@bloxchain/contracts 1.0.0-alpha.6 → 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 (54) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +8 -9
  3. package/abi/BaseStateMachine.abi.json +773 -822
  4. package/abi/EngineBlox.abi.json +562 -552
  5. package/abi/GuardController.abi.json +1597 -1609
  6. package/abi/GuardControllerDefinitions.abi.json +257 -120
  7. package/abi/IDefinition.abi.json +57 -47
  8. package/abi/RuntimeRBAC.abi.json +841 -842
  9. package/abi/RuntimeRBACDefinitions.abi.json +265 -99
  10. package/abi/SecureOwnable.abi.json +1365 -1349
  11. package/abi/SecureOwnableDefinitions.abi.json +174 -164
  12. package/components/README.md +8 -0
  13. package/core/AUDIT.md +45 -0
  14. package/core/access/RuntimeRBAC.sol +130 -61
  15. package/core/access/interface/IRuntimeRBAC.sol +3 -3
  16. package/core/access/lib/definitions/RuntimeRBACDefinitions.sol +67 -3
  17. package/core/base/BaseStateMachine.sol +971 -967
  18. package/core/base/interface/IBaseStateMachine.sol +153 -160
  19. package/core/execution/GuardController.sol +89 -75
  20. package/core/execution/interface/IGuardController.sol +146 -160
  21. package/core/execution/lib/definitions/GuardControllerDefinitions.sol +180 -24
  22. package/core/lib/EngineBlox.sol +577 -327
  23. package/core/lib/interfaces/IDefinition.sol +49 -49
  24. package/core/lib/interfaces/IEventForwarder.sol +4 -2
  25. package/core/lib/utils/SharedValidation.sol +534 -487
  26. package/core/pattern/Account.sol +84 -65
  27. package/core/security/SecureOwnable.sol +446 -390
  28. package/core/security/interface/ISecureOwnable.sol +105 -105
  29. package/core/security/lib/definitions/SecureOwnableDefinitions.sol +49 -17
  30. package/package.json +11 -7
  31. package/standards/README.md +12 -0
  32. package/{core/research → standards/behavior}/ICopyable.sol +3 -11
  33. package/standards/hooks/IOnActionHook.sol +21 -0
  34. package/abi/AccountBlox.abi.json +0 -3916
  35. package/abi/BareBlox.abi.json +0 -1378
  36. package/abi/RoleBlox.abi.json +0 -2983
  37. package/abi/SecureBlox.abi.json +0 -2753
  38. package/abi/SimpleRWA20.abi.json +0 -4032
  39. package/abi/SimpleRWA20Definitions.abi.json +0 -191
  40. package/abi/SimpleVault.abi.json +0 -3407
  41. package/abi/SimpleVaultDefinitions.abi.json +0 -269
  42. package/core/research/BloxchainWallet.sol +0 -292
  43. package/core/research/FactoryBlox/FactoryBlox.sol +0 -346
  44. package/core/research/FactoryBlox/FactoryBloxDefinitions.sol +0 -143
  45. package/core/research/erc1155-blox/ERC1155Blox.sol +0 -169
  46. package/core/research/erc1155-blox/lib/definitions/ERC1155BloxDefinitions.sol +0 -203
  47. package/core/research/erc20-blox/ERC20Blox.sol +0 -167
  48. package/core/research/erc20-blox/lib/definitions/ERC20BloxDefinitions.sol +0 -185
  49. package/core/research/erc721-blox/ERC721Blox.sol +0 -131
  50. package/core/research/erc721-blox/lib/definitions/ERC721BloxDefinitions.sol +0 -172
  51. package/core/research/lending-blox/.gitkeep +0 -1
  52. package/core/research/p2p-blox/P2PBlox.sol +0 -266
  53. package/core/research/p2p-blox/README.md +0 -85
  54. package/core/research/p2p-blox/lib/definitions/P2PBloxDefinitions.sol +0 -19
@@ -1,852 +1,862 @@
1
1
  [
2
2
  {
3
+ "type": "function",
4
+ "name": "ATTACHED_PAYMENT_RECIPIENT_SELECTOR",
3
5
  "inputs": [],
4
- "name": "AlreadyInitialized",
5
- "type": "error"
6
+ "outputs": [
7
+ {
8
+ "name": "",
9
+ "type": "bytes4",
10
+ "internalType": "bytes4"
11
+ }
12
+ ],
13
+ "stateMutability": "view"
6
14
  },
7
15
  {
8
- "inputs": [
16
+ "type": "function",
17
+ "name": "ERC20_TRANSFER_SELECTOR",
18
+ "inputs": [],
19
+ "outputs": [
9
20
  {
10
- "internalType": "uint256",
11
- "name": "releaseTime",
12
- "type": "uint256"
13
- },
21
+ "name": "",
22
+ "type": "bytes4",
23
+ "internalType": "bytes4"
24
+ }
25
+ ],
26
+ "stateMutability": "view"
27
+ },
28
+ {
29
+ "type": "function",
30
+ "name": "MAX_BATCH_SIZE",
31
+ "inputs": [],
32
+ "outputs": [
14
33
  {
15
- "internalType": "uint256",
16
- "name": "currentTime",
17
- "type": "uint256"
34
+ "name": "",
35
+ "type": "uint256",
36
+ "internalType": "uint256"
18
37
  }
19
38
  ],
20
- "name": "BeforeReleaseTime",
21
- "type": "error"
39
+ "stateMutability": "view"
40
+ },
41
+ {
42
+ "type": "function",
43
+ "name": "MAX_FUNCTIONS",
44
+ "inputs": [],
45
+ "outputs": [
46
+ {
47
+ "name": "",
48
+ "type": "uint256",
49
+ "internalType": "uint256"
50
+ }
51
+ ],
52
+ "stateMutability": "view"
53
+ },
54
+ {
55
+ "type": "function",
56
+ "name": "MAX_HOOKS_PER_SELECTOR",
57
+ "inputs": [],
58
+ "outputs": [
59
+ {
60
+ "name": "",
61
+ "type": "uint256",
62
+ "internalType": "uint256"
63
+ }
64
+ ],
65
+ "stateMutability": "view"
66
+ },
67
+ {
68
+ "type": "function",
69
+ "name": "MAX_ROLES",
70
+ "inputs": [],
71
+ "outputs": [
72
+ {
73
+ "name": "",
74
+ "type": "uint256",
75
+ "internalType": "uint256"
76
+ }
77
+ ],
78
+ "stateMutability": "view"
79
+ },
80
+ {
81
+ "type": "function",
82
+ "name": "NATIVE_TRANSFER_SELECTOR",
83
+ "inputs": [],
84
+ "outputs": [
85
+ {
86
+ "name": "",
87
+ "type": "bytes4",
88
+ "internalType": "bytes4"
89
+ }
90
+ ],
91
+ "stateMutability": "view"
92
+ },
93
+ {
94
+ "type": "function",
95
+ "name": "PROTOCOL_NAME_HASH",
96
+ "inputs": [],
97
+ "outputs": [
98
+ {
99
+ "name": "",
100
+ "type": "bytes32",
101
+ "internalType": "bytes32"
102
+ }
103
+ ],
104
+ "stateMutability": "view"
105
+ },
106
+ {
107
+ "type": "function",
108
+ "name": "VERSION",
109
+ "inputs": [],
110
+ "outputs": [
111
+ {
112
+ "name": "",
113
+ "type": "string",
114
+ "internalType": "string"
115
+ }
116
+ ],
117
+ "stateMutability": "view"
22
118
  },
23
119
  {
120
+ "type": "function",
121
+ "name": "createMetaTxParams",
24
122
  "inputs": [
25
123
  {
26
- "internalType": "bytes32",
27
- "name": "resourceId",
28
- "type": "bytes32"
124
+ "name": "handlerContract",
125
+ "type": "address",
126
+ "internalType": "address"
127
+ },
128
+ {
129
+ "name": "handlerSelector",
130
+ "type": "bytes4",
131
+ "internalType": "bytes4"
132
+ },
133
+ {
134
+ "name": "action",
135
+ "type": "EngineBlox.TxAction",
136
+ "internalType": "enum EngineBlox.TxAction"
137
+ },
138
+ {
139
+ "name": "deadline",
140
+ "type": "uint256",
141
+ "internalType": "uint256"
142
+ },
143
+ {
144
+ "name": "maxGasPrice",
145
+ "type": "uint256",
146
+ "internalType": "uint256"
147
+ },
148
+ {
149
+ "name": "signer",
150
+ "type": "address",
151
+ "internalType": "address"
29
152
  }
30
153
  ],
31
- "name": "CannotModifyProtected",
32
- "type": "error"
154
+ "outputs": [
155
+ {
156
+ "name": "",
157
+ "type": "tuple",
158
+ "internalType": "struct EngineBlox.MetaTxParams",
159
+ "components": [
160
+ {
161
+ "name": "chainId",
162
+ "type": "uint256",
163
+ "internalType": "uint256"
164
+ },
165
+ {
166
+ "name": "nonce",
167
+ "type": "uint256",
168
+ "internalType": "uint256"
169
+ },
170
+ {
171
+ "name": "handlerContract",
172
+ "type": "address",
173
+ "internalType": "address"
174
+ },
175
+ {
176
+ "name": "handlerSelector",
177
+ "type": "bytes4",
178
+ "internalType": "bytes4"
179
+ },
180
+ {
181
+ "name": "action",
182
+ "type": "EngineBlox.TxAction",
183
+ "internalType": "enum EngineBlox.TxAction"
184
+ },
185
+ {
186
+ "name": "deadline",
187
+ "type": "uint256",
188
+ "internalType": "uint256"
189
+ },
190
+ {
191
+ "name": "maxGasPrice",
192
+ "type": "uint256",
193
+ "internalType": "uint256"
194
+ },
195
+ {
196
+ "name": "signer",
197
+ "type": "address",
198
+ "internalType": "address"
199
+ }
200
+ ]
201
+ }
202
+ ],
203
+ "stateMutability": "view"
33
204
  },
34
205
  {
206
+ "type": "function",
207
+ "name": "recoverSigner",
35
208
  "inputs": [
36
209
  {
37
- "internalType": "uint256",
38
- "name": "providedChainId",
39
- "type": "uint256"
210
+ "name": "messageHash",
211
+ "type": "bytes32",
212
+ "internalType": "bytes32"
40
213
  },
41
214
  {
42
- "internalType": "uint256",
43
- "name": "expectedChainId",
44
- "type": "uint256"
215
+ "name": "signature",
216
+ "type": "bytes",
217
+ "internalType": "bytes"
45
218
  }
46
219
  ],
47
- "name": "ChainIdMismatch",
48
- "type": "error"
220
+ "outputs": [
221
+ {
222
+ "name": "",
223
+ "type": "address",
224
+ "internalType": "address"
225
+ }
226
+ ],
227
+ "stateMutability": "pure"
49
228
  },
50
229
  {
230
+ "type": "event",
231
+ "name": "TransactionEvent",
51
232
  "inputs": [
52
233
  {
53
- "internalType": "bytes4",
54
- "name": "functionSelector",
55
- "type": "bytes4"
234
+ "name": "txId",
235
+ "type": "uint256",
236
+ "indexed": true,
237
+ "internalType": "uint256"
238
+ },
239
+ {
240
+ "name": "functionHash",
241
+ "type": "bytes4",
242
+ "indexed": true,
243
+ "internalType": "bytes4"
244
+ },
245
+ {
246
+ "name": "status",
247
+ "type": "uint8",
248
+ "indexed": false,
249
+ "internalType": "enum EngineBlox.TxStatus"
250
+ },
251
+ {
252
+ "name": "requester",
253
+ "type": "address",
254
+ "indexed": true,
255
+ "internalType": "address"
256
+ },
257
+ {
258
+ "name": "target",
259
+ "type": "address",
260
+ "indexed": false,
261
+ "internalType": "address"
262
+ },
263
+ {
264
+ "name": "operationType",
265
+ "type": "bytes32",
266
+ "indexed": false,
267
+ "internalType": "bytes32"
268
+ },
269
+ {
270
+ "name": "resultHash",
271
+ "type": "bytes32",
272
+ "indexed": false,
273
+ "internalType": "bytes32"
56
274
  }
57
275
  ],
58
- "name": "ConflictingMetaTxPermissions",
59
- "type": "error"
276
+ "anonymous": false
60
277
  },
61
278
  {
279
+ "type": "event",
280
+ "name": "TxExecutionResult",
62
281
  "inputs": [
63
282
  {
64
- "internalType": "bytes4",
65
- "name": "functionSelector",
66
- "type": "bytes4"
283
+ "name": "txId",
284
+ "type": "uint256",
285
+ "indexed": true,
286
+ "internalType": "uint256"
287
+ },
288
+ {
289
+ "name": "result",
290
+ "type": "bytes",
291
+ "indexed": false,
292
+ "internalType": "bytes"
67
293
  }
68
294
  ],
69
- "name": "ContractFunctionMustBeProtected",
70
- "type": "error"
295
+ "anonymous": false
296
+ },
297
+ {
298
+ "type": "error",
299
+ "name": "AlreadyInitialized",
300
+ "inputs": []
71
301
  },
72
302
  {
303
+ "type": "error",
304
+ "name": "BeforeReleaseTime",
73
305
  "inputs": [
74
306
  {
75
- "internalType": "uint256",
76
- "name": "deadline",
77
- "type": "uint256"
307
+ "name": "releaseTime",
308
+ "type": "uint256",
309
+ "internalType": "uint256"
78
310
  },
79
311
  {
80
- "internalType": "uint256",
81
312
  "name": "currentTime",
82
- "type": "uint256"
313
+ "type": "uint256",
314
+ "internalType": "uint256"
83
315
  }
84
- ],
85
- "name": "DeadlineInPast",
86
- "type": "error"
316
+ ]
87
317
  },
88
318
  {
319
+ "type": "error",
320
+ "name": "CannotModifyProtected",
89
321
  "inputs": [
90
322
  {
91
- "internalType": "address",
92
- "name": "recoveredSigner",
93
- "type": "address"
323
+ "name": "resourceId",
324
+ "type": "bytes32",
325
+ "internalType": "bytes32"
94
326
  }
95
- ],
327
+ ]
328
+ },
329
+ {
330
+ "type": "error",
331
+ "name": "ChainIdMismatch",
332
+ "inputs": [
333
+ {
334
+ "name": "providedChainId",
335
+ "type": "uint256",
336
+ "internalType": "uint256"
337
+ },
338
+ {
339
+ "name": "expectedChainId",
340
+ "type": "uint256",
341
+ "internalType": "uint256"
342
+ }
343
+ ]
344
+ },
345
+ {
346
+ "type": "error",
347
+ "name": "ConflictingMetaTxPermissions",
348
+ "inputs": [
349
+ {
350
+ "name": "functionSelector",
351
+ "type": "bytes4",
352
+ "internalType": "bytes4"
353
+ }
354
+ ]
355
+ },
356
+ {
357
+ "type": "error",
96
358
  "name": "ECDSAInvalidSignature",
97
- "type": "error"
359
+ "inputs": [
360
+ {
361
+ "name": "recoveredSigner",
362
+ "type": "address",
363
+ "internalType": "address"
364
+ }
365
+ ]
98
366
  },
99
367
  {
368
+ "type": "error",
369
+ "name": "FunctionSelectorMismatch",
100
370
  "inputs": [
101
371
  {
102
- "internalType": "bytes4",
103
372
  "name": "providedSelector",
104
- "type": "bytes4"
373
+ "type": "bytes4",
374
+ "internalType": "bytes4"
105
375
  },
106
376
  {
107
- "internalType": "bytes4",
108
377
  "name": "derivedSelector",
109
- "type": "bytes4"
378
+ "type": "bytes4",
379
+ "internalType": "bytes4"
110
380
  }
111
- ],
112
- "name": "FunctionSelectorMismatch",
113
- "type": "error"
381
+ ]
114
382
  },
115
383
  {
384
+ "type": "error",
385
+ "name": "GasPriceExceedsMax",
116
386
  "inputs": [
117
387
  {
118
- "internalType": "uint256",
119
388
  "name": "currentGasPrice",
120
- "type": "uint256"
389
+ "type": "uint256",
390
+ "internalType": "uint256"
121
391
  },
122
392
  {
123
- "internalType": "uint256",
124
393
  "name": "maxGasPrice",
125
- "type": "uint256"
394
+ "type": "uint256",
395
+ "internalType": "uint256"
126
396
  }
127
- ],
128
- "name": "GasPriceExceedsMax",
129
- "type": "error"
397
+ ]
398
+ },
399
+ {
400
+ "type": "error",
401
+ "name": "GrantNotRevocable",
402
+ "inputs": [
403
+ {
404
+ "name": "functionSelector",
405
+ "type": "bytes4",
406
+ "internalType": "bytes4"
407
+ }
408
+ ]
130
409
  },
131
410
  {
411
+ "type": "error",
412
+ "name": "HandlerForSelectorMismatch",
132
413
  "inputs": [
133
414
  {
134
- "internalType": "bytes4",
135
415
  "name": "schemaHandlerForSelector",
136
- "type": "bytes4"
416
+ "type": "bytes4",
417
+ "internalType": "bytes4"
137
418
  },
138
419
  {
139
- "internalType": "bytes4",
140
420
  "name": "permissionHandlerForSelector",
141
- "type": "bytes4"
421
+ "type": "bytes4",
422
+ "internalType": "bytes4"
142
423
  }
143
- ],
144
- "name": "HandlerForSelectorMismatch",
145
- "type": "error"
424
+ ]
146
425
  },
147
426
  {
427
+ "type": "error",
428
+ "name": "IndexOutOfBounds",
148
429
  "inputs": [
149
430
  {
150
- "internalType": "uint256",
151
431
  "name": "index",
152
- "type": "uint256"
432
+ "type": "uint256",
433
+ "internalType": "uint256"
153
434
  },
154
435
  {
155
- "internalType": "uint256",
156
436
  "name": "arrayLength",
157
- "type": "uint256"
437
+ "type": "uint256",
438
+ "internalType": "uint256"
158
439
  }
159
- ],
160
- "name": "IndexOutOfBounds",
161
- "type": "error"
440
+ ]
162
441
  },
163
442
  {
443
+ "type": "error",
444
+ "name": "InsufficientBalance",
164
445
  "inputs": [
165
446
  {
166
- "internalType": "uint256",
167
447
  "name": "currentBalance",
168
- "type": "uint256"
448
+ "type": "uint256",
449
+ "internalType": "uint256"
169
450
  },
170
451
  {
171
- "internalType": "uint256",
172
452
  "name": "requiredAmount",
173
- "type": "uint256"
453
+ "type": "uint256",
454
+ "internalType": "uint256"
174
455
  }
175
- ],
176
- "name": "InsufficientBalance",
177
- "type": "error"
456
+ ]
178
457
  },
179
458
  {
459
+ "type": "error",
460
+ "name": "InvalidAddress",
180
461
  "inputs": [
181
462
  {
182
- "internalType": "address",
183
463
  "name": "provided",
184
- "type": "address"
464
+ "type": "address",
465
+ "internalType": "address"
185
466
  }
186
- ],
187
- "name": "InvalidAddress",
188
- "type": "error"
467
+ ]
189
468
  },
190
469
  {
470
+ "type": "error",
471
+ "name": "InvalidHandlerSelector",
191
472
  "inputs": [
192
473
  {
193
- "internalType": "bytes4",
194
474
  "name": "selector",
195
- "type": "bytes4"
475
+ "type": "bytes4",
476
+ "internalType": "bytes4"
196
477
  }
197
- ],
198
- "name": "InvalidHandlerSelector",
199
- "type": "error"
478
+ ]
200
479
  },
201
480
  {
481
+ "type": "error",
482
+ "name": "InvalidNonce",
202
483
  "inputs": [
203
484
  {
204
- "internalType": "uint256",
205
485
  "name": "providedNonce",
206
- "type": "uint256"
486
+ "type": "uint256",
487
+ "internalType": "uint256"
207
488
  },
208
489
  {
209
- "internalType": "uint256",
210
490
  "name": "expectedNonce",
211
- "type": "uint256"
491
+ "type": "uint256",
492
+ "internalType": "uint256"
212
493
  }
213
- ],
214
- "name": "InvalidNonce",
215
- "type": "error"
494
+ ]
216
495
  },
217
496
  {
497
+ "type": "error",
498
+ "name": "InvalidSValue",
218
499
  "inputs": [
219
500
  {
220
- "internalType": "bytes32",
221
501
  "name": "s",
222
- "type": "bytes32"
502
+ "type": "bytes32",
503
+ "internalType": "bytes32"
223
504
  }
224
- ],
225
- "name": "InvalidSValue",
226
- "type": "error"
505
+ ]
227
506
  },
228
507
  {
508
+ "type": "error",
509
+ "name": "InvalidSignature",
229
510
  "inputs": [
230
511
  {
231
- "internalType": "bytes",
232
512
  "name": "signature",
233
- "type": "bytes"
513
+ "type": "bytes",
514
+ "internalType": "bytes"
234
515
  }
235
- ],
236
- "name": "InvalidSignature",
237
- "type": "error"
516
+ ]
238
517
  },
239
518
  {
519
+ "type": "error",
520
+ "name": "InvalidSignatureLength",
240
521
  "inputs": [
241
522
  {
242
- "internalType": "uint256",
243
523
  "name": "providedLength",
244
- "type": "uint256"
524
+ "type": "uint256",
525
+ "internalType": "uint256"
245
526
  },
246
527
  {
247
- "internalType": "uint256",
248
528
  "name": "expectedLength",
249
- "type": "uint256"
529
+ "type": "uint256",
530
+ "internalType": "uint256"
250
531
  }
251
- ],
252
- "name": "InvalidSignatureLength",
253
- "type": "error"
532
+ ]
254
533
  },
255
534
  {
535
+ "type": "error",
536
+ "name": "InvalidVValue",
256
537
  "inputs": [
257
538
  {
258
- "internalType": "uint8",
259
539
  "name": "v",
260
- "type": "uint8"
540
+ "type": "uint8",
541
+ "internalType": "uint8"
261
542
  }
262
- ],
263
- "name": "InvalidVValue",
264
- "type": "error"
543
+ ]
265
544
  },
266
545
  {
546
+ "type": "error",
547
+ "name": "ItemAlreadyExists",
267
548
  "inputs": [
268
549
  {
269
- "internalType": "address",
270
550
  "name": "item",
271
- "type": "address"
551
+ "type": "address",
552
+ "internalType": "address"
272
553
  }
273
- ],
274
- "name": "ItemAlreadyExists",
275
- "type": "error"
554
+ ]
276
555
  },
277
556
  {
557
+ "type": "error",
558
+ "name": "ItemNotFound",
278
559
  "inputs": [
279
560
  {
280
- "internalType": "address",
281
561
  "name": "item",
282
- "type": "address"
562
+ "type": "address",
563
+ "internalType": "address"
283
564
  }
284
- ],
285
- "name": "ItemNotFound",
286
- "type": "error"
565
+ ]
287
566
  },
288
567
  {
568
+ "type": "error",
569
+ "name": "MaxFunctionsExceeded",
289
570
  "inputs": [
290
571
  {
291
- "internalType": "uint256",
292
572
  "name": "currentCount",
293
- "type": "uint256"
573
+ "type": "uint256",
574
+ "internalType": "uint256"
294
575
  },
295
576
  {
296
- "internalType": "uint256",
297
577
  "name": "maxFunctions",
298
- "type": "uint256"
578
+ "type": "uint256",
579
+ "internalType": "uint256"
299
580
  }
300
- ],
301
- "name": "MaxFunctionsExceeded",
302
- "type": "error"
581
+ ]
303
582
  },
304
583
  {
584
+ "type": "error",
585
+ "name": "MaxHooksExceeded",
305
586
  "inputs": [
306
587
  {
307
- "internalType": "uint256",
308
588
  "name": "currentCount",
309
- "type": "uint256"
589
+ "type": "uint256",
590
+ "internalType": "uint256"
310
591
  },
311
592
  {
312
- "internalType": "uint256",
313
593
  "name": "maxHooks",
314
- "type": "uint256"
594
+ "type": "uint256",
595
+ "internalType": "uint256"
315
596
  }
316
- ],
317
- "name": "MaxHooksExceeded",
318
- "type": "error"
597
+ ]
319
598
  },
320
599
  {
600
+ "type": "error",
601
+ "name": "MaxRolesExceeded",
321
602
  "inputs": [
322
603
  {
323
- "internalType": "uint256",
324
604
  "name": "currentCount",
325
- "type": "uint256"
605
+ "type": "uint256",
606
+ "internalType": "uint256"
326
607
  },
327
608
  {
328
- "internalType": "uint256",
329
609
  "name": "maxRoles",
330
- "type": "uint256"
610
+ "type": "uint256",
611
+ "internalType": "uint256"
331
612
  }
332
- ],
333
- "name": "MaxRolesExceeded",
334
- "type": "error"
613
+ ]
335
614
  },
336
615
  {
616
+ "type": "error",
617
+ "name": "MaxWalletsZero",
337
618
  "inputs": [
338
619
  {
339
- "internalType": "uint256",
340
620
  "name": "provided",
341
- "type": "uint256"
621
+ "type": "uint256",
622
+ "internalType": "uint256"
342
623
  }
343
- ],
344
- "name": "MaxWalletsZero",
345
- "type": "error"
624
+ ]
346
625
  },
347
626
  {
627
+ "type": "error",
628
+ "name": "MetaTxExpired",
348
629
  "inputs": [
349
630
  {
350
- "internalType": "uint256",
351
631
  "name": "deadline",
352
- "type": "uint256"
632
+ "type": "uint256",
633
+ "internalType": "uint256"
353
634
  },
354
635
  {
355
- "internalType": "uint256",
356
636
  "name": "currentTime",
357
- "type": "uint256"
637
+ "type": "uint256",
638
+ "internalType": "uint256"
358
639
  }
359
- ],
360
- "name": "MetaTxExpired",
361
- "type": "error"
640
+ ]
362
641
  },
363
642
  {
643
+ "type": "error",
644
+ "name": "MetaTxHandlerContractMismatch",
364
645
  "inputs": [
365
646
  {
366
- "internalType": "address",
367
- "name": "caller",
368
- "type": "address"
647
+ "name": "signedContract",
648
+ "type": "address",
649
+ "internalType": "address"
650
+ },
651
+ {
652
+ "name": "entryContract",
653
+ "type": "address",
654
+ "internalType": "address"
369
655
  }
370
- ],
656
+ ]
657
+ },
658
+ {
659
+ "type": "error",
660
+ "name": "MetaTxPaymentMismatchStoredTx",
661
+ "inputs": [
662
+ {
663
+ "name": "txId",
664
+ "type": "uint256",
665
+ "internalType": "uint256"
666
+ }
667
+ ]
668
+ },
669
+ {
670
+ "type": "error",
671
+ "name": "MetaTxRecordMismatchStoredTx",
672
+ "inputs": [
673
+ {
674
+ "name": "txId",
675
+ "type": "uint256",
676
+ "internalType": "uint256"
677
+ }
678
+ ]
679
+ },
680
+ {
681
+ "type": "error",
371
682
  "name": "NoPermission",
372
- "type": "error"
683
+ "inputs": [
684
+ {
685
+ "name": "caller",
686
+ "type": "address",
687
+ "internalType": "address"
688
+ }
689
+ ]
373
690
  },
374
691
  {
692
+ "type": "error",
693
+ "name": "NotNewAddress",
375
694
  "inputs": [
376
695
  {
377
- "internalType": "address",
378
696
  "name": "newAddress",
379
- "type": "address"
697
+ "type": "address",
698
+ "internalType": "address"
380
699
  },
381
700
  {
382
- "internalType": "address",
383
701
  "name": "currentAddress",
384
- "type": "address"
702
+ "type": "address",
703
+ "internalType": "address"
385
704
  }
386
- ],
387
- "name": "NotNewAddress",
388
- "type": "error"
705
+ ]
389
706
  },
390
707
  {
391
- "inputs": [],
708
+ "type": "error",
392
709
  "name": "NotSupported",
393
- "type": "error"
710
+ "inputs": []
394
711
  },
395
712
  {
396
- "inputs": [],
713
+ "type": "error",
397
714
  "name": "OperationFailed",
398
- "type": "error"
715
+ "inputs": []
399
716
  },
400
717
  {
718
+ "type": "error",
719
+ "name": "PaymentFailed",
401
720
  "inputs": [
402
721
  {
403
- "internalType": "address",
404
722
  "name": "recipient",
405
- "type": "address"
723
+ "type": "address",
724
+ "internalType": "address"
406
725
  },
407
726
  {
408
- "internalType": "uint256",
409
727
  "name": "amount",
410
- "type": "uint256"
728
+ "type": "uint256",
729
+ "internalType": "uint256"
411
730
  },
412
731
  {
413
- "internalType": "bytes",
414
732
  "name": "reason",
415
- "type": "bytes"
733
+ "type": "bytes",
734
+ "internalType": "bytes"
416
735
  }
417
- ],
418
- "name": "PaymentFailed",
419
- "type": "error"
736
+ ]
420
737
  },
421
738
  {
739
+ "type": "error",
740
+ "name": "ResourceAlreadyExists",
422
741
  "inputs": [
423
742
  {
424
- "internalType": "bytes32",
425
743
  "name": "resourceId",
426
- "type": "bytes32"
744
+ "type": "bytes32",
745
+ "internalType": "bytes32"
427
746
  }
428
- ],
429
- "name": "ResourceAlreadyExists",
430
- "type": "error"
747
+ ]
431
748
  },
432
749
  {
750
+ "type": "error",
751
+ "name": "ResourceNotFound",
433
752
  "inputs": [
434
753
  {
435
- "internalType": "bytes32",
436
754
  "name": "resourceId",
437
- "type": "bytes32"
755
+ "type": "bytes32",
756
+ "internalType": "bytes32"
438
757
  }
439
- ],
440
- "name": "ResourceNotFound",
441
- "type": "error"
758
+ ]
442
759
  },
443
760
  {
761
+ "type": "error",
762
+ "name": "RoleWalletLimitReached",
444
763
  "inputs": [
445
764
  {
446
- "internalType": "uint256",
447
765
  "name": "currentCount",
448
- "type": "uint256"
766
+ "type": "uint256",
767
+ "internalType": "uint256"
449
768
  },
450
769
  {
451
- "internalType": "uint256",
452
770
  "name": "maxWallets",
453
- "type": "uint256"
771
+ "type": "uint256",
772
+ "internalType": "uint256"
454
773
  }
455
- ],
456
- "name": "RoleWalletLimitReached",
457
- "type": "error"
774
+ ]
458
775
  },
459
776
  {
777
+ "type": "error",
778
+ "name": "SafeERC20FailedOperation",
460
779
  "inputs": [
461
780
  {
462
- "internalType": "address",
463
781
  "name": "token",
464
- "type": "address"
782
+ "type": "address",
783
+ "internalType": "address"
465
784
  }
466
- ],
467
- "name": "SafeERC20FailedOperation",
468
- "type": "error"
785
+ ]
469
786
  },
470
787
  {
788
+ "type": "error",
789
+ "name": "SignerNotAuthorized",
471
790
  "inputs": [
472
791
  {
473
- "internalType": "address",
474
792
  "name": "signer",
475
- "type": "address"
793
+ "type": "address",
794
+ "internalType": "address"
476
795
  }
477
- ],
478
- "name": "SignerNotAuthorized",
479
- "type": "error"
796
+ ]
480
797
  },
481
798
  {
799
+ "type": "error",
800
+ "name": "TargetNotWhitelisted",
482
801
  "inputs": [
483
802
  {
484
- "internalType": "address",
485
803
  "name": "target",
486
- "type": "address"
804
+ "type": "address",
805
+ "internalType": "address"
487
806
  },
488
807
  {
489
- "internalType": "bytes4",
490
808
  "name": "functionSelector",
491
- "type": "bytes4"
809
+ "type": "bytes4",
810
+ "internalType": "bytes4"
492
811
  }
493
- ],
494
- "name": "TargetNotWhitelisted",
495
- "type": "error"
812
+ ]
496
813
  },
497
814
  {
815
+ "type": "error",
816
+ "name": "TimeLockPeriodZero",
498
817
  "inputs": [
499
818
  {
500
- "internalType": "uint256",
501
819
  "name": "provided",
502
- "type": "uint256"
820
+ "type": "uint256",
821
+ "internalType": "uint256"
503
822
  }
504
- ],
505
- "name": "TimeLockPeriodZero",
506
- "type": "error"
823
+ ]
507
824
  },
508
825
  {
826
+ "type": "error",
827
+ "name": "TransactionIdMismatch",
509
828
  "inputs": [
510
829
  {
511
- "internalType": "uint256",
512
830
  "name": "expectedTxId",
513
- "type": "uint256"
831
+ "type": "uint256",
832
+ "internalType": "uint256"
514
833
  },
515
834
  {
516
- "internalType": "uint256",
517
835
  "name": "providedTxId",
518
- "type": "uint256"
836
+ "type": "uint256",
837
+ "internalType": "uint256"
519
838
  }
520
- ],
521
- "name": "TransactionIdMismatch",
522
- "type": "error"
839
+ ]
523
840
  },
524
841
  {
842
+ "type": "error",
843
+ "name": "TransactionStatusMismatch",
525
844
  "inputs": [
526
845
  {
527
- "internalType": "uint8",
528
846
  "name": "expectedStatus",
529
- "type": "uint8"
847
+ "type": "uint8",
848
+ "internalType": "uint8"
530
849
  },
531
850
  {
532
- "internalType": "uint8",
533
851
  "name": "currentStatus",
534
- "type": "uint8"
852
+ "type": "uint8",
853
+ "internalType": "uint8"
535
854
  }
536
- ],
537
- "name": "TransactionStatusMismatch",
538
- "type": "error"
855
+ ]
539
856
  },
540
857
  {
541
- "inputs": [],
858
+ "type": "error",
542
859
  "name": "ZeroOperationTypeNotAllowed",
543
- "type": "error"
544
- },
545
- {
546
- "anonymous": false,
547
- "inputs": [
548
- {
549
- "indexed": true,
550
- "internalType": "uint256",
551
- "name": "txId",
552
- "type": "uint256"
553
- },
554
- {
555
- "indexed": true,
556
- "internalType": "bytes4",
557
- "name": "functionHash",
558
- "type": "bytes4"
559
- },
560
- {
561
- "indexed": false,
562
- "internalType": "enum EngineBlox.TxStatus",
563
- "name": "status",
564
- "type": "uint8"
565
- },
566
- {
567
- "indexed": true,
568
- "internalType": "address",
569
- "name": "requester",
570
- "type": "address"
571
- },
572
- {
573
- "indexed": false,
574
- "internalType": "address",
575
- "name": "target",
576
- "type": "address"
577
- },
578
- {
579
- "indexed": false,
580
- "internalType": "bytes32",
581
- "name": "operationType",
582
- "type": "bytes32"
583
- }
584
- ],
585
- "name": "TransactionEvent",
586
- "type": "event"
587
- },
588
- {
589
- "inputs": [],
590
- "name": "MAX_BATCH_SIZE",
591
- "outputs": [
592
- {
593
- "internalType": "uint256",
594
- "name": "",
595
- "type": "uint256"
596
- }
597
- ],
598
- "stateMutability": "view",
599
- "type": "function"
600
- },
601
- {
602
- "inputs": [],
603
- "name": "MAX_FUNCTIONS",
604
- "outputs": [
605
- {
606
- "internalType": "uint256",
607
- "name": "",
608
- "type": "uint256"
609
- }
610
- ],
611
- "stateMutability": "view",
612
- "type": "function"
613
- },
614
- {
615
- "inputs": [],
616
- "name": "MAX_HOOKS_PER_SELECTOR",
617
- "outputs": [
618
- {
619
- "internalType": "uint256",
620
- "name": "",
621
- "type": "uint256"
622
- }
623
- ],
624
- "stateMutability": "view",
625
- "type": "function"
626
- },
627
- {
628
- "inputs": [],
629
- "name": "MAX_ROLES",
630
- "outputs": [
631
- {
632
- "internalType": "uint256",
633
- "name": "",
634
- "type": "uint256"
635
- }
636
- ],
637
- "stateMutability": "view",
638
- "type": "function"
639
- },
640
- {
641
- "inputs": [],
642
- "name": "NATIVE_TRANSFER_OPERATION",
643
- "outputs": [
644
- {
645
- "internalType": "bytes32",
646
- "name": "",
647
- "type": "bytes32"
648
- }
649
- ],
650
- "stateMutability": "view",
651
- "type": "function"
652
- },
653
- {
654
- "inputs": [],
655
- "name": "NATIVE_TRANSFER_SELECTOR",
656
- "outputs": [
657
- {
658
- "internalType": "bytes4",
659
- "name": "",
660
- "type": "bytes4"
661
- }
662
- ],
663
- "stateMutability": "view",
664
- "type": "function"
665
- },
666
- {
667
- "inputs": [],
668
- "name": "PROTOCOL_NAME_HASH",
669
- "outputs": [
670
- {
671
- "internalType": "bytes32",
672
- "name": "",
673
- "type": "bytes32"
674
- }
675
- ],
676
- "stateMutability": "view",
677
- "type": "function"
678
- },
679
- {
680
- "inputs": [],
681
- "name": "VERSION_MAJOR",
682
- "outputs": [
683
- {
684
- "internalType": "uint8",
685
- "name": "",
686
- "type": "uint8"
687
- }
688
- ],
689
- "stateMutability": "view",
690
- "type": "function"
691
- },
692
- {
693
- "inputs": [],
694
- "name": "VERSION_MINOR",
695
- "outputs": [
696
- {
697
- "internalType": "uint8",
698
- "name": "",
699
- "type": "uint8"
700
- }
701
- ],
702
- "stateMutability": "view",
703
- "type": "function"
704
- },
705
- {
706
- "inputs": [],
707
- "name": "VERSION_PATCH",
708
- "outputs": [
709
- {
710
- "internalType": "uint8",
711
- "name": "",
712
- "type": "uint8"
713
- }
714
- ],
715
- "stateMutability": "view",
716
- "type": "function"
717
- },
718
- {
719
- "inputs": [
720
- {
721
- "internalType": "bytes32",
722
- "name": "messageHash",
723
- "type": "bytes32"
724
- },
725
- {
726
- "internalType": "bytes",
727
- "name": "signature",
728
- "type": "bytes"
729
- }
730
- ],
731
- "name": "recoverSigner",
732
- "outputs": [
733
- {
734
- "internalType": "address",
735
- "name": "",
736
- "type": "address"
737
- }
738
- ],
739
- "stateMutability": "pure",
740
- "type": "function"
741
- },
742
- {
743
- "inputs": [
744
- {
745
- "internalType": "address",
746
- "name": "handlerContract",
747
- "type": "address"
748
- },
749
- {
750
- "internalType": "bytes4",
751
- "name": "handlerSelector",
752
- "type": "bytes4"
753
- },
754
- {
755
- "internalType": "enum EngineBlox.TxAction",
756
- "name": "action",
757
- "type": "EngineBlox.TxAction"
758
- },
759
- {
760
- "internalType": "uint256",
761
- "name": "deadline",
762
- "type": "uint256"
763
- },
764
- {
765
- "internalType": "uint256",
766
- "name": "maxGasPrice",
767
- "type": "uint256"
768
- },
769
- {
770
- "internalType": "address",
771
- "name": "signer",
772
- "type": "address"
773
- }
774
- ],
775
- "name": "createMetaTxParams",
776
- "outputs": [
777
- {
778
- "components": [
779
- {
780
- "internalType": "uint256",
781
- "name": "chainId",
782
- "type": "uint256"
783
- },
784
- {
785
- "internalType": "uint256",
786
- "name": "nonce",
787
- "type": "uint256"
788
- },
789
- {
790
- "internalType": "address",
791
- "name": "handlerContract",
792
- "type": "address"
793
- },
794
- {
795
- "internalType": "bytes4",
796
- "name": "handlerSelector",
797
- "type": "bytes4"
798
- },
799
- {
800
- "internalType": "enum EngineBlox.TxAction",
801
- "name": "action",
802
- "type": "EngineBlox.TxAction"
803
- },
804
- {
805
- "internalType": "uint256",
806
- "name": "deadline",
807
- "type": "uint256"
808
- },
809
- {
810
- "internalType": "uint256",
811
- "name": "maxGasPrice",
812
- "type": "uint256"
813
- },
814
- {
815
- "internalType": "address",
816
- "name": "signer",
817
- "type": "address"
818
- }
819
- ],
820
- "internalType": "struct EngineBlox.MetaTxParams",
821
- "name": "",
822
- "type": "tuple"
823
- }
824
- ],
825
- "stateMutability": "view",
826
- "type": "function"
827
- },
828
- {
829
- "inputs": [
830
- {
831
- "internalType": "address",
832
- "name": "contractAddress",
833
- "type": "address"
834
- },
835
- {
836
- "internalType": "bytes4",
837
- "name": "selector",
838
- "type": "bytes4"
839
- }
840
- ],
841
- "name": "selectorExistsInContract",
842
- "outputs": [
843
- {
844
- "internalType": "bool",
845
- "name": "",
846
- "type": "bool"
847
- }
848
- ],
849
- "stateMutability": "view",
850
- "type": "function"
860
+ "inputs": []
851
861
  }
852
862
  ]