@gitmyabi/optimismportal 1.0.3 → 1.0.5

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.
@@ -1,142 +1,71 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OptimismPortal2_json = exports.OptimismPortal2_jsonAbi = void 0;
3
+ exports.OptimismPortal_json = exports.OptimismPortal_jsonAbi = void 0;
4
4
  const viem_1 = require("viem");
5
5
  /**
6
- * OptimismPortal2_json ABI
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.OptimismPortal2_jsonAbi = [
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": "ContentLengthMismatch",
18
+ "name": "BadTarget",
25
19
  "type": "error"
26
20
  },
27
21
  {
28
22
  "inputs": [],
29
- "name": "EmptyItem",
23
+ "name": "CallPaused",
30
24
  "type": "error"
31
25
  },
32
26
  {
33
27
  "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",
55
- "type": "error"
56
- },
57
- {
58
- "inputs": [],
59
- "name": "OptimismPortal_CalldataTooLarge",
60
- "type": "error"
61
- },
62
- {
63
- "inputs": [],
64
- "name": "OptimismPortal_GasEstimation",
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_InvalidInteropState",
85
- "type": "error"
86
- },
87
- {
88
- "inputs": [],
89
- "name": "OptimismPortal_InvalidLockboxState",
90
- "type": "error"
91
- },
92
- {
93
- "inputs": [],
94
- "name": "OptimismPortal_InvalidMerkleProof",
95
- "type": "error"
96
- },
97
- {
98
- "inputs": [],
99
- "name": "OptimismPortal_InvalidOutputRootProof",
28
+ "name": "ContentLengthMismatch",
100
29
  "type": "error"
101
30
  },
102
31
  {
103
32
  "inputs": [],
104
- "name": "OptimismPortal_InvalidProofTimestamp",
33
+ "name": "EmptyItem",
105
34
  "type": "error"
106
35
  },
107
36
  {
108
37
  "inputs": [],
109
- "name": "OptimismPortal_InvalidRootClaim",
38
+ "name": "GasEstimation",
110
39
  "type": "error"
111
40
  },
112
41
  {
113
42
  "inputs": [],
114
- "name": "OptimismPortal_MigratingToSameRegistry",
43
+ "name": "InvalidDataRemainder",
115
44
  "type": "error"
116
45
  },
117
46
  {
118
47
  "inputs": [],
119
- "name": "OptimismPortal_NoReentrancy",
48
+ "name": "InvalidHeader",
120
49
  "type": "error"
121
50
  },
122
51
  {
123
52
  "inputs": [],
124
- "name": "OptimismPortal_NotAllowedOnCGTMode",
53
+ "name": "LargeCalldata",
125
54
  "type": "error"
126
55
  },
127
56
  {
128
57
  "inputs": [],
129
- "name": "OptimismPortal_NotUsingInterop",
58
+ "name": "NoValue",
130
59
  "type": "error"
131
60
  },
132
61
  {
133
62
  "inputs": [],
134
- "name": "OptimismPortal_ProofNotOldEnough",
63
+ "name": "NonReentrant",
135
64
  "type": "error"
136
65
  },
137
66
  {
138
67
  "inputs": [],
139
- "name": "OptimismPortal_Unproven",
68
+ "name": "OnlyCustomGasToken",
140
69
  "type": "error"
141
70
  },
142
71
  {
@@ -146,37 +75,17 @@ exports.OptimismPortal2_jsonAbi = [
146
75
  },
147
76
  {
148
77
  "inputs": [],
149
- "name": "ProxyAdminOwnedBase_NotProxyAdmin",
150
- "type": "error"
151
- },
152
- {
153
- "inputs": [],
154
- "name": "ProxyAdminOwnedBase_NotProxyAdminOrProxyAdminOwner",
155
- "type": "error"
156
- },
157
- {
158
- "inputs": [],
159
- "name": "ProxyAdminOwnedBase_NotProxyAdminOwner",
160
- "type": "error"
161
- },
162
- {
163
- "inputs": [],
164
- "name": "ProxyAdminOwnedBase_NotResolvedDelegateProxy",
165
- "type": "error"
166
- },
167
- {
168
- "inputs": [],
169
- "name": "ProxyAdminOwnedBase_NotSharedProxyAdminOwner",
78
+ "name": "SmallGasLimit",
170
79
  "type": "error"
171
80
  },
172
81
  {
173
82
  "inputs": [],
174
- "name": "ProxyAdminOwnedBase_ProxyAdminNotFound",
83
+ "name": "TransferFailed",
175
84
  "type": "error"
176
85
  },
177
86
  {
178
87
  "inputs": [],
179
- "name": "ReinitializableBase_ZeroInitVersion",
88
+ "name": "Unauthorized",
180
89
  "type": "error"
181
90
  },
182
91
  {
@@ -189,25 +98,6 @@ exports.OptimismPortal2_jsonAbi = [
189
98
  "name": "UnexpectedString",
190
99
  "type": "error"
191
100
  },
192
- {
193
- "anonymous": false,
194
- "inputs": [
195
- {
196
- "indexed": true,
197
- "internalType": "address",
198
- "name": "lockbox",
199
- "type": "address"
200
- },
201
- {
202
- "indexed": false,
203
- "internalType": "uint256",
204
- "name": "balance",
205
- "type": "uint256"
206
- }
207
- ],
208
- "name": "ETHMigrated",
209
- "type": "event"
210
- },
211
101
  {
212
102
  "anonymous": false,
213
103
  "inputs": [
@@ -221,37 +111,6 @@ exports.OptimismPortal2_jsonAbi = [
221
111
  "name": "Initialized",
222
112
  "type": "event"
223
113
  },
224
- {
225
- "anonymous": false,
226
- "inputs": [
227
- {
228
- "indexed": false,
229
- "internalType": "contract IETHLockbox",
230
- "name": "oldLockbox",
231
- "type": "address"
232
- },
233
- {
234
- "indexed": false,
235
- "internalType": "contract IETHLockbox",
236
- "name": "newLockbox",
237
- "type": "address"
238
- },
239
- {
240
- "indexed": false,
241
- "internalType": "contract IAnchorStateRegistry",
242
- "name": "oldAnchorStateRegistry",
243
- "type": "address"
244
- },
245
- {
246
- "indexed": false,
247
- "internalType": "contract IAnchorStateRegistry",
248
- "name": "newAnchorStateRegistry",
249
- "type": "address"
250
- }
251
- ],
252
- "name": "PortalMigrated",
253
- "type": "event"
254
- },
255
114
  {
256
115
  "anonymous": false,
257
116
  "inputs": [
@@ -327,53 +186,16 @@ exports.OptimismPortal2_jsonAbi = [
327
186
  "name": "WithdrawalProven",
328
187
  "type": "event"
329
188
  },
330
- {
331
- "anonymous": false,
332
- "inputs": [
333
- {
334
- "indexed": true,
335
- "internalType": "bytes32",
336
- "name": "withdrawalHash",
337
- "type": "bytes32"
338
- },
339
- {
340
- "indexed": true,
341
- "internalType": "address",
342
- "name": "proofSubmitter",
343
- "type": "address"
344
- }
345
- ],
346
- "name": "WithdrawalProvenExtension1",
347
- "type": "event"
348
- },
349
189
  {
350
190
  "inputs": [],
351
- "name": "anchorStateRegistry",
191
+ "name": "balance",
352
192
  "outputs": [
353
193
  {
354
- "internalType": "contract IAnchorStateRegistry",
194
+ "internalType": "uint256",
355
195
  "name": "",
356
- "type": "address"
357
- }
358
- ],
359
- "stateMutability": "view",
360
- "type": "function"
361
- },
362
- {
363
- "inputs": [
364
- {
365
- "internalType": "bytes32",
366
- "name": "_withdrawalHash",
367
- "type": "bytes32"
368
- },
369
- {
370
- "internalType": "address",
371
- "name": "_proofSubmitter",
372
- "type": "address"
196
+ "type": "uint256"
373
197
  }
374
198
  ],
375
- "name": "checkWithdrawal",
376
- "outputs": [],
377
199
  "stateMutability": "view",
378
200
  "type": "function"
379
201
  },
@@ -384,6 +206,11 @@ exports.OptimismPortal2_jsonAbi = [
384
206
  "name": "_to",
385
207
  "type": "address"
386
208
  },
209
+ {
210
+ "internalType": "uint256",
211
+ "name": "_mint",
212
+ "type": "uint256"
213
+ },
387
214
  {
388
215
  "internalType": "uint256",
389
216
  "name": "_value",
@@ -405,54 +232,42 @@ exports.OptimismPortal2_jsonAbi = [
405
232
  "type": "bytes"
406
233
  }
407
234
  ],
408
- "name": "depositTransaction",
235
+ "name": "depositERC20Transaction",
409
236
  "outputs": [],
410
- "stateMutability": "payable",
237
+ "stateMutability": "nonpayable",
411
238
  "type": "function"
412
239
  },
413
240
  {
414
241
  "inputs": [
415
242
  {
416
- "internalType": "contract IDisputeGame",
417
- "name": "_disputeGame",
243
+ "internalType": "address",
244
+ "name": "_to",
418
245
  "type": "address"
419
- }
420
- ],
421
- "name": "disputeGameBlacklist",
422
- "outputs": [
246
+ },
247
+ {
248
+ "internalType": "uint256",
249
+ "name": "_value",
250
+ "type": "uint256"
251
+ },
252
+ {
253
+ "internalType": "uint64",
254
+ "name": "_gasLimit",
255
+ "type": "uint64"
256
+ },
423
257
  {
424
258
  "internalType": "bool",
425
- "name": "",
259
+ "name": "_isCreation",
426
260
  "type": "bool"
427
- }
428
- ],
429
- "stateMutability": "view",
430
- "type": "function"
431
- },
432
- {
433
- "inputs": [],
434
- "name": "disputeGameFactory",
435
- "outputs": [
436
- {
437
- "internalType": "contract IDisputeGameFactory",
438
- "name": "",
439
- "type": "address"
440
- }
441
- ],
442
- "stateMutability": "view",
443
- "type": "function"
444
- },
445
- {
446
- "inputs": [],
447
- "name": "disputeGameFinalityDelaySeconds",
448
- "outputs": [
261
+ },
449
262
  {
450
- "internalType": "uint256",
451
- "name": "",
452
- "type": "uint256"
263
+ "internalType": "bytes",
264
+ "name": "_data",
265
+ "type": "bytes"
453
266
  }
454
267
  ],
455
- "stateMutability": "view",
268
+ "name": "depositTransaction",
269
+ "outputs": [],
270
+ "stateMutability": "payable",
456
271
  "type": "function"
457
272
  },
458
273
  {
@@ -462,19 +277,6 @@ exports.OptimismPortal2_jsonAbi = [
462
277
  "stateMutability": "payable",
463
278
  "type": "function"
464
279
  },
465
- {
466
- "inputs": [],
467
- "name": "ethLockbox",
468
- "outputs": [
469
- {
470
- "internalType": "contract IETHLockbox",
471
- "name": "",
472
- "type": "address"
473
- }
474
- ],
475
- "stateMutability": "view",
476
- "type": "function"
477
- },
478
280
  {
479
281
  "inputs": [
480
282
  {
@@ -520,56 +322,6 @@ exports.OptimismPortal2_jsonAbi = [
520
322
  "stateMutability": "nonpayable",
521
323
  "type": "function"
522
324
  },
523
- {
524
- "inputs": [
525
- {
526
- "components": [
527
- {
528
- "internalType": "uint256",
529
- "name": "nonce",
530
- "type": "uint256"
531
- },
532
- {
533
- "internalType": "address",
534
- "name": "sender",
535
- "type": "address"
536
- },
537
- {
538
- "internalType": "address",
539
- "name": "target",
540
- "type": "address"
541
- },
542
- {
543
- "internalType": "uint256",
544
- "name": "value",
545
- "type": "uint256"
546
- },
547
- {
548
- "internalType": "uint256",
549
- "name": "gasLimit",
550
- "type": "uint256"
551
- },
552
- {
553
- "internalType": "bytes",
554
- "name": "data",
555
- "type": "bytes"
556
- }
557
- ],
558
- "internalType": "struct Types.WithdrawalTransaction",
559
- "name": "_tx",
560
- "type": "tuple"
561
- },
562
- {
563
- "internalType": "address",
564
- "name": "_proofSubmitter",
565
- "type": "address"
566
- }
567
- ],
568
- "name": "finalizeWithdrawalTransactionExternalProof",
569
- "outputs": [],
570
- "stateMutability": "nonpayable",
571
- "type": "function"
572
- },
573
325
  {
574
326
  "inputs": [
575
327
  {
@@ -602,34 +354,21 @@ exports.OptimismPortal2_jsonAbi = [
602
354
  "stateMutability": "view",
603
355
  "type": "function"
604
356
  },
605
- {
606
- "inputs": [],
607
- "name": "initVersion",
608
- "outputs": [
609
- {
610
- "internalType": "uint8",
611
- "name": "",
612
- "type": "uint8"
613
- }
614
- ],
615
- "stateMutability": "view",
616
- "type": "function"
617
- },
618
357
  {
619
358
  "inputs": [
620
359
  {
621
- "internalType": "contract ISystemConfig",
622
- "name": "_systemConfig",
360
+ "internalType": "contract L2OutputOracle",
361
+ "name": "_l2Oracle",
623
362
  "type": "address"
624
363
  },
625
364
  {
626
- "internalType": "contract IAnchorStateRegistry",
627
- "name": "_anchorStateRegistry",
365
+ "internalType": "contract SystemConfig",
366
+ "name": "_systemConfig",
628
367
  "type": "address"
629
368
  },
630
369
  {
631
- "internalType": "contract IETHLockbox",
632
- "name": "_ethLockbox",
370
+ "internalType": "contract SuperchainConfig",
371
+ "name": "_superchainConfig",
633
372
  "type": "address"
634
373
  }
635
374
  ],
@@ -639,13 +378,19 @@ exports.OptimismPortal2_jsonAbi = [
639
378
  "type": "function"
640
379
  },
641
380
  {
642
- "inputs": [],
643
- "name": "l2Sender",
381
+ "inputs": [
382
+ {
383
+ "internalType": "uint256",
384
+ "name": "_l2OutputIndex",
385
+ "type": "uint256"
386
+ }
387
+ ],
388
+ "name": "isOutputFinalized",
644
389
  "outputs": [
645
390
  {
646
- "internalType": "address",
391
+ "internalType": "bool",
647
392
  "name": "",
648
- "type": "address"
393
+ "type": "bool"
649
394
  }
650
395
  ],
651
396
  "stateMutability": "view",
@@ -653,65 +398,47 @@ exports.OptimismPortal2_jsonAbi = [
653
398
  },
654
399
  {
655
400
  "inputs": [],
656
- "name": "migrateLiquidity",
657
- "outputs": [],
658
- "stateMutability": "nonpayable",
659
- "type": "function"
660
- },
661
- {
662
- "inputs": [
663
- {
664
- "internalType": "contract IETHLockbox",
665
- "name": "_newLockbox",
666
- "type": "address"
667
- },
401
+ "name": "l2Oracle",
402
+ "outputs": [
668
403
  {
669
- "internalType": "contract IAnchorStateRegistry",
670
- "name": "_newAnchorStateRegistry",
404
+ "internalType": "contract L2OutputOracle",
405
+ "name": "",
671
406
  "type": "address"
672
407
  }
673
408
  ],
674
- "name": "migrateToSharedDisputeGame",
675
- "outputs": [],
676
- "stateMutability": "nonpayable",
409
+ "stateMutability": "view",
677
410
  "type": "function"
678
411
  },
679
412
  {
680
- "inputs": [
681
- {
682
- "internalType": "uint64",
683
- "name": "_byteCount",
684
- "type": "uint64"
685
- }
686
- ],
687
- "name": "minimumGasLimit",
413
+ "inputs": [],
414
+ "name": "l2Sender",
688
415
  "outputs": [
689
416
  {
690
- "internalType": "uint64",
417
+ "internalType": "address",
691
418
  "name": "",
692
- "type": "uint64"
419
+ "type": "address"
693
420
  }
694
421
  ],
695
- "stateMutability": "pure",
422
+ "stateMutability": "view",
696
423
  "type": "function"
697
424
  },
698
425
  {
699
426
  "inputs": [
700
427
  {
701
- "internalType": "bytes32",
702
- "name": "_withdrawalHash",
703
- "type": "bytes32"
428
+ "internalType": "uint64",
429
+ "name": "_byteCount",
430
+ "type": "uint64"
704
431
  }
705
432
  ],
706
- "name": "numProofSubmitters",
433
+ "name": "minimumGasLimit",
707
434
  "outputs": [
708
435
  {
709
- "internalType": "uint256",
436
+ "internalType": "uint64",
710
437
  "name": "",
711
- "type": "uint256"
438
+ "type": "uint64"
712
439
  }
713
440
  ],
714
- "stateMutability": "view",
441
+ "stateMutability": "pure",
715
442
  "type": "function"
716
443
  },
717
444
  {
@@ -743,50 +470,13 @@ exports.OptimismPortal2_jsonAbi = [
743
470
  "outputs": [
744
471
  {
745
472
  "internalType": "bool",
746
- "name": "",
473
+ "name": "paused_",
747
474
  "type": "bool"
748
475
  }
749
476
  ],
750
477
  "stateMutability": "view",
751
478
  "type": "function"
752
479
  },
753
- {
754
- "inputs": [],
755
- "name": "proofMaturityDelaySeconds",
756
- "outputs": [
757
- {
758
- "internalType": "uint256",
759
- "name": "",
760
- "type": "uint256"
761
- }
762
- ],
763
- "stateMutability": "view",
764
- "type": "function"
765
- },
766
- {
767
- "inputs": [
768
- {
769
- "internalType": "bytes32",
770
- "name": "",
771
- "type": "bytes32"
772
- },
773
- {
774
- "internalType": "uint256",
775
- "name": "",
776
- "type": "uint256"
777
- }
778
- ],
779
- "name": "proofSubmitters",
780
- "outputs": [
781
- {
782
- "internalType": "address",
783
- "name": "",
784
- "type": "address"
785
- }
786
- ],
787
- "stateMutability": "view",
788
- "type": "function"
789
- },
790
480
  {
791
481
  "inputs": [
792
482
  {
@@ -828,7 +518,7 @@ exports.OptimismPortal2_jsonAbi = [
828
518
  },
829
519
  {
830
520
  "internalType": "uint256",
831
- "name": "_disputeGameIndex",
521
+ "name": "_l2OutputIndex",
832
522
  "type": "uint256"
833
523
  },
834
524
  {
@@ -875,79 +565,55 @@ exports.OptimismPortal2_jsonAbi = [
875
565
  "internalType": "bytes32",
876
566
  "name": "",
877
567
  "type": "bytes32"
878
- },
879
- {
880
- "internalType": "address",
881
- "name": "",
882
- "type": "address"
883
568
  }
884
569
  ],
885
570
  "name": "provenWithdrawals",
886
571
  "outputs": [
887
572
  {
888
- "internalType": "contract IDisputeGame",
889
- "name": "disputeGameProxy",
890
- "type": "address"
573
+ "internalType": "bytes32",
574
+ "name": "outputRoot",
575
+ "type": "bytes32"
891
576
  },
892
577
  {
893
- "internalType": "uint64",
578
+ "internalType": "uint128",
894
579
  "name": "timestamp",
895
- "type": "uint64"
896
- }
897
- ],
898
- "stateMutability": "view",
899
- "type": "function"
900
- },
901
- {
902
- "inputs": [],
903
- "name": "proxyAdmin",
904
- "outputs": [
580
+ "type": "uint128"
581
+ },
905
582
  {
906
- "internalType": "contract IProxyAdmin",
907
- "name": "",
908
- "type": "address"
583
+ "internalType": "uint128",
584
+ "name": "l2OutputIndex",
585
+ "type": "uint128"
909
586
  }
910
587
  ],
911
588
  "stateMutability": "view",
912
589
  "type": "function"
913
590
  },
914
591
  {
915
- "inputs": [],
916
- "name": "proxyAdminOwner",
917
- "outputs": [
592
+ "inputs": [
918
593
  {
919
594
  "internalType": "address",
920
- "name": "",
595
+ "name": "_token",
921
596
  "type": "address"
922
- }
923
- ],
924
- "stateMutability": "view",
925
- "type": "function"
926
- },
927
- {
928
- "inputs": [],
929
- "name": "respectedGameType",
930
- "outputs": [
597
+ },
931
598
  {
932
- "internalType": "GameType",
933
- "name": "",
934
- "type": "uint32"
935
- }
936
- ],
937
- "stateMutability": "view",
938
- "type": "function"
939
- },
940
- {
941
- "inputs": [],
942
- "name": "respectedGameTypeUpdatedAt",
943
- "outputs": [
599
+ "internalType": "uint8",
600
+ "name": "_decimals",
601
+ "type": "uint8"
602
+ },
944
603
  {
945
- "internalType": "uint64",
946
- "name": "",
947
- "type": "uint64"
604
+ "internalType": "bytes32",
605
+ "name": "_name",
606
+ "type": "bytes32"
607
+ },
608
+ {
609
+ "internalType": "bytes32",
610
+ "name": "_symbol",
611
+ "type": "bytes32"
948
612
  }
949
613
  ],
950
- "stateMutability": "view",
614
+ "name": "setGasPayingToken",
615
+ "outputs": [],
616
+ "stateMutability": "nonpayable",
951
617
  "type": "function"
952
618
  },
953
619
  {
@@ -955,7 +621,7 @@ exports.OptimismPortal2_jsonAbi = [
955
621
  "name": "superchainConfig",
956
622
  "outputs": [
957
623
  {
958
- "internalType": "contract ISuperchainConfig",
624
+ "internalType": "contract SuperchainConfig",
959
625
  "name": "",
960
626
  "type": "address"
961
627
  }
@@ -968,7 +634,7 @@ exports.OptimismPortal2_jsonAbi = [
968
634
  "name": "systemConfig",
969
635
  "outputs": [
970
636
  {
971
- "internalType": "contract ISystemConfig",
637
+ "internalType": "contract SystemConfig",
972
638
  "name": "",
973
639
  "type": "address"
974
640
  }
@@ -986,7 +652,7 @@ exports.OptimismPortal2_jsonAbi = [
986
652
  "type": "string"
987
653
  }
988
654
  ],
989
- "stateMutability": "pure",
655
+ "stateMutability": "view",
990
656
  "type": "function"
991
657
  },
992
658
  {
@@ -995,7 +661,7 @@ exports.OptimismPortal2_jsonAbi = [
995
661
  }
996
662
  ];
997
663
  /**
998
- * OptimismPortal2_json Contract Class
664
+ * OptimismPortal_json Contract Class
999
665
  *
1000
666
  * Provides a class-based API similar to TypeChain for interacting with the contract.
1001
667
  *
@@ -1003,12 +669,12 @@ exports.OptimismPortal2_jsonAbi = [
1003
669
  * ```typescript
1004
670
  * import { createPublicClient, createWalletClient, http } from 'viem';
1005
671
  * import { mainnet } from 'viem/chains';
1006
- * import { OptimismPortal2_json } from 'OptimismPortal2_json';
672
+ * import { OptimismPortal_json } from 'OptimismPortal_json';
1007
673
  *
1008
674
  * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
1009
675
  * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
1010
676
  *
1011
- * const contract = new OptimismPortal2_json('0x...', { publicClient, walletClient });
677
+ * const contract = new OptimismPortal_json('0x...', { publicClient, walletClient });
1012
678
  *
1013
679
  * // Read functions
1014
680
  * const result = await contract.balanceOf('0x...');
@@ -1026,13 +692,13 @@ exports.OptimismPortal2_jsonAbi = [
1026
692
  * });
1027
693
  * ```
1028
694
  */
1029
- class OptimismPortal2_json {
695
+ class OptimismPortal_json {
1030
696
  constructor(address, clients) {
1031
697
  this.contractAddress = address;
1032
698
  this.publicClient = clients.publicClient;
1033
699
  this.contract = (0, viem_1.getContract)({
1034
700
  address,
1035
- abi: exports.OptimismPortal2_jsonAbi,
701
+ abi: exports.OptimismPortal_jsonAbi,
1036
702
  client: {
1037
703
  public: clients.publicClient,
1038
704
  wallet: clients.walletClient,
@@ -1052,46 +718,11 @@ class OptimismPortal2_json {
1052
718
  return this.contract;
1053
719
  }
1054
720
  /**
1055
- * anchorStateRegistry
1056
- * view
1057
- */
1058
- async anchorStateRegistry() {
1059
- return this.contract.read.anchorStateRegistry();
1060
- }
1061
- /**
1062
- * checkWithdrawal
1063
- * view
1064
- */
1065
- async checkWithdrawal(_withdrawalHash, _proofSubmitter) {
1066
- return this.contract.read.checkWithdrawal([_withdrawalHash, _proofSubmitter]);
1067
- }
1068
- /**
1069
- * disputeGameBlacklist
1070
- * view
1071
- */
1072
- async disputeGameBlacklist(_disputeGame) {
1073
- return this.contract.read.disputeGameBlacklist([_disputeGame]);
1074
- }
1075
- /**
1076
- * disputeGameFactory
1077
- * view
1078
- */
1079
- async disputeGameFactory() {
1080
- return this.contract.read.disputeGameFactory();
1081
- }
1082
- /**
1083
- * disputeGameFinalityDelaySeconds
1084
- * view
1085
- */
1086
- async disputeGameFinalityDelaySeconds() {
1087
- return this.contract.read.disputeGameFinalityDelaySeconds();
1088
- }
1089
- /**
1090
- * ethLockbox
721
+ * balance
1091
722
  * view
1092
723
  */
1093
- async ethLockbox() {
1094
- return this.contract.read.ethLockbox();
724
+ async balance() {
725
+ return this.contract.read.balance();
1095
726
  }
1096
727
  /**
1097
728
  * finalizedWithdrawals
@@ -1108,11 +739,18 @@ class OptimismPortal2_json {
1108
739
  return this.contract.read.guardian();
1109
740
  }
1110
741
  /**
1111
- * initVersion
742
+ * isOutputFinalized
743
+ * view
744
+ */
745
+ async isOutputFinalized(_l2OutputIndex) {
746
+ return this.contract.read.isOutputFinalized([_l2OutputIndex]);
747
+ }
748
+ /**
749
+ * l2Oracle
1112
750
  * view
1113
751
  */
1114
- async initVersion() {
1115
- return this.contract.read.initVersion();
752
+ async l2Oracle() {
753
+ return this.contract.read.l2Oracle();
1116
754
  }
1117
755
  /**
1118
756
  * l2Sender
@@ -1128,13 +766,6 @@ class OptimismPortal2_json {
1128
766
  async minimumGasLimit(_byteCount) {
1129
767
  return this.contract.read.minimumGasLimit([_byteCount]);
1130
768
  }
1131
- /**
1132
- * numProofSubmitters
1133
- * view
1134
- */
1135
- async numProofSubmitters(_withdrawalHash) {
1136
- return this.contract.read.numProofSubmitters([_withdrawalHash]);
1137
- }
1138
769
  /**
1139
770
  * params
1140
771
  * view
@@ -1149,54 +780,12 @@ class OptimismPortal2_json {
1149
780
  async paused() {
1150
781
  return this.contract.read.paused();
1151
782
  }
1152
- /**
1153
- * proofMaturityDelaySeconds
1154
- * view
1155
- */
1156
- async proofMaturityDelaySeconds() {
1157
- return this.contract.read.proofMaturityDelaySeconds();
1158
- }
1159
- /**
1160
- * proofSubmitters
1161
- * view
1162
- */
1163
- async proofSubmitters(arg0, arg1) {
1164
- return this.contract.read.proofSubmitters([arg0, arg1]);
1165
- }
1166
783
  /**
1167
784
  * provenWithdrawals
1168
785
  * view
1169
786
  */
1170
- async provenWithdrawals(arg0, arg1) {
1171
- return this.contract.read.provenWithdrawals([arg0, arg1]);
1172
- }
1173
- /**
1174
- * proxyAdmin
1175
- * view
1176
- */
1177
- async proxyAdmin() {
1178
- return this.contract.read.proxyAdmin();
1179
- }
1180
- /**
1181
- * proxyAdminOwner
1182
- * view
1183
- */
1184
- async proxyAdminOwner() {
1185
- return this.contract.read.proxyAdminOwner();
1186
- }
1187
- /**
1188
- * respectedGameType
1189
- * view
1190
- */
1191
- async respectedGameType() {
1192
- return this.contract.read.respectedGameType();
1193
- }
1194
- /**
1195
- * respectedGameTypeUpdatedAt
1196
- * view
1197
- */
1198
- async respectedGameTypeUpdatedAt() {
1199
- return this.contract.read.respectedGameTypeUpdatedAt();
787
+ async provenWithdrawals(arg0) {
788
+ return this.contract.read.provenWithdrawals([arg0]);
1200
789
  }
1201
790
  /**
1202
791
  * superchainConfig
@@ -1214,11 +803,22 @@ class OptimismPortal2_json {
1214
803
  }
1215
804
  /**
1216
805
  * version
1217
- * pure
806
+ * view
1218
807
  */
1219
808
  async version() {
1220
809
  return this.contract.read.version();
1221
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
+ }
1222
822
  /**
1223
823
  * depositTransaction
1224
824
  * payable
@@ -1252,60 +852,38 @@ class OptimismPortal2_json {
1252
852
  }
1253
853
  return this.contract.write.finalizeWithdrawalTransaction([_tx], options);
1254
854
  }
1255
- /**
1256
- * finalizeWithdrawalTransactionExternalProof
1257
- * nonpayable
1258
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1259
- */
1260
- async finalizeWithdrawalTransactionExternalProof(_tx, _proofSubmitter, options) {
1261
- if (!this.contract.write) {
1262
- throw new Error('Wallet client is required for write operations');
1263
- }
1264
- return this.contract.write.finalizeWithdrawalTransactionExternalProof([_tx, _proofSubmitter], options);
1265
- }
1266
855
  /**
1267
856
  * initialize
1268
857
  * nonpayable
1269
858
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1270
859
  */
1271
- async initialize(_systemConfig, _anchorStateRegistry, _ethLockbox, options) {
1272
- if (!this.contract.write) {
1273
- throw new Error('Wallet client is required for write operations');
1274
- }
1275
- return this.contract.write.initialize([_systemConfig, _anchorStateRegistry, _ethLockbox], options);
1276
- }
1277
- /**
1278
- * migrateLiquidity
1279
- * nonpayable
1280
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1281
- */
1282
- async migrateLiquidity(options) {
860
+ async initialize(_l2Oracle, _systemConfig, _superchainConfig, options) {
1283
861
  if (!this.contract.write) {
1284
862
  throw new Error('Wallet client is required for write operations');
1285
863
  }
1286
- return this.contract.write.migrateLiquidity(options);
864
+ return this.contract.write.initialize([_l2Oracle, _systemConfig, _superchainConfig], options);
1287
865
  }
1288
866
  /**
1289
- * migrateToSharedDisputeGame
867
+ * proveWithdrawalTransaction
1290
868
  * nonpayable
1291
869
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1292
870
  */
1293
- async migrateToSharedDisputeGame(_newLockbox, _newAnchorStateRegistry, options) {
871
+ async proveWithdrawalTransaction(_tx, _l2OutputIndex, _outputRootProof, _withdrawalProof, options) {
1294
872
  if (!this.contract.write) {
1295
873
  throw new Error('Wallet client is required for write operations');
1296
874
  }
1297
- return this.contract.write.migrateToSharedDisputeGame([_newLockbox, _newAnchorStateRegistry], options);
875
+ return this.contract.write.proveWithdrawalTransaction([_tx, _l2OutputIndex, _outputRootProof, _withdrawalProof], options);
1298
876
  }
1299
877
  /**
1300
- * proveWithdrawalTransaction
878
+ * setGasPayingToken
1301
879
  * nonpayable
1302
880
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1303
881
  */
1304
- async proveWithdrawalTransaction(_tx, _disputeGameIndex, _outputRootProof, _withdrawalProof, options) {
882
+ async setGasPayingToken(_token, _decimals, _name, _symbol, options) {
1305
883
  if (!this.contract.write) {
1306
884
  throw new Error('Wallet client is required for write operations');
1307
885
  }
1308
- return this.contract.write.proveWithdrawalTransaction([_tx, _disputeGameIndex, _outputRootProof, _withdrawalProof], options);
886
+ return this.contract.write.setGasPayingToken([_token, _decimals, _name, _symbol], options);
1309
887
  }
1310
888
  /**
1311
889
  * Simulate contract write operations (dry-run without sending transaction)
@@ -1321,6 +899,14 @@ class OptimismPortal2_json {
1321
899
  throw new Error('Public client is required for simulation');
1322
900
  }
1323
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
+ },
1324
910
  /**
1325
911
  * Simulate depositTransaction
1326
912
  * Returns gas estimate and result without sending transaction
@@ -1345,45 +931,29 @@ class OptimismPortal2_json {
1345
931
  async finalizeWithdrawalTransaction(_tx, options) {
1346
932
  return contract.simulate.finalizeWithdrawalTransaction([_tx], options);
1347
933
  },
1348
- /**
1349
- * Simulate finalizeWithdrawalTransactionExternalProof
1350
- * Returns gas estimate and result without sending transaction
1351
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1352
- */
1353
- async finalizeWithdrawalTransactionExternalProof(_tx, _proofSubmitter, options) {
1354
- return contract.simulate.finalizeWithdrawalTransactionExternalProof([_tx, _proofSubmitter], options);
1355
- },
1356
934
  /**
1357
935
  * Simulate initialize
1358
936
  * Returns gas estimate and result without sending transaction
1359
937
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1360
938
  */
1361
- async initialize(_systemConfig, _anchorStateRegistry, _ethLockbox, options) {
1362
- return contract.simulate.initialize([_systemConfig, _anchorStateRegistry, _ethLockbox], options);
1363
- },
1364
- /**
1365
- * Simulate migrateLiquidity
1366
- * Returns gas estimate and result without sending transaction
1367
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1368
- */
1369
- async migrateLiquidity(options) {
1370
- return contract.simulate.migrateLiquidity(options);
939
+ async initialize(_l2Oracle, _systemConfig, _superchainConfig, options) {
940
+ return contract.simulate.initialize([_l2Oracle, _systemConfig, _superchainConfig], options);
1371
941
  },
1372
942
  /**
1373
- * Simulate migrateToSharedDisputeGame
943
+ * Simulate proveWithdrawalTransaction
1374
944
  * Returns gas estimate and result without sending transaction
1375
945
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1376
946
  */
1377
- async migrateToSharedDisputeGame(_newLockbox, _newAnchorStateRegistry, options) {
1378
- return contract.simulate.migrateToSharedDisputeGame([_newLockbox, _newAnchorStateRegistry], options);
947
+ async proveWithdrawalTransaction(_tx, _l2OutputIndex, _outputRootProof, _withdrawalProof, options) {
948
+ return contract.simulate.proveWithdrawalTransaction([_tx, _l2OutputIndex, _outputRootProof, _withdrawalProof], options);
1379
949
  },
1380
950
  /**
1381
- * Simulate proveWithdrawalTransaction
951
+ * Simulate setGasPayingToken
1382
952
  * Returns gas estimate and result without sending transaction
1383
953
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1384
954
  */
1385
- async proveWithdrawalTransaction(_tx, _disputeGameIndex, _outputRootProof, _withdrawalProof, options) {
1386
- return contract.simulate.proveWithdrawalTransaction([_tx, _disputeGameIndex, _outputRootProof, _withdrawalProof], options);
955
+ async setGasPayingToken(_token, _decimals, _name, _symbol, options) {
956
+ return contract.simulate.setGasPayingToken([_token, _decimals, _name, _symbol], options);
1387
957
  }
1388
958
  };
1389
959
  }
@@ -1401,25 +971,6 @@ class OptimismPortal2_json {
1401
971
  */
1402
972
  get watch() {
1403
973
  return {
1404
- /**
1405
- * Watch ETHMigrated events
1406
- * @param callback Function to call when event is emitted
1407
- * @param filter Optional filter for indexed parameters
1408
- * @returns Unwatch function to stop listening
1409
- */
1410
- ETHMigrated: (callback, filter) => {
1411
- return this.publicClient.watchContractEvent({
1412
- address: this.contractAddress,
1413
- abi: exports.OptimismPortal2_jsonAbi,
1414
- eventName: 'ETHMigrated',
1415
- args: filter,
1416
- onLogs: (logs) => {
1417
- logs.forEach((log) => {
1418
- callback(log.args);
1419
- });
1420
- },
1421
- });
1422
- },
1423
974
  /**
1424
975
  * Watch Initialized events
1425
976
  * @param callback Function to call when event is emitted
@@ -1429,7 +980,7 @@ class OptimismPortal2_json {
1429
980
  Initialized: (callback) => {
1430
981
  return this.publicClient.watchContractEvent({
1431
982
  address: this.contractAddress,
1432
- abi: exports.OptimismPortal2_jsonAbi,
983
+ abi: exports.OptimismPortal_jsonAbi,
1433
984
  eventName: 'Initialized',
1434
985
  onLogs: (logs) => {
1435
986
  logs.forEach((log) => {
@@ -1438,24 +989,6 @@ class OptimismPortal2_json {
1438
989
  },
1439
990
  });
1440
991
  },
1441
- /**
1442
- * Watch PortalMigrated events
1443
- * @param callback Function to call when event is emitted
1444
- * @param filter Optional filter for indexed parameters
1445
- * @returns Unwatch function to stop listening
1446
- */
1447
- PortalMigrated: (callback) => {
1448
- return this.publicClient.watchContractEvent({
1449
- address: this.contractAddress,
1450
- abi: exports.OptimismPortal2_jsonAbi,
1451
- eventName: 'PortalMigrated',
1452
- onLogs: (logs) => {
1453
- logs.forEach((log) => {
1454
- callback(log.args);
1455
- });
1456
- },
1457
- });
1458
- },
1459
992
  /**
1460
993
  * Watch TransactionDeposited events
1461
994
  * @param callback Function to call when event is emitted
@@ -1465,7 +998,7 @@ class OptimismPortal2_json {
1465
998
  TransactionDeposited: (callback, filter) => {
1466
999
  return this.publicClient.watchContractEvent({
1467
1000
  address: this.contractAddress,
1468
- abi: exports.OptimismPortal2_jsonAbi,
1001
+ abi: exports.OptimismPortal_jsonAbi,
1469
1002
  eventName: 'TransactionDeposited',
1470
1003
  args: filter,
1471
1004
  onLogs: (logs) => {
@@ -1484,7 +1017,7 @@ class OptimismPortal2_json {
1484
1017
  WithdrawalFinalized: (callback, filter) => {
1485
1018
  return this.publicClient.watchContractEvent({
1486
1019
  address: this.contractAddress,
1487
- abi: exports.OptimismPortal2_jsonAbi,
1020
+ abi: exports.OptimismPortal_jsonAbi,
1488
1021
  eventName: 'WithdrawalFinalized',
1489
1022
  args: filter,
1490
1023
  onLogs: (logs) => {
@@ -1503,7 +1036,7 @@ class OptimismPortal2_json {
1503
1036
  WithdrawalProven: (callback, filter) => {
1504
1037
  return this.publicClient.watchContractEvent({
1505
1038
  address: this.contractAddress,
1506
- abi: exports.OptimismPortal2_jsonAbi,
1039
+ abi: exports.OptimismPortal_jsonAbi,
1507
1040
  eventName: 'WithdrawalProven',
1508
1041
  args: filter,
1509
1042
  onLogs: (logs) => {
@@ -1512,27 +1045,8 @@ class OptimismPortal2_json {
1512
1045
  });
1513
1046
  },
1514
1047
  });
1515
- },
1516
- /**
1517
- * Watch WithdrawalProvenExtension1 events
1518
- * @param callback Function to call when event is emitted
1519
- * @param filter Optional filter for indexed parameters
1520
- * @returns Unwatch function to stop listening
1521
- */
1522
- WithdrawalProvenExtension1: (callback, filter) => {
1523
- return this.publicClient.watchContractEvent({
1524
- address: this.contractAddress,
1525
- abi: exports.OptimismPortal2_jsonAbi,
1526
- eventName: 'WithdrawalProvenExtension1',
1527
- args: filter,
1528
- onLogs: (logs) => {
1529
- logs.forEach((log) => {
1530
- callback(log.args);
1531
- });
1532
- },
1533
- });
1534
1048
  }
1535
1049
  };
1536
1050
  }
1537
1051
  }
1538
- exports.OptimismPortal2_json = OptimismPortal2_json;
1052
+ exports.OptimismPortal_json = OptimismPortal_json;