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.
Files changed (63) hide show
  1. package/build/contracts/AccessControl.json +4579 -0
  2. package/build/contracts/Context.json +356 -0
  3. package/build/contracts/CreditSystem.json +6037 -0
  4. package/build/contracts/ECDSA.json +4734 -0
  5. package/build/contracts/EIP712.json +3021 -0
  6. package/build/contracts/ERC165.json +352 -0
  7. package/build/contracts/ERC20.json +6816 -0
  8. package/build/contracts/ERC20Permit.json +2658 -0
  9. package/build/contracts/ERC721.json +12779 -0
  10. package/build/contracts/ERC721Utils.json +1058 -0
  11. package/build/contracts/Groth16Verifier.json +6298 -0
  12. package/build/contracts/Guardian.json +1116 -0
  13. package/build/contracts/IERC1155Errors.json +1687 -0
  14. package/build/contracts/IERC165.json +197 -0
  15. package/build/contracts/IERC20.json +1162 -0
  16. package/build/contracts/IERC20Errors.json +1662 -0
  17. package/build/contracts/IERC20Metadata.json +574 -0
  18. package/build/contracts/IERC20Permit.json +546 -0
  19. package/build/contracts/IERC5267.json +392 -0
  20. package/build/contracts/IERC721.json +1729 -0
  21. package/build/contracts/IERC721Errors.json +1694 -0
  22. package/build/contracts/IERC721Metadata.json +728 -0
  23. package/build/contracts/IERC721Receiver.json +296 -0
  24. package/build/contracts/IGuardian.json +215 -0
  25. package/build/contracts/ITrustRegistry.json +6767 -0
  26. package/build/contracts/IdentityVault.json +11584 -0
  27. package/build/contracts/Math.json +23115 -0
  28. package/build/contracts/MessageHashUtils.json +1668 -0
  29. package/build/contracts/Nonces.json +865 -0
  30. package/build/contracts/Ownable.json +1859 -0
  31. package/build/contracts/Panic.json +798 -0
  32. package/build/contracts/ReportingSystem.json +2787 -0
  33. package/build/contracts/SafeCast.json +21592 -0
  34. package/build/contracts/ScoringSystem.json +11245 -0
  35. package/build/contracts/SecureTransacSBT.json +18823 -0
  36. package/build/contracts/SecureTransacToken.json +19225 -0
  37. package/build/contracts/SecureVault.json +12890 -0
  38. package/build/contracts/ShortStrings.json +2852 -0
  39. package/build/contracts/SignedMath.json +1915 -0
  40. package/build/contracts/StorageSlot.json +1773 -0
  41. package/build/contracts/Strings.json +19001 -0
  42. package/build/contracts/TransactionLogger.json +5325 -0
  43. package/build/contracts/TrustDAO.json +23850 -0
  44. package/build/contracts/TrustRegistry.json +10948 -0
  45. package/build/contracts/VerificationRegistry.json +12811 -0
  46. package/build/contracts/ZKIdentityVerifier.json +13979 -0
  47. package/contracts/AccessControl.sol +34 -0
  48. package/contracts/CreditSystem.sol +48 -0
  49. package/contracts/Guardian.sol +33 -0
  50. package/contracts/IGuardian.sol +7 -0
  51. package/contracts/IdentityVault.sol +57 -0
  52. package/contracts/ReportingSystem.sol +14 -0
  53. package/contracts/ScoringSystem.sol +71 -0
  54. package/contracts/SecureTransacSBT.sol +72 -0
  55. package/contracts/SecureTransacToken.sol +20 -0
  56. package/contracts/SecureVault.sol +24 -0
  57. package/contracts/TransactionLogger.sol +12 -0
  58. package/contracts/TrustDAO.sol +158 -0
  59. package/contracts/TrustRegistry.sol +23 -0
  60. package/contracts/VerificationRegistry.sol +51 -0
  61. package/contracts/ZKIdentityVerifier.sol +38 -0
  62. package/contracts/ZKScoreVerifier.sol +175 -0
  63. package/package.json +32 -0
@@ -0,0 +1,1058 @@
1
+ {
2
+ "contractName": "ERC721Utils",
3
+ "abi": [],
4
+ "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Library that provide common ERC-721 utility functions. See https://eips.ethereum.org/EIPS/eip-721[ERC-721]. _Available since v5.1._\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/token/ERC721/utils/ERC721Utils.sol\":\"ERC721Utils\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"keccak256\":\"0x19fdfb0f3b89a230e7dbd1cf416f1a6b531a3ee5db4da483f946320fc74afc0e\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://3490d794728f5bfecb46820431adaff71ba374141545ec20b650bb60353fac23\",\"dweb:/ipfs/QmPsfxjVpMcZbpE7BH93DzTpEaktESigEw4SmDzkXuJ4WR\"]},\"@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol\":{\"keccak256\":\"0x88cd5e3bee2e8c36b8d9058fbcaa81ad5704281b25634122234b55ea853d8055\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://8dc7e7ab5b8ea36c15027ab04221b05d1c970f47a53e9fd47ead8ca665d49c7e\",\"dweb:/ipfs/Qmeeph7fsDyfRr8vb2L8KcDEmKPb224TAayMvgqgGAnqpL\"]},\"@openzeppelin/contracts/token/ERC721/utils/ERC721Utils.sol\":{\"keccak256\":\"0xc2dfdc8fbc8fdb142575c90568e237b809a1feaccff23e32d00131887a08dc36\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://dbc1d283ee77da43d61661b5ba1adeb427d6a6224335494a9a857dce41d9f1d6\",\"dweb:/ipfs/QmTnA35z7XzkxFSRUqB6CGVH1nhmvajwnDNfA5PiKmYuCi\"]}},\"version\":1}",
5
+ "bytecode": "0x6055604b600b8282823980515f1a607314603f577f4e487b71000000000000000000000000000000000000000000000000000000005f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212207692978d8fcb09af4999411a558e0c616b23479c7894c9527f68eff021ffd0a964736f6c63430008150033",
6
+ "deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f80fdfea26469706673582212207692978d8fcb09af4999411a558e0c616b23479c7894c9527f68eff021ffd0a964736f6c63430008150033",
7
+ "immutableReferences": {},
8
+ "generatedSources": [],
9
+ "deployedGeneratedSources": [],
10
+ "sourceMap": "431:1490:12:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;",
11
+ "deployedSourceMap": "431:1490:12:-:0;;;;;;;;",
12
+ "source": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC721/utils/ERC721Utils.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC721Receiver} from \"../IERC721Receiver.sol\";\nimport {IERC721Errors} from \"../../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Library that provide common ERC-721 utility functions.\n *\n * See https://eips.ethereum.org/EIPS/eip-721[ERC-721].\n *\n * _Available since v5.1._\n */\nlibrary ERC721Utils {\n /**\n * @dev Performs an acceptance check for the provided `operator` by calling {IERC721Receiver-onERC721Received}\n * on the `to` address. The `operator` is generally the address that initiated the token transfer (i.e. `msg.sender`).\n *\n * The acceptance call is not executed and treated as a no-op if the target address doesn't contain code (i.e. an EOA).\n * Otherwise, the recipient must implement {IERC721Receiver-onERC721Received} and return the acceptance magic value to accept\n * the transfer.\n */\n function checkOnERC721Received(\n address operator,\n address from,\n address to,\n uint256 tokenId,\n bytes memory data\n ) internal {\n if (to.code.length > 0) {\n try IERC721Receiver(to).onERC721Received(operator, from, tokenId, data) returns (bytes4 retval) {\n if (retval != IERC721Receiver.onERC721Received.selector) {\n // Token rejected\n revert IERC721Errors.ERC721InvalidReceiver(to);\n }\n } catch (bytes memory reason) {\n if (reason.length == 0) {\n // non-IERC721Receiver implementer\n revert IERC721Errors.ERC721InvalidReceiver(to);\n } else {\n assembly (\"memory-safe\") {\n revert(add(reason, 0x20), mload(reason))\n }\n }\n }\n }\n }\n}\n",
13
+ "sourcePath": "@openzeppelin\\contracts\\token\\ERC721\\utils\\ERC721Utils.sol",
14
+ "ast": {
15
+ "absolutePath": "@openzeppelin/contracts/token/ERC721/utils/ERC721Utils.sol",
16
+ "exportedSymbols": {
17
+ "ERC721Utils": [
18
+ 2315
19
+ ],
20
+ "IERC721Errors": [
21
+ 262
22
+ ],
23
+ "IERC721Receiver": [
24
+ 2210
25
+ ]
26
+ },
27
+ "id": 2316,
28
+ "license": "MIT",
29
+ "nodeType": "SourceUnit",
30
+ "nodes": [
31
+ {
32
+ "id": 2240,
33
+ "literals": [
34
+ "solidity",
35
+ "^",
36
+ "0.8",
37
+ ".20"
38
+ ],
39
+ "nodeType": "PragmaDirective",
40
+ "src": "118:24:12"
41
+ },
42
+ {
43
+ "absolutePath": "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol",
44
+ "file": "../IERC721Receiver.sol",
45
+ "id": 2242,
46
+ "nameLocation": "-1:-1:-1",
47
+ "nodeType": "ImportDirective",
48
+ "scope": 2316,
49
+ "sourceUnit": 2211,
50
+ "src": "144:55:12",
51
+ "symbolAliases": [
52
+ {
53
+ "foreign": {
54
+ "id": 2241,
55
+ "name": "IERC721Receiver",
56
+ "nodeType": "Identifier",
57
+ "overloadedDeclarations": [],
58
+ "referencedDeclaration": 2210,
59
+ "src": "152:15:12",
60
+ "typeDescriptions": {}
61
+ },
62
+ "nameLocation": "-1:-1:-1"
63
+ }
64
+ ],
65
+ "unitAlias": ""
66
+ },
67
+ {
68
+ "absolutePath": "@openzeppelin/contracts/interfaces/draft-IERC6093.sol",
69
+ "file": "../../../interfaces/draft-IERC6093.sol",
70
+ "id": 2244,
71
+ "nameLocation": "-1:-1:-1",
72
+ "nodeType": "ImportDirective",
73
+ "scope": 2316,
74
+ "sourceUnit": 310,
75
+ "src": "200:69:12",
76
+ "symbolAliases": [
77
+ {
78
+ "foreign": {
79
+ "id": 2243,
80
+ "name": "IERC721Errors",
81
+ "nodeType": "Identifier",
82
+ "overloadedDeclarations": [],
83
+ "referencedDeclaration": 262,
84
+ "src": "208:13:12",
85
+ "typeDescriptions": {}
86
+ },
87
+ "nameLocation": "-1:-1:-1"
88
+ }
89
+ ],
90
+ "unitAlias": ""
91
+ },
92
+ {
93
+ "abstract": false,
94
+ "baseContracts": [],
95
+ "canonicalName": "ERC721Utils",
96
+ "contractDependencies": [],
97
+ "contractKind": "library",
98
+ "documentation": {
99
+ "id": 2245,
100
+ "nodeType": "StructuredDocumentation",
101
+ "src": "271:159:12",
102
+ "text": " @dev Library that provide common ERC-721 utility functions.\n See https://eips.ethereum.org/EIPS/eip-721[ERC-721].\n _Available since v5.1._"
103
+ },
104
+ "fullyImplemented": true,
105
+ "id": 2315,
106
+ "linearizedBaseContracts": [
107
+ 2315
108
+ ],
109
+ "name": "ERC721Utils",
110
+ "nameLocation": "439:11:12",
111
+ "nodeType": "ContractDefinition",
112
+ "nodes": [
113
+ {
114
+ "body": {
115
+ "id": 2313,
116
+ "nodeType": "Block",
117
+ "src": "1159:760:12",
118
+ "statements": [
119
+ {
120
+ "condition": {
121
+ "commonType": {
122
+ "typeIdentifier": "t_uint256",
123
+ "typeString": "uint256"
124
+ },
125
+ "id": 2263,
126
+ "isConstant": false,
127
+ "isLValue": false,
128
+ "isPure": false,
129
+ "lValueRequested": false,
130
+ "leftExpression": {
131
+ "expression": {
132
+ "expression": {
133
+ "id": 2259,
134
+ "name": "to",
135
+ "nodeType": "Identifier",
136
+ "overloadedDeclarations": [],
137
+ "referencedDeclaration": 2252,
138
+ "src": "1173:2:12",
139
+ "typeDescriptions": {
140
+ "typeIdentifier": "t_address",
141
+ "typeString": "address"
142
+ }
143
+ },
144
+ "id": 2260,
145
+ "isConstant": false,
146
+ "isLValue": false,
147
+ "isPure": false,
148
+ "lValueRequested": false,
149
+ "memberLocation": "1176:4:12",
150
+ "memberName": "code",
151
+ "nodeType": "MemberAccess",
152
+ "src": "1173:7:12",
153
+ "typeDescriptions": {
154
+ "typeIdentifier": "t_bytes_memory_ptr",
155
+ "typeString": "bytes memory"
156
+ }
157
+ },
158
+ "id": 2261,
159
+ "isConstant": false,
160
+ "isLValue": false,
161
+ "isPure": false,
162
+ "lValueRequested": false,
163
+ "memberLocation": "1181:6:12",
164
+ "memberName": "length",
165
+ "nodeType": "MemberAccess",
166
+ "src": "1173:14:12",
167
+ "typeDescriptions": {
168
+ "typeIdentifier": "t_uint256",
169
+ "typeString": "uint256"
170
+ }
171
+ },
172
+ "nodeType": "BinaryOperation",
173
+ "operator": ">",
174
+ "rightExpression": {
175
+ "hexValue": "30",
176
+ "id": 2262,
177
+ "isConstant": false,
178
+ "isLValue": false,
179
+ "isPure": true,
180
+ "kind": "number",
181
+ "lValueRequested": false,
182
+ "nodeType": "Literal",
183
+ "src": "1190:1:12",
184
+ "typeDescriptions": {
185
+ "typeIdentifier": "t_rational_0_by_1",
186
+ "typeString": "int_const 0"
187
+ },
188
+ "value": "0"
189
+ },
190
+ "src": "1173:18:12",
191
+ "typeDescriptions": {
192
+ "typeIdentifier": "t_bool",
193
+ "typeString": "bool"
194
+ }
195
+ },
196
+ "id": 2312,
197
+ "nodeType": "IfStatement",
198
+ "src": "1169:744:12",
199
+ "trueBody": {
200
+ "id": 2311,
201
+ "nodeType": "Block",
202
+ "src": "1193:720:12",
203
+ "statements": [
204
+ {
205
+ "clauses": [
206
+ {
207
+ "block": {
208
+ "id": 2289,
209
+ "nodeType": "Block",
210
+ "src": "1303:214:12",
211
+ "statements": [
212
+ {
213
+ "condition": {
214
+ "commonType": {
215
+ "typeIdentifier": "t_bytes4",
216
+ "typeString": "bytes4"
217
+ },
218
+ "id": 2280,
219
+ "isConstant": false,
220
+ "isLValue": false,
221
+ "isPure": false,
222
+ "lValueRequested": false,
223
+ "leftExpression": {
224
+ "id": 2276,
225
+ "name": "retval",
226
+ "nodeType": "Identifier",
227
+ "overloadedDeclarations": [],
228
+ "referencedDeclaration": 2274,
229
+ "src": "1325:6:12",
230
+ "typeDescriptions": {
231
+ "typeIdentifier": "t_bytes4",
232
+ "typeString": "bytes4"
233
+ }
234
+ },
235
+ "nodeType": "BinaryOperation",
236
+ "operator": "!=",
237
+ "rightExpression": {
238
+ "expression": {
239
+ "expression": {
240
+ "id": 2277,
241
+ "name": "IERC721Receiver",
242
+ "nodeType": "Identifier",
243
+ "overloadedDeclarations": [],
244
+ "referencedDeclaration": 2210,
245
+ "src": "1335:15:12",
246
+ "typeDescriptions": {
247
+ "typeIdentifier": "t_type$_t_contract$_IERC721Receiver_$2210_$",
248
+ "typeString": "type(contract IERC721Receiver)"
249
+ }
250
+ },
251
+ "id": 2278,
252
+ "isConstant": false,
253
+ "isLValue": false,
254
+ "isPure": true,
255
+ "lValueRequested": false,
256
+ "memberLocation": "1351:16:12",
257
+ "memberName": "onERC721Received",
258
+ "nodeType": "MemberAccess",
259
+ "referencedDeclaration": 2209,
260
+ "src": "1335:32:12",
261
+ "typeDescriptions": {
262
+ "typeIdentifier": "t_function_declaration_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_calldata_ptr_$returns$_t_bytes4_$",
263
+ "typeString": "function IERC721Receiver.onERC721Received(address,address,uint256,bytes calldata) returns (bytes4)"
264
+ }
265
+ },
266
+ "id": 2279,
267
+ "isConstant": false,
268
+ "isLValue": false,
269
+ "isPure": true,
270
+ "lValueRequested": false,
271
+ "memberLocation": "1368:8:12",
272
+ "memberName": "selector",
273
+ "nodeType": "MemberAccess",
274
+ "src": "1335:41:12",
275
+ "typeDescriptions": {
276
+ "typeIdentifier": "t_bytes4",
277
+ "typeString": "bytes4"
278
+ }
279
+ },
280
+ "src": "1325:51:12",
281
+ "typeDescriptions": {
282
+ "typeIdentifier": "t_bool",
283
+ "typeString": "bool"
284
+ }
285
+ },
286
+ "id": 2288,
287
+ "nodeType": "IfStatement",
288
+ "src": "1321:182:12",
289
+ "trueBody": {
290
+ "id": 2287,
291
+ "nodeType": "Block",
292
+ "src": "1378:125:12",
293
+ "statements": [
294
+ {
295
+ "errorCall": {
296
+ "arguments": [
297
+ {
298
+ "id": 2284,
299
+ "name": "to",
300
+ "nodeType": "Identifier",
301
+ "overloadedDeclarations": [],
302
+ "referencedDeclaration": 2252,
303
+ "src": "1481:2:12",
304
+ "typeDescriptions": {
305
+ "typeIdentifier": "t_address",
306
+ "typeString": "address"
307
+ }
308
+ }
309
+ ],
310
+ "expression": {
311
+ "argumentTypes": [
312
+ {
313
+ "typeIdentifier": "t_address",
314
+ "typeString": "address"
315
+ }
316
+ ],
317
+ "expression": {
318
+ "id": 2281,
319
+ "name": "IERC721Errors",
320
+ "nodeType": "Identifier",
321
+ "overloadedDeclarations": [],
322
+ "referencedDeclaration": 262,
323
+ "src": "1445:13:12",
324
+ "typeDescriptions": {
325
+ "typeIdentifier": "t_type$_t_contract$_IERC721Errors_$262_$",
326
+ "typeString": "type(contract IERC721Errors)"
327
+ }
328
+ },
329
+ "id": 2283,
330
+ "isConstant": false,
331
+ "isLValue": false,
332
+ "isPure": false,
333
+ "lValueRequested": false,
334
+ "memberLocation": "1459:21:12",
335
+ "memberName": "ERC721InvalidReceiver",
336
+ "nodeType": "MemberAccess",
337
+ "referencedDeclaration": 244,
338
+ "src": "1445:35:12",
339
+ "typeDescriptions": {
340
+ "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$",
341
+ "typeString": "function (address) pure"
342
+ }
343
+ },
344
+ "id": 2285,
345
+ "isConstant": false,
346
+ "isLValue": false,
347
+ "isPure": false,
348
+ "kind": "functionCall",
349
+ "lValueRequested": false,
350
+ "nameLocations": [],
351
+ "names": [],
352
+ "nodeType": "FunctionCall",
353
+ "src": "1445:39:12",
354
+ "tryCall": false,
355
+ "typeDescriptions": {
356
+ "typeIdentifier": "t_tuple$__$",
357
+ "typeString": "tuple()"
358
+ }
359
+ },
360
+ "id": 2286,
361
+ "nodeType": "RevertStatement",
362
+ "src": "1438:46:12"
363
+ }
364
+ ]
365
+ }
366
+ }
367
+ ]
368
+ },
369
+ "errorName": "",
370
+ "id": 2290,
371
+ "nodeType": "TryCatchClause",
372
+ "parameters": {
373
+ "id": 2275,
374
+ "nodeType": "ParameterList",
375
+ "parameters": [
376
+ {
377
+ "constant": false,
378
+ "id": 2274,
379
+ "mutability": "mutable",
380
+ "name": "retval",
381
+ "nameLocation": "1295:6:12",
382
+ "nodeType": "VariableDeclaration",
383
+ "scope": 2290,
384
+ "src": "1288:13:12",
385
+ "stateVariable": false,
386
+ "storageLocation": "default",
387
+ "typeDescriptions": {
388
+ "typeIdentifier": "t_bytes4",
389
+ "typeString": "bytes4"
390
+ },
391
+ "typeName": {
392
+ "id": 2273,
393
+ "name": "bytes4",
394
+ "nodeType": "ElementaryTypeName",
395
+ "src": "1288:6:12",
396
+ "typeDescriptions": {
397
+ "typeIdentifier": "t_bytes4",
398
+ "typeString": "bytes4"
399
+ }
400
+ },
401
+ "visibility": "internal"
402
+ }
403
+ ],
404
+ "src": "1287:15:12"
405
+ },
406
+ "src": "1279:238:12"
407
+ },
408
+ {
409
+ "block": {
410
+ "id": 2308,
411
+ "nodeType": "Block",
412
+ "src": "1546:357:12",
413
+ "statements": [
414
+ {
415
+ "condition": {
416
+ "commonType": {
417
+ "typeIdentifier": "t_uint256",
418
+ "typeString": "uint256"
419
+ },
420
+ "id": 2297,
421
+ "isConstant": false,
422
+ "isLValue": false,
423
+ "isPure": false,
424
+ "lValueRequested": false,
425
+ "leftExpression": {
426
+ "expression": {
427
+ "id": 2294,
428
+ "name": "reason",
429
+ "nodeType": "Identifier",
430
+ "overloadedDeclarations": [],
431
+ "referencedDeclaration": 2292,
432
+ "src": "1568:6:12",
433
+ "typeDescriptions": {
434
+ "typeIdentifier": "t_bytes_memory_ptr",
435
+ "typeString": "bytes memory"
436
+ }
437
+ },
438
+ "id": 2295,
439
+ "isConstant": false,
440
+ "isLValue": false,
441
+ "isPure": false,
442
+ "lValueRequested": false,
443
+ "memberLocation": "1575:6:12",
444
+ "memberName": "length",
445
+ "nodeType": "MemberAccess",
446
+ "src": "1568:13:12",
447
+ "typeDescriptions": {
448
+ "typeIdentifier": "t_uint256",
449
+ "typeString": "uint256"
450
+ }
451
+ },
452
+ "nodeType": "BinaryOperation",
453
+ "operator": "==",
454
+ "rightExpression": {
455
+ "hexValue": "30",
456
+ "id": 2296,
457
+ "isConstant": false,
458
+ "isLValue": false,
459
+ "isPure": true,
460
+ "kind": "number",
461
+ "lValueRequested": false,
462
+ "nodeType": "Literal",
463
+ "src": "1585:1:12",
464
+ "typeDescriptions": {
465
+ "typeIdentifier": "t_rational_0_by_1",
466
+ "typeString": "int_const 0"
467
+ },
468
+ "value": "0"
469
+ },
470
+ "src": "1568:18:12",
471
+ "typeDescriptions": {
472
+ "typeIdentifier": "t_bool",
473
+ "typeString": "bool"
474
+ }
475
+ },
476
+ "falseBody": {
477
+ "id": 2306,
478
+ "nodeType": "Block",
479
+ "src": "1736:153:12",
480
+ "statements": [
481
+ {
482
+ "AST": {
483
+ "nativeSrc": "1783:88:12",
484
+ "nodeType": "YulBlock",
485
+ "src": "1783:88:12",
486
+ "statements": [
487
+ {
488
+ "expression": {
489
+ "arguments": [
490
+ {
491
+ "arguments": [
492
+ {
493
+ "name": "reason",
494
+ "nativeSrc": "1820:6:12",
495
+ "nodeType": "YulIdentifier",
496
+ "src": "1820:6:12"
497
+ },
498
+ {
499
+ "kind": "number",
500
+ "nativeSrc": "1828:4:12",
501
+ "nodeType": "YulLiteral",
502
+ "src": "1828:4:12",
503
+ "type": "",
504
+ "value": "0x20"
505
+ }
506
+ ],
507
+ "functionName": {
508
+ "name": "add",
509
+ "nativeSrc": "1816:3:12",
510
+ "nodeType": "YulIdentifier",
511
+ "src": "1816:3:12"
512
+ },
513
+ "nativeSrc": "1816:17:12",
514
+ "nodeType": "YulFunctionCall",
515
+ "src": "1816:17:12"
516
+ },
517
+ {
518
+ "arguments": [
519
+ {
520
+ "name": "reason",
521
+ "nativeSrc": "1841:6:12",
522
+ "nodeType": "YulIdentifier",
523
+ "src": "1841:6:12"
524
+ }
525
+ ],
526
+ "functionName": {
527
+ "name": "mload",
528
+ "nativeSrc": "1835:5:12",
529
+ "nodeType": "YulIdentifier",
530
+ "src": "1835:5:12"
531
+ },
532
+ "nativeSrc": "1835:13:12",
533
+ "nodeType": "YulFunctionCall",
534
+ "src": "1835:13:12"
535
+ }
536
+ ],
537
+ "functionName": {
538
+ "name": "revert",
539
+ "nativeSrc": "1809:6:12",
540
+ "nodeType": "YulIdentifier",
541
+ "src": "1809:6:12"
542
+ },
543
+ "nativeSrc": "1809:40:12",
544
+ "nodeType": "YulFunctionCall",
545
+ "src": "1809:40:12"
546
+ },
547
+ "nativeSrc": "1809:40:12",
548
+ "nodeType": "YulExpressionStatement",
549
+ "src": "1809:40:12"
550
+ }
551
+ ]
552
+ },
553
+ "evmVersion": "shanghai",
554
+ "externalReferences": [
555
+ {
556
+ "declaration": 2292,
557
+ "isOffset": false,
558
+ "isSlot": false,
559
+ "src": "1820:6:12",
560
+ "valueSize": 1
561
+ },
562
+ {
563
+ "declaration": 2292,
564
+ "isOffset": false,
565
+ "isSlot": false,
566
+ "src": "1841:6:12",
567
+ "valueSize": 1
568
+ }
569
+ ],
570
+ "flags": [
571
+ "memory-safe"
572
+ ],
573
+ "id": 2305,
574
+ "nodeType": "InlineAssembly",
575
+ "src": "1758:113:12"
576
+ }
577
+ ]
578
+ },
579
+ "id": 2307,
580
+ "nodeType": "IfStatement",
581
+ "src": "1564:325:12",
582
+ "trueBody": {
583
+ "id": 2304,
584
+ "nodeType": "Block",
585
+ "src": "1588:142:12",
586
+ "statements": [
587
+ {
588
+ "errorCall": {
589
+ "arguments": [
590
+ {
591
+ "id": 2301,
592
+ "name": "to",
593
+ "nodeType": "Identifier",
594
+ "overloadedDeclarations": [],
595
+ "referencedDeclaration": 2252,
596
+ "src": "1708:2:12",
597
+ "typeDescriptions": {
598
+ "typeIdentifier": "t_address",
599
+ "typeString": "address"
600
+ }
601
+ }
602
+ ],
603
+ "expression": {
604
+ "argumentTypes": [
605
+ {
606
+ "typeIdentifier": "t_address",
607
+ "typeString": "address"
608
+ }
609
+ ],
610
+ "expression": {
611
+ "id": 2298,
612
+ "name": "IERC721Errors",
613
+ "nodeType": "Identifier",
614
+ "overloadedDeclarations": [],
615
+ "referencedDeclaration": 262,
616
+ "src": "1672:13:12",
617
+ "typeDescriptions": {
618
+ "typeIdentifier": "t_type$_t_contract$_IERC721Errors_$262_$",
619
+ "typeString": "type(contract IERC721Errors)"
620
+ }
621
+ },
622
+ "id": 2300,
623
+ "isConstant": false,
624
+ "isLValue": false,
625
+ "isPure": false,
626
+ "lValueRequested": false,
627
+ "memberLocation": "1686:21:12",
628
+ "memberName": "ERC721InvalidReceiver",
629
+ "nodeType": "MemberAccess",
630
+ "referencedDeclaration": 244,
631
+ "src": "1672:35:12",
632
+ "typeDescriptions": {
633
+ "typeIdentifier": "t_function_error_pure$_t_address_$returns$__$",
634
+ "typeString": "function (address) pure"
635
+ }
636
+ },
637
+ "id": 2302,
638
+ "isConstant": false,
639
+ "isLValue": false,
640
+ "isPure": false,
641
+ "kind": "functionCall",
642
+ "lValueRequested": false,
643
+ "nameLocations": [],
644
+ "names": [],
645
+ "nodeType": "FunctionCall",
646
+ "src": "1672:39:12",
647
+ "tryCall": false,
648
+ "typeDescriptions": {
649
+ "typeIdentifier": "t_tuple$__$",
650
+ "typeString": "tuple()"
651
+ }
652
+ },
653
+ "id": 2303,
654
+ "nodeType": "RevertStatement",
655
+ "src": "1665:46:12"
656
+ }
657
+ ]
658
+ }
659
+ }
660
+ ]
661
+ },
662
+ "errorName": "",
663
+ "id": 2309,
664
+ "nodeType": "TryCatchClause",
665
+ "parameters": {
666
+ "id": 2293,
667
+ "nodeType": "ParameterList",
668
+ "parameters": [
669
+ {
670
+ "constant": false,
671
+ "id": 2292,
672
+ "mutability": "mutable",
673
+ "name": "reason",
674
+ "nameLocation": "1538:6:12",
675
+ "nodeType": "VariableDeclaration",
676
+ "scope": 2309,
677
+ "src": "1525:19:12",
678
+ "stateVariable": false,
679
+ "storageLocation": "memory",
680
+ "typeDescriptions": {
681
+ "typeIdentifier": "t_bytes_memory_ptr",
682
+ "typeString": "bytes"
683
+ },
684
+ "typeName": {
685
+ "id": 2291,
686
+ "name": "bytes",
687
+ "nodeType": "ElementaryTypeName",
688
+ "src": "1525:5:12",
689
+ "typeDescriptions": {
690
+ "typeIdentifier": "t_bytes_storage_ptr",
691
+ "typeString": "bytes"
692
+ }
693
+ },
694
+ "visibility": "internal"
695
+ }
696
+ ],
697
+ "src": "1524:21:12"
698
+ },
699
+ "src": "1518:385:12"
700
+ }
701
+ ],
702
+ "externalCall": {
703
+ "arguments": [
704
+ {
705
+ "id": 2268,
706
+ "name": "operator",
707
+ "nodeType": "Identifier",
708
+ "overloadedDeclarations": [],
709
+ "referencedDeclaration": 2248,
710
+ "src": "1248:8:12",
711
+ "typeDescriptions": {
712
+ "typeIdentifier": "t_address",
713
+ "typeString": "address"
714
+ }
715
+ },
716
+ {
717
+ "id": 2269,
718
+ "name": "from",
719
+ "nodeType": "Identifier",
720
+ "overloadedDeclarations": [],
721
+ "referencedDeclaration": 2250,
722
+ "src": "1258:4:12",
723
+ "typeDescriptions": {
724
+ "typeIdentifier": "t_address",
725
+ "typeString": "address"
726
+ }
727
+ },
728
+ {
729
+ "id": 2270,
730
+ "name": "tokenId",
731
+ "nodeType": "Identifier",
732
+ "overloadedDeclarations": [],
733
+ "referencedDeclaration": 2254,
734
+ "src": "1264:7:12",
735
+ "typeDescriptions": {
736
+ "typeIdentifier": "t_uint256",
737
+ "typeString": "uint256"
738
+ }
739
+ },
740
+ {
741
+ "id": 2271,
742
+ "name": "data",
743
+ "nodeType": "Identifier",
744
+ "overloadedDeclarations": [],
745
+ "referencedDeclaration": 2256,
746
+ "src": "1273:4:12",
747
+ "typeDescriptions": {
748
+ "typeIdentifier": "t_bytes_memory_ptr",
749
+ "typeString": "bytes memory"
750
+ }
751
+ }
752
+ ],
753
+ "expression": {
754
+ "argumentTypes": [
755
+ {
756
+ "typeIdentifier": "t_address",
757
+ "typeString": "address"
758
+ },
759
+ {
760
+ "typeIdentifier": "t_address",
761
+ "typeString": "address"
762
+ },
763
+ {
764
+ "typeIdentifier": "t_uint256",
765
+ "typeString": "uint256"
766
+ },
767
+ {
768
+ "typeIdentifier": "t_bytes_memory_ptr",
769
+ "typeString": "bytes memory"
770
+ }
771
+ ],
772
+ "expression": {
773
+ "arguments": [
774
+ {
775
+ "id": 2265,
776
+ "name": "to",
777
+ "nodeType": "Identifier",
778
+ "overloadedDeclarations": [],
779
+ "referencedDeclaration": 2252,
780
+ "src": "1227:2:12",
781
+ "typeDescriptions": {
782
+ "typeIdentifier": "t_address",
783
+ "typeString": "address"
784
+ }
785
+ }
786
+ ],
787
+ "expression": {
788
+ "argumentTypes": [
789
+ {
790
+ "typeIdentifier": "t_address",
791
+ "typeString": "address"
792
+ }
793
+ ],
794
+ "id": 2264,
795
+ "name": "IERC721Receiver",
796
+ "nodeType": "Identifier",
797
+ "overloadedDeclarations": [],
798
+ "referencedDeclaration": 2210,
799
+ "src": "1211:15:12",
800
+ "typeDescriptions": {
801
+ "typeIdentifier": "t_type$_t_contract$_IERC721Receiver_$2210_$",
802
+ "typeString": "type(contract IERC721Receiver)"
803
+ }
804
+ },
805
+ "id": 2266,
806
+ "isConstant": false,
807
+ "isLValue": false,
808
+ "isPure": false,
809
+ "kind": "typeConversion",
810
+ "lValueRequested": false,
811
+ "nameLocations": [],
812
+ "names": [],
813
+ "nodeType": "FunctionCall",
814
+ "src": "1211:19:12",
815
+ "tryCall": false,
816
+ "typeDescriptions": {
817
+ "typeIdentifier": "t_contract$_IERC721Receiver_$2210",
818
+ "typeString": "contract IERC721Receiver"
819
+ }
820
+ },
821
+ "id": 2267,
822
+ "isConstant": false,
823
+ "isLValue": false,
824
+ "isPure": false,
825
+ "lValueRequested": false,
826
+ "memberLocation": "1231:16:12",
827
+ "memberName": "onERC721Received",
828
+ "nodeType": "MemberAccess",
829
+ "referencedDeclaration": 2209,
830
+ "src": "1211:36:12",
831
+ "typeDescriptions": {
832
+ "typeIdentifier": "t_function_external_nonpayable$_t_address_$_t_address_$_t_uint256_$_t_bytes_memory_ptr_$returns$_t_bytes4_$",
833
+ "typeString": "function (address,address,uint256,bytes memory) external returns (bytes4)"
834
+ }
835
+ },
836
+ "id": 2272,
837
+ "isConstant": false,
838
+ "isLValue": false,
839
+ "isPure": false,
840
+ "kind": "functionCall",
841
+ "lValueRequested": false,
842
+ "nameLocations": [],
843
+ "names": [],
844
+ "nodeType": "FunctionCall",
845
+ "src": "1211:67:12",
846
+ "tryCall": true,
847
+ "typeDescriptions": {
848
+ "typeIdentifier": "t_bytes4",
849
+ "typeString": "bytes4"
850
+ }
851
+ },
852
+ "id": 2310,
853
+ "nodeType": "TryStatement",
854
+ "src": "1207:696:12"
855
+ }
856
+ ]
857
+ }
858
+ }
859
+ ]
860
+ },
861
+ "documentation": {
862
+ "id": 2246,
863
+ "nodeType": "StructuredDocumentation",
864
+ "src": "457:531:12",
865
+ "text": " @dev Performs an acceptance check for the provided `operator` by calling {IERC721Receiver-onERC721Received}\n on the `to` address. The `operator` is generally the address that initiated the token transfer (i.e. `msg.sender`).\n The acceptance call is not executed and treated as a no-op if the target address doesn't contain code (i.e. an EOA).\n Otherwise, the recipient must implement {IERC721Receiver-onERC721Received} and return the acceptance magic value to accept\n the transfer."
866
+ },
867
+ "id": 2314,
868
+ "implemented": true,
869
+ "kind": "function",
870
+ "modifiers": [],
871
+ "name": "checkOnERC721Received",
872
+ "nameLocation": "1002:21:12",
873
+ "nodeType": "FunctionDefinition",
874
+ "parameters": {
875
+ "id": 2257,
876
+ "nodeType": "ParameterList",
877
+ "parameters": [
878
+ {
879
+ "constant": false,
880
+ "id": 2248,
881
+ "mutability": "mutable",
882
+ "name": "operator",
883
+ "nameLocation": "1041:8:12",
884
+ "nodeType": "VariableDeclaration",
885
+ "scope": 2314,
886
+ "src": "1033:16:12",
887
+ "stateVariable": false,
888
+ "storageLocation": "default",
889
+ "typeDescriptions": {
890
+ "typeIdentifier": "t_address",
891
+ "typeString": "address"
892
+ },
893
+ "typeName": {
894
+ "id": 2247,
895
+ "name": "address",
896
+ "nodeType": "ElementaryTypeName",
897
+ "src": "1033:7:12",
898
+ "stateMutability": "nonpayable",
899
+ "typeDescriptions": {
900
+ "typeIdentifier": "t_address",
901
+ "typeString": "address"
902
+ }
903
+ },
904
+ "visibility": "internal"
905
+ },
906
+ {
907
+ "constant": false,
908
+ "id": 2250,
909
+ "mutability": "mutable",
910
+ "name": "from",
911
+ "nameLocation": "1067:4:12",
912
+ "nodeType": "VariableDeclaration",
913
+ "scope": 2314,
914
+ "src": "1059:12:12",
915
+ "stateVariable": false,
916
+ "storageLocation": "default",
917
+ "typeDescriptions": {
918
+ "typeIdentifier": "t_address",
919
+ "typeString": "address"
920
+ },
921
+ "typeName": {
922
+ "id": 2249,
923
+ "name": "address",
924
+ "nodeType": "ElementaryTypeName",
925
+ "src": "1059:7:12",
926
+ "stateMutability": "nonpayable",
927
+ "typeDescriptions": {
928
+ "typeIdentifier": "t_address",
929
+ "typeString": "address"
930
+ }
931
+ },
932
+ "visibility": "internal"
933
+ },
934
+ {
935
+ "constant": false,
936
+ "id": 2252,
937
+ "mutability": "mutable",
938
+ "name": "to",
939
+ "nameLocation": "1089:2:12",
940
+ "nodeType": "VariableDeclaration",
941
+ "scope": 2314,
942
+ "src": "1081:10:12",
943
+ "stateVariable": false,
944
+ "storageLocation": "default",
945
+ "typeDescriptions": {
946
+ "typeIdentifier": "t_address",
947
+ "typeString": "address"
948
+ },
949
+ "typeName": {
950
+ "id": 2251,
951
+ "name": "address",
952
+ "nodeType": "ElementaryTypeName",
953
+ "src": "1081:7:12",
954
+ "stateMutability": "nonpayable",
955
+ "typeDescriptions": {
956
+ "typeIdentifier": "t_address",
957
+ "typeString": "address"
958
+ }
959
+ },
960
+ "visibility": "internal"
961
+ },
962
+ {
963
+ "constant": false,
964
+ "id": 2254,
965
+ "mutability": "mutable",
966
+ "name": "tokenId",
967
+ "nameLocation": "1109:7:12",
968
+ "nodeType": "VariableDeclaration",
969
+ "scope": 2314,
970
+ "src": "1101:15:12",
971
+ "stateVariable": false,
972
+ "storageLocation": "default",
973
+ "typeDescriptions": {
974
+ "typeIdentifier": "t_uint256",
975
+ "typeString": "uint256"
976
+ },
977
+ "typeName": {
978
+ "id": 2253,
979
+ "name": "uint256",
980
+ "nodeType": "ElementaryTypeName",
981
+ "src": "1101:7:12",
982
+ "typeDescriptions": {
983
+ "typeIdentifier": "t_uint256",
984
+ "typeString": "uint256"
985
+ }
986
+ },
987
+ "visibility": "internal"
988
+ },
989
+ {
990
+ "constant": false,
991
+ "id": 2256,
992
+ "mutability": "mutable",
993
+ "name": "data",
994
+ "nameLocation": "1139:4:12",
995
+ "nodeType": "VariableDeclaration",
996
+ "scope": 2314,
997
+ "src": "1126:17:12",
998
+ "stateVariable": false,
999
+ "storageLocation": "memory",
1000
+ "typeDescriptions": {
1001
+ "typeIdentifier": "t_bytes_memory_ptr",
1002
+ "typeString": "bytes"
1003
+ },
1004
+ "typeName": {
1005
+ "id": 2255,
1006
+ "name": "bytes",
1007
+ "nodeType": "ElementaryTypeName",
1008
+ "src": "1126:5:12",
1009
+ "typeDescriptions": {
1010
+ "typeIdentifier": "t_bytes_storage_ptr",
1011
+ "typeString": "bytes"
1012
+ }
1013
+ },
1014
+ "visibility": "internal"
1015
+ }
1016
+ ],
1017
+ "src": "1023:126:12"
1018
+ },
1019
+ "returnParameters": {
1020
+ "id": 2258,
1021
+ "nodeType": "ParameterList",
1022
+ "parameters": [],
1023
+ "src": "1159:0:12"
1024
+ },
1025
+ "scope": 2315,
1026
+ "src": "993:926:12",
1027
+ "stateMutability": "nonpayable",
1028
+ "virtual": false,
1029
+ "visibility": "internal"
1030
+ }
1031
+ ],
1032
+ "scope": 2316,
1033
+ "src": "431:1490:12",
1034
+ "usedErrors": [],
1035
+ "usedEvents": []
1036
+ }
1037
+ ],
1038
+ "src": "118:1804:12"
1039
+ },
1040
+ "compiler": {
1041
+ "name": "solc",
1042
+ "version": "0.8.21+commit.d9974bed.Emscripten.clang"
1043
+ },
1044
+ "networks": {},
1045
+ "schemaVersion": "3.4.16",
1046
+ "updatedAt": "2026-01-24T20:23:04.028Z",
1047
+ "devdoc": {
1048
+ "details": "Library that provide common ERC-721 utility functions. See https://eips.ethereum.org/EIPS/eip-721[ERC-721]. _Available since v5.1._",
1049
+ "kind": "dev",
1050
+ "methods": {},
1051
+ "version": 1
1052
+ },
1053
+ "userdoc": {
1054
+ "kind": "user",
1055
+ "methods": {},
1056
+ "version": 1
1057
+ }
1058
+ }