@gitmyabi/optimismportal 1.0.5 → 1.0.8
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/OptimismPortal_json.d.ts +346 -130
- package/contracts/OptimismPortal_json.js +390 -159
- package/contracts/OptimismPortal_json.ts +466 -160
- package/package.json +3 -3
|
@@ -14,89 +14,42 @@ exports.OptimismPortal_jsonAbi = [
|
|
|
14
14
|
"type": "constructor"
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"type": "error"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"inputs": [],
|
|
38
|
-
"name": "GasEstimation",
|
|
39
|
-
"type": "error"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"inputs": [],
|
|
43
|
-
"name": "InvalidDataRemainder",
|
|
44
|
-
"type": "error"
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
"inputs": [],
|
|
48
|
-
"name": "InvalidHeader",
|
|
49
|
-
"type": "error"
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"inputs": [],
|
|
53
|
-
"name": "LargeCalldata",
|
|
54
|
-
"type": "error"
|
|
55
|
-
},
|
|
56
|
-
{
|
|
57
|
-
"inputs": [],
|
|
58
|
-
"name": "NoValue",
|
|
59
|
-
"type": "error"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"inputs": [],
|
|
63
|
-
"name": "NonReentrant",
|
|
64
|
-
"type": "error"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
"inputs": [],
|
|
68
|
-
"name": "OnlyCustomGasToken",
|
|
69
|
-
"type": "error"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"inputs": [],
|
|
73
|
-
"name": "OutOfGas",
|
|
74
|
-
"type": "error"
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
"inputs": [],
|
|
78
|
-
"name": "SmallGasLimit",
|
|
79
|
-
"type": "error"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"inputs": [],
|
|
83
|
-
"name": "TransferFailed",
|
|
84
|
-
"type": "error"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
"inputs": [],
|
|
88
|
-
"name": "Unauthorized",
|
|
89
|
-
"type": "error"
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"inputs": [],
|
|
93
|
-
"name": "UnexpectedList",
|
|
94
|
-
"type": "error"
|
|
17
|
+
"anonymous": false,
|
|
18
|
+
"inputs": [
|
|
19
|
+
{
|
|
20
|
+
"indexed": true,
|
|
21
|
+
"internalType": "address",
|
|
22
|
+
"name": "claimer",
|
|
23
|
+
"type": "address"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"indexed": false,
|
|
27
|
+
"internalType": "uint256",
|
|
28
|
+
"name": "amount",
|
|
29
|
+
"type": "uint256"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"name": "ETHClaimed",
|
|
33
|
+
"type": "event"
|
|
95
34
|
},
|
|
96
35
|
{
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
|
|
36
|
+
"anonymous": false,
|
|
37
|
+
"inputs": [
|
|
38
|
+
{
|
|
39
|
+
"indexed": true,
|
|
40
|
+
"internalType": "address",
|
|
41
|
+
"name": "recipient",
|
|
42
|
+
"type": "address"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"indexed": false,
|
|
46
|
+
"internalType": "uint256",
|
|
47
|
+
"name": "amount",
|
|
48
|
+
"type": "uint256"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"name": "ETHRecovered",
|
|
52
|
+
"type": "event"
|
|
100
53
|
},
|
|
101
54
|
{
|
|
102
55
|
"anonymous": false,
|
|
@@ -111,6 +64,38 @@ exports.OptimismPortal_jsonAbi = [
|
|
|
111
64
|
"name": "Initialized",
|
|
112
65
|
"type": "event"
|
|
113
66
|
},
|
|
67
|
+
{
|
|
68
|
+
"anonymous": false,
|
|
69
|
+
"inputs": [
|
|
70
|
+
{
|
|
71
|
+
"indexed": true,
|
|
72
|
+
"internalType": "bytes32",
|
|
73
|
+
"name": "root",
|
|
74
|
+
"type": "bytes32"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"indexed": true,
|
|
78
|
+
"internalType": "address",
|
|
79
|
+
"name": "setter",
|
|
80
|
+
"type": "address"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"name": "MerkleRootETHSet",
|
|
84
|
+
"type": "event"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"anonymous": false,
|
|
88
|
+
"inputs": [
|
|
89
|
+
{
|
|
90
|
+
"indexed": false,
|
|
91
|
+
"internalType": "address",
|
|
92
|
+
"name": "account",
|
|
93
|
+
"type": "address"
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"name": "Paused",
|
|
97
|
+
"type": "event"
|
|
98
|
+
},
|
|
114
99
|
{
|
|
115
100
|
"anonymous": false,
|
|
116
101
|
"inputs": [
|
|
@@ -142,6 +127,19 @@ exports.OptimismPortal_jsonAbi = [
|
|
|
142
127
|
"name": "TransactionDeposited",
|
|
143
128
|
"type": "event"
|
|
144
129
|
},
|
|
130
|
+
{
|
|
131
|
+
"anonymous": false,
|
|
132
|
+
"inputs": [
|
|
133
|
+
{
|
|
134
|
+
"indexed": false,
|
|
135
|
+
"internalType": "address",
|
|
136
|
+
"name": "account",
|
|
137
|
+
"type": "address"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"name": "Unpaused",
|
|
141
|
+
"type": "event"
|
|
142
|
+
},
|
|
145
143
|
{
|
|
146
144
|
"anonymous": false,
|
|
147
145
|
"inputs": [
|
|
@@ -188,55 +186,93 @@ exports.OptimismPortal_jsonAbi = [
|
|
|
188
186
|
},
|
|
189
187
|
{
|
|
190
188
|
"inputs": [],
|
|
191
|
-
"name": "
|
|
189
|
+
"name": "GUARDIAN",
|
|
192
190
|
"outputs": [
|
|
193
191
|
{
|
|
194
|
-
"internalType": "
|
|
192
|
+
"internalType": "address",
|
|
195
193
|
"name": "",
|
|
196
|
-
"type": "
|
|
194
|
+
"type": "address"
|
|
197
195
|
}
|
|
198
196
|
],
|
|
199
197
|
"stateMutability": "view",
|
|
200
198
|
"type": "function"
|
|
201
199
|
},
|
|
202
200
|
{
|
|
203
|
-
"inputs": [
|
|
201
|
+
"inputs": [],
|
|
202
|
+
"name": "L2_ORACLE",
|
|
203
|
+
"outputs": [
|
|
204
204
|
{
|
|
205
|
-
"internalType": "
|
|
206
|
-
"name": "
|
|
205
|
+
"internalType": "contract L2OutputOracle",
|
|
206
|
+
"name": "",
|
|
207
207
|
"type": "address"
|
|
208
|
-
}
|
|
208
|
+
}
|
|
209
|
+
],
|
|
210
|
+
"stateMutability": "view",
|
|
211
|
+
"type": "function"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"inputs": [],
|
|
215
|
+
"name": "RECOVERY_TIMESTAMP",
|
|
216
|
+
"outputs": [
|
|
209
217
|
{
|
|
210
218
|
"internalType": "uint256",
|
|
211
|
-
"name": "
|
|
219
|
+
"name": "",
|
|
212
220
|
"type": "uint256"
|
|
213
|
-
}
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
"stateMutability": "view",
|
|
224
|
+
"type": "function"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"inputs": [],
|
|
228
|
+
"name": "SYSTEM_CONFIG",
|
|
229
|
+
"outputs": [
|
|
230
|
+
{
|
|
231
|
+
"internalType": "contract SystemConfig",
|
|
232
|
+
"name": "",
|
|
233
|
+
"type": "address"
|
|
234
|
+
}
|
|
235
|
+
],
|
|
236
|
+
"stateMutability": "view",
|
|
237
|
+
"type": "function"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"inputs": [
|
|
214
241
|
{
|
|
215
242
|
"internalType": "uint256",
|
|
216
|
-
"name": "
|
|
243
|
+
"name": "_amount",
|
|
217
244
|
"type": "uint256"
|
|
218
245
|
},
|
|
219
246
|
{
|
|
220
|
-
"internalType": "
|
|
221
|
-
"name": "
|
|
222
|
-
"type": "
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
"internalType": "bool",
|
|
226
|
-
"name": "_isCreation",
|
|
227
|
-
"type": "bool"
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
"internalType": "bytes",
|
|
231
|
-
"name": "_data",
|
|
232
|
-
"type": "bytes"
|
|
247
|
+
"internalType": "bytes32[]",
|
|
248
|
+
"name": "_proof",
|
|
249
|
+
"type": "bytes32[]"
|
|
233
250
|
}
|
|
234
251
|
],
|
|
235
|
-
"name": "
|
|
252
|
+
"name": "claimETH",
|
|
236
253
|
"outputs": [],
|
|
237
254
|
"stateMutability": "nonpayable",
|
|
238
255
|
"type": "function"
|
|
239
256
|
},
|
|
257
|
+
{
|
|
258
|
+
"inputs": [
|
|
259
|
+
{
|
|
260
|
+
"internalType": "address",
|
|
261
|
+
"name": "",
|
|
262
|
+
"type": "address"
|
|
263
|
+
}
|
|
264
|
+
],
|
|
265
|
+
"name": "claimedETH",
|
|
266
|
+
"outputs": [
|
|
267
|
+
{
|
|
268
|
+
"internalType": "uint256",
|
|
269
|
+
"name": "",
|
|
270
|
+
"type": "uint256"
|
|
271
|
+
}
|
|
272
|
+
],
|
|
273
|
+
"stateMutability": "view",
|
|
274
|
+
"type": "function"
|
|
275
|
+
},
|
|
240
276
|
{
|
|
241
277
|
"inputs": [
|
|
242
278
|
{
|
|
@@ -361,15 +397,20 @@ exports.OptimismPortal_jsonAbi = [
|
|
|
361
397
|
"name": "_l2Oracle",
|
|
362
398
|
"type": "address"
|
|
363
399
|
},
|
|
400
|
+
{
|
|
401
|
+
"internalType": "address",
|
|
402
|
+
"name": "_guardian",
|
|
403
|
+
"type": "address"
|
|
404
|
+
},
|
|
364
405
|
{
|
|
365
406
|
"internalType": "contract SystemConfig",
|
|
366
407
|
"name": "_systemConfig",
|
|
367
408
|
"type": "address"
|
|
368
409
|
},
|
|
369
410
|
{
|
|
370
|
-
"internalType": "
|
|
371
|
-
"name": "
|
|
372
|
-
"type": "
|
|
411
|
+
"internalType": "bool",
|
|
412
|
+
"name": "_paused",
|
|
413
|
+
"type": "bool"
|
|
373
414
|
}
|
|
374
415
|
],
|
|
375
416
|
"name": "initialize",
|
|
@@ -422,6 +463,19 @@ exports.OptimismPortal_jsonAbi = [
|
|
|
422
463
|
"stateMutability": "view",
|
|
423
464
|
"type": "function"
|
|
424
465
|
},
|
|
466
|
+
{
|
|
467
|
+
"inputs": [],
|
|
468
|
+
"name": "merkleRootETH",
|
|
469
|
+
"outputs": [
|
|
470
|
+
{
|
|
471
|
+
"internalType": "bytes32",
|
|
472
|
+
"name": "",
|
|
473
|
+
"type": "bytes32"
|
|
474
|
+
}
|
|
475
|
+
],
|
|
476
|
+
"stateMutability": "view",
|
|
477
|
+
"type": "function"
|
|
478
|
+
},
|
|
425
479
|
{
|
|
426
480
|
"inputs": [
|
|
427
481
|
{
|
|
@@ -464,13 +518,20 @@ exports.OptimismPortal_jsonAbi = [
|
|
|
464
518
|
"stateMutability": "view",
|
|
465
519
|
"type": "function"
|
|
466
520
|
},
|
|
521
|
+
{
|
|
522
|
+
"inputs": [],
|
|
523
|
+
"name": "pause",
|
|
524
|
+
"outputs": [],
|
|
525
|
+
"stateMutability": "nonpayable",
|
|
526
|
+
"type": "function"
|
|
527
|
+
},
|
|
467
528
|
{
|
|
468
529
|
"inputs": [],
|
|
469
530
|
"name": "paused",
|
|
470
531
|
"outputs": [
|
|
471
532
|
{
|
|
472
533
|
"internalType": "bool",
|
|
473
|
-
"name": "
|
|
534
|
+
"name": "",
|
|
474
535
|
"type": "bool"
|
|
475
536
|
}
|
|
476
537
|
],
|
|
@@ -592,41 +653,26 @@ exports.OptimismPortal_jsonAbi = [
|
|
|
592
653
|
"inputs": [
|
|
593
654
|
{
|
|
594
655
|
"internalType": "address",
|
|
595
|
-
"name": "
|
|
656
|
+
"name": "_recipient",
|
|
596
657
|
"type": "address"
|
|
597
|
-
},
|
|
598
|
-
{
|
|
599
|
-
"internalType": "uint8",
|
|
600
|
-
"name": "_decimals",
|
|
601
|
-
"type": "uint8"
|
|
602
|
-
},
|
|
603
|
-
{
|
|
604
|
-
"internalType": "bytes32",
|
|
605
|
-
"name": "_name",
|
|
606
|
-
"type": "bytes32"
|
|
607
|
-
},
|
|
608
|
-
{
|
|
609
|
-
"internalType": "bytes32",
|
|
610
|
-
"name": "_symbol",
|
|
611
|
-
"type": "bytes32"
|
|
612
658
|
}
|
|
613
659
|
],
|
|
614
|
-
"name": "
|
|
660
|
+
"name": "recoverETH",
|
|
615
661
|
"outputs": [],
|
|
616
662
|
"stateMutability": "nonpayable",
|
|
617
663
|
"type": "function"
|
|
618
664
|
},
|
|
619
665
|
{
|
|
620
|
-
"inputs": [
|
|
621
|
-
"name": "superchainConfig",
|
|
622
|
-
"outputs": [
|
|
666
|
+
"inputs": [
|
|
623
667
|
{
|
|
624
|
-
"internalType": "
|
|
625
|
-
"name": "",
|
|
626
|
-
"type": "
|
|
668
|
+
"internalType": "bytes32",
|
|
669
|
+
"name": "_root",
|
|
670
|
+
"type": "bytes32"
|
|
627
671
|
}
|
|
628
672
|
],
|
|
629
|
-
"
|
|
673
|
+
"name": "setMerkleRootETH",
|
|
674
|
+
"outputs": [],
|
|
675
|
+
"stateMutability": "nonpayable",
|
|
630
676
|
"type": "function"
|
|
631
677
|
},
|
|
632
678
|
{
|
|
@@ -642,6 +688,13 @@ exports.OptimismPortal_jsonAbi = [
|
|
|
642
688
|
"stateMutability": "view",
|
|
643
689
|
"type": "function"
|
|
644
690
|
},
|
|
691
|
+
{
|
|
692
|
+
"inputs": [],
|
|
693
|
+
"name": "unpause",
|
|
694
|
+
"outputs": [],
|
|
695
|
+
"stateMutability": "nonpayable",
|
|
696
|
+
"type": "function"
|
|
697
|
+
},
|
|
645
698
|
{
|
|
646
699
|
"inputs": [],
|
|
647
700
|
"name": "version",
|
|
@@ -718,11 +771,39 @@ class OptimismPortal_json {
|
|
|
718
771
|
return this.contract;
|
|
719
772
|
}
|
|
720
773
|
/**
|
|
721
|
-
*
|
|
774
|
+
* GUARDIAN
|
|
775
|
+
* view
|
|
776
|
+
*/
|
|
777
|
+
async GUARDIAN() {
|
|
778
|
+
return this.contract.read.GUARDIAN();
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* L2_ORACLE
|
|
782
|
+
* view
|
|
783
|
+
*/
|
|
784
|
+
async L2_ORACLE() {
|
|
785
|
+
return this.contract.read.L2_ORACLE();
|
|
786
|
+
}
|
|
787
|
+
/**
|
|
788
|
+
* RECOVERY_TIMESTAMP
|
|
789
|
+
* view
|
|
790
|
+
*/
|
|
791
|
+
async RECOVERY_TIMESTAMP() {
|
|
792
|
+
return this.contract.read.RECOVERY_TIMESTAMP();
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* SYSTEM_CONFIG
|
|
796
|
+
* view
|
|
797
|
+
*/
|
|
798
|
+
async SYSTEM_CONFIG() {
|
|
799
|
+
return this.contract.read.SYSTEM_CONFIG();
|
|
800
|
+
}
|
|
801
|
+
/**
|
|
802
|
+
* claimedETH
|
|
722
803
|
* view
|
|
723
804
|
*/
|
|
724
|
-
async
|
|
725
|
-
return this.contract.read.
|
|
805
|
+
async claimedETH(arg0) {
|
|
806
|
+
return this.contract.read.claimedETH([arg0]);
|
|
726
807
|
}
|
|
727
808
|
/**
|
|
728
809
|
* finalizedWithdrawals
|
|
@@ -759,6 +840,13 @@ class OptimismPortal_json {
|
|
|
759
840
|
async l2Sender() {
|
|
760
841
|
return this.contract.read.l2Sender();
|
|
761
842
|
}
|
|
843
|
+
/**
|
|
844
|
+
* merkleRootETH
|
|
845
|
+
* view
|
|
846
|
+
*/
|
|
847
|
+
async merkleRootETH() {
|
|
848
|
+
return this.contract.read.merkleRootETH();
|
|
849
|
+
}
|
|
762
850
|
/**
|
|
763
851
|
* minimumGasLimit
|
|
764
852
|
* pure
|
|
@@ -787,13 +875,6 @@ class OptimismPortal_json {
|
|
|
787
875
|
async provenWithdrawals(arg0) {
|
|
788
876
|
return this.contract.read.provenWithdrawals([arg0]);
|
|
789
877
|
}
|
|
790
|
-
/**
|
|
791
|
-
* superchainConfig
|
|
792
|
-
* view
|
|
793
|
-
*/
|
|
794
|
-
async superchainConfig() {
|
|
795
|
-
return this.contract.read.superchainConfig();
|
|
796
|
-
}
|
|
797
878
|
/**
|
|
798
879
|
* systemConfig
|
|
799
880
|
* view
|
|
@@ -809,15 +890,15 @@ class OptimismPortal_json {
|
|
|
809
890
|
return this.contract.read.version();
|
|
810
891
|
}
|
|
811
892
|
/**
|
|
812
|
-
*
|
|
893
|
+
* claimETH
|
|
813
894
|
* nonpayable
|
|
814
895
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
815
896
|
*/
|
|
816
|
-
async
|
|
897
|
+
async claimETH(_amount, _proof, options) {
|
|
817
898
|
if (!this.contract.write) {
|
|
818
899
|
throw new Error('Wallet client is required for write operations');
|
|
819
900
|
}
|
|
820
|
-
return this.contract.write.
|
|
901
|
+
return this.contract.write.claimETH([_amount, _proof], options);
|
|
821
902
|
}
|
|
822
903
|
/**
|
|
823
904
|
* depositTransaction
|
|
@@ -857,11 +938,22 @@ class OptimismPortal_json {
|
|
|
857
938
|
* nonpayable
|
|
858
939
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
859
940
|
*/
|
|
860
|
-
async initialize(_l2Oracle, _systemConfig,
|
|
941
|
+
async initialize(_l2Oracle, _guardian, _systemConfig, _paused, options) {
|
|
942
|
+
if (!this.contract.write) {
|
|
943
|
+
throw new Error('Wallet client is required for write operations');
|
|
944
|
+
}
|
|
945
|
+
return this.contract.write.initialize([_l2Oracle, _guardian, _systemConfig, _paused], options);
|
|
946
|
+
}
|
|
947
|
+
/**
|
|
948
|
+
* pause
|
|
949
|
+
* nonpayable
|
|
950
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
951
|
+
*/
|
|
952
|
+
async pause(options) {
|
|
861
953
|
if (!this.contract.write) {
|
|
862
954
|
throw new Error('Wallet client is required for write operations');
|
|
863
955
|
}
|
|
864
|
-
return this.contract.write.
|
|
956
|
+
return this.contract.write.pause(options);
|
|
865
957
|
}
|
|
866
958
|
/**
|
|
867
959
|
* proveWithdrawalTransaction
|
|
@@ -875,15 +967,37 @@ class OptimismPortal_json {
|
|
|
875
967
|
return this.contract.write.proveWithdrawalTransaction([_tx, _l2OutputIndex, _outputRootProof, _withdrawalProof], options);
|
|
876
968
|
}
|
|
877
969
|
/**
|
|
878
|
-
*
|
|
970
|
+
* recoverETH
|
|
971
|
+
* nonpayable
|
|
972
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
973
|
+
*/
|
|
974
|
+
async recoverETH(_recipient, options) {
|
|
975
|
+
if (!this.contract.write) {
|
|
976
|
+
throw new Error('Wallet client is required for write operations');
|
|
977
|
+
}
|
|
978
|
+
return this.contract.write.recoverETH([_recipient], options);
|
|
979
|
+
}
|
|
980
|
+
/**
|
|
981
|
+
* setMerkleRootETH
|
|
982
|
+
* nonpayable
|
|
983
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
984
|
+
*/
|
|
985
|
+
async setMerkleRootETH(_root, options) {
|
|
986
|
+
if (!this.contract.write) {
|
|
987
|
+
throw new Error('Wallet client is required for write operations');
|
|
988
|
+
}
|
|
989
|
+
return this.contract.write.setMerkleRootETH([_root], options);
|
|
990
|
+
}
|
|
991
|
+
/**
|
|
992
|
+
* unpause
|
|
879
993
|
* nonpayable
|
|
880
994
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
881
995
|
*/
|
|
882
|
-
async
|
|
996
|
+
async unpause(options) {
|
|
883
997
|
if (!this.contract.write) {
|
|
884
998
|
throw new Error('Wallet client is required for write operations');
|
|
885
999
|
}
|
|
886
|
-
return this.contract.write.
|
|
1000
|
+
return this.contract.write.unpause(options);
|
|
887
1001
|
}
|
|
888
1002
|
/**
|
|
889
1003
|
* Simulate contract write operations (dry-run without sending transaction)
|
|
@@ -900,12 +1014,12 @@ class OptimismPortal_json {
|
|
|
900
1014
|
}
|
|
901
1015
|
return {
|
|
902
1016
|
/**
|
|
903
|
-
* Simulate
|
|
1017
|
+
* Simulate claimETH
|
|
904
1018
|
* Returns gas estimate and result without sending transaction
|
|
905
1019
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
906
1020
|
*/
|
|
907
|
-
async
|
|
908
|
-
return contract.simulate.
|
|
1021
|
+
async claimETH(_amount, _proof, options) {
|
|
1022
|
+
return contract.simulate.claimETH([_amount, _proof], options);
|
|
909
1023
|
},
|
|
910
1024
|
/**
|
|
911
1025
|
* Simulate depositTransaction
|
|
@@ -936,8 +1050,16 @@ class OptimismPortal_json {
|
|
|
936
1050
|
* Returns gas estimate and result without sending transaction
|
|
937
1051
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
938
1052
|
*/
|
|
939
|
-
async initialize(_l2Oracle, _systemConfig,
|
|
940
|
-
return contract.simulate.initialize([_l2Oracle, _systemConfig,
|
|
1053
|
+
async initialize(_l2Oracle, _guardian, _systemConfig, _paused, options) {
|
|
1054
|
+
return contract.simulate.initialize([_l2Oracle, _guardian, _systemConfig, _paused], options);
|
|
1055
|
+
},
|
|
1056
|
+
/**
|
|
1057
|
+
* Simulate pause
|
|
1058
|
+
* Returns gas estimate and result without sending transaction
|
|
1059
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1060
|
+
*/
|
|
1061
|
+
async pause(options) {
|
|
1062
|
+
return contract.simulate.pause(options);
|
|
941
1063
|
},
|
|
942
1064
|
/**
|
|
943
1065
|
* Simulate proveWithdrawalTransaction
|
|
@@ -948,12 +1070,28 @@ class OptimismPortal_json {
|
|
|
948
1070
|
return contract.simulate.proveWithdrawalTransaction([_tx, _l2OutputIndex, _outputRootProof, _withdrawalProof], options);
|
|
949
1071
|
},
|
|
950
1072
|
/**
|
|
951
|
-
* Simulate
|
|
1073
|
+
* Simulate recoverETH
|
|
1074
|
+
* Returns gas estimate and result without sending transaction
|
|
1075
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1076
|
+
*/
|
|
1077
|
+
async recoverETH(_recipient, options) {
|
|
1078
|
+
return contract.simulate.recoverETH([_recipient], options);
|
|
1079
|
+
},
|
|
1080
|
+
/**
|
|
1081
|
+
* Simulate setMerkleRootETH
|
|
952
1082
|
* Returns gas estimate and result without sending transaction
|
|
953
1083
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
954
1084
|
*/
|
|
955
|
-
async
|
|
956
|
-
return contract.simulate.
|
|
1085
|
+
async setMerkleRootETH(_root, options) {
|
|
1086
|
+
return contract.simulate.setMerkleRootETH([_root], options);
|
|
1087
|
+
},
|
|
1088
|
+
/**
|
|
1089
|
+
* Simulate unpause
|
|
1090
|
+
* Returns gas estimate and result without sending transaction
|
|
1091
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1092
|
+
*/
|
|
1093
|
+
async unpause(options) {
|
|
1094
|
+
return contract.simulate.unpause(options);
|
|
957
1095
|
}
|
|
958
1096
|
};
|
|
959
1097
|
}
|
|
@@ -971,6 +1109,44 @@ class OptimismPortal_json {
|
|
|
971
1109
|
*/
|
|
972
1110
|
get watch() {
|
|
973
1111
|
return {
|
|
1112
|
+
/**
|
|
1113
|
+
* Watch ETHClaimed events
|
|
1114
|
+
* @param callback Function to call when event is emitted
|
|
1115
|
+
* @param filter Optional filter for indexed parameters
|
|
1116
|
+
* @returns Unwatch function to stop listening
|
|
1117
|
+
*/
|
|
1118
|
+
ETHClaimed: (callback, filter) => {
|
|
1119
|
+
return this.publicClient.watchContractEvent({
|
|
1120
|
+
address: this.contractAddress,
|
|
1121
|
+
abi: exports.OptimismPortal_jsonAbi,
|
|
1122
|
+
eventName: 'ETHClaimed',
|
|
1123
|
+
args: filter,
|
|
1124
|
+
onLogs: (logs) => {
|
|
1125
|
+
logs.forEach((log) => {
|
|
1126
|
+
callback(log.args);
|
|
1127
|
+
});
|
|
1128
|
+
},
|
|
1129
|
+
});
|
|
1130
|
+
},
|
|
1131
|
+
/**
|
|
1132
|
+
* Watch ETHRecovered events
|
|
1133
|
+
* @param callback Function to call when event is emitted
|
|
1134
|
+
* @param filter Optional filter for indexed parameters
|
|
1135
|
+
* @returns Unwatch function to stop listening
|
|
1136
|
+
*/
|
|
1137
|
+
ETHRecovered: (callback, filter) => {
|
|
1138
|
+
return this.publicClient.watchContractEvent({
|
|
1139
|
+
address: this.contractAddress,
|
|
1140
|
+
abi: exports.OptimismPortal_jsonAbi,
|
|
1141
|
+
eventName: 'ETHRecovered',
|
|
1142
|
+
args: filter,
|
|
1143
|
+
onLogs: (logs) => {
|
|
1144
|
+
logs.forEach((log) => {
|
|
1145
|
+
callback(log.args);
|
|
1146
|
+
});
|
|
1147
|
+
},
|
|
1148
|
+
});
|
|
1149
|
+
},
|
|
974
1150
|
/**
|
|
975
1151
|
* Watch Initialized events
|
|
976
1152
|
* @param callback Function to call when event is emitted
|
|
@@ -989,6 +1165,43 @@ class OptimismPortal_json {
|
|
|
989
1165
|
},
|
|
990
1166
|
});
|
|
991
1167
|
},
|
|
1168
|
+
/**
|
|
1169
|
+
* Watch MerkleRootETHSet events
|
|
1170
|
+
* @param callback Function to call when event is emitted
|
|
1171
|
+
* @param filter Optional filter for indexed parameters
|
|
1172
|
+
* @returns Unwatch function to stop listening
|
|
1173
|
+
*/
|
|
1174
|
+
MerkleRootETHSet: (callback, filter) => {
|
|
1175
|
+
return this.publicClient.watchContractEvent({
|
|
1176
|
+
address: this.contractAddress,
|
|
1177
|
+
abi: exports.OptimismPortal_jsonAbi,
|
|
1178
|
+
eventName: 'MerkleRootETHSet',
|
|
1179
|
+
args: filter,
|
|
1180
|
+
onLogs: (logs) => {
|
|
1181
|
+
logs.forEach((log) => {
|
|
1182
|
+
callback(log.args);
|
|
1183
|
+
});
|
|
1184
|
+
},
|
|
1185
|
+
});
|
|
1186
|
+
},
|
|
1187
|
+
/**
|
|
1188
|
+
* Watch Paused events
|
|
1189
|
+
* @param callback Function to call when event is emitted
|
|
1190
|
+
* @param filter Optional filter for indexed parameters
|
|
1191
|
+
* @returns Unwatch function to stop listening
|
|
1192
|
+
*/
|
|
1193
|
+
Paused: (callback) => {
|
|
1194
|
+
return this.publicClient.watchContractEvent({
|
|
1195
|
+
address: this.contractAddress,
|
|
1196
|
+
abi: exports.OptimismPortal_jsonAbi,
|
|
1197
|
+
eventName: 'Paused',
|
|
1198
|
+
onLogs: (logs) => {
|
|
1199
|
+
logs.forEach((log) => {
|
|
1200
|
+
callback(log.args);
|
|
1201
|
+
});
|
|
1202
|
+
},
|
|
1203
|
+
});
|
|
1204
|
+
},
|
|
992
1205
|
/**
|
|
993
1206
|
* Watch TransactionDeposited events
|
|
994
1207
|
* @param callback Function to call when event is emitted
|
|
@@ -1008,6 +1221,24 @@ class OptimismPortal_json {
|
|
|
1008
1221
|
},
|
|
1009
1222
|
});
|
|
1010
1223
|
},
|
|
1224
|
+
/**
|
|
1225
|
+
* Watch Unpaused events
|
|
1226
|
+
* @param callback Function to call when event is emitted
|
|
1227
|
+
* @param filter Optional filter for indexed parameters
|
|
1228
|
+
* @returns Unwatch function to stop listening
|
|
1229
|
+
*/
|
|
1230
|
+
Unpaused: (callback) => {
|
|
1231
|
+
return this.publicClient.watchContractEvent({
|
|
1232
|
+
address: this.contractAddress,
|
|
1233
|
+
abi: exports.OptimismPortal_jsonAbi,
|
|
1234
|
+
eventName: 'Unpaused',
|
|
1235
|
+
onLogs: (logs) => {
|
|
1236
|
+
logs.forEach((log) => {
|
|
1237
|
+
callback(log.args);
|
|
1238
|
+
});
|
|
1239
|
+
},
|
|
1240
|
+
});
|
|
1241
|
+
},
|
|
1011
1242
|
/**
|
|
1012
1243
|
* Watch WithdrawalFinalized events
|
|
1013
1244
|
* @param callback Function to call when event is emitted
|