@gitmyabi/optimismportal 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/contracts/{OptimismPortal2_json.d.ts → OptimismPortal_json.d.ts} +169 -387
- package/contracts/{OptimismPortal2_json.js → OptimismPortal_json.js} +181 -497
- package/contracts/{OptimismPortal2_json.ts → OptimismPortal_json.ts} +209 -513
- package/contracts/index.d.ts +2 -2
- package/contracts/index.js +4 -4
- package/contracts/index.ts +2 -2
- package/package.json +3 -3
|
@@ -1,127 +1,71 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.OptimismPortal_json = exports.OptimismPortal_jsonAbi = void 0;
|
|
4
4
|
const viem_1 = require("viem");
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* OptimismPortal_json ABI
|
|
7
7
|
*
|
|
8
8
|
* This ABI is typed using viem's type system for full type safety.
|
|
9
9
|
*/
|
|
10
|
-
exports.
|
|
10
|
+
exports.OptimismPortal_jsonAbi = [
|
|
11
11
|
{
|
|
12
|
-
"inputs": [
|
|
13
|
-
{
|
|
14
|
-
"internalType": "uint256",
|
|
15
|
-
"name": "_proofMaturityDelaySeconds",
|
|
16
|
-
"type": "uint256"
|
|
17
|
-
}
|
|
18
|
-
],
|
|
12
|
+
"inputs": [],
|
|
19
13
|
"stateMutability": "nonpayable",
|
|
20
14
|
"type": "constructor"
|
|
21
15
|
},
|
|
22
16
|
{
|
|
23
17
|
"inputs": [],
|
|
24
|
-
"name": "
|
|
25
|
-
"type": "error"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"inputs": [],
|
|
29
|
-
"name": "EmptyItem",
|
|
30
|
-
"type": "error"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"inputs": [],
|
|
34
|
-
"name": "InvalidDataRemainder",
|
|
35
|
-
"type": "error"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"inputs": [],
|
|
39
|
-
"name": "InvalidHeader",
|
|
40
|
-
"type": "error"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"inputs": [],
|
|
44
|
-
"name": "OptimismPortal_AlreadyFinalized",
|
|
45
|
-
"type": "error"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"inputs": [],
|
|
49
|
-
"name": "OptimismPortal_BadTarget",
|
|
50
|
-
"type": "error"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"inputs": [],
|
|
54
|
-
"name": "OptimismPortal_CallPaused",
|
|
18
|
+
"name": "BadTarget",
|
|
55
19
|
"type": "error"
|
|
56
20
|
},
|
|
57
21
|
{
|
|
58
22
|
"inputs": [],
|
|
59
|
-
"name": "
|
|
23
|
+
"name": "CallPaused",
|
|
60
24
|
"type": "error"
|
|
61
25
|
},
|
|
62
26
|
{
|
|
63
27
|
"inputs": [],
|
|
64
|
-
"name": "
|
|
65
|
-
"type": "error"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"inputs": [],
|
|
69
|
-
"name": "OptimismPortal_GasLimitTooLow",
|
|
70
|
-
"type": "error"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
"inputs": [],
|
|
74
|
-
"name": "OptimismPortal_ImproperDisputeGame",
|
|
75
|
-
"type": "error"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"inputs": [],
|
|
79
|
-
"name": "OptimismPortal_InvalidDisputeGame",
|
|
80
|
-
"type": "error"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
"inputs": [],
|
|
84
|
-
"name": "OptimismPortal_InvalidLockboxState",
|
|
28
|
+
"name": "ContentLengthMismatch",
|
|
85
29
|
"type": "error"
|
|
86
30
|
},
|
|
87
31
|
{
|
|
88
32
|
"inputs": [],
|
|
89
|
-
"name": "
|
|
33
|
+
"name": "EmptyItem",
|
|
90
34
|
"type": "error"
|
|
91
35
|
},
|
|
92
36
|
{
|
|
93
37
|
"inputs": [],
|
|
94
|
-
"name": "
|
|
38
|
+
"name": "GasEstimation",
|
|
95
39
|
"type": "error"
|
|
96
40
|
},
|
|
97
41
|
{
|
|
98
42
|
"inputs": [],
|
|
99
|
-
"name": "
|
|
43
|
+
"name": "InvalidDataRemainder",
|
|
100
44
|
"type": "error"
|
|
101
45
|
},
|
|
102
46
|
{
|
|
103
47
|
"inputs": [],
|
|
104
|
-
"name": "
|
|
48
|
+
"name": "InvalidHeader",
|
|
105
49
|
"type": "error"
|
|
106
50
|
},
|
|
107
51
|
{
|
|
108
52
|
"inputs": [],
|
|
109
|
-
"name": "
|
|
53
|
+
"name": "LargeCalldata",
|
|
110
54
|
"type": "error"
|
|
111
55
|
},
|
|
112
56
|
{
|
|
113
57
|
"inputs": [],
|
|
114
|
-
"name": "
|
|
58
|
+
"name": "NoValue",
|
|
115
59
|
"type": "error"
|
|
116
60
|
},
|
|
117
61
|
{
|
|
118
62
|
"inputs": [],
|
|
119
|
-
"name": "
|
|
63
|
+
"name": "NonReentrant",
|
|
120
64
|
"type": "error"
|
|
121
65
|
},
|
|
122
66
|
{
|
|
123
67
|
"inputs": [],
|
|
124
|
-
"name": "
|
|
68
|
+
"name": "OnlyCustomGasToken",
|
|
125
69
|
"type": "error"
|
|
126
70
|
},
|
|
127
71
|
{
|
|
@@ -131,37 +75,17 @@ exports.OptimismPortal2_jsonAbi = [
|
|
|
131
75
|
},
|
|
132
76
|
{
|
|
133
77
|
"inputs": [],
|
|
134
|
-
"name": "
|
|
135
|
-
"type": "error"
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"inputs": [],
|
|
139
|
-
"name": "ProxyAdminOwnedBase_NotProxyAdminOrProxyAdminOwner",
|
|
140
|
-
"type": "error"
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
"inputs": [],
|
|
144
|
-
"name": "ProxyAdminOwnedBase_NotProxyAdminOwner",
|
|
78
|
+
"name": "SmallGasLimit",
|
|
145
79
|
"type": "error"
|
|
146
80
|
},
|
|
147
81
|
{
|
|
148
82
|
"inputs": [],
|
|
149
|
-
"name": "
|
|
83
|
+
"name": "TransferFailed",
|
|
150
84
|
"type": "error"
|
|
151
85
|
},
|
|
152
86
|
{
|
|
153
87
|
"inputs": [],
|
|
154
|
-
"name": "
|
|
155
|
-
"type": "error"
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
"inputs": [],
|
|
159
|
-
"name": "ProxyAdminOwnedBase_ProxyAdminNotFound",
|
|
160
|
-
"type": "error"
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
"inputs": [],
|
|
164
|
-
"name": "ReinitializableBase_ZeroInitVersion",
|
|
88
|
+
"name": "Unauthorized",
|
|
165
89
|
"type": "error"
|
|
166
90
|
},
|
|
167
91
|
{
|
|
@@ -262,53 +186,16 @@ exports.OptimismPortal2_jsonAbi = [
|
|
|
262
186
|
"name": "WithdrawalProven",
|
|
263
187
|
"type": "event"
|
|
264
188
|
},
|
|
265
|
-
{
|
|
266
|
-
"anonymous": false,
|
|
267
|
-
"inputs": [
|
|
268
|
-
{
|
|
269
|
-
"indexed": true,
|
|
270
|
-
"internalType": "bytes32",
|
|
271
|
-
"name": "withdrawalHash",
|
|
272
|
-
"type": "bytes32"
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
"indexed": true,
|
|
276
|
-
"internalType": "address",
|
|
277
|
-
"name": "proofSubmitter",
|
|
278
|
-
"type": "address"
|
|
279
|
-
}
|
|
280
|
-
],
|
|
281
|
-
"name": "WithdrawalProvenExtension1",
|
|
282
|
-
"type": "event"
|
|
283
|
-
},
|
|
284
189
|
{
|
|
285
190
|
"inputs": [],
|
|
286
|
-
"name": "
|
|
191
|
+
"name": "balance",
|
|
287
192
|
"outputs": [
|
|
288
193
|
{
|
|
289
|
-
"internalType": "
|
|
194
|
+
"internalType": "uint256",
|
|
290
195
|
"name": "",
|
|
291
|
-
"type": "
|
|
292
|
-
}
|
|
293
|
-
],
|
|
294
|
-
"stateMutability": "view",
|
|
295
|
-
"type": "function"
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
"inputs": [
|
|
299
|
-
{
|
|
300
|
-
"internalType": "bytes32",
|
|
301
|
-
"name": "_withdrawalHash",
|
|
302
|
-
"type": "bytes32"
|
|
303
|
-
},
|
|
304
|
-
{
|
|
305
|
-
"internalType": "address",
|
|
306
|
-
"name": "_proofSubmitter",
|
|
307
|
-
"type": "address"
|
|
196
|
+
"type": "uint256"
|
|
308
197
|
}
|
|
309
198
|
],
|
|
310
|
-
"name": "checkWithdrawal",
|
|
311
|
-
"outputs": [],
|
|
312
199
|
"stateMutability": "view",
|
|
313
200
|
"type": "function"
|
|
314
201
|
},
|
|
@@ -319,6 +206,11 @@ exports.OptimismPortal2_jsonAbi = [
|
|
|
319
206
|
"name": "_to",
|
|
320
207
|
"type": "address"
|
|
321
208
|
},
|
|
209
|
+
{
|
|
210
|
+
"internalType": "uint256",
|
|
211
|
+
"name": "_mint",
|
|
212
|
+
"type": "uint256"
|
|
213
|
+
},
|
|
322
214
|
{
|
|
323
215
|
"internalType": "uint256",
|
|
324
216
|
"name": "_value",
|
|
@@ -340,54 +232,42 @@ exports.OptimismPortal2_jsonAbi = [
|
|
|
340
232
|
"type": "bytes"
|
|
341
233
|
}
|
|
342
234
|
],
|
|
343
|
-
"name": "
|
|
235
|
+
"name": "depositERC20Transaction",
|
|
344
236
|
"outputs": [],
|
|
345
|
-
"stateMutability": "
|
|
237
|
+
"stateMutability": "nonpayable",
|
|
346
238
|
"type": "function"
|
|
347
239
|
},
|
|
348
240
|
{
|
|
349
241
|
"inputs": [
|
|
350
242
|
{
|
|
351
|
-
"internalType": "
|
|
352
|
-
"name": "
|
|
243
|
+
"internalType": "address",
|
|
244
|
+
"name": "_to",
|
|
353
245
|
"type": "address"
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"internalType": "uint256",
|
|
249
|
+
"name": "_value",
|
|
250
|
+
"type": "uint256"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"internalType": "uint64",
|
|
254
|
+
"name": "_gasLimit",
|
|
255
|
+
"type": "uint64"
|
|
256
|
+
},
|
|
358
257
|
{
|
|
359
258
|
"internalType": "bool",
|
|
360
|
-
"name": "",
|
|
259
|
+
"name": "_isCreation",
|
|
361
260
|
"type": "bool"
|
|
362
|
-
}
|
|
363
|
-
],
|
|
364
|
-
"stateMutability": "view",
|
|
365
|
-
"type": "function"
|
|
366
|
-
},
|
|
367
|
-
{
|
|
368
|
-
"inputs": [],
|
|
369
|
-
"name": "disputeGameFactory",
|
|
370
|
-
"outputs": [
|
|
371
|
-
{
|
|
372
|
-
"internalType": "contract IDisputeGameFactory",
|
|
373
|
-
"name": "",
|
|
374
|
-
"type": "address"
|
|
375
|
-
}
|
|
376
|
-
],
|
|
377
|
-
"stateMutability": "view",
|
|
378
|
-
"type": "function"
|
|
379
|
-
},
|
|
380
|
-
{
|
|
381
|
-
"inputs": [],
|
|
382
|
-
"name": "disputeGameFinalityDelaySeconds",
|
|
383
|
-
"outputs": [
|
|
261
|
+
},
|
|
384
262
|
{
|
|
385
|
-
"internalType": "
|
|
386
|
-
"name": "",
|
|
387
|
-
"type": "
|
|
263
|
+
"internalType": "bytes",
|
|
264
|
+
"name": "_data",
|
|
265
|
+
"type": "bytes"
|
|
388
266
|
}
|
|
389
267
|
],
|
|
390
|
-
"
|
|
268
|
+
"name": "depositTransaction",
|
|
269
|
+
"outputs": [],
|
|
270
|
+
"stateMutability": "payable",
|
|
391
271
|
"type": "function"
|
|
392
272
|
},
|
|
393
273
|
{
|
|
@@ -397,19 +277,6 @@ exports.OptimismPortal2_jsonAbi = [
|
|
|
397
277
|
"stateMutability": "payable",
|
|
398
278
|
"type": "function"
|
|
399
279
|
},
|
|
400
|
-
{
|
|
401
|
-
"inputs": [],
|
|
402
|
-
"name": "ethLockbox",
|
|
403
|
-
"outputs": [
|
|
404
|
-
{
|
|
405
|
-
"internalType": "contract IETHLockbox",
|
|
406
|
-
"name": "",
|
|
407
|
-
"type": "address"
|
|
408
|
-
}
|
|
409
|
-
],
|
|
410
|
-
"stateMutability": "view",
|
|
411
|
-
"type": "function"
|
|
412
|
-
},
|
|
413
280
|
{
|
|
414
281
|
"inputs": [
|
|
415
282
|
{
|
|
@@ -455,56 +322,6 @@ exports.OptimismPortal2_jsonAbi = [
|
|
|
455
322
|
"stateMutability": "nonpayable",
|
|
456
323
|
"type": "function"
|
|
457
324
|
},
|
|
458
|
-
{
|
|
459
|
-
"inputs": [
|
|
460
|
-
{
|
|
461
|
-
"components": [
|
|
462
|
-
{
|
|
463
|
-
"internalType": "uint256",
|
|
464
|
-
"name": "nonce",
|
|
465
|
-
"type": "uint256"
|
|
466
|
-
},
|
|
467
|
-
{
|
|
468
|
-
"internalType": "address",
|
|
469
|
-
"name": "sender",
|
|
470
|
-
"type": "address"
|
|
471
|
-
},
|
|
472
|
-
{
|
|
473
|
-
"internalType": "address",
|
|
474
|
-
"name": "target",
|
|
475
|
-
"type": "address"
|
|
476
|
-
},
|
|
477
|
-
{
|
|
478
|
-
"internalType": "uint256",
|
|
479
|
-
"name": "value",
|
|
480
|
-
"type": "uint256"
|
|
481
|
-
},
|
|
482
|
-
{
|
|
483
|
-
"internalType": "uint256",
|
|
484
|
-
"name": "gasLimit",
|
|
485
|
-
"type": "uint256"
|
|
486
|
-
},
|
|
487
|
-
{
|
|
488
|
-
"internalType": "bytes",
|
|
489
|
-
"name": "data",
|
|
490
|
-
"type": "bytes"
|
|
491
|
-
}
|
|
492
|
-
],
|
|
493
|
-
"internalType": "struct Types.WithdrawalTransaction",
|
|
494
|
-
"name": "_tx",
|
|
495
|
-
"type": "tuple"
|
|
496
|
-
},
|
|
497
|
-
{
|
|
498
|
-
"internalType": "address",
|
|
499
|
-
"name": "_proofSubmitter",
|
|
500
|
-
"type": "address"
|
|
501
|
-
}
|
|
502
|
-
],
|
|
503
|
-
"name": "finalizeWithdrawalTransactionExternalProof",
|
|
504
|
-
"outputs": [],
|
|
505
|
-
"stateMutability": "nonpayable",
|
|
506
|
-
"type": "function"
|
|
507
|
-
},
|
|
508
325
|
{
|
|
509
326
|
"inputs": [
|
|
510
327
|
{
|
|
@@ -538,34 +355,58 @@ exports.OptimismPortal2_jsonAbi = [
|
|
|
538
355
|
"type": "function"
|
|
539
356
|
},
|
|
540
357
|
{
|
|
541
|
-
"inputs": [
|
|
542
|
-
|
|
358
|
+
"inputs": [
|
|
359
|
+
{
|
|
360
|
+
"internalType": "contract L2OutputOracle",
|
|
361
|
+
"name": "_l2Oracle",
|
|
362
|
+
"type": "address"
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"internalType": "contract SystemConfig",
|
|
366
|
+
"name": "_systemConfig",
|
|
367
|
+
"type": "address"
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"internalType": "contract SuperchainConfig",
|
|
371
|
+
"name": "_superchainConfig",
|
|
372
|
+
"type": "address"
|
|
373
|
+
}
|
|
374
|
+
],
|
|
375
|
+
"name": "initialize",
|
|
376
|
+
"outputs": [],
|
|
377
|
+
"stateMutability": "nonpayable",
|
|
378
|
+
"type": "function"
|
|
379
|
+
},
|
|
380
|
+
{
|
|
381
|
+
"inputs": [
|
|
382
|
+
{
|
|
383
|
+
"internalType": "uint256",
|
|
384
|
+
"name": "_l2OutputIndex",
|
|
385
|
+
"type": "uint256"
|
|
386
|
+
}
|
|
387
|
+
],
|
|
388
|
+
"name": "isOutputFinalized",
|
|
543
389
|
"outputs": [
|
|
544
390
|
{
|
|
545
|
-
"internalType": "
|
|
391
|
+
"internalType": "bool",
|
|
546
392
|
"name": "",
|
|
547
|
-
"type": "
|
|
393
|
+
"type": "bool"
|
|
548
394
|
}
|
|
549
395
|
],
|
|
550
396
|
"stateMutability": "view",
|
|
551
397
|
"type": "function"
|
|
552
398
|
},
|
|
553
399
|
{
|
|
554
|
-
"inputs": [
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
"name": "_systemConfig",
|
|
558
|
-
"type": "address"
|
|
559
|
-
},
|
|
400
|
+
"inputs": [],
|
|
401
|
+
"name": "l2Oracle",
|
|
402
|
+
"outputs": [
|
|
560
403
|
{
|
|
561
|
-
"internalType": "contract
|
|
562
|
-
"name": "
|
|
404
|
+
"internalType": "contract L2OutputOracle",
|
|
405
|
+
"name": "",
|
|
563
406
|
"type": "address"
|
|
564
407
|
}
|
|
565
408
|
],
|
|
566
|
-
"
|
|
567
|
-
"outputs": [],
|
|
568
|
-
"stateMutability": "nonpayable",
|
|
409
|
+
"stateMutability": "view",
|
|
569
410
|
"type": "function"
|
|
570
411
|
},
|
|
571
412
|
{
|
|
@@ -600,25 +441,6 @@ exports.OptimismPortal2_jsonAbi = [
|
|
|
600
441
|
"stateMutability": "pure",
|
|
601
442
|
"type": "function"
|
|
602
443
|
},
|
|
603
|
-
{
|
|
604
|
-
"inputs": [
|
|
605
|
-
{
|
|
606
|
-
"internalType": "bytes32",
|
|
607
|
-
"name": "_withdrawalHash",
|
|
608
|
-
"type": "bytes32"
|
|
609
|
-
}
|
|
610
|
-
],
|
|
611
|
-
"name": "numProofSubmitters",
|
|
612
|
-
"outputs": [
|
|
613
|
-
{
|
|
614
|
-
"internalType": "uint256",
|
|
615
|
-
"name": "",
|
|
616
|
-
"type": "uint256"
|
|
617
|
-
}
|
|
618
|
-
],
|
|
619
|
-
"stateMutability": "view",
|
|
620
|
-
"type": "function"
|
|
621
|
-
},
|
|
622
444
|
{
|
|
623
445
|
"inputs": [],
|
|
624
446
|
"name": "params",
|
|
@@ -648,50 +470,13 @@ exports.OptimismPortal2_jsonAbi = [
|
|
|
648
470
|
"outputs": [
|
|
649
471
|
{
|
|
650
472
|
"internalType": "bool",
|
|
651
|
-
"name": "",
|
|
473
|
+
"name": "paused_",
|
|
652
474
|
"type": "bool"
|
|
653
475
|
}
|
|
654
476
|
],
|
|
655
477
|
"stateMutability": "view",
|
|
656
478
|
"type": "function"
|
|
657
479
|
},
|
|
658
|
-
{
|
|
659
|
-
"inputs": [],
|
|
660
|
-
"name": "proofMaturityDelaySeconds",
|
|
661
|
-
"outputs": [
|
|
662
|
-
{
|
|
663
|
-
"internalType": "uint256",
|
|
664
|
-
"name": "",
|
|
665
|
-
"type": "uint256"
|
|
666
|
-
}
|
|
667
|
-
],
|
|
668
|
-
"stateMutability": "view",
|
|
669
|
-
"type": "function"
|
|
670
|
-
},
|
|
671
|
-
{
|
|
672
|
-
"inputs": [
|
|
673
|
-
{
|
|
674
|
-
"internalType": "bytes32",
|
|
675
|
-
"name": "",
|
|
676
|
-
"type": "bytes32"
|
|
677
|
-
},
|
|
678
|
-
{
|
|
679
|
-
"internalType": "uint256",
|
|
680
|
-
"name": "",
|
|
681
|
-
"type": "uint256"
|
|
682
|
-
}
|
|
683
|
-
],
|
|
684
|
-
"name": "proofSubmitters",
|
|
685
|
-
"outputs": [
|
|
686
|
-
{
|
|
687
|
-
"internalType": "address",
|
|
688
|
-
"name": "",
|
|
689
|
-
"type": "address"
|
|
690
|
-
}
|
|
691
|
-
],
|
|
692
|
-
"stateMutability": "view",
|
|
693
|
-
"type": "function"
|
|
694
|
-
},
|
|
695
480
|
{
|
|
696
481
|
"inputs": [
|
|
697
482
|
{
|
|
@@ -733,7 +518,7 @@ exports.OptimismPortal2_jsonAbi = [
|
|
|
733
518
|
},
|
|
734
519
|
{
|
|
735
520
|
"internalType": "uint256",
|
|
736
|
-
"name": "
|
|
521
|
+
"name": "_l2OutputIndex",
|
|
737
522
|
"type": "uint256"
|
|
738
523
|
},
|
|
739
524
|
{
|
|
@@ -780,79 +565,55 @@ exports.OptimismPortal2_jsonAbi = [
|
|
|
780
565
|
"internalType": "bytes32",
|
|
781
566
|
"name": "",
|
|
782
567
|
"type": "bytes32"
|
|
783
|
-
},
|
|
784
|
-
{
|
|
785
|
-
"internalType": "address",
|
|
786
|
-
"name": "",
|
|
787
|
-
"type": "address"
|
|
788
568
|
}
|
|
789
569
|
],
|
|
790
570
|
"name": "provenWithdrawals",
|
|
791
571
|
"outputs": [
|
|
792
572
|
{
|
|
793
|
-
"internalType": "
|
|
794
|
-
"name": "
|
|
795
|
-
"type": "
|
|
573
|
+
"internalType": "bytes32",
|
|
574
|
+
"name": "outputRoot",
|
|
575
|
+
"type": "bytes32"
|
|
796
576
|
},
|
|
797
577
|
{
|
|
798
|
-
"internalType": "
|
|
578
|
+
"internalType": "uint128",
|
|
799
579
|
"name": "timestamp",
|
|
800
|
-
"type": "
|
|
801
|
-
}
|
|
802
|
-
],
|
|
803
|
-
"stateMutability": "view",
|
|
804
|
-
"type": "function"
|
|
805
|
-
},
|
|
806
|
-
{
|
|
807
|
-
"inputs": [],
|
|
808
|
-
"name": "proxyAdmin",
|
|
809
|
-
"outputs": [
|
|
580
|
+
"type": "uint128"
|
|
581
|
+
},
|
|
810
582
|
{
|
|
811
|
-
"internalType": "
|
|
812
|
-
"name": "",
|
|
813
|
-
"type": "
|
|
583
|
+
"internalType": "uint128",
|
|
584
|
+
"name": "l2OutputIndex",
|
|
585
|
+
"type": "uint128"
|
|
814
586
|
}
|
|
815
587
|
],
|
|
816
588
|
"stateMutability": "view",
|
|
817
589
|
"type": "function"
|
|
818
590
|
},
|
|
819
591
|
{
|
|
820
|
-
"inputs": [
|
|
821
|
-
"name": "proxyAdminOwner",
|
|
822
|
-
"outputs": [
|
|
592
|
+
"inputs": [
|
|
823
593
|
{
|
|
824
594
|
"internalType": "address",
|
|
825
|
-
"name": "",
|
|
595
|
+
"name": "_token",
|
|
826
596
|
"type": "address"
|
|
827
|
-
}
|
|
828
|
-
],
|
|
829
|
-
"stateMutability": "view",
|
|
830
|
-
"type": "function"
|
|
831
|
-
},
|
|
832
|
-
{
|
|
833
|
-
"inputs": [],
|
|
834
|
-
"name": "respectedGameType",
|
|
835
|
-
"outputs": [
|
|
597
|
+
},
|
|
836
598
|
{
|
|
837
|
-
"internalType": "
|
|
838
|
-
"name": "",
|
|
839
|
-
"type": "
|
|
840
|
-
}
|
|
841
|
-
],
|
|
842
|
-
"stateMutability": "view",
|
|
843
|
-
"type": "function"
|
|
844
|
-
},
|
|
845
|
-
{
|
|
846
|
-
"inputs": [],
|
|
847
|
-
"name": "respectedGameTypeUpdatedAt",
|
|
848
|
-
"outputs": [
|
|
599
|
+
"internalType": "uint8",
|
|
600
|
+
"name": "_decimals",
|
|
601
|
+
"type": "uint8"
|
|
602
|
+
},
|
|
849
603
|
{
|
|
850
|
-
"internalType": "
|
|
851
|
-
"name": "",
|
|
852
|
-
"type": "
|
|
604
|
+
"internalType": "bytes32",
|
|
605
|
+
"name": "_name",
|
|
606
|
+
"type": "bytes32"
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"internalType": "bytes32",
|
|
610
|
+
"name": "_symbol",
|
|
611
|
+
"type": "bytes32"
|
|
853
612
|
}
|
|
854
613
|
],
|
|
855
|
-
"
|
|
614
|
+
"name": "setGasPayingToken",
|
|
615
|
+
"outputs": [],
|
|
616
|
+
"stateMutability": "nonpayable",
|
|
856
617
|
"type": "function"
|
|
857
618
|
},
|
|
858
619
|
{
|
|
@@ -860,7 +621,7 @@ exports.OptimismPortal2_jsonAbi = [
|
|
|
860
621
|
"name": "superchainConfig",
|
|
861
622
|
"outputs": [
|
|
862
623
|
{
|
|
863
|
-
"internalType": "contract
|
|
624
|
+
"internalType": "contract SuperchainConfig",
|
|
864
625
|
"name": "",
|
|
865
626
|
"type": "address"
|
|
866
627
|
}
|
|
@@ -873,7 +634,7 @@ exports.OptimismPortal2_jsonAbi = [
|
|
|
873
634
|
"name": "systemConfig",
|
|
874
635
|
"outputs": [
|
|
875
636
|
{
|
|
876
|
-
"internalType": "contract
|
|
637
|
+
"internalType": "contract SystemConfig",
|
|
877
638
|
"name": "",
|
|
878
639
|
"type": "address"
|
|
879
640
|
}
|
|
@@ -900,7 +661,7 @@ exports.OptimismPortal2_jsonAbi = [
|
|
|
900
661
|
}
|
|
901
662
|
];
|
|
902
663
|
/**
|
|
903
|
-
*
|
|
664
|
+
* OptimismPortal_json Contract Class
|
|
904
665
|
*
|
|
905
666
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
906
667
|
*
|
|
@@ -908,12 +669,12 @@ exports.OptimismPortal2_jsonAbi = [
|
|
|
908
669
|
* ```typescript
|
|
909
670
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
910
671
|
* import { mainnet } from 'viem/chains';
|
|
911
|
-
* import {
|
|
672
|
+
* import { OptimismPortal_json } from 'OptimismPortal_json';
|
|
912
673
|
*
|
|
913
674
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
914
675
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
915
676
|
*
|
|
916
|
-
* const contract = new
|
|
677
|
+
* const contract = new OptimismPortal_json('0x...', { publicClient, walletClient });
|
|
917
678
|
*
|
|
918
679
|
* // Read functions
|
|
919
680
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -931,13 +692,13 @@ exports.OptimismPortal2_jsonAbi = [
|
|
|
931
692
|
* });
|
|
932
693
|
* ```
|
|
933
694
|
*/
|
|
934
|
-
class
|
|
695
|
+
class OptimismPortal_json {
|
|
935
696
|
constructor(address, clients) {
|
|
936
697
|
this.contractAddress = address;
|
|
937
698
|
this.publicClient = clients.publicClient;
|
|
938
699
|
this.contract = (0, viem_1.getContract)({
|
|
939
700
|
address,
|
|
940
|
-
abi: exports.
|
|
701
|
+
abi: exports.OptimismPortal_jsonAbi,
|
|
941
702
|
client: {
|
|
942
703
|
public: clients.publicClient,
|
|
943
704
|
wallet: clients.walletClient,
|
|
@@ -957,46 +718,11 @@ class OptimismPortal2_json {
|
|
|
957
718
|
return this.contract;
|
|
958
719
|
}
|
|
959
720
|
/**
|
|
960
|
-
*
|
|
961
|
-
* view
|
|
962
|
-
*/
|
|
963
|
-
async anchorStateRegistry() {
|
|
964
|
-
return this.contract.read.anchorStateRegistry();
|
|
965
|
-
}
|
|
966
|
-
/**
|
|
967
|
-
* checkWithdrawal
|
|
968
|
-
* view
|
|
969
|
-
*/
|
|
970
|
-
async checkWithdrawal(_withdrawalHash, _proofSubmitter) {
|
|
971
|
-
return this.contract.read.checkWithdrawal([_withdrawalHash, _proofSubmitter]);
|
|
972
|
-
}
|
|
973
|
-
/**
|
|
974
|
-
* disputeGameBlacklist
|
|
975
|
-
* view
|
|
976
|
-
*/
|
|
977
|
-
async disputeGameBlacklist(_disputeGame) {
|
|
978
|
-
return this.contract.read.disputeGameBlacklist([_disputeGame]);
|
|
979
|
-
}
|
|
980
|
-
/**
|
|
981
|
-
* disputeGameFactory
|
|
982
|
-
* view
|
|
983
|
-
*/
|
|
984
|
-
async disputeGameFactory() {
|
|
985
|
-
return this.contract.read.disputeGameFactory();
|
|
986
|
-
}
|
|
987
|
-
/**
|
|
988
|
-
* disputeGameFinalityDelaySeconds
|
|
721
|
+
* balance
|
|
989
722
|
* view
|
|
990
723
|
*/
|
|
991
|
-
async
|
|
992
|
-
return this.contract.read.
|
|
993
|
-
}
|
|
994
|
-
/**
|
|
995
|
-
* ethLockbox
|
|
996
|
-
* view
|
|
997
|
-
*/
|
|
998
|
-
async ethLockbox() {
|
|
999
|
-
return this.contract.read.ethLockbox();
|
|
724
|
+
async balance() {
|
|
725
|
+
return this.contract.read.balance();
|
|
1000
726
|
}
|
|
1001
727
|
/**
|
|
1002
728
|
* finalizedWithdrawals
|
|
@@ -1013,11 +739,18 @@ class OptimismPortal2_json {
|
|
|
1013
739
|
return this.contract.read.guardian();
|
|
1014
740
|
}
|
|
1015
741
|
/**
|
|
1016
|
-
*
|
|
742
|
+
* isOutputFinalized
|
|
743
|
+
* view
|
|
744
|
+
*/
|
|
745
|
+
async isOutputFinalized(_l2OutputIndex) {
|
|
746
|
+
return this.contract.read.isOutputFinalized([_l2OutputIndex]);
|
|
747
|
+
}
|
|
748
|
+
/**
|
|
749
|
+
* l2Oracle
|
|
1017
750
|
* view
|
|
1018
751
|
*/
|
|
1019
|
-
async
|
|
1020
|
-
return this.contract.read.
|
|
752
|
+
async l2Oracle() {
|
|
753
|
+
return this.contract.read.l2Oracle();
|
|
1021
754
|
}
|
|
1022
755
|
/**
|
|
1023
756
|
* l2Sender
|
|
@@ -1033,13 +766,6 @@ class OptimismPortal2_json {
|
|
|
1033
766
|
async minimumGasLimit(_byteCount) {
|
|
1034
767
|
return this.contract.read.minimumGasLimit([_byteCount]);
|
|
1035
768
|
}
|
|
1036
|
-
/**
|
|
1037
|
-
* numProofSubmitters
|
|
1038
|
-
* view
|
|
1039
|
-
*/
|
|
1040
|
-
async numProofSubmitters(_withdrawalHash) {
|
|
1041
|
-
return this.contract.read.numProofSubmitters([_withdrawalHash]);
|
|
1042
|
-
}
|
|
1043
769
|
/**
|
|
1044
770
|
* params
|
|
1045
771
|
* view
|
|
@@ -1054,54 +780,12 @@ class OptimismPortal2_json {
|
|
|
1054
780
|
async paused() {
|
|
1055
781
|
return this.contract.read.paused();
|
|
1056
782
|
}
|
|
1057
|
-
/**
|
|
1058
|
-
* proofMaturityDelaySeconds
|
|
1059
|
-
* view
|
|
1060
|
-
*/
|
|
1061
|
-
async proofMaturityDelaySeconds() {
|
|
1062
|
-
return this.contract.read.proofMaturityDelaySeconds();
|
|
1063
|
-
}
|
|
1064
|
-
/**
|
|
1065
|
-
* proofSubmitters
|
|
1066
|
-
* view
|
|
1067
|
-
*/
|
|
1068
|
-
async proofSubmitters(arg0, arg1) {
|
|
1069
|
-
return this.contract.read.proofSubmitters([arg0, arg1]);
|
|
1070
|
-
}
|
|
1071
783
|
/**
|
|
1072
784
|
* provenWithdrawals
|
|
1073
785
|
* view
|
|
1074
786
|
*/
|
|
1075
|
-
async provenWithdrawals(arg0
|
|
1076
|
-
return this.contract.read.provenWithdrawals([arg0
|
|
1077
|
-
}
|
|
1078
|
-
/**
|
|
1079
|
-
* proxyAdmin
|
|
1080
|
-
* view
|
|
1081
|
-
*/
|
|
1082
|
-
async proxyAdmin() {
|
|
1083
|
-
return this.contract.read.proxyAdmin();
|
|
1084
|
-
}
|
|
1085
|
-
/**
|
|
1086
|
-
* proxyAdminOwner
|
|
1087
|
-
* view
|
|
1088
|
-
*/
|
|
1089
|
-
async proxyAdminOwner() {
|
|
1090
|
-
return this.contract.read.proxyAdminOwner();
|
|
1091
|
-
}
|
|
1092
|
-
/**
|
|
1093
|
-
* respectedGameType
|
|
1094
|
-
* view
|
|
1095
|
-
*/
|
|
1096
|
-
async respectedGameType() {
|
|
1097
|
-
return this.contract.read.respectedGameType();
|
|
1098
|
-
}
|
|
1099
|
-
/**
|
|
1100
|
-
* respectedGameTypeUpdatedAt
|
|
1101
|
-
* view
|
|
1102
|
-
*/
|
|
1103
|
-
async respectedGameTypeUpdatedAt() {
|
|
1104
|
-
return this.contract.read.respectedGameTypeUpdatedAt();
|
|
787
|
+
async provenWithdrawals(arg0) {
|
|
788
|
+
return this.contract.read.provenWithdrawals([arg0]);
|
|
1105
789
|
}
|
|
1106
790
|
/**
|
|
1107
791
|
* superchainConfig
|
|
@@ -1124,6 +808,17 @@ class OptimismPortal2_json {
|
|
|
1124
808
|
async version() {
|
|
1125
809
|
return this.contract.read.version();
|
|
1126
810
|
}
|
|
811
|
+
/**
|
|
812
|
+
* depositERC20Transaction
|
|
813
|
+
* nonpayable
|
|
814
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
815
|
+
*/
|
|
816
|
+
async depositERC20Transaction(_to, _mint, _value, _gasLimit, _isCreation, _data, options) {
|
|
817
|
+
if (!this.contract.write) {
|
|
818
|
+
throw new Error('Wallet client is required for write operations');
|
|
819
|
+
}
|
|
820
|
+
return this.contract.write.depositERC20Transaction([_to, _mint, _value, _gasLimit, _isCreation, _data], options);
|
|
821
|
+
}
|
|
1127
822
|
/**
|
|
1128
823
|
* depositTransaction
|
|
1129
824
|
* payable
|
|
@@ -1158,37 +853,37 @@ class OptimismPortal2_json {
|
|
|
1158
853
|
return this.contract.write.finalizeWithdrawalTransaction([_tx], options);
|
|
1159
854
|
}
|
|
1160
855
|
/**
|
|
1161
|
-
*
|
|
856
|
+
* initialize
|
|
1162
857
|
* nonpayable
|
|
1163
858
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1164
859
|
*/
|
|
1165
|
-
async
|
|
860
|
+
async initialize(_l2Oracle, _systemConfig, _superchainConfig, options) {
|
|
1166
861
|
if (!this.contract.write) {
|
|
1167
862
|
throw new Error('Wallet client is required for write operations');
|
|
1168
863
|
}
|
|
1169
|
-
return this.contract.write.
|
|
864
|
+
return this.contract.write.initialize([_l2Oracle, _systemConfig, _superchainConfig], options);
|
|
1170
865
|
}
|
|
1171
866
|
/**
|
|
1172
|
-
*
|
|
867
|
+
* proveWithdrawalTransaction
|
|
1173
868
|
* nonpayable
|
|
1174
869
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1175
870
|
*/
|
|
1176
|
-
async
|
|
871
|
+
async proveWithdrawalTransaction(_tx, _l2OutputIndex, _outputRootProof, _withdrawalProof, options) {
|
|
1177
872
|
if (!this.contract.write) {
|
|
1178
873
|
throw new Error('Wallet client is required for write operations');
|
|
1179
874
|
}
|
|
1180
|
-
return this.contract.write.
|
|
875
|
+
return this.contract.write.proveWithdrawalTransaction([_tx, _l2OutputIndex, _outputRootProof, _withdrawalProof], options);
|
|
1181
876
|
}
|
|
1182
877
|
/**
|
|
1183
|
-
*
|
|
878
|
+
* setGasPayingToken
|
|
1184
879
|
* nonpayable
|
|
1185
880
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1186
881
|
*/
|
|
1187
|
-
async
|
|
882
|
+
async setGasPayingToken(_token, _decimals, _name, _symbol, options) {
|
|
1188
883
|
if (!this.contract.write) {
|
|
1189
884
|
throw new Error('Wallet client is required for write operations');
|
|
1190
885
|
}
|
|
1191
|
-
return this.contract.write.
|
|
886
|
+
return this.contract.write.setGasPayingToken([_token, _decimals, _name, _symbol], options);
|
|
1192
887
|
}
|
|
1193
888
|
/**
|
|
1194
889
|
* Simulate contract write operations (dry-run without sending transaction)
|
|
@@ -1204,6 +899,14 @@ class OptimismPortal2_json {
|
|
|
1204
899
|
throw new Error('Public client is required for simulation');
|
|
1205
900
|
}
|
|
1206
901
|
return {
|
|
902
|
+
/**
|
|
903
|
+
* Simulate depositERC20Transaction
|
|
904
|
+
* Returns gas estimate and result without sending transaction
|
|
905
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
906
|
+
*/
|
|
907
|
+
async depositERC20Transaction(_to, _mint, _value, _gasLimit, _isCreation, _data, options) {
|
|
908
|
+
return contract.simulate.depositERC20Transaction([_to, _mint, _value, _gasLimit, _isCreation, _data], options);
|
|
909
|
+
},
|
|
1207
910
|
/**
|
|
1208
911
|
* Simulate depositTransaction
|
|
1209
912
|
* Returns gas estimate and result without sending transaction
|
|
@@ -1229,28 +932,28 @@ class OptimismPortal2_json {
|
|
|
1229
932
|
return contract.simulate.finalizeWithdrawalTransaction([_tx], options);
|
|
1230
933
|
},
|
|
1231
934
|
/**
|
|
1232
|
-
* Simulate
|
|
935
|
+
* Simulate initialize
|
|
1233
936
|
* Returns gas estimate and result without sending transaction
|
|
1234
937
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1235
938
|
*/
|
|
1236
|
-
async
|
|
1237
|
-
return contract.simulate.
|
|
939
|
+
async initialize(_l2Oracle, _systemConfig, _superchainConfig, options) {
|
|
940
|
+
return contract.simulate.initialize([_l2Oracle, _systemConfig, _superchainConfig], options);
|
|
1238
941
|
},
|
|
1239
942
|
/**
|
|
1240
|
-
* Simulate
|
|
943
|
+
* Simulate proveWithdrawalTransaction
|
|
1241
944
|
* Returns gas estimate and result without sending transaction
|
|
1242
945
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1243
946
|
*/
|
|
1244
|
-
async
|
|
1245
|
-
return contract.simulate.
|
|
947
|
+
async proveWithdrawalTransaction(_tx, _l2OutputIndex, _outputRootProof, _withdrawalProof, options) {
|
|
948
|
+
return contract.simulate.proveWithdrawalTransaction([_tx, _l2OutputIndex, _outputRootProof, _withdrawalProof], options);
|
|
1246
949
|
},
|
|
1247
950
|
/**
|
|
1248
|
-
* Simulate
|
|
951
|
+
* Simulate setGasPayingToken
|
|
1249
952
|
* Returns gas estimate and result without sending transaction
|
|
1250
953
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1251
954
|
*/
|
|
1252
|
-
async
|
|
1253
|
-
return contract.simulate.
|
|
955
|
+
async setGasPayingToken(_token, _decimals, _name, _symbol, options) {
|
|
956
|
+
return contract.simulate.setGasPayingToken([_token, _decimals, _name, _symbol], options);
|
|
1254
957
|
}
|
|
1255
958
|
};
|
|
1256
959
|
}
|
|
@@ -1277,7 +980,7 @@ class OptimismPortal2_json {
|
|
|
1277
980
|
Initialized: (callback) => {
|
|
1278
981
|
return this.publicClient.watchContractEvent({
|
|
1279
982
|
address: this.contractAddress,
|
|
1280
|
-
abi: exports.
|
|
983
|
+
abi: exports.OptimismPortal_jsonAbi,
|
|
1281
984
|
eventName: 'Initialized',
|
|
1282
985
|
onLogs: (logs) => {
|
|
1283
986
|
logs.forEach((log) => {
|
|
@@ -1295,7 +998,7 @@ class OptimismPortal2_json {
|
|
|
1295
998
|
TransactionDeposited: (callback, filter) => {
|
|
1296
999
|
return this.publicClient.watchContractEvent({
|
|
1297
1000
|
address: this.contractAddress,
|
|
1298
|
-
abi: exports.
|
|
1001
|
+
abi: exports.OptimismPortal_jsonAbi,
|
|
1299
1002
|
eventName: 'TransactionDeposited',
|
|
1300
1003
|
args: filter,
|
|
1301
1004
|
onLogs: (logs) => {
|
|
@@ -1314,7 +1017,7 @@ class OptimismPortal2_json {
|
|
|
1314
1017
|
WithdrawalFinalized: (callback, filter) => {
|
|
1315
1018
|
return this.publicClient.watchContractEvent({
|
|
1316
1019
|
address: this.contractAddress,
|
|
1317
|
-
abi: exports.
|
|
1020
|
+
abi: exports.OptimismPortal_jsonAbi,
|
|
1318
1021
|
eventName: 'WithdrawalFinalized',
|
|
1319
1022
|
args: filter,
|
|
1320
1023
|
onLogs: (logs) => {
|
|
@@ -1333,7 +1036,7 @@ class OptimismPortal2_json {
|
|
|
1333
1036
|
WithdrawalProven: (callback, filter) => {
|
|
1334
1037
|
return this.publicClient.watchContractEvent({
|
|
1335
1038
|
address: this.contractAddress,
|
|
1336
|
-
abi: exports.
|
|
1039
|
+
abi: exports.OptimismPortal_jsonAbi,
|
|
1337
1040
|
eventName: 'WithdrawalProven',
|
|
1338
1041
|
args: filter,
|
|
1339
1042
|
onLogs: (logs) => {
|
|
@@ -1342,27 +1045,8 @@ class OptimismPortal2_json {
|
|
|
1342
1045
|
});
|
|
1343
1046
|
},
|
|
1344
1047
|
});
|
|
1345
|
-
},
|
|
1346
|
-
/**
|
|
1347
|
-
* Watch WithdrawalProvenExtension1 events
|
|
1348
|
-
* @param callback Function to call when event is emitted
|
|
1349
|
-
* @param filter Optional filter for indexed parameters
|
|
1350
|
-
* @returns Unwatch function to stop listening
|
|
1351
|
-
*/
|
|
1352
|
-
WithdrawalProvenExtension1: (callback, filter) => {
|
|
1353
|
-
return this.publicClient.watchContractEvent({
|
|
1354
|
-
address: this.contractAddress,
|
|
1355
|
-
abi: exports.OptimismPortal2_jsonAbi,
|
|
1356
|
-
eventName: 'WithdrawalProvenExtension1',
|
|
1357
|
-
args: filter,
|
|
1358
|
-
onLogs: (logs) => {
|
|
1359
|
-
logs.forEach((log) => {
|
|
1360
|
-
callback(log.args);
|
|
1361
|
-
});
|
|
1362
|
-
},
|
|
1363
|
-
});
|
|
1364
1048
|
}
|
|
1365
1049
|
};
|
|
1366
1050
|
}
|
|
1367
1051
|
}
|
|
1368
|
-
exports.
|
|
1052
|
+
exports.OptimismPortal_json = OptimismPortal_json;
|