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,865 @@
1
+ {
2
+ "contractName": "Nonces",
3
+ "abi": [
4
+ {
5
+ "inputs": [
6
+ {
7
+ "internalType": "address",
8
+ "name": "account",
9
+ "type": "address"
10
+ },
11
+ {
12
+ "internalType": "uint256",
13
+ "name": "currentNonce",
14
+ "type": "uint256"
15
+ }
16
+ ],
17
+ "name": "InvalidAccountNonce",
18
+ "type": "error"
19
+ },
20
+ {
21
+ "inputs": [
22
+ {
23
+ "internalType": "address",
24
+ "name": "owner",
25
+ "type": "address"
26
+ }
27
+ ],
28
+ "name": "nonces",
29
+ "outputs": [
30
+ {
31
+ "internalType": "uint256",
32
+ "name": "",
33
+ "type": "uint256"
34
+ }
35
+ ],
36
+ "stateMutability": "view",
37
+ "type": "function"
38
+ }
39
+ ],
40
+ "metadata": "{\"compiler\":{\"version\":\"0.8.21+commit.d9974bed\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"currentNonce\",\"type\":\"uint256\"}],\"name\":\"InvalidAccountNonce\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"details\":\"Provides tracking nonces for addresses. Nonces will only increment.\",\"errors\":{\"InvalidAccountNonce(address,uint256)\":[{\"details\":\"The nonce used for an `account` is not the expected current nonce.\"}]},\"kind\":\"dev\",\"methods\":{\"nonces(address)\":{\"details\":\"Returns the next unused nonce for an address.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/Nonces.sol\":\"Nonces\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Nonces.sol\":{\"keccak256\":\"0x0082767004fca261c332e9ad100868327a863a88ef724e844857128845ab350f\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://132dce9686a54e025eb5ba5d2e48208f847a1ec3e60a3e527766d7bf53fb7f9e\",\"dweb:/ipfs/QmXn1a2nUZMpu2z6S88UoTfMVtY2YNh86iGrzJDYmMkKeZ\"]}},\"version\":1}",
41
+ "bytecode": "0x",
42
+ "deployedBytecode": "0x",
43
+ "immutableReferences": {},
44
+ "generatedSources": [],
45
+ "deployedGeneratedSources": [],
46
+ "sourceMap": "",
47
+ "deployedSourceMap": "",
48
+ "source": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol)\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides tracking nonces for addresses. Nonces will only increment.\n */\nabstract contract Nonces {\n /**\n * @dev The nonce used for an `account` is not the expected current nonce.\n */\n error InvalidAccountNonce(address account, uint256 currentNonce);\n\n mapping(address account => uint256) private _nonces;\n\n /**\n * @dev Returns the next unused nonce for an address.\n */\n function nonces(address owner) public view virtual returns (uint256) {\n return _nonces[owner];\n }\n\n /**\n * @dev Consumes a nonce.\n *\n * Returns the current value and increments nonce.\n */\n function _useNonce(address owner) internal virtual returns (uint256) {\n // For each account, the nonce has an initial value of 0, can only be incremented by one, and cannot be\n // decremented or reset. This guarantees that the nonce never overflows.\n unchecked {\n // It is important to do x++ and not ++x here.\n return _nonces[owner]++;\n }\n }\n\n /**\n * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`.\n */\n function _useCheckedNonce(address owner, uint256 nonce) internal virtual {\n uint256 current = _useNonce(owner);\n if (nonce != current) {\n revert InvalidAccountNonce(owner, current);\n }\n }\n}\n",
49
+ "sourcePath": "@openzeppelin\\contracts\\utils\\Nonces.sol",
50
+ "ast": {
51
+ "absolutePath": "@openzeppelin/contracts/utils/Nonces.sol",
52
+ "exportedSymbols": {
53
+ "Nonces": [
54
+ 2413
55
+ ]
56
+ },
57
+ "id": 2414,
58
+ "license": "MIT",
59
+ "nodeType": "SourceUnit",
60
+ "nodes": [
61
+ {
62
+ "id": 2347,
63
+ "literals": [
64
+ "solidity",
65
+ "^",
66
+ "0.8",
67
+ ".20"
68
+ ],
69
+ "nodeType": "PragmaDirective",
70
+ "src": "99:24:14"
71
+ },
72
+ {
73
+ "abstract": true,
74
+ "baseContracts": [],
75
+ "canonicalName": "Nonces",
76
+ "contractDependencies": [],
77
+ "contractKind": "contract",
78
+ "documentation": {
79
+ "id": 2348,
80
+ "nodeType": "StructuredDocumentation",
81
+ "src": "125:83:14",
82
+ "text": " @dev Provides tracking nonces for addresses. Nonces will only increment."
83
+ },
84
+ "fullyImplemented": true,
85
+ "id": 2413,
86
+ "linearizedBaseContracts": [
87
+ 2413
88
+ ],
89
+ "name": "Nonces",
90
+ "nameLocation": "227:6:14",
91
+ "nodeType": "ContractDefinition",
92
+ "nodes": [
93
+ {
94
+ "documentation": {
95
+ "id": 2349,
96
+ "nodeType": "StructuredDocumentation",
97
+ "src": "240:90:14",
98
+ "text": " @dev The nonce used for an `account` is not the expected current nonce."
99
+ },
100
+ "errorSelector": "752d88c0",
101
+ "id": 2355,
102
+ "name": "InvalidAccountNonce",
103
+ "nameLocation": "341:19:14",
104
+ "nodeType": "ErrorDefinition",
105
+ "parameters": {
106
+ "id": 2354,
107
+ "nodeType": "ParameterList",
108
+ "parameters": [
109
+ {
110
+ "constant": false,
111
+ "id": 2351,
112
+ "mutability": "mutable",
113
+ "name": "account",
114
+ "nameLocation": "369:7:14",
115
+ "nodeType": "VariableDeclaration",
116
+ "scope": 2355,
117
+ "src": "361:15:14",
118
+ "stateVariable": false,
119
+ "storageLocation": "default",
120
+ "typeDescriptions": {
121
+ "typeIdentifier": "t_address",
122
+ "typeString": "address"
123
+ },
124
+ "typeName": {
125
+ "id": 2350,
126
+ "name": "address",
127
+ "nodeType": "ElementaryTypeName",
128
+ "src": "361:7:14",
129
+ "stateMutability": "nonpayable",
130
+ "typeDescriptions": {
131
+ "typeIdentifier": "t_address",
132
+ "typeString": "address"
133
+ }
134
+ },
135
+ "visibility": "internal"
136
+ },
137
+ {
138
+ "constant": false,
139
+ "id": 2353,
140
+ "mutability": "mutable",
141
+ "name": "currentNonce",
142
+ "nameLocation": "386:12:14",
143
+ "nodeType": "VariableDeclaration",
144
+ "scope": 2355,
145
+ "src": "378:20:14",
146
+ "stateVariable": false,
147
+ "storageLocation": "default",
148
+ "typeDescriptions": {
149
+ "typeIdentifier": "t_uint256",
150
+ "typeString": "uint256"
151
+ },
152
+ "typeName": {
153
+ "id": 2352,
154
+ "name": "uint256",
155
+ "nodeType": "ElementaryTypeName",
156
+ "src": "378:7:14",
157
+ "typeDescriptions": {
158
+ "typeIdentifier": "t_uint256",
159
+ "typeString": "uint256"
160
+ }
161
+ },
162
+ "visibility": "internal"
163
+ }
164
+ ],
165
+ "src": "360:39:14"
166
+ },
167
+ "src": "335:65:14"
168
+ },
169
+ {
170
+ "constant": false,
171
+ "id": 2359,
172
+ "mutability": "mutable",
173
+ "name": "_nonces",
174
+ "nameLocation": "450:7:14",
175
+ "nodeType": "VariableDeclaration",
176
+ "scope": 2413,
177
+ "src": "406:51:14",
178
+ "stateVariable": true,
179
+ "storageLocation": "default",
180
+ "typeDescriptions": {
181
+ "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
182
+ "typeString": "mapping(address => uint256)"
183
+ },
184
+ "typeName": {
185
+ "id": 2358,
186
+ "keyName": "account",
187
+ "keyNameLocation": "422:7:14",
188
+ "keyType": {
189
+ "id": 2356,
190
+ "name": "address",
191
+ "nodeType": "ElementaryTypeName",
192
+ "src": "414:7:14",
193
+ "typeDescriptions": {
194
+ "typeIdentifier": "t_address",
195
+ "typeString": "address"
196
+ }
197
+ },
198
+ "nodeType": "Mapping",
199
+ "src": "406:35:14",
200
+ "typeDescriptions": {
201
+ "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
202
+ "typeString": "mapping(address => uint256)"
203
+ },
204
+ "valueName": "",
205
+ "valueNameLocation": "-1:-1:-1",
206
+ "valueType": {
207
+ "id": 2357,
208
+ "name": "uint256",
209
+ "nodeType": "ElementaryTypeName",
210
+ "src": "433:7:14",
211
+ "typeDescriptions": {
212
+ "typeIdentifier": "t_uint256",
213
+ "typeString": "uint256"
214
+ }
215
+ }
216
+ },
217
+ "visibility": "private"
218
+ },
219
+ {
220
+ "body": {
221
+ "id": 2371,
222
+ "nodeType": "Block",
223
+ "src": "607:38:14",
224
+ "statements": [
225
+ {
226
+ "expression": {
227
+ "baseExpression": {
228
+ "id": 2367,
229
+ "name": "_nonces",
230
+ "nodeType": "Identifier",
231
+ "overloadedDeclarations": [],
232
+ "referencedDeclaration": 2359,
233
+ "src": "624:7:14",
234
+ "typeDescriptions": {
235
+ "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
236
+ "typeString": "mapping(address => uint256)"
237
+ }
238
+ },
239
+ "id": 2369,
240
+ "indexExpression": {
241
+ "id": 2368,
242
+ "name": "owner",
243
+ "nodeType": "Identifier",
244
+ "overloadedDeclarations": [],
245
+ "referencedDeclaration": 2362,
246
+ "src": "632:5:14",
247
+ "typeDescriptions": {
248
+ "typeIdentifier": "t_address",
249
+ "typeString": "address"
250
+ }
251
+ },
252
+ "isConstant": false,
253
+ "isLValue": true,
254
+ "isPure": false,
255
+ "lValueRequested": false,
256
+ "nodeType": "IndexAccess",
257
+ "src": "624:14:14",
258
+ "typeDescriptions": {
259
+ "typeIdentifier": "t_uint256",
260
+ "typeString": "uint256"
261
+ }
262
+ },
263
+ "functionReturnParameters": 2366,
264
+ "id": 2370,
265
+ "nodeType": "Return",
266
+ "src": "617:21:14"
267
+ }
268
+ ]
269
+ },
270
+ "documentation": {
271
+ "id": 2360,
272
+ "nodeType": "StructuredDocumentation",
273
+ "src": "464:69:14",
274
+ "text": " @dev Returns the next unused nonce for an address."
275
+ },
276
+ "functionSelector": "7ecebe00",
277
+ "id": 2372,
278
+ "implemented": true,
279
+ "kind": "function",
280
+ "modifiers": [],
281
+ "name": "nonces",
282
+ "nameLocation": "547:6:14",
283
+ "nodeType": "FunctionDefinition",
284
+ "parameters": {
285
+ "id": 2363,
286
+ "nodeType": "ParameterList",
287
+ "parameters": [
288
+ {
289
+ "constant": false,
290
+ "id": 2362,
291
+ "mutability": "mutable",
292
+ "name": "owner",
293
+ "nameLocation": "562:5:14",
294
+ "nodeType": "VariableDeclaration",
295
+ "scope": 2372,
296
+ "src": "554:13:14",
297
+ "stateVariable": false,
298
+ "storageLocation": "default",
299
+ "typeDescriptions": {
300
+ "typeIdentifier": "t_address",
301
+ "typeString": "address"
302
+ },
303
+ "typeName": {
304
+ "id": 2361,
305
+ "name": "address",
306
+ "nodeType": "ElementaryTypeName",
307
+ "src": "554:7:14",
308
+ "stateMutability": "nonpayable",
309
+ "typeDescriptions": {
310
+ "typeIdentifier": "t_address",
311
+ "typeString": "address"
312
+ }
313
+ },
314
+ "visibility": "internal"
315
+ }
316
+ ],
317
+ "src": "553:15:14"
318
+ },
319
+ "returnParameters": {
320
+ "id": 2366,
321
+ "nodeType": "ParameterList",
322
+ "parameters": [
323
+ {
324
+ "constant": false,
325
+ "id": 2365,
326
+ "mutability": "mutable",
327
+ "name": "",
328
+ "nameLocation": "-1:-1:-1",
329
+ "nodeType": "VariableDeclaration",
330
+ "scope": 2372,
331
+ "src": "598:7:14",
332
+ "stateVariable": false,
333
+ "storageLocation": "default",
334
+ "typeDescriptions": {
335
+ "typeIdentifier": "t_uint256",
336
+ "typeString": "uint256"
337
+ },
338
+ "typeName": {
339
+ "id": 2364,
340
+ "name": "uint256",
341
+ "nodeType": "ElementaryTypeName",
342
+ "src": "598:7:14",
343
+ "typeDescriptions": {
344
+ "typeIdentifier": "t_uint256",
345
+ "typeString": "uint256"
346
+ }
347
+ },
348
+ "visibility": "internal"
349
+ }
350
+ ],
351
+ "src": "597:9:14"
352
+ },
353
+ "scope": 2413,
354
+ "src": "538:107:14",
355
+ "stateMutability": "view",
356
+ "virtual": true,
357
+ "visibility": "public"
358
+ },
359
+ {
360
+ "body": {
361
+ "id": 2386,
362
+ "nodeType": "Block",
363
+ "src": "828:326:14",
364
+ "statements": [
365
+ {
366
+ "id": 2385,
367
+ "nodeType": "UncheckedBlock",
368
+ "src": "1031:117:14",
369
+ "statements": [
370
+ {
371
+ "expression": {
372
+ "id": 2383,
373
+ "isConstant": false,
374
+ "isLValue": false,
375
+ "isPure": false,
376
+ "lValueRequested": false,
377
+ "nodeType": "UnaryOperation",
378
+ "operator": "++",
379
+ "prefix": false,
380
+ "src": "1121:16:14",
381
+ "subExpression": {
382
+ "baseExpression": {
383
+ "id": 2380,
384
+ "name": "_nonces",
385
+ "nodeType": "Identifier",
386
+ "overloadedDeclarations": [],
387
+ "referencedDeclaration": 2359,
388
+ "src": "1121:7:14",
389
+ "typeDescriptions": {
390
+ "typeIdentifier": "t_mapping$_t_address_$_t_uint256_$",
391
+ "typeString": "mapping(address => uint256)"
392
+ }
393
+ },
394
+ "id": 2382,
395
+ "indexExpression": {
396
+ "id": 2381,
397
+ "name": "owner",
398
+ "nodeType": "Identifier",
399
+ "overloadedDeclarations": [],
400
+ "referencedDeclaration": 2375,
401
+ "src": "1129:5:14",
402
+ "typeDescriptions": {
403
+ "typeIdentifier": "t_address",
404
+ "typeString": "address"
405
+ }
406
+ },
407
+ "isConstant": false,
408
+ "isLValue": true,
409
+ "isPure": false,
410
+ "lValueRequested": true,
411
+ "nodeType": "IndexAccess",
412
+ "src": "1121:14:14",
413
+ "typeDescriptions": {
414
+ "typeIdentifier": "t_uint256",
415
+ "typeString": "uint256"
416
+ }
417
+ },
418
+ "typeDescriptions": {
419
+ "typeIdentifier": "t_uint256",
420
+ "typeString": "uint256"
421
+ }
422
+ },
423
+ "functionReturnParameters": 2379,
424
+ "id": 2384,
425
+ "nodeType": "Return",
426
+ "src": "1114:23:14"
427
+ }
428
+ ]
429
+ }
430
+ ]
431
+ },
432
+ "documentation": {
433
+ "id": 2373,
434
+ "nodeType": "StructuredDocumentation",
435
+ "src": "651:103:14",
436
+ "text": " @dev Consumes a nonce.\n Returns the current value and increments nonce."
437
+ },
438
+ "id": 2387,
439
+ "implemented": true,
440
+ "kind": "function",
441
+ "modifiers": [],
442
+ "name": "_useNonce",
443
+ "nameLocation": "768:9:14",
444
+ "nodeType": "FunctionDefinition",
445
+ "parameters": {
446
+ "id": 2376,
447
+ "nodeType": "ParameterList",
448
+ "parameters": [
449
+ {
450
+ "constant": false,
451
+ "id": 2375,
452
+ "mutability": "mutable",
453
+ "name": "owner",
454
+ "nameLocation": "786:5:14",
455
+ "nodeType": "VariableDeclaration",
456
+ "scope": 2387,
457
+ "src": "778:13:14",
458
+ "stateVariable": false,
459
+ "storageLocation": "default",
460
+ "typeDescriptions": {
461
+ "typeIdentifier": "t_address",
462
+ "typeString": "address"
463
+ },
464
+ "typeName": {
465
+ "id": 2374,
466
+ "name": "address",
467
+ "nodeType": "ElementaryTypeName",
468
+ "src": "778:7:14",
469
+ "stateMutability": "nonpayable",
470
+ "typeDescriptions": {
471
+ "typeIdentifier": "t_address",
472
+ "typeString": "address"
473
+ }
474
+ },
475
+ "visibility": "internal"
476
+ }
477
+ ],
478
+ "src": "777:15:14"
479
+ },
480
+ "returnParameters": {
481
+ "id": 2379,
482
+ "nodeType": "ParameterList",
483
+ "parameters": [
484
+ {
485
+ "constant": false,
486
+ "id": 2378,
487
+ "mutability": "mutable",
488
+ "name": "",
489
+ "nameLocation": "-1:-1:-1",
490
+ "nodeType": "VariableDeclaration",
491
+ "scope": 2387,
492
+ "src": "819:7:14",
493
+ "stateVariable": false,
494
+ "storageLocation": "default",
495
+ "typeDescriptions": {
496
+ "typeIdentifier": "t_uint256",
497
+ "typeString": "uint256"
498
+ },
499
+ "typeName": {
500
+ "id": 2377,
501
+ "name": "uint256",
502
+ "nodeType": "ElementaryTypeName",
503
+ "src": "819:7:14",
504
+ "typeDescriptions": {
505
+ "typeIdentifier": "t_uint256",
506
+ "typeString": "uint256"
507
+ }
508
+ },
509
+ "visibility": "internal"
510
+ }
511
+ ],
512
+ "src": "818:9:14"
513
+ },
514
+ "scope": 2413,
515
+ "src": "759:395:14",
516
+ "stateMutability": "nonpayable",
517
+ "virtual": true,
518
+ "visibility": "internal"
519
+ },
520
+ {
521
+ "body": {
522
+ "id": 2411,
523
+ "nodeType": "Block",
524
+ "src": "1338:149:14",
525
+ "statements": [
526
+ {
527
+ "assignments": [
528
+ 2396
529
+ ],
530
+ "declarations": [
531
+ {
532
+ "constant": false,
533
+ "id": 2396,
534
+ "mutability": "mutable",
535
+ "name": "current",
536
+ "nameLocation": "1356:7:14",
537
+ "nodeType": "VariableDeclaration",
538
+ "scope": 2411,
539
+ "src": "1348:15:14",
540
+ "stateVariable": false,
541
+ "storageLocation": "default",
542
+ "typeDescriptions": {
543
+ "typeIdentifier": "t_uint256",
544
+ "typeString": "uint256"
545
+ },
546
+ "typeName": {
547
+ "id": 2395,
548
+ "name": "uint256",
549
+ "nodeType": "ElementaryTypeName",
550
+ "src": "1348:7:14",
551
+ "typeDescriptions": {
552
+ "typeIdentifier": "t_uint256",
553
+ "typeString": "uint256"
554
+ }
555
+ },
556
+ "visibility": "internal"
557
+ }
558
+ ],
559
+ "id": 2400,
560
+ "initialValue": {
561
+ "arguments": [
562
+ {
563
+ "id": 2398,
564
+ "name": "owner",
565
+ "nodeType": "Identifier",
566
+ "overloadedDeclarations": [],
567
+ "referencedDeclaration": 2390,
568
+ "src": "1376:5:14",
569
+ "typeDescriptions": {
570
+ "typeIdentifier": "t_address",
571
+ "typeString": "address"
572
+ }
573
+ }
574
+ ],
575
+ "expression": {
576
+ "argumentTypes": [
577
+ {
578
+ "typeIdentifier": "t_address",
579
+ "typeString": "address"
580
+ }
581
+ ],
582
+ "id": 2397,
583
+ "name": "_useNonce",
584
+ "nodeType": "Identifier",
585
+ "overloadedDeclarations": [],
586
+ "referencedDeclaration": 2387,
587
+ "src": "1366:9:14",
588
+ "typeDescriptions": {
589
+ "typeIdentifier": "t_function_internal_nonpayable$_t_address_$returns$_t_uint256_$",
590
+ "typeString": "function (address) returns (uint256)"
591
+ }
592
+ },
593
+ "id": 2399,
594
+ "isConstant": false,
595
+ "isLValue": false,
596
+ "isPure": false,
597
+ "kind": "functionCall",
598
+ "lValueRequested": false,
599
+ "nameLocations": [],
600
+ "names": [],
601
+ "nodeType": "FunctionCall",
602
+ "src": "1366:16:14",
603
+ "tryCall": false,
604
+ "typeDescriptions": {
605
+ "typeIdentifier": "t_uint256",
606
+ "typeString": "uint256"
607
+ }
608
+ },
609
+ "nodeType": "VariableDeclarationStatement",
610
+ "src": "1348:34:14"
611
+ },
612
+ {
613
+ "condition": {
614
+ "commonType": {
615
+ "typeIdentifier": "t_uint256",
616
+ "typeString": "uint256"
617
+ },
618
+ "id": 2403,
619
+ "isConstant": false,
620
+ "isLValue": false,
621
+ "isPure": false,
622
+ "lValueRequested": false,
623
+ "leftExpression": {
624
+ "id": 2401,
625
+ "name": "nonce",
626
+ "nodeType": "Identifier",
627
+ "overloadedDeclarations": [],
628
+ "referencedDeclaration": 2392,
629
+ "src": "1396:5:14",
630
+ "typeDescriptions": {
631
+ "typeIdentifier": "t_uint256",
632
+ "typeString": "uint256"
633
+ }
634
+ },
635
+ "nodeType": "BinaryOperation",
636
+ "operator": "!=",
637
+ "rightExpression": {
638
+ "id": 2402,
639
+ "name": "current",
640
+ "nodeType": "Identifier",
641
+ "overloadedDeclarations": [],
642
+ "referencedDeclaration": 2396,
643
+ "src": "1405:7:14",
644
+ "typeDescriptions": {
645
+ "typeIdentifier": "t_uint256",
646
+ "typeString": "uint256"
647
+ }
648
+ },
649
+ "src": "1396:16:14",
650
+ "typeDescriptions": {
651
+ "typeIdentifier": "t_bool",
652
+ "typeString": "bool"
653
+ }
654
+ },
655
+ "id": 2410,
656
+ "nodeType": "IfStatement",
657
+ "src": "1392:89:14",
658
+ "trueBody": {
659
+ "id": 2409,
660
+ "nodeType": "Block",
661
+ "src": "1414:67:14",
662
+ "statements": [
663
+ {
664
+ "errorCall": {
665
+ "arguments": [
666
+ {
667
+ "id": 2405,
668
+ "name": "owner",
669
+ "nodeType": "Identifier",
670
+ "overloadedDeclarations": [],
671
+ "referencedDeclaration": 2390,
672
+ "src": "1455:5:14",
673
+ "typeDescriptions": {
674
+ "typeIdentifier": "t_address",
675
+ "typeString": "address"
676
+ }
677
+ },
678
+ {
679
+ "id": 2406,
680
+ "name": "current",
681
+ "nodeType": "Identifier",
682
+ "overloadedDeclarations": [],
683
+ "referencedDeclaration": 2396,
684
+ "src": "1462:7:14",
685
+ "typeDescriptions": {
686
+ "typeIdentifier": "t_uint256",
687
+ "typeString": "uint256"
688
+ }
689
+ }
690
+ ],
691
+ "expression": {
692
+ "argumentTypes": [
693
+ {
694
+ "typeIdentifier": "t_address",
695
+ "typeString": "address"
696
+ },
697
+ {
698
+ "typeIdentifier": "t_uint256",
699
+ "typeString": "uint256"
700
+ }
701
+ ],
702
+ "id": 2404,
703
+ "name": "InvalidAccountNonce",
704
+ "nodeType": "Identifier",
705
+ "overloadedDeclarations": [],
706
+ "referencedDeclaration": 2355,
707
+ "src": "1435:19:14",
708
+ "typeDescriptions": {
709
+ "typeIdentifier": "t_function_error_pure$_t_address_$_t_uint256_$returns$__$",
710
+ "typeString": "function (address,uint256) pure"
711
+ }
712
+ },
713
+ "id": 2407,
714
+ "isConstant": false,
715
+ "isLValue": false,
716
+ "isPure": false,
717
+ "kind": "functionCall",
718
+ "lValueRequested": false,
719
+ "nameLocations": [],
720
+ "names": [],
721
+ "nodeType": "FunctionCall",
722
+ "src": "1435:35:14",
723
+ "tryCall": false,
724
+ "typeDescriptions": {
725
+ "typeIdentifier": "t_tuple$__$",
726
+ "typeString": "tuple()"
727
+ }
728
+ },
729
+ "id": 2408,
730
+ "nodeType": "RevertStatement",
731
+ "src": "1428:42:14"
732
+ }
733
+ ]
734
+ }
735
+ }
736
+ ]
737
+ },
738
+ "documentation": {
739
+ "id": 2388,
740
+ "nodeType": "StructuredDocumentation",
741
+ "src": "1160:100:14",
742
+ "text": " @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`."
743
+ },
744
+ "id": 2412,
745
+ "implemented": true,
746
+ "kind": "function",
747
+ "modifiers": [],
748
+ "name": "_useCheckedNonce",
749
+ "nameLocation": "1274:16:14",
750
+ "nodeType": "FunctionDefinition",
751
+ "parameters": {
752
+ "id": 2393,
753
+ "nodeType": "ParameterList",
754
+ "parameters": [
755
+ {
756
+ "constant": false,
757
+ "id": 2390,
758
+ "mutability": "mutable",
759
+ "name": "owner",
760
+ "nameLocation": "1299:5:14",
761
+ "nodeType": "VariableDeclaration",
762
+ "scope": 2412,
763
+ "src": "1291:13:14",
764
+ "stateVariable": false,
765
+ "storageLocation": "default",
766
+ "typeDescriptions": {
767
+ "typeIdentifier": "t_address",
768
+ "typeString": "address"
769
+ },
770
+ "typeName": {
771
+ "id": 2389,
772
+ "name": "address",
773
+ "nodeType": "ElementaryTypeName",
774
+ "src": "1291:7:14",
775
+ "stateMutability": "nonpayable",
776
+ "typeDescriptions": {
777
+ "typeIdentifier": "t_address",
778
+ "typeString": "address"
779
+ }
780
+ },
781
+ "visibility": "internal"
782
+ },
783
+ {
784
+ "constant": false,
785
+ "id": 2392,
786
+ "mutability": "mutable",
787
+ "name": "nonce",
788
+ "nameLocation": "1314:5:14",
789
+ "nodeType": "VariableDeclaration",
790
+ "scope": 2412,
791
+ "src": "1306:13:14",
792
+ "stateVariable": false,
793
+ "storageLocation": "default",
794
+ "typeDescriptions": {
795
+ "typeIdentifier": "t_uint256",
796
+ "typeString": "uint256"
797
+ },
798
+ "typeName": {
799
+ "id": 2391,
800
+ "name": "uint256",
801
+ "nodeType": "ElementaryTypeName",
802
+ "src": "1306:7:14",
803
+ "typeDescriptions": {
804
+ "typeIdentifier": "t_uint256",
805
+ "typeString": "uint256"
806
+ }
807
+ },
808
+ "visibility": "internal"
809
+ }
810
+ ],
811
+ "src": "1290:30:14"
812
+ },
813
+ "returnParameters": {
814
+ "id": 2394,
815
+ "nodeType": "ParameterList",
816
+ "parameters": [],
817
+ "src": "1338:0:14"
818
+ },
819
+ "scope": 2413,
820
+ "src": "1265:222:14",
821
+ "stateMutability": "nonpayable",
822
+ "virtual": true,
823
+ "visibility": "internal"
824
+ }
825
+ ],
826
+ "scope": 2414,
827
+ "src": "209:1280:14",
828
+ "usedErrors": [
829
+ 2355
830
+ ],
831
+ "usedEvents": []
832
+ }
833
+ ],
834
+ "src": "99:1391:14"
835
+ },
836
+ "compiler": {
837
+ "name": "solc",
838
+ "version": "0.8.21+commit.d9974bed.Emscripten.clang"
839
+ },
840
+ "networks": {},
841
+ "schemaVersion": "3.4.16",
842
+ "updatedAt": "2026-01-24T20:23:04.038Z",
843
+ "devdoc": {
844
+ "details": "Provides tracking nonces for addresses. Nonces will only increment.",
845
+ "errors": {
846
+ "InvalidAccountNonce(address,uint256)": [
847
+ {
848
+ "details": "The nonce used for an `account` is not the expected current nonce."
849
+ }
850
+ ]
851
+ },
852
+ "kind": "dev",
853
+ "methods": {
854
+ "nonces(address)": {
855
+ "details": "Returns the next unused nonce for an address."
856
+ }
857
+ },
858
+ "version": 1
859
+ },
860
+ "userdoc": {
861
+ "kind": "user",
862
+ "methods": {},
863
+ "version": 1
864
+ }
865
+ }