secure-transac-contracts 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/contracts/AccessControl.json +4579 -0
- package/build/contracts/Context.json +356 -0
- package/build/contracts/CreditSystem.json +6037 -0
- package/build/contracts/ECDSA.json +4734 -0
- package/build/contracts/EIP712.json +3021 -0
- package/build/contracts/ERC165.json +352 -0
- package/build/contracts/ERC20.json +6816 -0
- package/build/contracts/ERC20Permit.json +2658 -0
- package/build/contracts/ERC721.json +12779 -0
- package/build/contracts/ERC721Utils.json +1058 -0
- package/build/contracts/Groth16Verifier.json +6298 -0
- package/build/contracts/Guardian.json +1116 -0
- package/build/contracts/IERC1155Errors.json +1687 -0
- package/build/contracts/IERC165.json +197 -0
- package/build/contracts/IERC20.json +1162 -0
- package/build/contracts/IERC20Errors.json +1662 -0
- package/build/contracts/IERC20Metadata.json +574 -0
- package/build/contracts/IERC20Permit.json +546 -0
- package/build/contracts/IERC5267.json +392 -0
- package/build/contracts/IERC721.json +1729 -0
- package/build/contracts/IERC721Errors.json +1694 -0
- package/build/contracts/IERC721Metadata.json +728 -0
- package/build/contracts/IERC721Receiver.json +296 -0
- package/build/contracts/IGuardian.json +215 -0
- package/build/contracts/ITrustRegistry.json +6767 -0
- package/build/contracts/IdentityVault.json +11584 -0
- package/build/contracts/Math.json +23115 -0
- package/build/contracts/MessageHashUtils.json +1668 -0
- package/build/contracts/Nonces.json +865 -0
- package/build/contracts/Ownable.json +1859 -0
- package/build/contracts/Panic.json +798 -0
- package/build/contracts/ReportingSystem.json +2787 -0
- package/build/contracts/SafeCast.json +21592 -0
- package/build/contracts/ScoringSystem.json +11245 -0
- package/build/contracts/SecureTransacSBT.json +18823 -0
- package/build/contracts/SecureTransacToken.json +19225 -0
- package/build/contracts/SecureVault.json +12890 -0
- package/build/contracts/ShortStrings.json +2852 -0
- package/build/contracts/SignedMath.json +1915 -0
- package/build/contracts/StorageSlot.json +1773 -0
- package/build/contracts/Strings.json +19001 -0
- package/build/contracts/TransactionLogger.json +5325 -0
- package/build/contracts/TrustDAO.json +23850 -0
- package/build/contracts/TrustRegistry.json +10948 -0
- package/build/contracts/VerificationRegistry.json +12811 -0
- package/build/contracts/ZKIdentityVerifier.json +13979 -0
- package/contracts/AccessControl.sol +34 -0
- package/contracts/CreditSystem.sol +48 -0
- package/contracts/Guardian.sol +33 -0
- package/contracts/IGuardian.sol +7 -0
- package/contracts/IdentityVault.sol +57 -0
- package/contracts/ReportingSystem.sol +14 -0
- package/contracts/ScoringSystem.sol +71 -0
- package/contracts/SecureTransacSBT.sol +72 -0
- package/contracts/SecureTransacToken.sol +20 -0
- package/contracts/SecureVault.sol +24 -0
- package/contracts/TransactionLogger.sol +12 -0
- package/contracts/TrustDAO.sol +158 -0
- package/contracts/TrustRegistry.sol +23 -0
- package/contracts/VerificationRegistry.sol +51 -0
- package/contracts/ZKIdentityVerifier.sol +38 -0
- package/contracts/ZKScoreVerifier.sol +175 -0
- package/package.json +32 -0
|
@@ -0,0 +1,1668 @@
|
|
|
1
|
+
{
|
|
2
|
+
"contractName": "MessageHashUtils",
|
|
3
|
+
"abi": [],
|
|
4
|
+
"metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing. The library provides methods for generating a hash of a message that conforms to the https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712] specifications.\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":\"MessageHashUtils\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Panic.sol\":{\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://c6a5ff4f9fd8649b7ee20800b7fa387d3465bd77cf20c2d1068cd5c98e1ed57a\",\"dweb:/ipfs/QmVSaVJf9FXFhdYEYeCEfjMVHrxDh5qL4CGkxdMWpQCrqG\"]},\"@openzeppelin/contracts/utils/Strings.sol\":{\"keccak256\":\"0xad148d59f05165f9217d0a9e1ac8f772abb02ea6aaad8a756315c532bf79f9f4\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://15e3599867c2182f5831e9268b274b2ef2047825837df6b4d81c9e89254b093e\",\"dweb:/ipfs/QmZbL7XAYr5RmaNaooPgZRmcDXaudfsYQfYD9y5iAECvpS\"]},\"@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol\":{\"keccak256\":\"0x26670fef37d4adf55570ba78815eec5f31cb017e708f61886add4fc4da665631\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b16d45febff462bafd8a5669f904796a835baf607df58a8461916d3bf4f08c59\",\"dweb:/ipfs/QmU2eJFpjmT4vxeJWJyLeQb8Xht1kdB8Y6MKLDPFA9WPux\"]},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"keccak256\":\"0x1225214420c83ebcca88f2ae2b50f053aaa7df7bd684c3e878d334627f2edfc6\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://6c5fab4970634f9ab9a620983dc1c8a30153981a0b1a521666e269d0a11399d3\",\"dweb:/ipfs/QmVRnBC575MESGkEHndjujtR7qub2FzU9RWy9eKLp4hPZB\"]},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://b1d578337048cad08c1c03041cca5978eff5428aa130c781b271ad9e5566e1f8\",\"dweb:/ipfs/QmPFKL2r9CBsMwmUqqdcFPfHZB2qcs9g1HDrPxzWSxomvy\"]},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"keccak256\":\"0xb1970fac7b64e6c09611e6691791e848d5e3fe410fa5899e7df2e0afd77a99e3\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://db5fbb3dddd8b7047465b62575d96231ba8a2774d37fb4737fbf23340fabbb03\",\"dweb:/ipfs/QmVUSvooZKEdEdap619tcJjTLcAuH6QBdZqAzWwnAXZAWJ\"]}},\"version\":1}",
|
|
5
|
+
"bytecode": "0x6055604b600b8282823980515f1a607314603f577f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea2646970667358221220c7fc62a62f8dd1a272eefcf28033a7848e2c14683252360c9f19b4ae6411817c64736f6c63430008150033",
|
|
6
|
+
"deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f80fdfea2646970667358221220c7fc62a62f8dd1a272eefcf28033a7848e2c14683252360c9f19b4ae6411817c64736f6c63430008150033",
|
|
7
|
+
"immutableReferences": {},
|
|
8
|
+
"generatedSources": [],
|
|
9
|
+
"deployedGeneratedSources": [],
|
|
10
|
+
"sourceMap": "521:3729:21:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
|
|
11
|
+
"deployedSourceMap": "521:3729:21:-:0;;;;;;;;",
|
|
12
|
+
"source": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.3.0) (utils/cryptography/MessageHashUtils.sol)\n\npragma solidity ^0.8.20;\n\nimport {Strings} from \"../Strings.sol\";\n\n/**\n * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n *\n * The library provides methods for generating a hash of a message that conforms to the\n * https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n * specifications.\n */\nlibrary MessageHashUtils {\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing a bytes32 `messageHash` with\n * `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n * keccak256, although any bytes32 value can be safely used because the final digest will\n * be re-hashed.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n mstore(0x00, \"\\x19Ethereum Signed Message:\\n32\") // 32 is the bytes-length of messageHash\n mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix\n digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x45` (`personal_sign` messages).\n *\n * The digest is calculated by prefixing an arbitrary `message` with\n * `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n * hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n *\n * See {ECDSA-recover}.\n */\n function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) {\n return\n keccak256(bytes.concat(\"\\x19Ethereum Signed Message:\\n\", bytes(Strings.toString(message.length)), message));\n }\n\n /**\n * @dev Returns the keccak256 digest of an ERC-191 signed data with version\n * `0x00` (data with intended validator).\n *\n * The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n * `validator` address. Then hashing the result.\n *\n * See {ECDSA-recover}.\n */\n function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) {\n return keccak256(abi.encodePacked(hex\"19_00\", validator, data));\n }\n\n /**\n * @dev Variant of {toDataWithIntendedValidatorHash-address-bytes} optimized for cases where `data` is a bytes32.\n */\n function toDataWithIntendedValidatorHash(\n address validator,\n bytes32 messageHash\n ) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n mstore(0x00, hex\"19_00\")\n mstore(0x02, shl(96, validator))\n mstore(0x16, messageHash)\n digest := keccak256(0x00, 0x36)\n }\n }\n\n /**\n * @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`).\n *\n * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n * `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n *\n * See {ECDSA-recover}.\n */\n function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) {\n assembly (\"memory-safe\") {\n let ptr := mload(0x40)\n mstore(ptr, hex\"19_01\")\n mstore(add(ptr, 0x02), domainSeparator)\n mstore(add(ptr, 0x22), structHash)\n digest := keccak256(ptr, 0x42)\n }\n }\n}\n",
|
|
13
|
+
"sourcePath": "@openzeppelin\\contracts\\utils\\cryptography\\MessageHashUtils.sol",
|
|
14
|
+
"ast": {
|
|
15
|
+
"absolutePath": "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol",
|
|
16
|
+
"exportedSymbols": {
|
|
17
|
+
"MessageHashUtils": [
|
|
18
|
+
4869
|
|
19
|
+
],
|
|
20
|
+
"Strings": [
|
|
21
|
+
4208
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"id": 4870,
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"nodeType": "SourceUnit",
|
|
27
|
+
"nodes": [
|
|
28
|
+
{
|
|
29
|
+
"id": 4785,
|
|
30
|
+
"literals": [
|
|
31
|
+
"solidity",
|
|
32
|
+
"^",
|
|
33
|
+
"0.8",
|
|
34
|
+
".20"
|
|
35
|
+
],
|
|
36
|
+
"nodeType": "PragmaDirective",
|
|
37
|
+
"src": "123:24:21"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"absolutePath": "@openzeppelin/contracts/utils/Strings.sol",
|
|
41
|
+
"file": "../Strings.sol",
|
|
42
|
+
"id": 4787,
|
|
43
|
+
"nameLocation": "-1:-1:-1",
|
|
44
|
+
"nodeType": "ImportDirective",
|
|
45
|
+
"scope": 4870,
|
|
46
|
+
"sourceUnit": 4209,
|
|
47
|
+
"src": "149:39:21",
|
|
48
|
+
"symbolAliases": [
|
|
49
|
+
{
|
|
50
|
+
"foreign": {
|
|
51
|
+
"id": 4786,
|
|
52
|
+
"name": "Strings",
|
|
53
|
+
"nodeType": "Identifier",
|
|
54
|
+
"overloadedDeclarations": [],
|
|
55
|
+
"referencedDeclaration": 4208,
|
|
56
|
+
"src": "157:7:21",
|
|
57
|
+
"typeDescriptions": {}
|
|
58
|
+
},
|
|
59
|
+
"nameLocation": "-1:-1:-1"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
"unitAlias": ""
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"abstract": false,
|
|
66
|
+
"baseContracts": [],
|
|
67
|
+
"canonicalName": "MessageHashUtils",
|
|
68
|
+
"contractDependencies": [],
|
|
69
|
+
"contractKind": "library",
|
|
70
|
+
"documentation": {
|
|
71
|
+
"id": 4788,
|
|
72
|
+
"nodeType": "StructuredDocumentation",
|
|
73
|
+
"src": "190:330:21",
|
|
74
|
+
"text": " @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing.\n The library provides methods for generating a hash of a message that conforms to the\n https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712]\n specifications."
|
|
75
|
+
},
|
|
76
|
+
"fullyImplemented": true,
|
|
77
|
+
"id": 4869,
|
|
78
|
+
"linearizedBaseContracts": [
|
|
79
|
+
4869
|
|
80
|
+
],
|
|
81
|
+
"name": "MessageHashUtils",
|
|
82
|
+
"nameLocation": "529:16:21",
|
|
83
|
+
"nodeType": "ContractDefinition",
|
|
84
|
+
"nodes": [
|
|
85
|
+
{
|
|
86
|
+
"body": {
|
|
87
|
+
"id": 4797,
|
|
88
|
+
"nodeType": "Block",
|
|
89
|
+
"src": "1339:341:21",
|
|
90
|
+
"statements": [
|
|
91
|
+
{
|
|
92
|
+
"AST": {
|
|
93
|
+
"nativeSrc": "1374:300:21",
|
|
94
|
+
"nodeType": "YulBlock",
|
|
95
|
+
"src": "1374:300:21",
|
|
96
|
+
"statements": [
|
|
97
|
+
{
|
|
98
|
+
"expression": {
|
|
99
|
+
"arguments": [
|
|
100
|
+
{
|
|
101
|
+
"kind": "number",
|
|
102
|
+
"nativeSrc": "1395:4:21",
|
|
103
|
+
"nodeType": "YulLiteral",
|
|
104
|
+
"src": "1395:4:21",
|
|
105
|
+
"type": "",
|
|
106
|
+
"value": "0x00"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"hexValue": "19457468657265756d205369676e6564204d6573736167653a0a3332",
|
|
110
|
+
"kind": "string",
|
|
111
|
+
"nativeSrc": "1401:34:21",
|
|
112
|
+
"nodeType": "YulLiteral",
|
|
113
|
+
"src": "1401:34:21",
|
|
114
|
+
"type": "",
|
|
115
|
+
"value": "\u0019Ethereum Signed Message:\n32"
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
"functionName": {
|
|
119
|
+
"name": "mstore",
|
|
120
|
+
"nativeSrc": "1388:6:21",
|
|
121
|
+
"nodeType": "YulIdentifier",
|
|
122
|
+
"src": "1388:6:21"
|
|
123
|
+
},
|
|
124
|
+
"nativeSrc": "1388:48:21",
|
|
125
|
+
"nodeType": "YulFunctionCall",
|
|
126
|
+
"src": "1388:48:21"
|
|
127
|
+
},
|
|
128
|
+
"nativeSrc": "1388:48:21",
|
|
129
|
+
"nodeType": "YulExpressionStatement",
|
|
130
|
+
"src": "1388:48:21"
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"expression": {
|
|
134
|
+
"arguments": [
|
|
135
|
+
{
|
|
136
|
+
"kind": "number",
|
|
137
|
+
"nativeSrc": "1497:4:21",
|
|
138
|
+
"nodeType": "YulLiteral",
|
|
139
|
+
"src": "1497:4:21",
|
|
140
|
+
"type": "",
|
|
141
|
+
"value": "0x1c"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"name": "messageHash",
|
|
145
|
+
"nativeSrc": "1503:11:21",
|
|
146
|
+
"nodeType": "YulIdentifier",
|
|
147
|
+
"src": "1503:11:21"
|
|
148
|
+
}
|
|
149
|
+
],
|
|
150
|
+
"functionName": {
|
|
151
|
+
"name": "mstore",
|
|
152
|
+
"nativeSrc": "1490:6:21",
|
|
153
|
+
"nodeType": "YulIdentifier",
|
|
154
|
+
"src": "1490:6:21"
|
|
155
|
+
},
|
|
156
|
+
"nativeSrc": "1490:25:21",
|
|
157
|
+
"nodeType": "YulFunctionCall",
|
|
158
|
+
"src": "1490:25:21"
|
|
159
|
+
},
|
|
160
|
+
"nativeSrc": "1490:25:21",
|
|
161
|
+
"nodeType": "YulExpressionStatement",
|
|
162
|
+
"src": "1490:25:21"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"nativeSrc": "1569:31:21",
|
|
166
|
+
"nodeType": "YulAssignment",
|
|
167
|
+
"src": "1569:31:21",
|
|
168
|
+
"value": {
|
|
169
|
+
"arguments": [
|
|
170
|
+
{
|
|
171
|
+
"kind": "number",
|
|
172
|
+
"nativeSrc": "1589:4:21",
|
|
173
|
+
"nodeType": "YulLiteral",
|
|
174
|
+
"src": "1589:4:21",
|
|
175
|
+
"type": "",
|
|
176
|
+
"value": "0x00"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"kind": "number",
|
|
180
|
+
"nativeSrc": "1595:4:21",
|
|
181
|
+
"nodeType": "YulLiteral",
|
|
182
|
+
"src": "1595:4:21",
|
|
183
|
+
"type": "",
|
|
184
|
+
"value": "0x3c"
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
"functionName": {
|
|
188
|
+
"name": "keccak256",
|
|
189
|
+
"nativeSrc": "1579:9:21",
|
|
190
|
+
"nodeType": "YulIdentifier",
|
|
191
|
+
"src": "1579:9:21"
|
|
192
|
+
},
|
|
193
|
+
"nativeSrc": "1579:21:21",
|
|
194
|
+
"nodeType": "YulFunctionCall",
|
|
195
|
+
"src": "1579:21:21"
|
|
196
|
+
},
|
|
197
|
+
"variableNames": [
|
|
198
|
+
{
|
|
199
|
+
"name": "digest",
|
|
200
|
+
"nativeSrc": "1569:6:21",
|
|
201
|
+
"nodeType": "YulIdentifier",
|
|
202
|
+
"src": "1569:6:21"
|
|
203
|
+
}
|
|
204
|
+
]
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
},
|
|
208
|
+
"evmVersion": "shanghai",
|
|
209
|
+
"externalReferences": [
|
|
210
|
+
{
|
|
211
|
+
"declaration": 4794,
|
|
212
|
+
"isOffset": false,
|
|
213
|
+
"isSlot": false,
|
|
214
|
+
"src": "1569:6:21",
|
|
215
|
+
"valueSize": 1
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"declaration": 4791,
|
|
219
|
+
"isOffset": false,
|
|
220
|
+
"isSlot": false,
|
|
221
|
+
"src": "1503:11:21",
|
|
222
|
+
"valueSize": 1
|
|
223
|
+
}
|
|
224
|
+
],
|
|
225
|
+
"flags": [
|
|
226
|
+
"memory-safe"
|
|
227
|
+
],
|
|
228
|
+
"id": 4796,
|
|
229
|
+
"nodeType": "InlineAssembly",
|
|
230
|
+
"src": "1349:325:21"
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
"documentation": {
|
|
235
|
+
"id": 4789,
|
|
236
|
+
"nodeType": "StructuredDocumentation",
|
|
237
|
+
"src": "552:690:21",
|
|
238
|
+
"text": " @dev Returns the keccak256 digest of an ERC-191 signed data with version\n `0x45` (`personal_sign` messages).\n The digest is calculated by prefixing a bytes32 `messageHash` with\n `\"\\x19Ethereum Signed Message:\\n32\"` and hashing the result. It corresponds with the\n hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with\n keccak256, although any bytes32 value can be safely used because the final digest will\n be re-hashed.\n See {ECDSA-recover}."
|
|
239
|
+
},
|
|
240
|
+
"id": 4798,
|
|
241
|
+
"implemented": true,
|
|
242
|
+
"kind": "function",
|
|
243
|
+
"modifiers": [],
|
|
244
|
+
"name": "toEthSignedMessageHash",
|
|
245
|
+
"nameLocation": "1256:22:21",
|
|
246
|
+
"nodeType": "FunctionDefinition",
|
|
247
|
+
"parameters": {
|
|
248
|
+
"id": 4792,
|
|
249
|
+
"nodeType": "ParameterList",
|
|
250
|
+
"parameters": [
|
|
251
|
+
{
|
|
252
|
+
"constant": false,
|
|
253
|
+
"id": 4791,
|
|
254
|
+
"mutability": "mutable",
|
|
255
|
+
"name": "messageHash",
|
|
256
|
+
"nameLocation": "1287:11:21",
|
|
257
|
+
"nodeType": "VariableDeclaration",
|
|
258
|
+
"scope": 4798,
|
|
259
|
+
"src": "1279:19:21",
|
|
260
|
+
"stateVariable": false,
|
|
261
|
+
"storageLocation": "default",
|
|
262
|
+
"typeDescriptions": {
|
|
263
|
+
"typeIdentifier": "t_bytes32",
|
|
264
|
+
"typeString": "bytes32"
|
|
265
|
+
},
|
|
266
|
+
"typeName": {
|
|
267
|
+
"id": 4790,
|
|
268
|
+
"name": "bytes32",
|
|
269
|
+
"nodeType": "ElementaryTypeName",
|
|
270
|
+
"src": "1279:7:21",
|
|
271
|
+
"typeDescriptions": {
|
|
272
|
+
"typeIdentifier": "t_bytes32",
|
|
273
|
+
"typeString": "bytes32"
|
|
274
|
+
}
|
|
275
|
+
},
|
|
276
|
+
"visibility": "internal"
|
|
277
|
+
}
|
|
278
|
+
],
|
|
279
|
+
"src": "1278:21:21"
|
|
280
|
+
},
|
|
281
|
+
"returnParameters": {
|
|
282
|
+
"id": 4795,
|
|
283
|
+
"nodeType": "ParameterList",
|
|
284
|
+
"parameters": [
|
|
285
|
+
{
|
|
286
|
+
"constant": false,
|
|
287
|
+
"id": 4794,
|
|
288
|
+
"mutability": "mutable",
|
|
289
|
+
"name": "digest",
|
|
290
|
+
"nameLocation": "1331:6:21",
|
|
291
|
+
"nodeType": "VariableDeclaration",
|
|
292
|
+
"scope": 4798,
|
|
293
|
+
"src": "1323:14:21",
|
|
294
|
+
"stateVariable": false,
|
|
295
|
+
"storageLocation": "default",
|
|
296
|
+
"typeDescriptions": {
|
|
297
|
+
"typeIdentifier": "t_bytes32",
|
|
298
|
+
"typeString": "bytes32"
|
|
299
|
+
},
|
|
300
|
+
"typeName": {
|
|
301
|
+
"id": 4793,
|
|
302
|
+
"name": "bytes32",
|
|
303
|
+
"nodeType": "ElementaryTypeName",
|
|
304
|
+
"src": "1323:7:21",
|
|
305
|
+
"typeDescriptions": {
|
|
306
|
+
"typeIdentifier": "t_bytes32",
|
|
307
|
+
"typeString": "bytes32"
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"visibility": "internal"
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
"src": "1322:16:21"
|
|
314
|
+
},
|
|
315
|
+
"scope": 4869,
|
|
316
|
+
"src": "1247:433:21",
|
|
317
|
+
"stateMutability": "pure",
|
|
318
|
+
"virtual": false,
|
|
319
|
+
"visibility": "internal"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"body": {
|
|
323
|
+
"id": 4823,
|
|
324
|
+
"nodeType": "Block",
|
|
325
|
+
"src": "2257:143:21",
|
|
326
|
+
"statements": [
|
|
327
|
+
{
|
|
328
|
+
"expression": {
|
|
329
|
+
"arguments": [
|
|
330
|
+
{
|
|
331
|
+
"arguments": [
|
|
332
|
+
{
|
|
333
|
+
"hexValue": "19457468657265756d205369676e6564204d6573736167653a0a",
|
|
334
|
+
"id": 4810,
|
|
335
|
+
"isConstant": false,
|
|
336
|
+
"isLValue": false,
|
|
337
|
+
"isPure": true,
|
|
338
|
+
"kind": "string",
|
|
339
|
+
"lValueRequested": false,
|
|
340
|
+
"nodeType": "Literal",
|
|
341
|
+
"src": "2309:32:21",
|
|
342
|
+
"typeDescriptions": {
|
|
343
|
+
"typeIdentifier": "t_stringliteral_9af2d9c228f6cfddaa6d1e5b94e0bce4ab16bd9a472a2b7fbfd74ebff4c720b4",
|
|
344
|
+
"typeString": "literal_string hex\"19457468657265756d205369676e6564204d6573736167653a0a\""
|
|
345
|
+
},
|
|
346
|
+
"value": "\u0019Ethereum Signed Message:\n"
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"arguments": [
|
|
350
|
+
{
|
|
351
|
+
"arguments": [
|
|
352
|
+
{
|
|
353
|
+
"expression": {
|
|
354
|
+
"id": 4815,
|
|
355
|
+
"name": "message",
|
|
356
|
+
"nodeType": "Identifier",
|
|
357
|
+
"overloadedDeclarations": [],
|
|
358
|
+
"referencedDeclaration": 4801,
|
|
359
|
+
"src": "2366:7:21",
|
|
360
|
+
"typeDescriptions": {
|
|
361
|
+
"typeIdentifier": "t_bytes_memory_ptr",
|
|
362
|
+
"typeString": "bytes memory"
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
"id": 4816,
|
|
366
|
+
"isConstant": false,
|
|
367
|
+
"isLValue": false,
|
|
368
|
+
"isPure": false,
|
|
369
|
+
"lValueRequested": false,
|
|
370
|
+
"memberLocation": "2374:6:21",
|
|
371
|
+
"memberName": "length",
|
|
372
|
+
"nodeType": "MemberAccess",
|
|
373
|
+
"src": "2366:14:21",
|
|
374
|
+
"typeDescriptions": {
|
|
375
|
+
"typeIdentifier": "t_uint256",
|
|
376
|
+
"typeString": "uint256"
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
],
|
|
380
|
+
"expression": {
|
|
381
|
+
"argumentTypes": [
|
|
382
|
+
{
|
|
383
|
+
"typeIdentifier": "t_uint256",
|
|
384
|
+
"typeString": "uint256"
|
|
385
|
+
}
|
|
386
|
+
],
|
|
387
|
+
"expression": {
|
|
388
|
+
"id": 4813,
|
|
389
|
+
"name": "Strings",
|
|
390
|
+
"nodeType": "Identifier",
|
|
391
|
+
"overloadedDeclarations": [],
|
|
392
|
+
"referencedDeclaration": 4208,
|
|
393
|
+
"src": "2349:7:21",
|
|
394
|
+
"typeDescriptions": {
|
|
395
|
+
"typeIdentifier": "t_type$_t_contract$_Strings_$4208_$",
|
|
396
|
+
"typeString": "type(library Strings)"
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
"id": 4814,
|
|
400
|
+
"isConstant": false,
|
|
401
|
+
"isLValue": false,
|
|
402
|
+
"isPure": false,
|
|
403
|
+
"lValueRequested": false,
|
|
404
|
+
"memberLocation": "2357:8:21",
|
|
405
|
+
"memberName": "toString",
|
|
406
|
+
"nodeType": "MemberAccess",
|
|
407
|
+
"referencedDeclaration": 2920,
|
|
408
|
+
"src": "2349:16:21",
|
|
409
|
+
"typeDescriptions": {
|
|
410
|
+
"typeIdentifier": "t_function_internal_pure$_t_uint256_$returns$_t_string_memory_ptr_$",
|
|
411
|
+
"typeString": "function (uint256) pure returns (string memory)"
|
|
412
|
+
}
|
|
413
|
+
},
|
|
414
|
+
"id": 4817,
|
|
415
|
+
"isConstant": false,
|
|
416
|
+
"isLValue": false,
|
|
417
|
+
"isPure": false,
|
|
418
|
+
"kind": "functionCall",
|
|
419
|
+
"lValueRequested": false,
|
|
420
|
+
"nameLocations": [],
|
|
421
|
+
"names": [],
|
|
422
|
+
"nodeType": "FunctionCall",
|
|
423
|
+
"src": "2349:32:21",
|
|
424
|
+
"tryCall": false,
|
|
425
|
+
"typeDescriptions": {
|
|
426
|
+
"typeIdentifier": "t_string_memory_ptr",
|
|
427
|
+
"typeString": "string memory"
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
],
|
|
431
|
+
"expression": {
|
|
432
|
+
"argumentTypes": [
|
|
433
|
+
{
|
|
434
|
+
"typeIdentifier": "t_string_memory_ptr",
|
|
435
|
+
"typeString": "string memory"
|
|
436
|
+
}
|
|
437
|
+
],
|
|
438
|
+
"id": 4812,
|
|
439
|
+
"isConstant": false,
|
|
440
|
+
"isLValue": false,
|
|
441
|
+
"isPure": true,
|
|
442
|
+
"lValueRequested": false,
|
|
443
|
+
"nodeType": "ElementaryTypeNameExpression",
|
|
444
|
+
"src": "2343:5:21",
|
|
445
|
+
"typeDescriptions": {
|
|
446
|
+
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
|
|
447
|
+
"typeString": "type(bytes storage pointer)"
|
|
448
|
+
},
|
|
449
|
+
"typeName": {
|
|
450
|
+
"id": 4811,
|
|
451
|
+
"name": "bytes",
|
|
452
|
+
"nodeType": "ElementaryTypeName",
|
|
453
|
+
"src": "2343:5:21",
|
|
454
|
+
"typeDescriptions": {}
|
|
455
|
+
}
|
|
456
|
+
},
|
|
457
|
+
"id": 4818,
|
|
458
|
+
"isConstant": false,
|
|
459
|
+
"isLValue": false,
|
|
460
|
+
"isPure": false,
|
|
461
|
+
"kind": "typeConversion",
|
|
462
|
+
"lValueRequested": false,
|
|
463
|
+
"nameLocations": [],
|
|
464
|
+
"names": [],
|
|
465
|
+
"nodeType": "FunctionCall",
|
|
466
|
+
"src": "2343:39:21",
|
|
467
|
+
"tryCall": false,
|
|
468
|
+
"typeDescriptions": {
|
|
469
|
+
"typeIdentifier": "t_bytes_memory_ptr",
|
|
470
|
+
"typeString": "bytes memory"
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
"id": 4819,
|
|
475
|
+
"name": "message",
|
|
476
|
+
"nodeType": "Identifier",
|
|
477
|
+
"overloadedDeclarations": [],
|
|
478
|
+
"referencedDeclaration": 4801,
|
|
479
|
+
"src": "2384:7:21",
|
|
480
|
+
"typeDescriptions": {
|
|
481
|
+
"typeIdentifier": "t_bytes_memory_ptr",
|
|
482
|
+
"typeString": "bytes memory"
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
],
|
|
486
|
+
"expression": {
|
|
487
|
+
"argumentTypes": [
|
|
488
|
+
{
|
|
489
|
+
"typeIdentifier": "t_stringliteral_9af2d9c228f6cfddaa6d1e5b94e0bce4ab16bd9a472a2b7fbfd74ebff4c720b4",
|
|
490
|
+
"typeString": "literal_string hex\"19457468657265756d205369676e6564204d6573736167653a0a\""
|
|
491
|
+
},
|
|
492
|
+
{
|
|
493
|
+
"typeIdentifier": "t_bytes_memory_ptr",
|
|
494
|
+
"typeString": "bytes memory"
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
"typeIdentifier": "t_bytes_memory_ptr",
|
|
498
|
+
"typeString": "bytes memory"
|
|
499
|
+
}
|
|
500
|
+
],
|
|
501
|
+
"expression": {
|
|
502
|
+
"id": 4808,
|
|
503
|
+
"isConstant": false,
|
|
504
|
+
"isLValue": false,
|
|
505
|
+
"isPure": true,
|
|
506
|
+
"lValueRequested": false,
|
|
507
|
+
"nodeType": "ElementaryTypeNameExpression",
|
|
508
|
+
"src": "2296:5:21",
|
|
509
|
+
"typeDescriptions": {
|
|
510
|
+
"typeIdentifier": "t_type$_t_bytes_storage_ptr_$",
|
|
511
|
+
"typeString": "type(bytes storage pointer)"
|
|
512
|
+
},
|
|
513
|
+
"typeName": {
|
|
514
|
+
"id": 4807,
|
|
515
|
+
"name": "bytes",
|
|
516
|
+
"nodeType": "ElementaryTypeName",
|
|
517
|
+
"src": "2296:5:21",
|
|
518
|
+
"typeDescriptions": {}
|
|
519
|
+
}
|
|
520
|
+
},
|
|
521
|
+
"id": 4809,
|
|
522
|
+
"isConstant": false,
|
|
523
|
+
"isLValue": false,
|
|
524
|
+
"isPure": false,
|
|
525
|
+
"lValueRequested": false,
|
|
526
|
+
"memberLocation": "2302:6:21",
|
|
527
|
+
"memberName": "concat",
|
|
528
|
+
"nodeType": "MemberAccess",
|
|
529
|
+
"src": "2296:12:21",
|
|
530
|
+
"typeDescriptions": {
|
|
531
|
+
"typeIdentifier": "t_function_bytesconcat_pure$__$returns$_t_bytes_memory_ptr_$",
|
|
532
|
+
"typeString": "function () pure returns (bytes memory)"
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
"id": 4820,
|
|
536
|
+
"isConstant": false,
|
|
537
|
+
"isLValue": false,
|
|
538
|
+
"isPure": false,
|
|
539
|
+
"kind": "functionCall",
|
|
540
|
+
"lValueRequested": false,
|
|
541
|
+
"nameLocations": [],
|
|
542
|
+
"names": [],
|
|
543
|
+
"nodeType": "FunctionCall",
|
|
544
|
+
"src": "2296:96:21",
|
|
545
|
+
"tryCall": false,
|
|
546
|
+
"typeDescriptions": {
|
|
547
|
+
"typeIdentifier": "t_bytes_memory_ptr",
|
|
548
|
+
"typeString": "bytes memory"
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
],
|
|
552
|
+
"expression": {
|
|
553
|
+
"argumentTypes": [
|
|
554
|
+
{
|
|
555
|
+
"typeIdentifier": "t_bytes_memory_ptr",
|
|
556
|
+
"typeString": "bytes memory"
|
|
557
|
+
}
|
|
558
|
+
],
|
|
559
|
+
"id": 4806,
|
|
560
|
+
"name": "keccak256",
|
|
561
|
+
"nodeType": "Identifier",
|
|
562
|
+
"overloadedDeclarations": [],
|
|
563
|
+
"referencedDeclaration": 4294967288,
|
|
564
|
+
"src": "2286:9:21",
|
|
565
|
+
"typeDescriptions": {
|
|
566
|
+
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
|
|
567
|
+
"typeString": "function (bytes memory) pure returns (bytes32)"
|
|
568
|
+
}
|
|
569
|
+
},
|
|
570
|
+
"id": 4821,
|
|
571
|
+
"isConstant": false,
|
|
572
|
+
"isLValue": false,
|
|
573
|
+
"isPure": false,
|
|
574
|
+
"kind": "functionCall",
|
|
575
|
+
"lValueRequested": false,
|
|
576
|
+
"nameLocations": [],
|
|
577
|
+
"names": [],
|
|
578
|
+
"nodeType": "FunctionCall",
|
|
579
|
+
"src": "2286:107:21",
|
|
580
|
+
"tryCall": false,
|
|
581
|
+
"typeDescriptions": {
|
|
582
|
+
"typeIdentifier": "t_bytes32",
|
|
583
|
+
"typeString": "bytes32"
|
|
584
|
+
}
|
|
585
|
+
},
|
|
586
|
+
"functionReturnParameters": 4805,
|
|
587
|
+
"id": 4822,
|
|
588
|
+
"nodeType": "Return",
|
|
589
|
+
"src": "2267:126:21"
|
|
590
|
+
}
|
|
591
|
+
]
|
|
592
|
+
},
|
|
593
|
+
"documentation": {
|
|
594
|
+
"id": 4799,
|
|
595
|
+
"nodeType": "StructuredDocumentation",
|
|
596
|
+
"src": "1686:480:21",
|
|
597
|
+
"text": " @dev Returns the keccak256 digest of an ERC-191 signed data with version\n `0x45` (`personal_sign` messages).\n The digest is calculated by prefixing an arbitrary `message` with\n `\"\\x19Ethereum Signed Message:\\n\" + len(message)` and hashing the result. It corresponds with the\n hash signed when using the https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_sign[`eth_sign`] JSON-RPC method.\n See {ECDSA-recover}."
|
|
598
|
+
},
|
|
599
|
+
"id": 4824,
|
|
600
|
+
"implemented": true,
|
|
601
|
+
"kind": "function",
|
|
602
|
+
"modifiers": [],
|
|
603
|
+
"name": "toEthSignedMessageHash",
|
|
604
|
+
"nameLocation": "2180:22:21",
|
|
605
|
+
"nodeType": "FunctionDefinition",
|
|
606
|
+
"parameters": {
|
|
607
|
+
"id": 4802,
|
|
608
|
+
"nodeType": "ParameterList",
|
|
609
|
+
"parameters": [
|
|
610
|
+
{
|
|
611
|
+
"constant": false,
|
|
612
|
+
"id": 4801,
|
|
613
|
+
"mutability": "mutable",
|
|
614
|
+
"name": "message",
|
|
615
|
+
"nameLocation": "2216:7:21",
|
|
616
|
+
"nodeType": "VariableDeclaration",
|
|
617
|
+
"scope": 4824,
|
|
618
|
+
"src": "2203:20:21",
|
|
619
|
+
"stateVariable": false,
|
|
620
|
+
"storageLocation": "memory",
|
|
621
|
+
"typeDescriptions": {
|
|
622
|
+
"typeIdentifier": "t_bytes_memory_ptr",
|
|
623
|
+
"typeString": "bytes"
|
|
624
|
+
},
|
|
625
|
+
"typeName": {
|
|
626
|
+
"id": 4800,
|
|
627
|
+
"name": "bytes",
|
|
628
|
+
"nodeType": "ElementaryTypeName",
|
|
629
|
+
"src": "2203:5:21",
|
|
630
|
+
"typeDescriptions": {
|
|
631
|
+
"typeIdentifier": "t_bytes_storage_ptr",
|
|
632
|
+
"typeString": "bytes"
|
|
633
|
+
}
|
|
634
|
+
},
|
|
635
|
+
"visibility": "internal"
|
|
636
|
+
}
|
|
637
|
+
],
|
|
638
|
+
"src": "2202:22:21"
|
|
639
|
+
},
|
|
640
|
+
"returnParameters": {
|
|
641
|
+
"id": 4805,
|
|
642
|
+
"nodeType": "ParameterList",
|
|
643
|
+
"parameters": [
|
|
644
|
+
{
|
|
645
|
+
"constant": false,
|
|
646
|
+
"id": 4804,
|
|
647
|
+
"mutability": "mutable",
|
|
648
|
+
"name": "",
|
|
649
|
+
"nameLocation": "-1:-1:-1",
|
|
650
|
+
"nodeType": "VariableDeclaration",
|
|
651
|
+
"scope": 4824,
|
|
652
|
+
"src": "2248:7:21",
|
|
653
|
+
"stateVariable": false,
|
|
654
|
+
"storageLocation": "default",
|
|
655
|
+
"typeDescriptions": {
|
|
656
|
+
"typeIdentifier": "t_bytes32",
|
|
657
|
+
"typeString": "bytes32"
|
|
658
|
+
},
|
|
659
|
+
"typeName": {
|
|
660
|
+
"id": 4803,
|
|
661
|
+
"name": "bytes32",
|
|
662
|
+
"nodeType": "ElementaryTypeName",
|
|
663
|
+
"src": "2248:7:21",
|
|
664
|
+
"typeDescriptions": {
|
|
665
|
+
"typeIdentifier": "t_bytes32",
|
|
666
|
+
"typeString": "bytes32"
|
|
667
|
+
}
|
|
668
|
+
},
|
|
669
|
+
"visibility": "internal"
|
|
670
|
+
}
|
|
671
|
+
],
|
|
672
|
+
"src": "2247:9:21"
|
|
673
|
+
},
|
|
674
|
+
"scope": 4869,
|
|
675
|
+
"src": "2171:229:21",
|
|
676
|
+
"stateMutability": "pure",
|
|
677
|
+
"virtual": false,
|
|
678
|
+
"visibility": "internal"
|
|
679
|
+
},
|
|
680
|
+
{
|
|
681
|
+
"body": {
|
|
682
|
+
"id": 4843,
|
|
683
|
+
"nodeType": "Block",
|
|
684
|
+
"src": "2854:80:21",
|
|
685
|
+
"statements": [
|
|
686
|
+
{
|
|
687
|
+
"expression": {
|
|
688
|
+
"arguments": [
|
|
689
|
+
{
|
|
690
|
+
"arguments": [
|
|
691
|
+
{
|
|
692
|
+
"hexValue": "1900",
|
|
693
|
+
"id": 4837,
|
|
694
|
+
"isConstant": false,
|
|
695
|
+
"isLValue": false,
|
|
696
|
+
"isPure": true,
|
|
697
|
+
"kind": "hexString",
|
|
698
|
+
"lValueRequested": false,
|
|
699
|
+
"nodeType": "Literal",
|
|
700
|
+
"src": "2898:10:21",
|
|
701
|
+
"typeDescriptions": {
|
|
702
|
+
"typeIdentifier": "t_stringliteral_73fd5d154550a4a103564cb191928cd38898034de1b952dc21b290898b4b697a",
|
|
703
|
+
"typeString": "literal_string hex\"1900\""
|
|
704
|
+
},
|
|
705
|
+
"value": "\u0019\u0000"
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
"id": 4838,
|
|
709
|
+
"name": "validator",
|
|
710
|
+
"nodeType": "Identifier",
|
|
711
|
+
"overloadedDeclarations": [],
|
|
712
|
+
"referencedDeclaration": 4827,
|
|
713
|
+
"src": "2910:9:21",
|
|
714
|
+
"typeDescriptions": {
|
|
715
|
+
"typeIdentifier": "t_address",
|
|
716
|
+
"typeString": "address"
|
|
717
|
+
}
|
|
718
|
+
},
|
|
719
|
+
{
|
|
720
|
+
"id": 4839,
|
|
721
|
+
"name": "data",
|
|
722
|
+
"nodeType": "Identifier",
|
|
723
|
+
"overloadedDeclarations": [],
|
|
724
|
+
"referencedDeclaration": 4829,
|
|
725
|
+
"src": "2921:4:21",
|
|
726
|
+
"typeDescriptions": {
|
|
727
|
+
"typeIdentifier": "t_bytes_memory_ptr",
|
|
728
|
+
"typeString": "bytes memory"
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
],
|
|
732
|
+
"expression": {
|
|
733
|
+
"argumentTypes": [
|
|
734
|
+
{
|
|
735
|
+
"typeIdentifier": "t_stringliteral_73fd5d154550a4a103564cb191928cd38898034de1b952dc21b290898b4b697a",
|
|
736
|
+
"typeString": "literal_string hex\"1900\""
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
"typeIdentifier": "t_address",
|
|
740
|
+
"typeString": "address"
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
"typeIdentifier": "t_bytes_memory_ptr",
|
|
744
|
+
"typeString": "bytes memory"
|
|
745
|
+
}
|
|
746
|
+
],
|
|
747
|
+
"expression": {
|
|
748
|
+
"id": 4835,
|
|
749
|
+
"name": "abi",
|
|
750
|
+
"nodeType": "Identifier",
|
|
751
|
+
"overloadedDeclarations": [],
|
|
752
|
+
"referencedDeclaration": 4294967295,
|
|
753
|
+
"src": "2881:3:21",
|
|
754
|
+
"typeDescriptions": {
|
|
755
|
+
"typeIdentifier": "t_magic_abi",
|
|
756
|
+
"typeString": "abi"
|
|
757
|
+
}
|
|
758
|
+
},
|
|
759
|
+
"id": 4836,
|
|
760
|
+
"isConstant": false,
|
|
761
|
+
"isLValue": false,
|
|
762
|
+
"isPure": true,
|
|
763
|
+
"lValueRequested": false,
|
|
764
|
+
"memberLocation": "2885:12:21",
|
|
765
|
+
"memberName": "encodePacked",
|
|
766
|
+
"nodeType": "MemberAccess",
|
|
767
|
+
"src": "2881:16:21",
|
|
768
|
+
"typeDescriptions": {
|
|
769
|
+
"typeIdentifier": "t_function_abiencodepacked_pure$__$returns$_t_bytes_memory_ptr_$",
|
|
770
|
+
"typeString": "function () pure returns (bytes memory)"
|
|
771
|
+
}
|
|
772
|
+
},
|
|
773
|
+
"id": 4840,
|
|
774
|
+
"isConstant": false,
|
|
775
|
+
"isLValue": false,
|
|
776
|
+
"isPure": false,
|
|
777
|
+
"kind": "functionCall",
|
|
778
|
+
"lValueRequested": false,
|
|
779
|
+
"nameLocations": [],
|
|
780
|
+
"names": [],
|
|
781
|
+
"nodeType": "FunctionCall",
|
|
782
|
+
"src": "2881:45:21",
|
|
783
|
+
"tryCall": false,
|
|
784
|
+
"typeDescriptions": {
|
|
785
|
+
"typeIdentifier": "t_bytes_memory_ptr",
|
|
786
|
+
"typeString": "bytes memory"
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
],
|
|
790
|
+
"expression": {
|
|
791
|
+
"argumentTypes": [
|
|
792
|
+
{
|
|
793
|
+
"typeIdentifier": "t_bytes_memory_ptr",
|
|
794
|
+
"typeString": "bytes memory"
|
|
795
|
+
}
|
|
796
|
+
],
|
|
797
|
+
"id": 4834,
|
|
798
|
+
"name": "keccak256",
|
|
799
|
+
"nodeType": "Identifier",
|
|
800
|
+
"overloadedDeclarations": [],
|
|
801
|
+
"referencedDeclaration": 4294967288,
|
|
802
|
+
"src": "2871:9:21",
|
|
803
|
+
"typeDescriptions": {
|
|
804
|
+
"typeIdentifier": "t_function_keccak256_pure$_t_bytes_memory_ptr_$returns$_t_bytes32_$",
|
|
805
|
+
"typeString": "function (bytes memory) pure returns (bytes32)"
|
|
806
|
+
}
|
|
807
|
+
},
|
|
808
|
+
"id": 4841,
|
|
809
|
+
"isConstant": false,
|
|
810
|
+
"isLValue": false,
|
|
811
|
+
"isPure": false,
|
|
812
|
+
"kind": "functionCall",
|
|
813
|
+
"lValueRequested": false,
|
|
814
|
+
"nameLocations": [],
|
|
815
|
+
"names": [],
|
|
816
|
+
"nodeType": "FunctionCall",
|
|
817
|
+
"src": "2871:56:21",
|
|
818
|
+
"tryCall": false,
|
|
819
|
+
"typeDescriptions": {
|
|
820
|
+
"typeIdentifier": "t_bytes32",
|
|
821
|
+
"typeString": "bytes32"
|
|
822
|
+
}
|
|
823
|
+
},
|
|
824
|
+
"functionReturnParameters": 4833,
|
|
825
|
+
"id": 4842,
|
|
826
|
+
"nodeType": "Return",
|
|
827
|
+
"src": "2864:63:21"
|
|
828
|
+
}
|
|
829
|
+
]
|
|
830
|
+
},
|
|
831
|
+
"documentation": {
|
|
832
|
+
"id": 4825,
|
|
833
|
+
"nodeType": "StructuredDocumentation",
|
|
834
|
+
"src": "2406:332:21",
|
|
835
|
+
"text": " @dev Returns the keccak256 digest of an ERC-191 signed data with version\n `0x00` (data with intended validator).\n The digest is calculated by prefixing an arbitrary `data` with `\"\\x19\\x00\"` and the intended\n `validator` address. Then hashing the result.\n See {ECDSA-recover}."
|
|
836
|
+
},
|
|
837
|
+
"id": 4844,
|
|
838
|
+
"implemented": true,
|
|
839
|
+
"kind": "function",
|
|
840
|
+
"modifiers": [],
|
|
841
|
+
"name": "toDataWithIntendedValidatorHash",
|
|
842
|
+
"nameLocation": "2752:31:21",
|
|
843
|
+
"nodeType": "FunctionDefinition",
|
|
844
|
+
"parameters": {
|
|
845
|
+
"id": 4830,
|
|
846
|
+
"nodeType": "ParameterList",
|
|
847
|
+
"parameters": [
|
|
848
|
+
{
|
|
849
|
+
"constant": false,
|
|
850
|
+
"id": 4827,
|
|
851
|
+
"mutability": "mutable",
|
|
852
|
+
"name": "validator",
|
|
853
|
+
"nameLocation": "2792:9:21",
|
|
854
|
+
"nodeType": "VariableDeclaration",
|
|
855
|
+
"scope": 4844,
|
|
856
|
+
"src": "2784:17:21",
|
|
857
|
+
"stateVariable": false,
|
|
858
|
+
"storageLocation": "default",
|
|
859
|
+
"typeDescriptions": {
|
|
860
|
+
"typeIdentifier": "t_address",
|
|
861
|
+
"typeString": "address"
|
|
862
|
+
},
|
|
863
|
+
"typeName": {
|
|
864
|
+
"id": 4826,
|
|
865
|
+
"name": "address",
|
|
866
|
+
"nodeType": "ElementaryTypeName",
|
|
867
|
+
"src": "2784:7:21",
|
|
868
|
+
"stateMutability": "nonpayable",
|
|
869
|
+
"typeDescriptions": {
|
|
870
|
+
"typeIdentifier": "t_address",
|
|
871
|
+
"typeString": "address"
|
|
872
|
+
}
|
|
873
|
+
},
|
|
874
|
+
"visibility": "internal"
|
|
875
|
+
},
|
|
876
|
+
{
|
|
877
|
+
"constant": false,
|
|
878
|
+
"id": 4829,
|
|
879
|
+
"mutability": "mutable",
|
|
880
|
+
"name": "data",
|
|
881
|
+
"nameLocation": "2816:4:21",
|
|
882
|
+
"nodeType": "VariableDeclaration",
|
|
883
|
+
"scope": 4844,
|
|
884
|
+
"src": "2803:17:21",
|
|
885
|
+
"stateVariable": false,
|
|
886
|
+
"storageLocation": "memory",
|
|
887
|
+
"typeDescriptions": {
|
|
888
|
+
"typeIdentifier": "t_bytes_memory_ptr",
|
|
889
|
+
"typeString": "bytes"
|
|
890
|
+
},
|
|
891
|
+
"typeName": {
|
|
892
|
+
"id": 4828,
|
|
893
|
+
"name": "bytes",
|
|
894
|
+
"nodeType": "ElementaryTypeName",
|
|
895
|
+
"src": "2803:5:21",
|
|
896
|
+
"typeDescriptions": {
|
|
897
|
+
"typeIdentifier": "t_bytes_storage_ptr",
|
|
898
|
+
"typeString": "bytes"
|
|
899
|
+
}
|
|
900
|
+
},
|
|
901
|
+
"visibility": "internal"
|
|
902
|
+
}
|
|
903
|
+
],
|
|
904
|
+
"src": "2783:38:21"
|
|
905
|
+
},
|
|
906
|
+
"returnParameters": {
|
|
907
|
+
"id": 4833,
|
|
908
|
+
"nodeType": "ParameterList",
|
|
909
|
+
"parameters": [
|
|
910
|
+
{
|
|
911
|
+
"constant": false,
|
|
912
|
+
"id": 4832,
|
|
913
|
+
"mutability": "mutable",
|
|
914
|
+
"name": "",
|
|
915
|
+
"nameLocation": "-1:-1:-1",
|
|
916
|
+
"nodeType": "VariableDeclaration",
|
|
917
|
+
"scope": 4844,
|
|
918
|
+
"src": "2845:7:21",
|
|
919
|
+
"stateVariable": false,
|
|
920
|
+
"storageLocation": "default",
|
|
921
|
+
"typeDescriptions": {
|
|
922
|
+
"typeIdentifier": "t_bytes32",
|
|
923
|
+
"typeString": "bytes32"
|
|
924
|
+
},
|
|
925
|
+
"typeName": {
|
|
926
|
+
"id": 4831,
|
|
927
|
+
"name": "bytes32",
|
|
928
|
+
"nodeType": "ElementaryTypeName",
|
|
929
|
+
"src": "2845:7:21",
|
|
930
|
+
"typeDescriptions": {
|
|
931
|
+
"typeIdentifier": "t_bytes32",
|
|
932
|
+
"typeString": "bytes32"
|
|
933
|
+
}
|
|
934
|
+
},
|
|
935
|
+
"visibility": "internal"
|
|
936
|
+
}
|
|
937
|
+
],
|
|
938
|
+
"src": "2844:9:21"
|
|
939
|
+
},
|
|
940
|
+
"scope": 4869,
|
|
941
|
+
"src": "2743:191:21",
|
|
942
|
+
"stateMutability": "pure",
|
|
943
|
+
"virtual": false,
|
|
944
|
+
"visibility": "internal"
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
"body": {
|
|
948
|
+
"id": 4855,
|
|
949
|
+
"nodeType": "Block",
|
|
950
|
+
"src": "3216:216:21",
|
|
951
|
+
"statements": [
|
|
952
|
+
{
|
|
953
|
+
"AST": {
|
|
954
|
+
"nativeSrc": "3251:175:21",
|
|
955
|
+
"nodeType": "YulBlock",
|
|
956
|
+
"src": "3251:175:21",
|
|
957
|
+
"statements": [
|
|
958
|
+
{
|
|
959
|
+
"expression": {
|
|
960
|
+
"arguments": [
|
|
961
|
+
{
|
|
962
|
+
"kind": "number",
|
|
963
|
+
"nativeSrc": "3272:4:21",
|
|
964
|
+
"nodeType": "YulLiteral",
|
|
965
|
+
"src": "3272:4:21",
|
|
966
|
+
"type": "",
|
|
967
|
+
"value": "0x00"
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
"hexValue": "1900",
|
|
971
|
+
"kind": "string",
|
|
972
|
+
"nativeSrc": "3278:10:21",
|
|
973
|
+
"nodeType": "YulLiteral",
|
|
974
|
+
"src": "3278:10:21",
|
|
975
|
+
"type": "",
|
|
976
|
+
"value": "\u0019\u0000"
|
|
977
|
+
}
|
|
978
|
+
],
|
|
979
|
+
"functionName": {
|
|
980
|
+
"name": "mstore",
|
|
981
|
+
"nativeSrc": "3265:6:21",
|
|
982
|
+
"nodeType": "YulIdentifier",
|
|
983
|
+
"src": "3265:6:21"
|
|
984
|
+
},
|
|
985
|
+
"nativeSrc": "3265:24:21",
|
|
986
|
+
"nodeType": "YulFunctionCall",
|
|
987
|
+
"src": "3265:24:21"
|
|
988
|
+
},
|
|
989
|
+
"nativeSrc": "3265:24:21",
|
|
990
|
+
"nodeType": "YulExpressionStatement",
|
|
991
|
+
"src": "3265:24:21"
|
|
992
|
+
},
|
|
993
|
+
{
|
|
994
|
+
"expression": {
|
|
995
|
+
"arguments": [
|
|
996
|
+
{
|
|
997
|
+
"kind": "number",
|
|
998
|
+
"nativeSrc": "3309:4:21",
|
|
999
|
+
"nodeType": "YulLiteral",
|
|
1000
|
+
"src": "3309:4:21",
|
|
1001
|
+
"type": "",
|
|
1002
|
+
"value": "0x02"
|
|
1003
|
+
},
|
|
1004
|
+
{
|
|
1005
|
+
"arguments": [
|
|
1006
|
+
{
|
|
1007
|
+
"kind": "number",
|
|
1008
|
+
"nativeSrc": "3319:2:21",
|
|
1009
|
+
"nodeType": "YulLiteral",
|
|
1010
|
+
"src": "3319:2:21",
|
|
1011
|
+
"type": "",
|
|
1012
|
+
"value": "96"
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
"name": "validator",
|
|
1016
|
+
"nativeSrc": "3323:9:21",
|
|
1017
|
+
"nodeType": "YulIdentifier",
|
|
1018
|
+
"src": "3323:9:21"
|
|
1019
|
+
}
|
|
1020
|
+
],
|
|
1021
|
+
"functionName": {
|
|
1022
|
+
"name": "shl",
|
|
1023
|
+
"nativeSrc": "3315:3:21",
|
|
1024
|
+
"nodeType": "YulIdentifier",
|
|
1025
|
+
"src": "3315:3:21"
|
|
1026
|
+
},
|
|
1027
|
+
"nativeSrc": "3315:18:21",
|
|
1028
|
+
"nodeType": "YulFunctionCall",
|
|
1029
|
+
"src": "3315:18:21"
|
|
1030
|
+
}
|
|
1031
|
+
],
|
|
1032
|
+
"functionName": {
|
|
1033
|
+
"name": "mstore",
|
|
1034
|
+
"nativeSrc": "3302:6:21",
|
|
1035
|
+
"nodeType": "YulIdentifier",
|
|
1036
|
+
"src": "3302:6:21"
|
|
1037
|
+
},
|
|
1038
|
+
"nativeSrc": "3302:32:21",
|
|
1039
|
+
"nodeType": "YulFunctionCall",
|
|
1040
|
+
"src": "3302:32:21"
|
|
1041
|
+
},
|
|
1042
|
+
"nativeSrc": "3302:32:21",
|
|
1043
|
+
"nodeType": "YulExpressionStatement",
|
|
1044
|
+
"src": "3302:32:21"
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
"expression": {
|
|
1048
|
+
"arguments": [
|
|
1049
|
+
{
|
|
1050
|
+
"kind": "number",
|
|
1051
|
+
"nativeSrc": "3354:4:21",
|
|
1052
|
+
"nodeType": "YulLiteral",
|
|
1053
|
+
"src": "3354:4:21",
|
|
1054
|
+
"type": "",
|
|
1055
|
+
"value": "0x16"
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
"name": "messageHash",
|
|
1059
|
+
"nativeSrc": "3360:11:21",
|
|
1060
|
+
"nodeType": "YulIdentifier",
|
|
1061
|
+
"src": "3360:11:21"
|
|
1062
|
+
}
|
|
1063
|
+
],
|
|
1064
|
+
"functionName": {
|
|
1065
|
+
"name": "mstore",
|
|
1066
|
+
"nativeSrc": "3347:6:21",
|
|
1067
|
+
"nodeType": "YulIdentifier",
|
|
1068
|
+
"src": "3347:6:21"
|
|
1069
|
+
},
|
|
1070
|
+
"nativeSrc": "3347:25:21",
|
|
1071
|
+
"nodeType": "YulFunctionCall",
|
|
1072
|
+
"src": "3347:25:21"
|
|
1073
|
+
},
|
|
1074
|
+
"nativeSrc": "3347:25:21",
|
|
1075
|
+
"nodeType": "YulExpressionStatement",
|
|
1076
|
+
"src": "3347:25:21"
|
|
1077
|
+
},
|
|
1078
|
+
{
|
|
1079
|
+
"nativeSrc": "3385:31:21",
|
|
1080
|
+
"nodeType": "YulAssignment",
|
|
1081
|
+
"src": "3385:31:21",
|
|
1082
|
+
"value": {
|
|
1083
|
+
"arguments": [
|
|
1084
|
+
{
|
|
1085
|
+
"kind": "number",
|
|
1086
|
+
"nativeSrc": "3405:4:21",
|
|
1087
|
+
"nodeType": "YulLiteral",
|
|
1088
|
+
"src": "3405:4:21",
|
|
1089
|
+
"type": "",
|
|
1090
|
+
"value": "0x00"
|
|
1091
|
+
},
|
|
1092
|
+
{
|
|
1093
|
+
"kind": "number",
|
|
1094
|
+
"nativeSrc": "3411:4:21",
|
|
1095
|
+
"nodeType": "YulLiteral",
|
|
1096
|
+
"src": "3411:4:21",
|
|
1097
|
+
"type": "",
|
|
1098
|
+
"value": "0x36"
|
|
1099
|
+
}
|
|
1100
|
+
],
|
|
1101
|
+
"functionName": {
|
|
1102
|
+
"name": "keccak256",
|
|
1103
|
+
"nativeSrc": "3395:9:21",
|
|
1104
|
+
"nodeType": "YulIdentifier",
|
|
1105
|
+
"src": "3395:9:21"
|
|
1106
|
+
},
|
|
1107
|
+
"nativeSrc": "3395:21:21",
|
|
1108
|
+
"nodeType": "YulFunctionCall",
|
|
1109
|
+
"src": "3395:21:21"
|
|
1110
|
+
},
|
|
1111
|
+
"variableNames": [
|
|
1112
|
+
{
|
|
1113
|
+
"name": "digest",
|
|
1114
|
+
"nativeSrc": "3385:6:21",
|
|
1115
|
+
"nodeType": "YulIdentifier",
|
|
1116
|
+
"src": "3385:6:21"
|
|
1117
|
+
}
|
|
1118
|
+
]
|
|
1119
|
+
}
|
|
1120
|
+
]
|
|
1121
|
+
},
|
|
1122
|
+
"evmVersion": "shanghai",
|
|
1123
|
+
"externalReferences": [
|
|
1124
|
+
{
|
|
1125
|
+
"declaration": 4852,
|
|
1126
|
+
"isOffset": false,
|
|
1127
|
+
"isSlot": false,
|
|
1128
|
+
"src": "3385:6:21",
|
|
1129
|
+
"valueSize": 1
|
|
1130
|
+
},
|
|
1131
|
+
{
|
|
1132
|
+
"declaration": 4849,
|
|
1133
|
+
"isOffset": false,
|
|
1134
|
+
"isSlot": false,
|
|
1135
|
+
"src": "3360:11:21",
|
|
1136
|
+
"valueSize": 1
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
"declaration": 4847,
|
|
1140
|
+
"isOffset": false,
|
|
1141
|
+
"isSlot": false,
|
|
1142
|
+
"src": "3323:9:21",
|
|
1143
|
+
"valueSize": 1
|
|
1144
|
+
}
|
|
1145
|
+
],
|
|
1146
|
+
"flags": [
|
|
1147
|
+
"memory-safe"
|
|
1148
|
+
],
|
|
1149
|
+
"id": 4854,
|
|
1150
|
+
"nodeType": "InlineAssembly",
|
|
1151
|
+
"src": "3226:200:21"
|
|
1152
|
+
}
|
|
1153
|
+
]
|
|
1154
|
+
},
|
|
1155
|
+
"documentation": {
|
|
1156
|
+
"id": 4845,
|
|
1157
|
+
"nodeType": "StructuredDocumentation",
|
|
1158
|
+
"src": "2940:129:21",
|
|
1159
|
+
"text": " @dev Variant of {toDataWithIntendedValidatorHash-address-bytes} optimized for cases where `data` is a bytes32."
|
|
1160
|
+
},
|
|
1161
|
+
"id": 4856,
|
|
1162
|
+
"implemented": true,
|
|
1163
|
+
"kind": "function",
|
|
1164
|
+
"modifiers": [],
|
|
1165
|
+
"name": "toDataWithIntendedValidatorHash",
|
|
1166
|
+
"nameLocation": "3083:31:21",
|
|
1167
|
+
"nodeType": "FunctionDefinition",
|
|
1168
|
+
"parameters": {
|
|
1169
|
+
"id": 4850,
|
|
1170
|
+
"nodeType": "ParameterList",
|
|
1171
|
+
"parameters": [
|
|
1172
|
+
{
|
|
1173
|
+
"constant": false,
|
|
1174
|
+
"id": 4847,
|
|
1175
|
+
"mutability": "mutable",
|
|
1176
|
+
"name": "validator",
|
|
1177
|
+
"nameLocation": "3132:9:21",
|
|
1178
|
+
"nodeType": "VariableDeclaration",
|
|
1179
|
+
"scope": 4856,
|
|
1180
|
+
"src": "3124:17:21",
|
|
1181
|
+
"stateVariable": false,
|
|
1182
|
+
"storageLocation": "default",
|
|
1183
|
+
"typeDescriptions": {
|
|
1184
|
+
"typeIdentifier": "t_address",
|
|
1185
|
+
"typeString": "address"
|
|
1186
|
+
},
|
|
1187
|
+
"typeName": {
|
|
1188
|
+
"id": 4846,
|
|
1189
|
+
"name": "address",
|
|
1190
|
+
"nodeType": "ElementaryTypeName",
|
|
1191
|
+
"src": "3124:7:21",
|
|
1192
|
+
"stateMutability": "nonpayable",
|
|
1193
|
+
"typeDescriptions": {
|
|
1194
|
+
"typeIdentifier": "t_address",
|
|
1195
|
+
"typeString": "address"
|
|
1196
|
+
}
|
|
1197
|
+
},
|
|
1198
|
+
"visibility": "internal"
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
"constant": false,
|
|
1202
|
+
"id": 4849,
|
|
1203
|
+
"mutability": "mutable",
|
|
1204
|
+
"name": "messageHash",
|
|
1205
|
+
"nameLocation": "3159:11:21",
|
|
1206
|
+
"nodeType": "VariableDeclaration",
|
|
1207
|
+
"scope": 4856,
|
|
1208
|
+
"src": "3151:19:21",
|
|
1209
|
+
"stateVariable": false,
|
|
1210
|
+
"storageLocation": "default",
|
|
1211
|
+
"typeDescriptions": {
|
|
1212
|
+
"typeIdentifier": "t_bytes32",
|
|
1213
|
+
"typeString": "bytes32"
|
|
1214
|
+
},
|
|
1215
|
+
"typeName": {
|
|
1216
|
+
"id": 4848,
|
|
1217
|
+
"name": "bytes32",
|
|
1218
|
+
"nodeType": "ElementaryTypeName",
|
|
1219
|
+
"src": "3151:7:21",
|
|
1220
|
+
"typeDescriptions": {
|
|
1221
|
+
"typeIdentifier": "t_bytes32",
|
|
1222
|
+
"typeString": "bytes32"
|
|
1223
|
+
}
|
|
1224
|
+
},
|
|
1225
|
+
"visibility": "internal"
|
|
1226
|
+
}
|
|
1227
|
+
],
|
|
1228
|
+
"src": "3114:62:21"
|
|
1229
|
+
},
|
|
1230
|
+
"returnParameters": {
|
|
1231
|
+
"id": 4853,
|
|
1232
|
+
"nodeType": "ParameterList",
|
|
1233
|
+
"parameters": [
|
|
1234
|
+
{
|
|
1235
|
+
"constant": false,
|
|
1236
|
+
"id": 4852,
|
|
1237
|
+
"mutability": "mutable",
|
|
1238
|
+
"name": "digest",
|
|
1239
|
+
"nameLocation": "3208:6:21",
|
|
1240
|
+
"nodeType": "VariableDeclaration",
|
|
1241
|
+
"scope": 4856,
|
|
1242
|
+
"src": "3200:14:21",
|
|
1243
|
+
"stateVariable": false,
|
|
1244
|
+
"storageLocation": "default",
|
|
1245
|
+
"typeDescriptions": {
|
|
1246
|
+
"typeIdentifier": "t_bytes32",
|
|
1247
|
+
"typeString": "bytes32"
|
|
1248
|
+
},
|
|
1249
|
+
"typeName": {
|
|
1250
|
+
"id": 4851,
|
|
1251
|
+
"name": "bytes32",
|
|
1252
|
+
"nodeType": "ElementaryTypeName",
|
|
1253
|
+
"src": "3200:7:21",
|
|
1254
|
+
"typeDescriptions": {
|
|
1255
|
+
"typeIdentifier": "t_bytes32",
|
|
1256
|
+
"typeString": "bytes32"
|
|
1257
|
+
}
|
|
1258
|
+
},
|
|
1259
|
+
"visibility": "internal"
|
|
1260
|
+
}
|
|
1261
|
+
],
|
|
1262
|
+
"src": "3199:16:21"
|
|
1263
|
+
},
|
|
1264
|
+
"scope": 4869,
|
|
1265
|
+
"src": "3074:358:21",
|
|
1266
|
+
"stateMutability": "pure",
|
|
1267
|
+
"virtual": false,
|
|
1268
|
+
"visibility": "internal"
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
"body": {
|
|
1272
|
+
"id": 4867,
|
|
1273
|
+
"nodeType": "Block",
|
|
1274
|
+
"src": "3983:265:21",
|
|
1275
|
+
"statements": [
|
|
1276
|
+
{
|
|
1277
|
+
"AST": {
|
|
1278
|
+
"nativeSrc": "4018:224:21",
|
|
1279
|
+
"nodeType": "YulBlock",
|
|
1280
|
+
"src": "4018:224:21",
|
|
1281
|
+
"statements": [
|
|
1282
|
+
{
|
|
1283
|
+
"nativeSrc": "4032:22:21",
|
|
1284
|
+
"nodeType": "YulVariableDeclaration",
|
|
1285
|
+
"src": "4032:22:21",
|
|
1286
|
+
"value": {
|
|
1287
|
+
"arguments": [
|
|
1288
|
+
{
|
|
1289
|
+
"kind": "number",
|
|
1290
|
+
"nativeSrc": "4049:4:21",
|
|
1291
|
+
"nodeType": "YulLiteral",
|
|
1292
|
+
"src": "4049:4:21",
|
|
1293
|
+
"type": "",
|
|
1294
|
+
"value": "0x40"
|
|
1295
|
+
}
|
|
1296
|
+
],
|
|
1297
|
+
"functionName": {
|
|
1298
|
+
"name": "mload",
|
|
1299
|
+
"nativeSrc": "4043:5:21",
|
|
1300
|
+
"nodeType": "YulIdentifier",
|
|
1301
|
+
"src": "4043:5:21"
|
|
1302
|
+
},
|
|
1303
|
+
"nativeSrc": "4043:11:21",
|
|
1304
|
+
"nodeType": "YulFunctionCall",
|
|
1305
|
+
"src": "4043:11:21"
|
|
1306
|
+
},
|
|
1307
|
+
"variables": [
|
|
1308
|
+
{
|
|
1309
|
+
"name": "ptr",
|
|
1310
|
+
"nativeSrc": "4036:3:21",
|
|
1311
|
+
"nodeType": "YulTypedName",
|
|
1312
|
+
"src": "4036:3:21",
|
|
1313
|
+
"type": ""
|
|
1314
|
+
}
|
|
1315
|
+
]
|
|
1316
|
+
},
|
|
1317
|
+
{
|
|
1318
|
+
"expression": {
|
|
1319
|
+
"arguments": [
|
|
1320
|
+
{
|
|
1321
|
+
"name": "ptr",
|
|
1322
|
+
"nativeSrc": "4074:3:21",
|
|
1323
|
+
"nodeType": "YulIdentifier",
|
|
1324
|
+
"src": "4074:3:21"
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
"hexValue": "1901",
|
|
1328
|
+
"kind": "string",
|
|
1329
|
+
"nativeSrc": "4079:10:21",
|
|
1330
|
+
"nodeType": "YulLiteral",
|
|
1331
|
+
"src": "4079:10:21",
|
|
1332
|
+
"type": "",
|
|
1333
|
+
"value": "\u0019\u0001"
|
|
1334
|
+
}
|
|
1335
|
+
],
|
|
1336
|
+
"functionName": {
|
|
1337
|
+
"name": "mstore",
|
|
1338
|
+
"nativeSrc": "4067:6:21",
|
|
1339
|
+
"nodeType": "YulIdentifier",
|
|
1340
|
+
"src": "4067:6:21"
|
|
1341
|
+
},
|
|
1342
|
+
"nativeSrc": "4067:23:21",
|
|
1343
|
+
"nodeType": "YulFunctionCall",
|
|
1344
|
+
"src": "4067:23:21"
|
|
1345
|
+
},
|
|
1346
|
+
"nativeSrc": "4067:23:21",
|
|
1347
|
+
"nodeType": "YulExpressionStatement",
|
|
1348
|
+
"src": "4067:23:21"
|
|
1349
|
+
},
|
|
1350
|
+
{
|
|
1351
|
+
"expression": {
|
|
1352
|
+
"arguments": [
|
|
1353
|
+
{
|
|
1354
|
+
"arguments": [
|
|
1355
|
+
{
|
|
1356
|
+
"name": "ptr",
|
|
1357
|
+
"nativeSrc": "4114:3:21",
|
|
1358
|
+
"nodeType": "YulIdentifier",
|
|
1359
|
+
"src": "4114:3:21"
|
|
1360
|
+
},
|
|
1361
|
+
{
|
|
1362
|
+
"kind": "number",
|
|
1363
|
+
"nativeSrc": "4119:4:21",
|
|
1364
|
+
"nodeType": "YulLiteral",
|
|
1365
|
+
"src": "4119:4:21",
|
|
1366
|
+
"type": "",
|
|
1367
|
+
"value": "0x02"
|
|
1368
|
+
}
|
|
1369
|
+
],
|
|
1370
|
+
"functionName": {
|
|
1371
|
+
"name": "add",
|
|
1372
|
+
"nativeSrc": "4110:3:21",
|
|
1373
|
+
"nodeType": "YulIdentifier",
|
|
1374
|
+
"src": "4110:3:21"
|
|
1375
|
+
},
|
|
1376
|
+
"nativeSrc": "4110:14:21",
|
|
1377
|
+
"nodeType": "YulFunctionCall",
|
|
1378
|
+
"src": "4110:14:21"
|
|
1379
|
+
},
|
|
1380
|
+
{
|
|
1381
|
+
"name": "domainSeparator",
|
|
1382
|
+
"nativeSrc": "4126:15:21",
|
|
1383
|
+
"nodeType": "YulIdentifier",
|
|
1384
|
+
"src": "4126:15:21"
|
|
1385
|
+
}
|
|
1386
|
+
],
|
|
1387
|
+
"functionName": {
|
|
1388
|
+
"name": "mstore",
|
|
1389
|
+
"nativeSrc": "4103:6:21",
|
|
1390
|
+
"nodeType": "YulIdentifier",
|
|
1391
|
+
"src": "4103:6:21"
|
|
1392
|
+
},
|
|
1393
|
+
"nativeSrc": "4103:39:21",
|
|
1394
|
+
"nodeType": "YulFunctionCall",
|
|
1395
|
+
"src": "4103:39:21"
|
|
1396
|
+
},
|
|
1397
|
+
"nativeSrc": "4103:39:21",
|
|
1398
|
+
"nodeType": "YulExpressionStatement",
|
|
1399
|
+
"src": "4103:39:21"
|
|
1400
|
+
},
|
|
1401
|
+
{
|
|
1402
|
+
"expression": {
|
|
1403
|
+
"arguments": [
|
|
1404
|
+
{
|
|
1405
|
+
"arguments": [
|
|
1406
|
+
{
|
|
1407
|
+
"name": "ptr",
|
|
1408
|
+
"nativeSrc": "4166:3:21",
|
|
1409
|
+
"nodeType": "YulIdentifier",
|
|
1410
|
+
"src": "4166:3:21"
|
|
1411
|
+
},
|
|
1412
|
+
{
|
|
1413
|
+
"kind": "number",
|
|
1414
|
+
"nativeSrc": "4171:4:21",
|
|
1415
|
+
"nodeType": "YulLiteral",
|
|
1416
|
+
"src": "4171:4:21",
|
|
1417
|
+
"type": "",
|
|
1418
|
+
"value": "0x22"
|
|
1419
|
+
}
|
|
1420
|
+
],
|
|
1421
|
+
"functionName": {
|
|
1422
|
+
"name": "add",
|
|
1423
|
+
"nativeSrc": "4162:3:21",
|
|
1424
|
+
"nodeType": "YulIdentifier",
|
|
1425
|
+
"src": "4162:3:21"
|
|
1426
|
+
},
|
|
1427
|
+
"nativeSrc": "4162:14:21",
|
|
1428
|
+
"nodeType": "YulFunctionCall",
|
|
1429
|
+
"src": "4162:14:21"
|
|
1430
|
+
},
|
|
1431
|
+
{
|
|
1432
|
+
"name": "structHash",
|
|
1433
|
+
"nativeSrc": "4178:10:21",
|
|
1434
|
+
"nodeType": "YulIdentifier",
|
|
1435
|
+
"src": "4178:10:21"
|
|
1436
|
+
}
|
|
1437
|
+
],
|
|
1438
|
+
"functionName": {
|
|
1439
|
+
"name": "mstore",
|
|
1440
|
+
"nativeSrc": "4155:6:21",
|
|
1441
|
+
"nodeType": "YulIdentifier",
|
|
1442
|
+
"src": "4155:6:21"
|
|
1443
|
+
},
|
|
1444
|
+
"nativeSrc": "4155:34:21",
|
|
1445
|
+
"nodeType": "YulFunctionCall",
|
|
1446
|
+
"src": "4155:34:21"
|
|
1447
|
+
},
|
|
1448
|
+
"nativeSrc": "4155:34:21",
|
|
1449
|
+
"nodeType": "YulExpressionStatement",
|
|
1450
|
+
"src": "4155:34:21"
|
|
1451
|
+
},
|
|
1452
|
+
{
|
|
1453
|
+
"nativeSrc": "4202:30:21",
|
|
1454
|
+
"nodeType": "YulAssignment",
|
|
1455
|
+
"src": "4202:30:21",
|
|
1456
|
+
"value": {
|
|
1457
|
+
"arguments": [
|
|
1458
|
+
{
|
|
1459
|
+
"name": "ptr",
|
|
1460
|
+
"nativeSrc": "4222:3:21",
|
|
1461
|
+
"nodeType": "YulIdentifier",
|
|
1462
|
+
"src": "4222:3:21"
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
"kind": "number",
|
|
1466
|
+
"nativeSrc": "4227:4:21",
|
|
1467
|
+
"nodeType": "YulLiteral",
|
|
1468
|
+
"src": "4227:4:21",
|
|
1469
|
+
"type": "",
|
|
1470
|
+
"value": "0x42"
|
|
1471
|
+
}
|
|
1472
|
+
],
|
|
1473
|
+
"functionName": {
|
|
1474
|
+
"name": "keccak256",
|
|
1475
|
+
"nativeSrc": "4212:9:21",
|
|
1476
|
+
"nodeType": "YulIdentifier",
|
|
1477
|
+
"src": "4212:9:21"
|
|
1478
|
+
},
|
|
1479
|
+
"nativeSrc": "4212:20:21",
|
|
1480
|
+
"nodeType": "YulFunctionCall",
|
|
1481
|
+
"src": "4212:20:21"
|
|
1482
|
+
},
|
|
1483
|
+
"variableNames": [
|
|
1484
|
+
{
|
|
1485
|
+
"name": "digest",
|
|
1486
|
+
"nativeSrc": "4202:6:21",
|
|
1487
|
+
"nodeType": "YulIdentifier",
|
|
1488
|
+
"src": "4202:6:21"
|
|
1489
|
+
}
|
|
1490
|
+
]
|
|
1491
|
+
}
|
|
1492
|
+
]
|
|
1493
|
+
},
|
|
1494
|
+
"evmVersion": "shanghai",
|
|
1495
|
+
"externalReferences": [
|
|
1496
|
+
{
|
|
1497
|
+
"declaration": 4864,
|
|
1498
|
+
"isOffset": false,
|
|
1499
|
+
"isSlot": false,
|
|
1500
|
+
"src": "4202:6:21",
|
|
1501
|
+
"valueSize": 1
|
|
1502
|
+
},
|
|
1503
|
+
{
|
|
1504
|
+
"declaration": 4859,
|
|
1505
|
+
"isOffset": false,
|
|
1506
|
+
"isSlot": false,
|
|
1507
|
+
"src": "4126:15:21",
|
|
1508
|
+
"valueSize": 1
|
|
1509
|
+
},
|
|
1510
|
+
{
|
|
1511
|
+
"declaration": 4861,
|
|
1512
|
+
"isOffset": false,
|
|
1513
|
+
"isSlot": false,
|
|
1514
|
+
"src": "4178:10:21",
|
|
1515
|
+
"valueSize": 1
|
|
1516
|
+
}
|
|
1517
|
+
],
|
|
1518
|
+
"flags": [
|
|
1519
|
+
"memory-safe"
|
|
1520
|
+
],
|
|
1521
|
+
"id": 4866,
|
|
1522
|
+
"nodeType": "InlineAssembly",
|
|
1523
|
+
"src": "3993:249:21"
|
|
1524
|
+
}
|
|
1525
|
+
]
|
|
1526
|
+
},
|
|
1527
|
+
"documentation": {
|
|
1528
|
+
"id": 4857,
|
|
1529
|
+
"nodeType": "StructuredDocumentation",
|
|
1530
|
+
"src": "3438:431:21",
|
|
1531
|
+
"text": " @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`).\n The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with\n `\\x19\\x01` and hashing the result. It corresponds to the hash signed by the\n https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712.\n See {ECDSA-recover}."
|
|
1532
|
+
},
|
|
1533
|
+
"id": 4868,
|
|
1534
|
+
"implemented": true,
|
|
1535
|
+
"kind": "function",
|
|
1536
|
+
"modifiers": [],
|
|
1537
|
+
"name": "toTypedDataHash",
|
|
1538
|
+
"nameLocation": "3883:15:21",
|
|
1539
|
+
"nodeType": "FunctionDefinition",
|
|
1540
|
+
"parameters": {
|
|
1541
|
+
"id": 4862,
|
|
1542
|
+
"nodeType": "ParameterList",
|
|
1543
|
+
"parameters": [
|
|
1544
|
+
{
|
|
1545
|
+
"constant": false,
|
|
1546
|
+
"id": 4859,
|
|
1547
|
+
"mutability": "mutable",
|
|
1548
|
+
"name": "domainSeparator",
|
|
1549
|
+
"nameLocation": "3907:15:21",
|
|
1550
|
+
"nodeType": "VariableDeclaration",
|
|
1551
|
+
"scope": 4868,
|
|
1552
|
+
"src": "3899:23:21",
|
|
1553
|
+
"stateVariable": false,
|
|
1554
|
+
"storageLocation": "default",
|
|
1555
|
+
"typeDescriptions": {
|
|
1556
|
+
"typeIdentifier": "t_bytes32",
|
|
1557
|
+
"typeString": "bytes32"
|
|
1558
|
+
},
|
|
1559
|
+
"typeName": {
|
|
1560
|
+
"id": 4858,
|
|
1561
|
+
"name": "bytes32",
|
|
1562
|
+
"nodeType": "ElementaryTypeName",
|
|
1563
|
+
"src": "3899:7:21",
|
|
1564
|
+
"typeDescriptions": {
|
|
1565
|
+
"typeIdentifier": "t_bytes32",
|
|
1566
|
+
"typeString": "bytes32"
|
|
1567
|
+
}
|
|
1568
|
+
},
|
|
1569
|
+
"visibility": "internal"
|
|
1570
|
+
},
|
|
1571
|
+
{
|
|
1572
|
+
"constant": false,
|
|
1573
|
+
"id": 4861,
|
|
1574
|
+
"mutability": "mutable",
|
|
1575
|
+
"name": "structHash",
|
|
1576
|
+
"nameLocation": "3932:10:21",
|
|
1577
|
+
"nodeType": "VariableDeclaration",
|
|
1578
|
+
"scope": 4868,
|
|
1579
|
+
"src": "3924:18:21",
|
|
1580
|
+
"stateVariable": false,
|
|
1581
|
+
"storageLocation": "default",
|
|
1582
|
+
"typeDescriptions": {
|
|
1583
|
+
"typeIdentifier": "t_bytes32",
|
|
1584
|
+
"typeString": "bytes32"
|
|
1585
|
+
},
|
|
1586
|
+
"typeName": {
|
|
1587
|
+
"id": 4860,
|
|
1588
|
+
"name": "bytes32",
|
|
1589
|
+
"nodeType": "ElementaryTypeName",
|
|
1590
|
+
"src": "3924:7:21",
|
|
1591
|
+
"typeDescriptions": {
|
|
1592
|
+
"typeIdentifier": "t_bytes32",
|
|
1593
|
+
"typeString": "bytes32"
|
|
1594
|
+
}
|
|
1595
|
+
},
|
|
1596
|
+
"visibility": "internal"
|
|
1597
|
+
}
|
|
1598
|
+
],
|
|
1599
|
+
"src": "3898:45:21"
|
|
1600
|
+
},
|
|
1601
|
+
"returnParameters": {
|
|
1602
|
+
"id": 4865,
|
|
1603
|
+
"nodeType": "ParameterList",
|
|
1604
|
+
"parameters": [
|
|
1605
|
+
{
|
|
1606
|
+
"constant": false,
|
|
1607
|
+
"id": 4864,
|
|
1608
|
+
"mutability": "mutable",
|
|
1609
|
+
"name": "digest",
|
|
1610
|
+
"nameLocation": "3975:6:21",
|
|
1611
|
+
"nodeType": "VariableDeclaration",
|
|
1612
|
+
"scope": 4868,
|
|
1613
|
+
"src": "3967:14:21",
|
|
1614
|
+
"stateVariable": false,
|
|
1615
|
+
"storageLocation": "default",
|
|
1616
|
+
"typeDescriptions": {
|
|
1617
|
+
"typeIdentifier": "t_bytes32",
|
|
1618
|
+
"typeString": "bytes32"
|
|
1619
|
+
},
|
|
1620
|
+
"typeName": {
|
|
1621
|
+
"id": 4863,
|
|
1622
|
+
"name": "bytes32",
|
|
1623
|
+
"nodeType": "ElementaryTypeName",
|
|
1624
|
+
"src": "3967:7:21",
|
|
1625
|
+
"typeDescriptions": {
|
|
1626
|
+
"typeIdentifier": "t_bytes32",
|
|
1627
|
+
"typeString": "bytes32"
|
|
1628
|
+
}
|
|
1629
|
+
},
|
|
1630
|
+
"visibility": "internal"
|
|
1631
|
+
}
|
|
1632
|
+
],
|
|
1633
|
+
"src": "3966:16:21"
|
|
1634
|
+
},
|
|
1635
|
+
"scope": 4869,
|
|
1636
|
+
"src": "3874:374:21",
|
|
1637
|
+
"stateMutability": "pure",
|
|
1638
|
+
"virtual": false,
|
|
1639
|
+
"visibility": "internal"
|
|
1640
|
+
}
|
|
1641
|
+
],
|
|
1642
|
+
"scope": 4870,
|
|
1643
|
+
"src": "521:3729:21",
|
|
1644
|
+
"usedErrors": [],
|
|
1645
|
+
"usedEvents": []
|
|
1646
|
+
}
|
|
1647
|
+
],
|
|
1648
|
+
"src": "123:4128:21"
|
|
1649
|
+
},
|
|
1650
|
+
"compiler": {
|
|
1651
|
+
"name": "solc",
|
|
1652
|
+
"version": "0.8.21+commit.d9974bed.Emscripten.clang"
|
|
1653
|
+
},
|
|
1654
|
+
"networks": {},
|
|
1655
|
+
"schemaVersion": "3.4.16",
|
|
1656
|
+
"updatedAt": "2026-01-24T20:23:04.160Z",
|
|
1657
|
+
"devdoc": {
|
|
1658
|
+
"details": "Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing. The library provides methods for generating a hash of a message that conforms to the https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712] specifications.",
|
|
1659
|
+
"kind": "dev",
|
|
1660
|
+
"methods": {},
|
|
1661
|
+
"version": 1
|
|
1662
|
+
},
|
|
1663
|
+
"userdoc": {
|
|
1664
|
+
"kind": "user",
|
|
1665
|
+
"methods": {},
|
|
1666
|
+
"version": 1
|
|
1667
|
+
}
|
|
1668
|
+
}
|