@gitmyabi/optimismportal 1.0.2 → 1.0.4

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,71 +1,142 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OptimismPortal_json = exports.OptimismPortal_jsonAbi = void 0;
3
+ exports.OptimismPortal2_json = exports.OptimismPortal2_jsonAbi = void 0;
4
4
  const viem_1 = require("viem");
5
5
  /**
6
- * OptimismPortal_json ABI
6
+ * OptimismPortal2_json ABI
7
7
  *
8
8
  * This ABI is typed using viem's type system for full type safety.
9
9
  */
10
- exports.OptimismPortal_jsonAbi = [
10
+ exports.OptimismPortal2_jsonAbi = [
11
11
  {
12
- "inputs": [],
12
+ "inputs": [
13
+ {
14
+ "internalType": "uint256",
15
+ "name": "_proofMaturityDelaySeconds",
16
+ "type": "uint256"
17
+ }
18
+ ],
13
19
  "stateMutability": "nonpayable",
14
20
  "type": "constructor"
15
21
  },
16
22
  {
17
23
  "inputs": [],
18
- "name": "BadTarget",
24
+ "name": "ContentLengthMismatch",
19
25
  "type": "error"
20
26
  },
21
27
  {
22
28
  "inputs": [],
23
- "name": "CallPaused",
29
+ "name": "EmptyItem",
24
30
  "type": "error"
25
31
  },
26
32
  {
27
33
  "inputs": [],
28
- "name": "ContentLengthMismatch",
34
+ "name": "InvalidDataRemainder",
29
35
  "type": "error"
30
36
  },
31
37
  {
32
38
  "inputs": [],
33
- "name": "EmptyItem",
39
+ "name": "InvalidHeader",
34
40
  "type": "error"
35
41
  },
36
42
  {
37
43
  "inputs": [],
38
- "name": "GasEstimation",
44
+ "name": "OptimismPortal_AlreadyFinalized",
39
45
  "type": "error"
40
46
  },
41
47
  {
42
48
  "inputs": [],
43
- "name": "InvalidDataRemainder",
49
+ "name": "OptimismPortal_BadTarget",
44
50
  "type": "error"
45
51
  },
46
52
  {
47
53
  "inputs": [],
48
- "name": "InvalidHeader",
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",
49
80
  "type": "error"
50
81
  },
51
82
  {
52
83
  "inputs": [],
53
- "name": "LargeCalldata",
84
+ "name": "OptimismPortal_InvalidInteropState",
54
85
  "type": "error"
55
86
  },
56
87
  {
57
88
  "inputs": [],
58
- "name": "NoValue",
89
+ "name": "OptimismPortal_InvalidLockboxState",
59
90
  "type": "error"
60
91
  },
61
92
  {
62
93
  "inputs": [],
63
- "name": "NonReentrant",
94
+ "name": "OptimismPortal_InvalidMerkleProof",
64
95
  "type": "error"
65
96
  },
66
97
  {
67
98
  "inputs": [],
68
- "name": "OnlyCustomGasToken",
99
+ "name": "OptimismPortal_InvalidOutputRootProof",
100
+ "type": "error"
101
+ },
102
+ {
103
+ "inputs": [],
104
+ "name": "OptimismPortal_InvalidProofTimestamp",
105
+ "type": "error"
106
+ },
107
+ {
108
+ "inputs": [],
109
+ "name": "OptimismPortal_InvalidRootClaim",
110
+ "type": "error"
111
+ },
112
+ {
113
+ "inputs": [],
114
+ "name": "OptimismPortal_MigratingToSameRegistry",
115
+ "type": "error"
116
+ },
117
+ {
118
+ "inputs": [],
119
+ "name": "OptimismPortal_NoReentrancy",
120
+ "type": "error"
121
+ },
122
+ {
123
+ "inputs": [],
124
+ "name": "OptimismPortal_NotAllowedOnCGTMode",
125
+ "type": "error"
126
+ },
127
+ {
128
+ "inputs": [],
129
+ "name": "OptimismPortal_NotUsingInterop",
130
+ "type": "error"
131
+ },
132
+ {
133
+ "inputs": [],
134
+ "name": "OptimismPortal_ProofNotOldEnough",
135
+ "type": "error"
136
+ },
137
+ {
138
+ "inputs": [],
139
+ "name": "OptimismPortal_Unproven",
69
140
  "type": "error"
70
141
  },
71
142
  {
@@ -75,17 +146,37 @@ exports.OptimismPortal_jsonAbi = [
75
146
  },
76
147
  {
77
148
  "inputs": [],
78
- "name": "SmallGasLimit",
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",
79
165
  "type": "error"
80
166
  },
81
167
  {
82
168
  "inputs": [],
83
- "name": "TransferFailed",
169
+ "name": "ProxyAdminOwnedBase_NotSharedProxyAdminOwner",
84
170
  "type": "error"
85
171
  },
86
172
  {
87
173
  "inputs": [],
88
- "name": "Unauthorized",
174
+ "name": "ProxyAdminOwnedBase_ProxyAdminNotFound",
175
+ "type": "error"
176
+ },
177
+ {
178
+ "inputs": [],
179
+ "name": "ReinitializableBase_ZeroInitVersion",
89
180
  "type": "error"
90
181
  },
91
182
  {
@@ -98,6 +189,25 @@ exports.OptimismPortal_jsonAbi = [
98
189
  "name": "UnexpectedString",
99
190
  "type": "error"
100
191
  },
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
+ },
101
211
  {
102
212
  "anonymous": false,
103
213
  "inputs": [
@@ -111,6 +221,37 @@ exports.OptimismPortal_jsonAbi = [
111
221
  "name": "Initialized",
112
222
  "type": "event"
113
223
  },
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
+ },
114
255
  {
115
256
  "anonymous": false,
116
257
  "inputs": [
@@ -186,14 +327,33 @@ exports.OptimismPortal_jsonAbi = [
186
327
  "name": "WithdrawalProven",
187
328
  "type": "event"
188
329
  },
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
+ },
189
349
  {
190
350
  "inputs": [],
191
- "name": "balance",
351
+ "name": "anchorStateRegistry",
192
352
  "outputs": [
193
353
  {
194
- "internalType": "uint256",
354
+ "internalType": "contract IAnchorStateRegistry",
195
355
  "name": "",
196
- "type": "uint256"
356
+ "type": "address"
197
357
  }
198
358
  ],
199
359
  "stateMutability": "view",
@@ -202,39 +362,19 @@ exports.OptimismPortal_jsonAbi = [
202
362
  {
203
363
  "inputs": [
204
364
  {
205
- "internalType": "address",
206
- "name": "_to",
207
- "type": "address"
208
- },
209
- {
210
- "internalType": "uint256",
211
- "name": "_mint",
212
- "type": "uint256"
213
- },
214
- {
215
- "internalType": "uint256",
216
- "name": "_value",
217
- "type": "uint256"
218
- },
219
- {
220
- "internalType": "uint64",
221
- "name": "_gasLimit",
222
- "type": "uint64"
223
- },
224
- {
225
- "internalType": "bool",
226
- "name": "_isCreation",
227
- "type": "bool"
365
+ "internalType": "bytes32",
366
+ "name": "_withdrawalHash",
367
+ "type": "bytes32"
228
368
  },
229
369
  {
230
- "internalType": "bytes",
231
- "name": "_data",
232
- "type": "bytes"
370
+ "internalType": "address",
371
+ "name": "_proofSubmitter",
372
+ "type": "address"
233
373
  }
234
374
  ],
235
- "name": "depositERC20Transaction",
375
+ "name": "checkWithdrawal",
236
376
  "outputs": [],
237
- "stateMutability": "nonpayable",
377
+ "stateMutability": "view",
238
378
  "type": "function"
239
379
  },
240
380
  {
@@ -270,6 +410,51 @@ exports.OptimismPortal_jsonAbi = [
270
410
  "stateMutability": "payable",
271
411
  "type": "function"
272
412
  },
413
+ {
414
+ "inputs": [
415
+ {
416
+ "internalType": "contract IDisputeGame",
417
+ "name": "_disputeGame",
418
+ "type": "address"
419
+ }
420
+ ],
421
+ "name": "disputeGameBlacklist",
422
+ "outputs": [
423
+ {
424
+ "internalType": "bool",
425
+ "name": "",
426
+ "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": [
449
+ {
450
+ "internalType": "uint256",
451
+ "name": "",
452
+ "type": "uint256"
453
+ }
454
+ ],
455
+ "stateMutability": "view",
456
+ "type": "function"
457
+ },
273
458
  {
274
459
  "inputs": [],
275
460
  "name": "donateETH",
@@ -277,6 +462,19 @@ exports.OptimismPortal_jsonAbi = [
277
462
  "stateMutability": "payable",
278
463
  "type": "function"
279
464
  },
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
+ },
280
478
  {
281
479
  "inputs": [
282
480
  {
@@ -322,6 +520,56 @@ exports.OptimismPortal_jsonAbi = [
322
520
  "stateMutability": "nonpayable",
323
521
  "type": "function"
324
522
  },
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
+ },
325
573
  {
326
574
  "inputs": [
327
575
  {
@@ -354,21 +602,34 @@ exports.OptimismPortal_jsonAbi = [
354
602
  "stateMutability": "view",
355
603
  "type": "function"
356
604
  },
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
+ },
357
618
  {
358
619
  "inputs": [
359
620
  {
360
- "internalType": "contract L2OutputOracle",
361
- "name": "_l2Oracle",
621
+ "internalType": "contract ISystemConfig",
622
+ "name": "_systemConfig",
362
623
  "type": "address"
363
624
  },
364
625
  {
365
- "internalType": "contract SystemConfig",
366
- "name": "_systemConfig",
626
+ "internalType": "contract IAnchorStateRegistry",
627
+ "name": "_anchorStateRegistry",
367
628
  "type": "address"
368
629
  },
369
630
  {
370
- "internalType": "contract SuperchainConfig",
371
- "name": "_superchainConfig",
631
+ "internalType": "contract IETHLockbox",
632
+ "name": "_ethLockbox",
372
633
  "type": "address"
373
634
  }
374
635
  ],
@@ -378,19 +639,13 @@ exports.OptimismPortal_jsonAbi = [
378
639
  "type": "function"
379
640
  },
380
641
  {
381
- "inputs": [
382
- {
383
- "internalType": "uint256",
384
- "name": "_l2OutputIndex",
385
- "type": "uint256"
386
- }
387
- ],
388
- "name": "isOutputFinalized",
642
+ "inputs": [],
643
+ "name": "l2Sender",
389
644
  "outputs": [
390
645
  {
391
- "internalType": "bool",
646
+ "internalType": "address",
392
647
  "name": "",
393
- "type": "bool"
648
+ "type": "address"
394
649
  }
395
650
  ],
396
651
  "stateMutability": "view",
@@ -398,28 +653,27 @@ exports.OptimismPortal_jsonAbi = [
398
653
  },
399
654
  {
400
655
  "inputs": [],
401
- "name": "l2Oracle",
402
- "outputs": [
403
- {
404
- "internalType": "contract L2OutputOracle",
405
- "name": "",
406
- "type": "address"
407
- }
408
- ],
409
- "stateMutability": "view",
656
+ "name": "migrateLiquidity",
657
+ "outputs": [],
658
+ "stateMutability": "nonpayable",
410
659
  "type": "function"
411
660
  },
412
661
  {
413
- "inputs": [],
414
- "name": "l2Sender",
415
- "outputs": [
662
+ "inputs": [
416
663
  {
417
- "internalType": "address",
418
- "name": "",
664
+ "internalType": "contract IETHLockbox",
665
+ "name": "_newLockbox",
666
+ "type": "address"
667
+ },
668
+ {
669
+ "internalType": "contract IAnchorStateRegistry",
670
+ "name": "_newAnchorStateRegistry",
419
671
  "type": "address"
420
672
  }
421
673
  ],
422
- "stateMutability": "view",
674
+ "name": "migrateToSharedDisputeGame",
675
+ "outputs": [],
676
+ "stateMutability": "nonpayable",
423
677
  "type": "function"
424
678
  },
425
679
  {
@@ -441,6 +695,25 @@ exports.OptimismPortal_jsonAbi = [
441
695
  "stateMutability": "pure",
442
696
  "type": "function"
443
697
  },
698
+ {
699
+ "inputs": [
700
+ {
701
+ "internalType": "bytes32",
702
+ "name": "_withdrawalHash",
703
+ "type": "bytes32"
704
+ }
705
+ ],
706
+ "name": "numProofSubmitters",
707
+ "outputs": [
708
+ {
709
+ "internalType": "uint256",
710
+ "name": "",
711
+ "type": "uint256"
712
+ }
713
+ ],
714
+ "stateMutability": "view",
715
+ "type": "function"
716
+ },
444
717
  {
445
718
  "inputs": [],
446
719
  "name": "params",
@@ -470,13 +743,50 @@ exports.OptimismPortal_jsonAbi = [
470
743
  "outputs": [
471
744
  {
472
745
  "internalType": "bool",
473
- "name": "paused_",
746
+ "name": "",
474
747
  "type": "bool"
475
748
  }
476
749
  ],
477
750
  "stateMutability": "view",
478
751
  "type": "function"
479
752
  },
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
+ },
480
790
  {
481
791
  "inputs": [
482
792
  {
@@ -518,7 +828,7 @@ exports.OptimismPortal_jsonAbi = [
518
828
  },
519
829
  {
520
830
  "internalType": "uint256",
521
- "name": "_l2OutputIndex",
831
+ "name": "_disputeGameIndex",
522
832
  "type": "uint256"
523
833
  },
524
834
  {
@@ -565,55 +875,79 @@ exports.OptimismPortal_jsonAbi = [
565
875
  "internalType": "bytes32",
566
876
  "name": "",
567
877
  "type": "bytes32"
878
+ },
879
+ {
880
+ "internalType": "address",
881
+ "name": "",
882
+ "type": "address"
568
883
  }
569
884
  ],
570
885
  "name": "provenWithdrawals",
571
886
  "outputs": [
572
887
  {
573
- "internalType": "bytes32",
574
- "name": "outputRoot",
575
- "type": "bytes32"
888
+ "internalType": "contract IDisputeGame",
889
+ "name": "disputeGameProxy",
890
+ "type": "address"
576
891
  },
577
892
  {
578
- "internalType": "uint128",
893
+ "internalType": "uint64",
579
894
  "name": "timestamp",
580
- "type": "uint128"
581
- },
895
+ "type": "uint64"
896
+ }
897
+ ],
898
+ "stateMutability": "view",
899
+ "type": "function"
900
+ },
901
+ {
902
+ "inputs": [],
903
+ "name": "proxyAdmin",
904
+ "outputs": [
582
905
  {
583
- "internalType": "uint128",
584
- "name": "l2OutputIndex",
585
- "type": "uint128"
906
+ "internalType": "contract IProxyAdmin",
907
+ "name": "",
908
+ "type": "address"
586
909
  }
587
910
  ],
588
911
  "stateMutability": "view",
589
912
  "type": "function"
590
913
  },
591
914
  {
592
- "inputs": [
915
+ "inputs": [],
916
+ "name": "proxyAdminOwner",
917
+ "outputs": [
593
918
  {
594
919
  "internalType": "address",
595
- "name": "_token",
920
+ "name": "",
596
921
  "type": "address"
597
- },
598
- {
599
- "internalType": "uint8",
600
- "name": "_decimals",
601
- "type": "uint8"
602
- },
922
+ }
923
+ ],
924
+ "stateMutability": "view",
925
+ "type": "function"
926
+ },
927
+ {
928
+ "inputs": [],
929
+ "name": "respectedGameType",
930
+ "outputs": [
603
931
  {
604
- "internalType": "bytes32",
605
- "name": "_name",
606
- "type": "bytes32"
607
- },
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": [
608
944
  {
609
- "internalType": "bytes32",
610
- "name": "_symbol",
611
- "type": "bytes32"
945
+ "internalType": "uint64",
946
+ "name": "",
947
+ "type": "uint64"
612
948
  }
613
949
  ],
614
- "name": "setGasPayingToken",
615
- "outputs": [],
616
- "stateMutability": "nonpayable",
950
+ "stateMutability": "view",
617
951
  "type": "function"
618
952
  },
619
953
  {
@@ -621,7 +955,7 @@ exports.OptimismPortal_jsonAbi = [
621
955
  "name": "superchainConfig",
622
956
  "outputs": [
623
957
  {
624
- "internalType": "contract SuperchainConfig",
958
+ "internalType": "contract ISuperchainConfig",
625
959
  "name": "",
626
960
  "type": "address"
627
961
  }
@@ -634,7 +968,7 @@ exports.OptimismPortal_jsonAbi = [
634
968
  "name": "systemConfig",
635
969
  "outputs": [
636
970
  {
637
- "internalType": "contract SystemConfig",
971
+ "internalType": "contract ISystemConfig",
638
972
  "name": "",
639
973
  "type": "address"
640
974
  }
@@ -661,7 +995,7 @@ exports.OptimismPortal_jsonAbi = [
661
995
  }
662
996
  ];
663
997
  /**
664
- * OptimismPortal_json Contract Class
998
+ * OptimismPortal2_json Contract Class
665
999
  *
666
1000
  * Provides a class-based API similar to TypeChain for interacting with the contract.
667
1001
  *
@@ -669,12 +1003,12 @@ exports.OptimismPortal_jsonAbi = [
669
1003
  * ```typescript
670
1004
  * import { createPublicClient, createWalletClient, http } from 'viem';
671
1005
  * import { mainnet } from 'viem/chains';
672
- * import { OptimismPortal_json } from 'OptimismPortal_json';
1006
+ * import { OptimismPortal2_json } from 'OptimismPortal2_json';
673
1007
  *
674
1008
  * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
675
1009
  * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
676
1010
  *
677
- * const contract = new OptimismPortal_json('0x...', { publicClient, walletClient });
1011
+ * const contract = new OptimismPortal2_json('0x...', { publicClient, walletClient });
678
1012
  *
679
1013
  * // Read functions
680
1014
  * const result = await contract.balanceOf('0x...');
@@ -692,13 +1026,13 @@ exports.OptimismPortal_jsonAbi = [
692
1026
  * });
693
1027
  * ```
694
1028
  */
695
- class OptimismPortal_json {
1029
+ class OptimismPortal2_json {
696
1030
  constructor(address, clients) {
697
1031
  this.contractAddress = address;
698
1032
  this.publicClient = clients.publicClient;
699
1033
  this.contract = (0, viem_1.getContract)({
700
1034
  address,
701
- abi: exports.OptimismPortal_jsonAbi,
1035
+ abi: exports.OptimismPortal2_jsonAbi,
702
1036
  client: {
703
1037
  public: clients.publicClient,
704
1038
  wallet: clients.walletClient,
@@ -718,11 +1052,46 @@ class OptimismPortal_json {
718
1052
  return this.contract;
719
1053
  }
720
1054
  /**
721
- * balance
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
722
1091
  * view
723
1092
  */
724
- async balance() {
725
- return this.contract.read.balance();
1093
+ async ethLockbox() {
1094
+ return this.contract.read.ethLockbox();
726
1095
  }
727
1096
  /**
728
1097
  * finalizedWithdrawals
@@ -739,18 +1108,11 @@ class OptimismPortal_json {
739
1108
  return this.contract.read.guardian();
740
1109
  }
741
1110
  /**
742
- * isOutputFinalized
743
- * view
744
- */
745
- async isOutputFinalized(_l2OutputIndex) {
746
- return this.contract.read.isOutputFinalized([_l2OutputIndex]);
747
- }
748
- /**
749
- * l2Oracle
1111
+ * initVersion
750
1112
  * view
751
1113
  */
752
- async l2Oracle() {
753
- return this.contract.read.l2Oracle();
1114
+ async initVersion() {
1115
+ return this.contract.read.initVersion();
754
1116
  }
755
1117
  /**
756
1118
  * l2Sender
@@ -766,6 +1128,13 @@ class OptimismPortal_json {
766
1128
  async minimumGasLimit(_byteCount) {
767
1129
  return this.contract.read.minimumGasLimit([_byteCount]);
768
1130
  }
1131
+ /**
1132
+ * numProofSubmitters
1133
+ * view
1134
+ */
1135
+ async numProofSubmitters(_withdrawalHash) {
1136
+ return this.contract.read.numProofSubmitters([_withdrawalHash]);
1137
+ }
769
1138
  /**
770
1139
  * params
771
1140
  * view
@@ -780,12 +1149,54 @@ class OptimismPortal_json {
780
1149
  async paused() {
781
1150
  return this.contract.read.paused();
782
1151
  }
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
+ }
783
1166
  /**
784
1167
  * provenWithdrawals
785
1168
  * view
786
1169
  */
787
- async provenWithdrawals(arg0) {
788
- return this.contract.read.provenWithdrawals([arg0]);
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();
789
1200
  }
790
1201
  /**
791
1202
  * superchainConfig
@@ -808,17 +1219,6 @@ class OptimismPortal_json {
808
1219
  async version() {
809
1220
  return this.contract.read.version();
810
1221
  }
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
- }
822
1222
  /**
823
1223
  * depositTransaction
824
1224
  * payable
@@ -852,38 +1252,60 @@ class OptimismPortal_json {
852
1252
  }
853
1253
  return this.contract.write.finalizeWithdrawalTransaction([_tx], options);
854
1254
  }
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
+ }
855
1266
  /**
856
1267
  * initialize
857
1268
  * nonpayable
858
1269
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
859
1270
  */
860
- async initialize(_l2Oracle, _systemConfig, _superchainConfig, options) {
1271
+ async initialize(_systemConfig, _anchorStateRegistry, _ethLockbox, options) {
861
1272
  if (!this.contract.write) {
862
1273
  throw new Error('Wallet client is required for write operations');
863
1274
  }
864
- return this.contract.write.initialize([_l2Oracle, _systemConfig, _superchainConfig], options);
1275
+ return this.contract.write.initialize([_systemConfig, _anchorStateRegistry, _ethLockbox], options);
865
1276
  }
866
1277
  /**
867
- * proveWithdrawalTransaction
1278
+ * migrateLiquidity
1279
+ * nonpayable
1280
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1281
+ */
1282
+ async migrateLiquidity(options) {
1283
+ if (!this.contract.write) {
1284
+ throw new Error('Wallet client is required for write operations');
1285
+ }
1286
+ return this.contract.write.migrateLiquidity(options);
1287
+ }
1288
+ /**
1289
+ * migrateToSharedDisputeGame
868
1290
  * nonpayable
869
1291
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
870
1292
  */
871
- async proveWithdrawalTransaction(_tx, _l2OutputIndex, _outputRootProof, _withdrawalProof, options) {
1293
+ async migrateToSharedDisputeGame(_newLockbox, _newAnchorStateRegistry, options) {
872
1294
  if (!this.contract.write) {
873
1295
  throw new Error('Wallet client is required for write operations');
874
1296
  }
875
- return this.contract.write.proveWithdrawalTransaction([_tx, _l2OutputIndex, _outputRootProof, _withdrawalProof], options);
1297
+ return this.contract.write.migrateToSharedDisputeGame([_newLockbox, _newAnchorStateRegistry], options);
876
1298
  }
877
1299
  /**
878
- * setGasPayingToken
1300
+ * proveWithdrawalTransaction
879
1301
  * nonpayable
880
1302
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
881
1303
  */
882
- async setGasPayingToken(_token, _decimals, _name, _symbol, options) {
1304
+ async proveWithdrawalTransaction(_tx, _disputeGameIndex, _outputRootProof, _withdrawalProof, options) {
883
1305
  if (!this.contract.write) {
884
1306
  throw new Error('Wallet client is required for write operations');
885
1307
  }
886
- return this.contract.write.setGasPayingToken([_token, _decimals, _name, _symbol], options);
1308
+ return this.contract.write.proveWithdrawalTransaction([_tx, _disputeGameIndex, _outputRootProof, _withdrawalProof], options);
887
1309
  }
888
1310
  /**
889
1311
  * Simulate contract write operations (dry-run without sending transaction)
@@ -899,14 +1321,6 @@ class OptimismPortal_json {
899
1321
  throw new Error('Public client is required for simulation');
900
1322
  }
901
1323
  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
- },
910
1324
  /**
911
1325
  * Simulate depositTransaction
912
1326
  * Returns gas estimate and result without sending transaction
@@ -931,29 +1345,45 @@ class OptimismPortal_json {
931
1345
  async finalizeWithdrawalTransaction(_tx, options) {
932
1346
  return contract.simulate.finalizeWithdrawalTransaction([_tx], options);
933
1347
  },
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
+ },
934
1356
  /**
935
1357
  * Simulate initialize
936
1358
  * Returns gas estimate and result without sending transaction
937
1359
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
938
1360
  */
939
- async initialize(_l2Oracle, _systemConfig, _superchainConfig, options) {
940
- return contract.simulate.initialize([_l2Oracle, _systemConfig, _superchainConfig], options);
1361
+ async initialize(_systemConfig, _anchorStateRegistry, _ethLockbox, options) {
1362
+ return contract.simulate.initialize([_systemConfig, _anchorStateRegistry, _ethLockbox], options);
941
1363
  },
942
1364
  /**
943
- * Simulate proveWithdrawalTransaction
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);
1371
+ },
1372
+ /**
1373
+ * Simulate migrateToSharedDisputeGame
944
1374
  * Returns gas estimate and result without sending transaction
945
1375
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
946
1376
  */
947
- async proveWithdrawalTransaction(_tx, _l2OutputIndex, _outputRootProof, _withdrawalProof, options) {
948
- return contract.simulate.proveWithdrawalTransaction([_tx, _l2OutputIndex, _outputRootProof, _withdrawalProof], options);
1377
+ async migrateToSharedDisputeGame(_newLockbox, _newAnchorStateRegistry, options) {
1378
+ return contract.simulate.migrateToSharedDisputeGame([_newLockbox, _newAnchorStateRegistry], options);
949
1379
  },
950
1380
  /**
951
- * Simulate setGasPayingToken
1381
+ * Simulate proveWithdrawalTransaction
952
1382
  * Returns gas estimate and result without sending transaction
953
1383
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
954
1384
  */
955
- async setGasPayingToken(_token, _decimals, _name, _symbol, options) {
956
- return contract.simulate.setGasPayingToken([_token, _decimals, _name, _symbol], options);
1385
+ async proveWithdrawalTransaction(_tx, _disputeGameIndex, _outputRootProof, _withdrawalProof, options) {
1386
+ return contract.simulate.proveWithdrawalTransaction([_tx, _disputeGameIndex, _outputRootProof, _withdrawalProof], options);
957
1387
  }
958
1388
  };
959
1389
  }
@@ -971,6 +1401,25 @@ class OptimismPortal_json {
971
1401
  */
972
1402
  get watch() {
973
1403
  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
+ },
974
1423
  /**
975
1424
  * Watch Initialized events
976
1425
  * @param callback Function to call when event is emitted
@@ -980,7 +1429,7 @@ class OptimismPortal_json {
980
1429
  Initialized: (callback) => {
981
1430
  return this.publicClient.watchContractEvent({
982
1431
  address: this.contractAddress,
983
- abi: exports.OptimismPortal_jsonAbi,
1432
+ abi: exports.OptimismPortal2_jsonAbi,
984
1433
  eventName: 'Initialized',
985
1434
  onLogs: (logs) => {
986
1435
  logs.forEach((log) => {
@@ -989,6 +1438,24 @@ class OptimismPortal_json {
989
1438
  },
990
1439
  });
991
1440
  },
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
+ },
992
1459
  /**
993
1460
  * Watch TransactionDeposited events
994
1461
  * @param callback Function to call when event is emitted
@@ -998,7 +1465,7 @@ class OptimismPortal_json {
998
1465
  TransactionDeposited: (callback, filter) => {
999
1466
  return this.publicClient.watchContractEvent({
1000
1467
  address: this.contractAddress,
1001
- abi: exports.OptimismPortal_jsonAbi,
1468
+ abi: exports.OptimismPortal2_jsonAbi,
1002
1469
  eventName: 'TransactionDeposited',
1003
1470
  args: filter,
1004
1471
  onLogs: (logs) => {
@@ -1017,7 +1484,7 @@ class OptimismPortal_json {
1017
1484
  WithdrawalFinalized: (callback, filter) => {
1018
1485
  return this.publicClient.watchContractEvent({
1019
1486
  address: this.contractAddress,
1020
- abi: exports.OptimismPortal_jsonAbi,
1487
+ abi: exports.OptimismPortal2_jsonAbi,
1021
1488
  eventName: 'WithdrawalFinalized',
1022
1489
  args: filter,
1023
1490
  onLogs: (logs) => {
@@ -1036,7 +1503,7 @@ class OptimismPortal_json {
1036
1503
  WithdrawalProven: (callback, filter) => {
1037
1504
  return this.publicClient.watchContractEvent({
1038
1505
  address: this.contractAddress,
1039
- abi: exports.OptimismPortal_jsonAbi,
1506
+ abi: exports.OptimismPortal2_jsonAbi,
1040
1507
  eventName: 'WithdrawalProven',
1041
1508
  args: filter,
1042
1509
  onLogs: (logs) => {
@@ -1045,8 +1512,27 @@ class OptimismPortal_json {
1045
1512
  });
1046
1513
  },
1047
1514
  });
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
+ });
1048
1534
  }
1049
1535
  };
1050
1536
  }
1051
1537
  }
1052
- exports.OptimismPortal_json = OptimismPortal_json;
1538
+ exports.OptimismPortal2_json = OptimismPortal2_json;