@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
|
@@ -24,125 +24,69 @@ export type Types_OutputRootProof = {
|
|
|
24
24
|
latestBlockhash: `0x${string}`;
|
|
25
25
|
};
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* OptimismPortal_json ABI
|
|
28
28
|
*
|
|
29
29
|
* This ABI is typed using viem's type system for full type safety.
|
|
30
30
|
*/
|
|
31
|
-
export const
|
|
31
|
+
export const OptimismPortal_jsonAbi = [
|
|
32
32
|
{
|
|
33
|
-
"inputs": [
|
|
34
|
-
{
|
|
35
|
-
"internalType": "uint256",
|
|
36
|
-
"name": "_proofMaturityDelaySeconds",
|
|
37
|
-
"type": "uint256"
|
|
38
|
-
}
|
|
39
|
-
],
|
|
33
|
+
"inputs": [],
|
|
40
34
|
"stateMutability": "nonpayable",
|
|
41
35
|
"type": "constructor"
|
|
42
36
|
},
|
|
43
37
|
{
|
|
44
38
|
"inputs": [],
|
|
45
|
-
"name": "
|
|
46
|
-
"type": "error"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"inputs": [],
|
|
50
|
-
"name": "EmptyItem",
|
|
51
|
-
"type": "error"
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"inputs": [],
|
|
55
|
-
"name": "InvalidDataRemainder",
|
|
56
|
-
"type": "error"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"inputs": [],
|
|
60
|
-
"name": "InvalidHeader",
|
|
61
|
-
"type": "error"
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"inputs": [],
|
|
65
|
-
"name": "OptimismPortal_AlreadyFinalized",
|
|
66
|
-
"type": "error"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
"inputs": [],
|
|
70
|
-
"name": "OptimismPortal_BadTarget",
|
|
39
|
+
"name": "BadTarget",
|
|
71
40
|
"type": "error"
|
|
72
41
|
},
|
|
73
42
|
{
|
|
74
43
|
"inputs": [],
|
|
75
|
-
"name": "
|
|
44
|
+
"name": "CallPaused",
|
|
76
45
|
"type": "error"
|
|
77
46
|
},
|
|
78
47
|
{
|
|
79
48
|
"inputs": [],
|
|
80
|
-
"name": "
|
|
81
|
-
"type": "error"
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
"inputs": [],
|
|
85
|
-
"name": "OptimismPortal_GasEstimation",
|
|
86
|
-
"type": "error"
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"inputs": [],
|
|
90
|
-
"name": "OptimismPortal_GasLimitTooLow",
|
|
91
|
-
"type": "error"
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"inputs": [],
|
|
95
|
-
"name": "OptimismPortal_ImproperDisputeGame",
|
|
96
|
-
"type": "error"
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
"inputs": [],
|
|
100
|
-
"name": "OptimismPortal_InvalidDisputeGame",
|
|
101
|
-
"type": "error"
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"inputs": [],
|
|
105
|
-
"name": "OptimismPortal_InvalidLockboxState",
|
|
49
|
+
"name": "ContentLengthMismatch",
|
|
106
50
|
"type": "error"
|
|
107
51
|
},
|
|
108
52
|
{
|
|
109
53
|
"inputs": [],
|
|
110
|
-
"name": "
|
|
54
|
+
"name": "EmptyItem",
|
|
111
55
|
"type": "error"
|
|
112
56
|
},
|
|
113
57
|
{
|
|
114
58
|
"inputs": [],
|
|
115
|
-
"name": "
|
|
59
|
+
"name": "GasEstimation",
|
|
116
60
|
"type": "error"
|
|
117
61
|
},
|
|
118
62
|
{
|
|
119
63
|
"inputs": [],
|
|
120
|
-
"name": "
|
|
64
|
+
"name": "InvalidDataRemainder",
|
|
121
65
|
"type": "error"
|
|
122
66
|
},
|
|
123
67
|
{
|
|
124
68
|
"inputs": [],
|
|
125
|
-
"name": "
|
|
69
|
+
"name": "InvalidHeader",
|
|
126
70
|
"type": "error"
|
|
127
71
|
},
|
|
128
72
|
{
|
|
129
73
|
"inputs": [],
|
|
130
|
-
"name": "
|
|
74
|
+
"name": "LargeCalldata",
|
|
131
75
|
"type": "error"
|
|
132
76
|
},
|
|
133
77
|
{
|
|
134
78
|
"inputs": [],
|
|
135
|
-
"name": "
|
|
79
|
+
"name": "NoValue",
|
|
136
80
|
"type": "error"
|
|
137
81
|
},
|
|
138
82
|
{
|
|
139
83
|
"inputs": [],
|
|
140
|
-
"name": "
|
|
84
|
+
"name": "NonReentrant",
|
|
141
85
|
"type": "error"
|
|
142
86
|
},
|
|
143
87
|
{
|
|
144
88
|
"inputs": [],
|
|
145
|
-
"name": "
|
|
89
|
+
"name": "OnlyCustomGasToken",
|
|
146
90
|
"type": "error"
|
|
147
91
|
},
|
|
148
92
|
{
|
|
@@ -152,37 +96,17 @@ export const OptimismPortal2_jsonAbi = [
|
|
|
152
96
|
},
|
|
153
97
|
{
|
|
154
98
|
"inputs": [],
|
|
155
|
-
"name": "
|
|
156
|
-
"type": "error"
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
"inputs": [],
|
|
160
|
-
"name": "ProxyAdminOwnedBase_NotProxyAdminOrProxyAdminOwner",
|
|
161
|
-
"type": "error"
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
"inputs": [],
|
|
165
|
-
"name": "ProxyAdminOwnedBase_NotProxyAdminOwner",
|
|
99
|
+
"name": "SmallGasLimit",
|
|
166
100
|
"type": "error"
|
|
167
101
|
},
|
|
168
102
|
{
|
|
169
103
|
"inputs": [],
|
|
170
|
-
"name": "
|
|
104
|
+
"name": "TransferFailed",
|
|
171
105
|
"type": "error"
|
|
172
106
|
},
|
|
173
107
|
{
|
|
174
108
|
"inputs": [],
|
|
175
|
-
"name": "
|
|
176
|
-
"type": "error"
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
"inputs": [],
|
|
180
|
-
"name": "ProxyAdminOwnedBase_ProxyAdminNotFound",
|
|
181
|
-
"type": "error"
|
|
182
|
-
},
|
|
183
|
-
{
|
|
184
|
-
"inputs": [],
|
|
185
|
-
"name": "ReinitializableBase_ZeroInitVersion",
|
|
109
|
+
"name": "Unauthorized",
|
|
186
110
|
"type": "error"
|
|
187
111
|
},
|
|
188
112
|
{
|
|
@@ -283,53 +207,16 @@ export const OptimismPortal2_jsonAbi = [
|
|
|
283
207
|
"name": "WithdrawalProven",
|
|
284
208
|
"type": "event"
|
|
285
209
|
},
|
|
286
|
-
{
|
|
287
|
-
"anonymous": false,
|
|
288
|
-
"inputs": [
|
|
289
|
-
{
|
|
290
|
-
"indexed": true,
|
|
291
|
-
"internalType": "bytes32",
|
|
292
|
-
"name": "withdrawalHash",
|
|
293
|
-
"type": "bytes32"
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
"indexed": true,
|
|
297
|
-
"internalType": "address",
|
|
298
|
-
"name": "proofSubmitter",
|
|
299
|
-
"type": "address"
|
|
300
|
-
}
|
|
301
|
-
],
|
|
302
|
-
"name": "WithdrawalProvenExtension1",
|
|
303
|
-
"type": "event"
|
|
304
|
-
},
|
|
305
210
|
{
|
|
306
211
|
"inputs": [],
|
|
307
|
-
"name": "
|
|
212
|
+
"name": "balance",
|
|
308
213
|
"outputs": [
|
|
309
214
|
{
|
|
310
|
-
"internalType": "
|
|
215
|
+
"internalType": "uint256",
|
|
311
216
|
"name": "",
|
|
312
|
-
"type": "
|
|
313
|
-
}
|
|
314
|
-
],
|
|
315
|
-
"stateMutability": "view",
|
|
316
|
-
"type": "function"
|
|
317
|
-
},
|
|
318
|
-
{
|
|
319
|
-
"inputs": [
|
|
320
|
-
{
|
|
321
|
-
"internalType": "bytes32",
|
|
322
|
-
"name": "_withdrawalHash",
|
|
323
|
-
"type": "bytes32"
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
"internalType": "address",
|
|
327
|
-
"name": "_proofSubmitter",
|
|
328
|
-
"type": "address"
|
|
217
|
+
"type": "uint256"
|
|
329
218
|
}
|
|
330
219
|
],
|
|
331
|
-
"name": "checkWithdrawal",
|
|
332
|
-
"outputs": [],
|
|
333
220
|
"stateMutability": "view",
|
|
334
221
|
"type": "function"
|
|
335
222
|
},
|
|
@@ -340,6 +227,11 @@ export const OptimismPortal2_jsonAbi = [
|
|
|
340
227
|
"name": "_to",
|
|
341
228
|
"type": "address"
|
|
342
229
|
},
|
|
230
|
+
{
|
|
231
|
+
"internalType": "uint256",
|
|
232
|
+
"name": "_mint",
|
|
233
|
+
"type": "uint256"
|
|
234
|
+
},
|
|
343
235
|
{
|
|
344
236
|
"internalType": "uint256",
|
|
345
237
|
"name": "_value",
|
|
@@ -361,54 +253,42 @@ export const OptimismPortal2_jsonAbi = [
|
|
|
361
253
|
"type": "bytes"
|
|
362
254
|
}
|
|
363
255
|
],
|
|
364
|
-
"name": "
|
|
256
|
+
"name": "depositERC20Transaction",
|
|
365
257
|
"outputs": [],
|
|
366
|
-
"stateMutability": "
|
|
258
|
+
"stateMutability": "nonpayable",
|
|
367
259
|
"type": "function"
|
|
368
260
|
},
|
|
369
261
|
{
|
|
370
262
|
"inputs": [
|
|
371
263
|
{
|
|
372
|
-
"internalType": "
|
|
373
|
-
"name": "
|
|
264
|
+
"internalType": "address",
|
|
265
|
+
"name": "_to",
|
|
374
266
|
"type": "address"
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"internalType": "uint256",
|
|
270
|
+
"name": "_value",
|
|
271
|
+
"type": "uint256"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"internalType": "uint64",
|
|
275
|
+
"name": "_gasLimit",
|
|
276
|
+
"type": "uint64"
|
|
277
|
+
},
|
|
379
278
|
{
|
|
380
279
|
"internalType": "bool",
|
|
381
|
-
"name": "",
|
|
280
|
+
"name": "_isCreation",
|
|
382
281
|
"type": "bool"
|
|
383
|
-
}
|
|
384
|
-
],
|
|
385
|
-
"stateMutability": "view",
|
|
386
|
-
"type": "function"
|
|
387
|
-
},
|
|
388
|
-
{
|
|
389
|
-
"inputs": [],
|
|
390
|
-
"name": "disputeGameFactory",
|
|
391
|
-
"outputs": [
|
|
392
|
-
{
|
|
393
|
-
"internalType": "contract IDisputeGameFactory",
|
|
394
|
-
"name": "",
|
|
395
|
-
"type": "address"
|
|
396
|
-
}
|
|
397
|
-
],
|
|
398
|
-
"stateMutability": "view",
|
|
399
|
-
"type": "function"
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
"inputs": [],
|
|
403
|
-
"name": "disputeGameFinalityDelaySeconds",
|
|
404
|
-
"outputs": [
|
|
282
|
+
},
|
|
405
283
|
{
|
|
406
|
-
"internalType": "
|
|
407
|
-
"name": "",
|
|
408
|
-
"type": "
|
|
284
|
+
"internalType": "bytes",
|
|
285
|
+
"name": "_data",
|
|
286
|
+
"type": "bytes"
|
|
409
287
|
}
|
|
410
288
|
],
|
|
411
|
-
"
|
|
289
|
+
"name": "depositTransaction",
|
|
290
|
+
"outputs": [],
|
|
291
|
+
"stateMutability": "payable",
|
|
412
292
|
"type": "function"
|
|
413
293
|
},
|
|
414
294
|
{
|
|
@@ -418,19 +298,6 @@ export const OptimismPortal2_jsonAbi = [
|
|
|
418
298
|
"stateMutability": "payable",
|
|
419
299
|
"type": "function"
|
|
420
300
|
},
|
|
421
|
-
{
|
|
422
|
-
"inputs": [],
|
|
423
|
-
"name": "ethLockbox",
|
|
424
|
-
"outputs": [
|
|
425
|
-
{
|
|
426
|
-
"internalType": "contract IETHLockbox",
|
|
427
|
-
"name": "",
|
|
428
|
-
"type": "address"
|
|
429
|
-
}
|
|
430
|
-
],
|
|
431
|
-
"stateMutability": "view",
|
|
432
|
-
"type": "function"
|
|
433
|
-
},
|
|
434
301
|
{
|
|
435
302
|
"inputs": [
|
|
436
303
|
{
|
|
@@ -476,56 +343,6 @@ export const OptimismPortal2_jsonAbi = [
|
|
|
476
343
|
"stateMutability": "nonpayable",
|
|
477
344
|
"type": "function"
|
|
478
345
|
},
|
|
479
|
-
{
|
|
480
|
-
"inputs": [
|
|
481
|
-
{
|
|
482
|
-
"components": [
|
|
483
|
-
{
|
|
484
|
-
"internalType": "uint256",
|
|
485
|
-
"name": "nonce",
|
|
486
|
-
"type": "uint256"
|
|
487
|
-
},
|
|
488
|
-
{
|
|
489
|
-
"internalType": "address",
|
|
490
|
-
"name": "sender",
|
|
491
|
-
"type": "address"
|
|
492
|
-
},
|
|
493
|
-
{
|
|
494
|
-
"internalType": "address",
|
|
495
|
-
"name": "target",
|
|
496
|
-
"type": "address"
|
|
497
|
-
},
|
|
498
|
-
{
|
|
499
|
-
"internalType": "uint256",
|
|
500
|
-
"name": "value",
|
|
501
|
-
"type": "uint256"
|
|
502
|
-
},
|
|
503
|
-
{
|
|
504
|
-
"internalType": "uint256",
|
|
505
|
-
"name": "gasLimit",
|
|
506
|
-
"type": "uint256"
|
|
507
|
-
},
|
|
508
|
-
{
|
|
509
|
-
"internalType": "bytes",
|
|
510
|
-
"name": "data",
|
|
511
|
-
"type": "bytes"
|
|
512
|
-
}
|
|
513
|
-
],
|
|
514
|
-
"internalType": "struct Types.WithdrawalTransaction",
|
|
515
|
-
"name": "_tx",
|
|
516
|
-
"type": "tuple"
|
|
517
|
-
},
|
|
518
|
-
{
|
|
519
|
-
"internalType": "address",
|
|
520
|
-
"name": "_proofSubmitter",
|
|
521
|
-
"type": "address"
|
|
522
|
-
}
|
|
523
|
-
],
|
|
524
|
-
"name": "finalizeWithdrawalTransactionExternalProof",
|
|
525
|
-
"outputs": [],
|
|
526
|
-
"stateMutability": "nonpayable",
|
|
527
|
-
"type": "function"
|
|
528
|
-
},
|
|
529
346
|
{
|
|
530
347
|
"inputs": [
|
|
531
348
|
{
|
|
@@ -559,34 +376,58 @@ export const OptimismPortal2_jsonAbi = [
|
|
|
559
376
|
"type": "function"
|
|
560
377
|
},
|
|
561
378
|
{
|
|
562
|
-
"inputs": [
|
|
563
|
-
|
|
379
|
+
"inputs": [
|
|
380
|
+
{
|
|
381
|
+
"internalType": "contract L2OutputOracle",
|
|
382
|
+
"name": "_l2Oracle",
|
|
383
|
+
"type": "address"
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"internalType": "contract SystemConfig",
|
|
387
|
+
"name": "_systemConfig",
|
|
388
|
+
"type": "address"
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
"internalType": "contract SuperchainConfig",
|
|
392
|
+
"name": "_superchainConfig",
|
|
393
|
+
"type": "address"
|
|
394
|
+
}
|
|
395
|
+
],
|
|
396
|
+
"name": "initialize",
|
|
397
|
+
"outputs": [],
|
|
398
|
+
"stateMutability": "nonpayable",
|
|
399
|
+
"type": "function"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
"inputs": [
|
|
403
|
+
{
|
|
404
|
+
"internalType": "uint256",
|
|
405
|
+
"name": "_l2OutputIndex",
|
|
406
|
+
"type": "uint256"
|
|
407
|
+
}
|
|
408
|
+
],
|
|
409
|
+
"name": "isOutputFinalized",
|
|
564
410
|
"outputs": [
|
|
565
411
|
{
|
|
566
|
-
"internalType": "
|
|
412
|
+
"internalType": "bool",
|
|
567
413
|
"name": "",
|
|
568
|
-
"type": "
|
|
414
|
+
"type": "bool"
|
|
569
415
|
}
|
|
570
416
|
],
|
|
571
417
|
"stateMutability": "view",
|
|
572
418
|
"type": "function"
|
|
573
419
|
},
|
|
574
420
|
{
|
|
575
|
-
"inputs": [
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
"name": "_systemConfig",
|
|
579
|
-
"type": "address"
|
|
580
|
-
},
|
|
421
|
+
"inputs": [],
|
|
422
|
+
"name": "l2Oracle",
|
|
423
|
+
"outputs": [
|
|
581
424
|
{
|
|
582
|
-
"internalType": "contract
|
|
583
|
-
"name": "
|
|
425
|
+
"internalType": "contract L2OutputOracle",
|
|
426
|
+
"name": "",
|
|
584
427
|
"type": "address"
|
|
585
428
|
}
|
|
586
429
|
],
|
|
587
|
-
"
|
|
588
|
-
"outputs": [],
|
|
589
|
-
"stateMutability": "nonpayable",
|
|
430
|
+
"stateMutability": "view",
|
|
590
431
|
"type": "function"
|
|
591
432
|
},
|
|
592
433
|
{
|
|
@@ -621,25 +462,6 @@ export const OptimismPortal2_jsonAbi = [
|
|
|
621
462
|
"stateMutability": "pure",
|
|
622
463
|
"type": "function"
|
|
623
464
|
},
|
|
624
|
-
{
|
|
625
|
-
"inputs": [
|
|
626
|
-
{
|
|
627
|
-
"internalType": "bytes32",
|
|
628
|
-
"name": "_withdrawalHash",
|
|
629
|
-
"type": "bytes32"
|
|
630
|
-
}
|
|
631
|
-
],
|
|
632
|
-
"name": "numProofSubmitters",
|
|
633
|
-
"outputs": [
|
|
634
|
-
{
|
|
635
|
-
"internalType": "uint256",
|
|
636
|
-
"name": "",
|
|
637
|
-
"type": "uint256"
|
|
638
|
-
}
|
|
639
|
-
],
|
|
640
|
-
"stateMutability": "view",
|
|
641
|
-
"type": "function"
|
|
642
|
-
},
|
|
643
465
|
{
|
|
644
466
|
"inputs": [],
|
|
645
467
|
"name": "params",
|
|
@@ -669,50 +491,13 @@ export const OptimismPortal2_jsonAbi = [
|
|
|
669
491
|
"outputs": [
|
|
670
492
|
{
|
|
671
493
|
"internalType": "bool",
|
|
672
|
-
"name": "",
|
|
494
|
+
"name": "paused_",
|
|
673
495
|
"type": "bool"
|
|
674
496
|
}
|
|
675
497
|
],
|
|
676
498
|
"stateMutability": "view",
|
|
677
499
|
"type": "function"
|
|
678
500
|
},
|
|
679
|
-
{
|
|
680
|
-
"inputs": [],
|
|
681
|
-
"name": "proofMaturityDelaySeconds",
|
|
682
|
-
"outputs": [
|
|
683
|
-
{
|
|
684
|
-
"internalType": "uint256",
|
|
685
|
-
"name": "",
|
|
686
|
-
"type": "uint256"
|
|
687
|
-
}
|
|
688
|
-
],
|
|
689
|
-
"stateMutability": "view",
|
|
690
|
-
"type": "function"
|
|
691
|
-
},
|
|
692
|
-
{
|
|
693
|
-
"inputs": [
|
|
694
|
-
{
|
|
695
|
-
"internalType": "bytes32",
|
|
696
|
-
"name": "",
|
|
697
|
-
"type": "bytes32"
|
|
698
|
-
},
|
|
699
|
-
{
|
|
700
|
-
"internalType": "uint256",
|
|
701
|
-
"name": "",
|
|
702
|
-
"type": "uint256"
|
|
703
|
-
}
|
|
704
|
-
],
|
|
705
|
-
"name": "proofSubmitters",
|
|
706
|
-
"outputs": [
|
|
707
|
-
{
|
|
708
|
-
"internalType": "address",
|
|
709
|
-
"name": "",
|
|
710
|
-
"type": "address"
|
|
711
|
-
}
|
|
712
|
-
],
|
|
713
|
-
"stateMutability": "view",
|
|
714
|
-
"type": "function"
|
|
715
|
-
},
|
|
716
501
|
{
|
|
717
502
|
"inputs": [
|
|
718
503
|
{
|
|
@@ -754,7 +539,7 @@ export const OptimismPortal2_jsonAbi = [
|
|
|
754
539
|
},
|
|
755
540
|
{
|
|
756
541
|
"internalType": "uint256",
|
|
757
|
-
"name": "
|
|
542
|
+
"name": "_l2OutputIndex",
|
|
758
543
|
"type": "uint256"
|
|
759
544
|
},
|
|
760
545
|
{
|
|
@@ -801,79 +586,55 @@ export const OptimismPortal2_jsonAbi = [
|
|
|
801
586
|
"internalType": "bytes32",
|
|
802
587
|
"name": "",
|
|
803
588
|
"type": "bytes32"
|
|
804
|
-
},
|
|
805
|
-
{
|
|
806
|
-
"internalType": "address",
|
|
807
|
-
"name": "",
|
|
808
|
-
"type": "address"
|
|
809
589
|
}
|
|
810
590
|
],
|
|
811
591
|
"name": "provenWithdrawals",
|
|
812
592
|
"outputs": [
|
|
813
593
|
{
|
|
814
|
-
"internalType": "
|
|
815
|
-
"name": "
|
|
816
|
-
"type": "
|
|
594
|
+
"internalType": "bytes32",
|
|
595
|
+
"name": "outputRoot",
|
|
596
|
+
"type": "bytes32"
|
|
817
597
|
},
|
|
818
598
|
{
|
|
819
|
-
"internalType": "
|
|
599
|
+
"internalType": "uint128",
|
|
820
600
|
"name": "timestamp",
|
|
821
|
-
"type": "
|
|
822
|
-
}
|
|
823
|
-
],
|
|
824
|
-
"stateMutability": "view",
|
|
825
|
-
"type": "function"
|
|
826
|
-
},
|
|
827
|
-
{
|
|
828
|
-
"inputs": [],
|
|
829
|
-
"name": "proxyAdmin",
|
|
830
|
-
"outputs": [
|
|
601
|
+
"type": "uint128"
|
|
602
|
+
},
|
|
831
603
|
{
|
|
832
|
-
"internalType": "
|
|
833
|
-
"name": "",
|
|
834
|
-
"type": "
|
|
604
|
+
"internalType": "uint128",
|
|
605
|
+
"name": "l2OutputIndex",
|
|
606
|
+
"type": "uint128"
|
|
835
607
|
}
|
|
836
608
|
],
|
|
837
609
|
"stateMutability": "view",
|
|
838
610
|
"type": "function"
|
|
839
611
|
},
|
|
840
612
|
{
|
|
841
|
-
"inputs": [
|
|
842
|
-
"name": "proxyAdminOwner",
|
|
843
|
-
"outputs": [
|
|
613
|
+
"inputs": [
|
|
844
614
|
{
|
|
845
615
|
"internalType": "address",
|
|
846
|
-
"name": "",
|
|
616
|
+
"name": "_token",
|
|
847
617
|
"type": "address"
|
|
848
|
-
}
|
|
849
|
-
],
|
|
850
|
-
"stateMutability": "view",
|
|
851
|
-
"type": "function"
|
|
852
|
-
},
|
|
853
|
-
{
|
|
854
|
-
"inputs": [],
|
|
855
|
-
"name": "respectedGameType",
|
|
856
|
-
"outputs": [
|
|
618
|
+
},
|
|
857
619
|
{
|
|
858
|
-
"internalType": "
|
|
859
|
-
"name": "",
|
|
860
|
-
"type": "
|
|
861
|
-
}
|
|
862
|
-
],
|
|
863
|
-
"stateMutability": "view",
|
|
864
|
-
"type": "function"
|
|
865
|
-
},
|
|
866
|
-
{
|
|
867
|
-
"inputs": [],
|
|
868
|
-
"name": "respectedGameTypeUpdatedAt",
|
|
869
|
-
"outputs": [
|
|
620
|
+
"internalType": "uint8",
|
|
621
|
+
"name": "_decimals",
|
|
622
|
+
"type": "uint8"
|
|
623
|
+
},
|
|
870
624
|
{
|
|
871
|
-
"internalType": "
|
|
872
|
-
"name": "",
|
|
873
|
-
"type": "
|
|
625
|
+
"internalType": "bytes32",
|
|
626
|
+
"name": "_name",
|
|
627
|
+
"type": "bytes32"
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
"internalType": "bytes32",
|
|
631
|
+
"name": "_symbol",
|
|
632
|
+
"type": "bytes32"
|
|
874
633
|
}
|
|
875
634
|
],
|
|
876
|
-
"
|
|
635
|
+
"name": "setGasPayingToken",
|
|
636
|
+
"outputs": [],
|
|
637
|
+
"stateMutability": "nonpayable",
|
|
877
638
|
"type": "function"
|
|
878
639
|
},
|
|
879
640
|
{
|
|
@@ -881,7 +642,7 @@ export const OptimismPortal2_jsonAbi = [
|
|
|
881
642
|
"name": "superchainConfig",
|
|
882
643
|
"outputs": [
|
|
883
644
|
{
|
|
884
|
-
"internalType": "contract
|
|
645
|
+
"internalType": "contract SuperchainConfig",
|
|
885
646
|
"name": "",
|
|
886
647
|
"type": "address"
|
|
887
648
|
}
|
|
@@ -894,7 +655,7 @@ export const OptimismPortal2_jsonAbi = [
|
|
|
894
655
|
"name": "systemConfig",
|
|
895
656
|
"outputs": [
|
|
896
657
|
{
|
|
897
|
-
"internalType": "contract
|
|
658
|
+
"internalType": "contract SystemConfig",
|
|
898
659
|
"name": "",
|
|
899
660
|
"type": "address"
|
|
900
661
|
}
|
|
@@ -922,19 +683,19 @@ export const OptimismPortal2_jsonAbi = [
|
|
|
922
683
|
] as const satisfies Abi;
|
|
923
684
|
|
|
924
685
|
/**
|
|
925
|
-
* Type-safe ABI for
|
|
686
|
+
* Type-safe ABI for OptimismPortal_json
|
|
926
687
|
*/
|
|
927
|
-
export type
|
|
688
|
+
export type OptimismPortal_jsonAbi = typeof OptimismPortal_jsonAbi;
|
|
928
689
|
|
|
929
690
|
/**
|
|
930
|
-
* Contract instance type for
|
|
691
|
+
* Contract instance type for OptimismPortal_json
|
|
931
692
|
*/
|
|
932
693
|
// Use any for contract type to avoid complex viem type issues
|
|
933
694
|
// The runtime behavior is type-safe through viem's ABI typing
|
|
934
|
-
export type
|
|
695
|
+
export type OptimismPortal_jsonContract = any;
|
|
935
696
|
|
|
936
697
|
/**
|
|
937
|
-
*
|
|
698
|
+
* OptimismPortal_json Contract Class
|
|
938
699
|
*
|
|
939
700
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
940
701
|
*
|
|
@@ -942,12 +703,12 @@ export type OptimismPortal2_jsonContract = any;
|
|
|
942
703
|
* ```typescript
|
|
943
704
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
944
705
|
* import { mainnet } from 'viem/chains';
|
|
945
|
-
* import {
|
|
706
|
+
* import { OptimismPortal_json } from 'OptimismPortal_json';
|
|
946
707
|
*
|
|
947
708
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
948
709
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
949
710
|
*
|
|
950
|
-
* const contract = new
|
|
711
|
+
* const contract = new OptimismPortal_json('0x...', { publicClient, walletClient });
|
|
951
712
|
*
|
|
952
713
|
* // Read functions
|
|
953
714
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -965,8 +726,8 @@ export type OptimismPortal2_jsonContract = any;
|
|
|
965
726
|
* });
|
|
966
727
|
* ```
|
|
967
728
|
*/
|
|
968
|
-
export class
|
|
969
|
-
private contract:
|
|
729
|
+
export class OptimismPortal_json {
|
|
730
|
+
private contract: OptimismPortal_jsonContract;
|
|
970
731
|
private contractAddress: Address;
|
|
971
732
|
private publicClient: PublicClient;
|
|
972
733
|
|
|
@@ -981,7 +742,7 @@ export class OptimismPortal2_json {
|
|
|
981
742
|
this.publicClient = clients.publicClient;
|
|
982
743
|
this.contract = getContract({
|
|
983
744
|
address,
|
|
984
|
-
abi:
|
|
745
|
+
abi: OptimismPortal_jsonAbi,
|
|
985
746
|
client: {
|
|
986
747
|
public: clients.publicClient,
|
|
987
748
|
wallet: clients.walletClient,
|
|
@@ -999,56 +760,16 @@ export class OptimismPortal2_json {
|
|
|
999
760
|
/**
|
|
1000
761
|
* Get the underlying viem contract instance
|
|
1001
762
|
*/
|
|
1002
|
-
getContract():
|
|
763
|
+
getContract(): OptimismPortal_jsonContract {
|
|
1003
764
|
return this.contract;
|
|
1004
765
|
}
|
|
1005
766
|
|
|
1006
767
|
/**
|
|
1007
|
-
*
|
|
1008
|
-
* view
|
|
1009
|
-
*/
|
|
1010
|
-
async anchorStateRegistry(): Promise<`0x${string}`> {
|
|
1011
|
-
return this.contract.read.anchorStateRegistry() as Promise<`0x${string}`>;
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1014
|
-
/**
|
|
1015
|
-
* checkWithdrawal
|
|
1016
|
-
* view
|
|
1017
|
-
*/
|
|
1018
|
-
async checkWithdrawal(_withdrawalHash: `0x${string}`, _proofSubmitter: `0x${string}`): Promise<void> {
|
|
1019
|
-
return this.contract.read.checkWithdrawal([_withdrawalHash, _proofSubmitter] as const) as Promise<void>;
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
/**
|
|
1023
|
-
* disputeGameBlacklist
|
|
1024
|
-
* view
|
|
1025
|
-
*/
|
|
1026
|
-
async disputeGameBlacklist(_disputeGame: `0x${string}`): Promise<boolean> {
|
|
1027
|
-
return this.contract.read.disputeGameBlacklist([_disputeGame] as const) as Promise<boolean>;
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
/**
|
|
1031
|
-
* disputeGameFactory
|
|
768
|
+
* balance
|
|
1032
769
|
* view
|
|
1033
770
|
*/
|
|
1034
|
-
async
|
|
1035
|
-
return this.contract.read.
|
|
1036
|
-
}
|
|
1037
|
-
|
|
1038
|
-
/**
|
|
1039
|
-
* disputeGameFinalityDelaySeconds
|
|
1040
|
-
* view
|
|
1041
|
-
*/
|
|
1042
|
-
async disputeGameFinalityDelaySeconds(): Promise<bigint> {
|
|
1043
|
-
return this.contract.read.disputeGameFinalityDelaySeconds() as Promise<bigint>;
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
|
-
/**
|
|
1047
|
-
* ethLockbox
|
|
1048
|
-
* view
|
|
1049
|
-
*/
|
|
1050
|
-
async ethLockbox(): Promise<`0x${string}`> {
|
|
1051
|
-
return this.contract.read.ethLockbox() as Promise<`0x${string}`>;
|
|
771
|
+
async balance(): Promise<bigint> {
|
|
772
|
+
return this.contract.read.balance() as Promise<bigint>;
|
|
1052
773
|
}
|
|
1053
774
|
|
|
1054
775
|
/**
|
|
@@ -1068,11 +789,19 @@ export class OptimismPortal2_json {
|
|
|
1068
789
|
}
|
|
1069
790
|
|
|
1070
791
|
/**
|
|
1071
|
-
*
|
|
792
|
+
* isOutputFinalized
|
|
793
|
+
* view
|
|
794
|
+
*/
|
|
795
|
+
async isOutputFinalized(_l2OutputIndex: bigint): Promise<boolean> {
|
|
796
|
+
return this.contract.read.isOutputFinalized([_l2OutputIndex] as const) as Promise<boolean>;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
/**
|
|
800
|
+
* l2Oracle
|
|
1072
801
|
* view
|
|
1073
802
|
*/
|
|
1074
|
-
async
|
|
1075
|
-
return this.contract.read.
|
|
803
|
+
async l2Oracle(): Promise<`0x${string}`> {
|
|
804
|
+
return this.contract.read.l2Oracle() as Promise<`0x${string}`>;
|
|
1076
805
|
}
|
|
1077
806
|
|
|
1078
807
|
/**
|
|
@@ -1091,14 +820,6 @@ export class OptimismPortal2_json {
|
|
|
1091
820
|
return this.contract.read.minimumGasLimit([_byteCount] as const) as Promise<bigint>;
|
|
1092
821
|
}
|
|
1093
822
|
|
|
1094
|
-
/**
|
|
1095
|
-
* numProofSubmitters
|
|
1096
|
-
* view
|
|
1097
|
-
*/
|
|
1098
|
-
async numProofSubmitters(_withdrawalHash: `0x${string}`): Promise<bigint> {
|
|
1099
|
-
return this.contract.read.numProofSubmitters([_withdrawalHash] as const) as Promise<bigint>;
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
823
|
/**
|
|
1103
824
|
* params
|
|
1104
825
|
* view
|
|
@@ -1115,60 +836,12 @@ export class OptimismPortal2_json {
|
|
|
1115
836
|
return this.contract.read.paused() as Promise<boolean>;
|
|
1116
837
|
}
|
|
1117
838
|
|
|
1118
|
-
/**
|
|
1119
|
-
* proofMaturityDelaySeconds
|
|
1120
|
-
* view
|
|
1121
|
-
*/
|
|
1122
|
-
async proofMaturityDelaySeconds(): Promise<bigint> {
|
|
1123
|
-
return this.contract.read.proofMaturityDelaySeconds() as Promise<bigint>;
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
|
-
/**
|
|
1127
|
-
* proofSubmitters
|
|
1128
|
-
* view
|
|
1129
|
-
*/
|
|
1130
|
-
async proofSubmitters(arg0: `0x${string}`, arg1: bigint): Promise<`0x${string}`> {
|
|
1131
|
-
return this.contract.read.proofSubmitters([arg0, arg1] as const) as Promise<`0x${string}`>;
|
|
1132
|
-
}
|
|
1133
|
-
|
|
1134
839
|
/**
|
|
1135
840
|
* provenWithdrawals
|
|
1136
841
|
* view
|
|
1137
842
|
*/
|
|
1138
|
-
async provenWithdrawals(arg0: `0x${string}
|
|
1139
|
-
return this.contract.read.provenWithdrawals([arg0
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
/**
|
|
1143
|
-
* proxyAdmin
|
|
1144
|
-
* view
|
|
1145
|
-
*/
|
|
1146
|
-
async proxyAdmin(): Promise<`0x${string}`> {
|
|
1147
|
-
return this.contract.read.proxyAdmin() as Promise<`0x${string}`>;
|
|
1148
|
-
}
|
|
1149
|
-
|
|
1150
|
-
/**
|
|
1151
|
-
* proxyAdminOwner
|
|
1152
|
-
* view
|
|
1153
|
-
*/
|
|
1154
|
-
async proxyAdminOwner(): Promise<`0x${string}`> {
|
|
1155
|
-
return this.contract.read.proxyAdminOwner() as Promise<`0x${string}`>;
|
|
1156
|
-
}
|
|
1157
|
-
|
|
1158
|
-
/**
|
|
1159
|
-
* respectedGameType
|
|
1160
|
-
* view
|
|
1161
|
-
*/
|
|
1162
|
-
async respectedGameType(): Promise<bigint> {
|
|
1163
|
-
return this.contract.read.respectedGameType() as Promise<bigint>;
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
|
-
/**
|
|
1167
|
-
* respectedGameTypeUpdatedAt
|
|
1168
|
-
* view
|
|
1169
|
-
*/
|
|
1170
|
-
async respectedGameTypeUpdatedAt(): Promise<bigint> {
|
|
1171
|
-
return this.contract.read.respectedGameTypeUpdatedAt() as Promise<bigint>;
|
|
843
|
+
async provenWithdrawals(arg0: `0x${string}`): Promise<[`0x${string}`, bigint, bigint]> {
|
|
844
|
+
return this.contract.read.provenWithdrawals([arg0] as const) as Promise<[`0x${string}`, bigint, bigint]>;
|
|
1172
845
|
}
|
|
1173
846
|
|
|
1174
847
|
/**
|
|
@@ -1195,6 +868,29 @@ export class OptimismPortal2_json {
|
|
|
1195
868
|
return this.contract.read.version() as Promise<string>;
|
|
1196
869
|
}
|
|
1197
870
|
|
|
871
|
+
/**
|
|
872
|
+
* depositERC20Transaction
|
|
873
|
+
* nonpayable
|
|
874
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
875
|
+
*/
|
|
876
|
+
async depositERC20Transaction(_to: `0x${string}`, _mint: bigint, _value: bigint, _gasLimit: bigint, _isCreation: boolean, _data: `0x${string}`, options?: {
|
|
877
|
+
accessList?: import('viem').AccessList;
|
|
878
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
879
|
+
chain?: import('viem').Chain | null;
|
|
880
|
+
dataSuffix?: `0x${string}`;
|
|
881
|
+
gas?: bigint;
|
|
882
|
+
gasPrice?: bigint;
|
|
883
|
+
maxFeePerGas?: bigint;
|
|
884
|
+
maxPriorityFeePerGas?: bigint;
|
|
885
|
+
nonce?: number;
|
|
886
|
+
value?: bigint;
|
|
887
|
+
}): Promise<`0x${string}`> {
|
|
888
|
+
if (!this.contract.write) {
|
|
889
|
+
throw new Error('Wallet client is required for write operations');
|
|
890
|
+
}
|
|
891
|
+
return this.contract.write.depositERC20Transaction([_to, _mint, _value, _gasLimit, _isCreation, _data] as const, options) as Promise<`0x${string}`>;
|
|
892
|
+
}
|
|
893
|
+
|
|
1198
894
|
/**
|
|
1199
895
|
* depositTransaction
|
|
1200
896
|
* payable
|
|
@@ -1265,11 +961,11 @@ export class OptimismPortal2_json {
|
|
|
1265
961
|
}
|
|
1266
962
|
|
|
1267
963
|
/**
|
|
1268
|
-
*
|
|
964
|
+
* initialize
|
|
1269
965
|
* nonpayable
|
|
1270
966
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1271
967
|
*/
|
|
1272
|
-
async
|
|
968
|
+
async initialize(_l2Oracle: `0x${string}`, _systemConfig: `0x${string}`, _superchainConfig: `0x${string}`, options?: {
|
|
1273
969
|
accessList?: import('viem').AccessList;
|
|
1274
970
|
authorizationList?: import('viem').AuthorizationList;
|
|
1275
971
|
chain?: import('viem').Chain | null;
|
|
@@ -1284,15 +980,15 @@ export class OptimismPortal2_json {
|
|
|
1284
980
|
if (!this.contract.write) {
|
|
1285
981
|
throw new Error('Wallet client is required for write operations');
|
|
1286
982
|
}
|
|
1287
|
-
return this.contract.write.
|
|
983
|
+
return this.contract.write.initialize([_l2Oracle, _systemConfig, _superchainConfig] as const, options) as Promise<`0x${string}`>;
|
|
1288
984
|
}
|
|
1289
985
|
|
|
1290
986
|
/**
|
|
1291
|
-
*
|
|
987
|
+
* proveWithdrawalTransaction
|
|
1292
988
|
* nonpayable
|
|
1293
989
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1294
990
|
*/
|
|
1295
|
-
async
|
|
991
|
+
async proveWithdrawalTransaction(_tx: Types_WithdrawalTransaction, _l2OutputIndex: bigint, _outputRootProof: Types_OutputRootProof, _withdrawalProof: `0x${string}`[], options?: {
|
|
1296
992
|
accessList?: import('viem').AccessList;
|
|
1297
993
|
authorizationList?: import('viem').AuthorizationList;
|
|
1298
994
|
chain?: import('viem').Chain | null;
|
|
@@ -1307,15 +1003,15 @@ export class OptimismPortal2_json {
|
|
|
1307
1003
|
if (!this.contract.write) {
|
|
1308
1004
|
throw new Error('Wallet client is required for write operations');
|
|
1309
1005
|
}
|
|
1310
|
-
return this.contract.write.
|
|
1006
|
+
return this.contract.write.proveWithdrawalTransaction([_tx, _l2OutputIndex, _outputRootProof, _withdrawalProof] as const, options) as Promise<`0x${string}`>;
|
|
1311
1007
|
}
|
|
1312
1008
|
|
|
1313
1009
|
/**
|
|
1314
|
-
*
|
|
1010
|
+
* setGasPayingToken
|
|
1315
1011
|
* nonpayable
|
|
1316
1012
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1317
1013
|
*/
|
|
1318
|
-
async
|
|
1014
|
+
async setGasPayingToken(_token: `0x${string}`, _decimals: bigint, _name: `0x${string}`, _symbol: `0x${string}`, options?: {
|
|
1319
1015
|
accessList?: import('viem').AccessList;
|
|
1320
1016
|
authorizationList?: import('viem').AuthorizationList;
|
|
1321
1017
|
chain?: import('viem').Chain | null;
|
|
@@ -1330,7 +1026,7 @@ export class OptimismPortal2_json {
|
|
|
1330
1026
|
if (!this.contract.write) {
|
|
1331
1027
|
throw new Error('Wallet client is required for write operations');
|
|
1332
1028
|
}
|
|
1333
|
-
return this.contract.write.
|
|
1029
|
+
return this.contract.write.setGasPayingToken([_token, _decimals, _name, _symbol] as const, options) as Promise<`0x${string}`>;
|
|
1334
1030
|
}
|
|
1335
1031
|
|
|
1336
1032
|
|
|
@@ -1349,6 +1045,25 @@ export class OptimismPortal2_json {
|
|
|
1349
1045
|
throw new Error('Public client is required for simulation');
|
|
1350
1046
|
}
|
|
1351
1047
|
return {
|
|
1048
|
+
/**
|
|
1049
|
+
* Simulate depositERC20Transaction
|
|
1050
|
+
* Returns gas estimate and result without sending transaction
|
|
1051
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1052
|
+
*/
|
|
1053
|
+
async depositERC20Transaction(_to: `0x${string}`, _mint: bigint, _value: bigint, _gasLimit: bigint, _isCreation: boolean, _data: `0x${string}`, options?: {
|
|
1054
|
+
accessList?: import('viem').AccessList;
|
|
1055
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1056
|
+
chain?: import('viem').Chain | null;
|
|
1057
|
+
dataSuffix?: `0x${string}`;
|
|
1058
|
+
gas?: bigint;
|
|
1059
|
+
gasPrice?: bigint;
|
|
1060
|
+
maxFeePerGas?: bigint;
|
|
1061
|
+
maxPriorityFeePerGas?: bigint;
|
|
1062
|
+
nonce?: number;
|
|
1063
|
+
value?: bigint;
|
|
1064
|
+
}): Promise<void> {
|
|
1065
|
+
return contract.simulate.depositERC20Transaction([_to, _mint, _value, _gasLimit, _isCreation, _data] as const, options) as Promise<void>;
|
|
1066
|
+
},
|
|
1352
1067
|
/**
|
|
1353
1068
|
* Simulate depositTransaction
|
|
1354
1069
|
* Returns gas estimate and result without sending transaction
|
|
@@ -1407,11 +1122,11 @@ export class OptimismPortal2_json {
|
|
|
1407
1122
|
return contract.simulate.finalizeWithdrawalTransaction([_tx] as const, options) as Promise<void>;
|
|
1408
1123
|
},
|
|
1409
1124
|
/**
|
|
1410
|
-
* Simulate
|
|
1125
|
+
* Simulate initialize
|
|
1411
1126
|
* Returns gas estimate and result without sending transaction
|
|
1412
1127
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1413
1128
|
*/
|
|
1414
|
-
async
|
|
1129
|
+
async initialize(_l2Oracle: `0x${string}`, _systemConfig: `0x${string}`, _superchainConfig: `0x${string}`, options?: {
|
|
1415
1130
|
accessList?: import('viem').AccessList;
|
|
1416
1131
|
authorizationList?: import('viem').AuthorizationList;
|
|
1417
1132
|
chain?: import('viem').Chain | null;
|
|
@@ -1423,14 +1138,14 @@ export class OptimismPortal2_json {
|
|
|
1423
1138
|
nonce?: number;
|
|
1424
1139
|
value?: bigint;
|
|
1425
1140
|
}): Promise<void> {
|
|
1426
|
-
return contract.simulate.
|
|
1141
|
+
return contract.simulate.initialize([_l2Oracle, _systemConfig, _superchainConfig] as const, options) as Promise<void>;
|
|
1427
1142
|
},
|
|
1428
1143
|
/**
|
|
1429
|
-
* Simulate
|
|
1144
|
+
* Simulate proveWithdrawalTransaction
|
|
1430
1145
|
* Returns gas estimate and result without sending transaction
|
|
1431
1146
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1432
1147
|
*/
|
|
1433
|
-
async
|
|
1148
|
+
async proveWithdrawalTransaction(_tx: Types_WithdrawalTransaction, _l2OutputIndex: bigint, _outputRootProof: Types_OutputRootProof, _withdrawalProof: `0x${string}`[], options?: {
|
|
1434
1149
|
accessList?: import('viem').AccessList;
|
|
1435
1150
|
authorizationList?: import('viem').AuthorizationList;
|
|
1436
1151
|
chain?: import('viem').Chain | null;
|
|
@@ -1442,14 +1157,14 @@ export class OptimismPortal2_json {
|
|
|
1442
1157
|
nonce?: number;
|
|
1443
1158
|
value?: bigint;
|
|
1444
1159
|
}): Promise<void> {
|
|
1445
|
-
return contract.simulate.
|
|
1160
|
+
return contract.simulate.proveWithdrawalTransaction([_tx, _l2OutputIndex, _outputRootProof, _withdrawalProof] as const, options) as Promise<void>;
|
|
1446
1161
|
},
|
|
1447
1162
|
/**
|
|
1448
|
-
* Simulate
|
|
1163
|
+
* Simulate setGasPayingToken
|
|
1449
1164
|
* Returns gas estimate and result without sending transaction
|
|
1450
1165
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1451
1166
|
*/
|
|
1452
|
-
async
|
|
1167
|
+
async setGasPayingToken(_token: `0x${string}`, _decimals: bigint, _name: `0x${string}`, _symbol: `0x${string}`, options?: {
|
|
1453
1168
|
accessList?: import('viem').AccessList;
|
|
1454
1169
|
authorizationList?: import('viem').AuthorizationList;
|
|
1455
1170
|
chain?: import('viem').Chain | null;
|
|
@@ -1461,7 +1176,7 @@ export class OptimismPortal2_json {
|
|
|
1461
1176
|
nonce?: number;
|
|
1462
1177
|
value?: bigint;
|
|
1463
1178
|
}): Promise<void> {
|
|
1464
|
-
return contract.simulate.
|
|
1179
|
+
return contract.simulate.setGasPayingToken([_token, _decimals, _name, _symbol] as const, options) as Promise<void>;
|
|
1465
1180
|
}
|
|
1466
1181
|
};
|
|
1467
1182
|
}
|
|
@@ -1489,7 +1204,7 @@ export class OptimismPortal2_json {
|
|
|
1489
1204
|
Initialized: (callback: (event: { version: bigint }) => void) => {
|
|
1490
1205
|
return this.publicClient.watchContractEvent({
|
|
1491
1206
|
address: this.contractAddress,
|
|
1492
|
-
abi:
|
|
1207
|
+
abi: OptimismPortal_jsonAbi,
|
|
1493
1208
|
eventName: 'Initialized',
|
|
1494
1209
|
|
|
1495
1210
|
onLogs: (logs: any[]) => {
|
|
@@ -1508,7 +1223,7 @@ export class OptimismPortal2_json {
|
|
|
1508
1223
|
TransactionDeposited: (callback: (event: { from: `0x${string}`; to: `0x${string}`; version: bigint; opaqueData: `0x${string}` }) => void, filter?: { from: `0x${string}`; to: `0x${string}`; version: bigint }) => {
|
|
1509
1224
|
return this.publicClient.watchContractEvent({
|
|
1510
1225
|
address: this.contractAddress,
|
|
1511
|
-
abi:
|
|
1226
|
+
abi: OptimismPortal_jsonAbi,
|
|
1512
1227
|
eventName: 'TransactionDeposited',
|
|
1513
1228
|
args: filter,
|
|
1514
1229
|
onLogs: (logs: any[]) => {
|
|
@@ -1527,7 +1242,7 @@ export class OptimismPortal2_json {
|
|
|
1527
1242
|
WithdrawalFinalized: (callback: (event: { withdrawalHash: `0x${string}`; success: boolean }) => void, filter?: { withdrawalHash: `0x${string}` }) => {
|
|
1528
1243
|
return this.publicClient.watchContractEvent({
|
|
1529
1244
|
address: this.contractAddress,
|
|
1530
|
-
abi:
|
|
1245
|
+
abi: OptimismPortal_jsonAbi,
|
|
1531
1246
|
eventName: 'WithdrawalFinalized',
|
|
1532
1247
|
args: filter,
|
|
1533
1248
|
onLogs: (logs: any[]) => {
|
|
@@ -1546,7 +1261,7 @@ export class OptimismPortal2_json {
|
|
|
1546
1261
|
WithdrawalProven: (callback: (event: { withdrawalHash: `0x${string}`; from: `0x${string}`; to: `0x${string}` }) => void, filter?: { withdrawalHash: `0x${string}`; from: `0x${string}`; to: `0x${string}` }) => {
|
|
1547
1262
|
return this.publicClient.watchContractEvent({
|
|
1548
1263
|
address: this.contractAddress,
|
|
1549
|
-
abi:
|
|
1264
|
+
abi: OptimismPortal_jsonAbi,
|
|
1550
1265
|
eventName: 'WithdrawalProven',
|
|
1551
1266
|
args: filter,
|
|
1552
1267
|
onLogs: (logs: any[]) => {
|
|
@@ -1555,25 +1270,6 @@ export class OptimismPortal2_json {
|
|
|
1555
1270
|
});
|
|
1556
1271
|
},
|
|
1557
1272
|
}) as () => void;
|
|
1558
|
-
},
|
|
1559
|
-
/**
|
|
1560
|
-
* Watch WithdrawalProvenExtension1 events
|
|
1561
|
-
* @param callback Function to call when event is emitted
|
|
1562
|
-
* @param filter Optional filter for indexed parameters
|
|
1563
|
-
* @returns Unwatch function to stop listening
|
|
1564
|
-
*/
|
|
1565
|
-
WithdrawalProvenExtension1: (callback: (event: { withdrawalHash: `0x${string}`; proofSubmitter: `0x${string}` }) => void, filter?: { withdrawalHash: `0x${string}`; proofSubmitter: `0x${string}` }) => {
|
|
1566
|
-
return this.publicClient.watchContractEvent({
|
|
1567
|
-
address: this.contractAddress,
|
|
1568
|
-
abi: OptimismPortal2_jsonAbi,
|
|
1569
|
-
eventName: 'WithdrawalProvenExtension1',
|
|
1570
|
-
args: filter,
|
|
1571
|
-
onLogs: (logs: any[]) => {
|
|
1572
|
-
logs.forEach((log: any) => {
|
|
1573
|
-
callback(log.args as any);
|
|
1574
|
-
});
|
|
1575
|
-
},
|
|
1576
|
-
}) as () => void;
|
|
1577
1273
|
}
|
|
1578
1274
|
};
|
|
1579
1275
|
}
|