@gitmyabi/optimismportal 1.0.6 → 1.0.9
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 → OptimismPortal2_json.d.ts} +541 -147
- package/contracts/{OptimismPortal_json.js → OptimismPortal2_json.js} +667 -171
- package/contracts/{OptimismPortal_json.ts → OptimismPortal2_json.ts} +714 -183
- package/contracts/index.d.ts +2 -2
- package/contracts/index.js +4 -4
- package/contracts/index.ts +2 -2
- package/package.json +3 -3
|
@@ -24,69 +24,150 @@ export type Types_OutputRootProof = {
|
|
|
24
24
|
latestBlockhash: `0x${string}`;
|
|
25
25
|
};
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* OptimismPortal2_json ABI
|
|
28
28
|
*
|
|
29
29
|
* This ABI is typed using viem's type system for full type safety.
|
|
30
30
|
*/
|
|
31
|
-
export const
|
|
31
|
+
export const OptimismPortal2_jsonAbi = [
|
|
32
32
|
{
|
|
33
|
-
"inputs": [
|
|
33
|
+
"inputs": [
|
|
34
|
+
{
|
|
35
|
+
"internalType": "uint256",
|
|
36
|
+
"name": "_proofMaturityDelaySeconds",
|
|
37
|
+
"type": "uint256"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
34
40
|
"stateMutability": "nonpayable",
|
|
35
41
|
"type": "constructor"
|
|
36
42
|
},
|
|
37
43
|
{
|
|
38
44
|
"inputs": [],
|
|
39
|
-
"name": "
|
|
45
|
+
"name": "ContentLengthMismatch",
|
|
40
46
|
"type": "error"
|
|
41
47
|
},
|
|
42
48
|
{
|
|
43
49
|
"inputs": [],
|
|
44
|
-
"name": "
|
|
50
|
+
"name": "EmptyItem",
|
|
45
51
|
"type": "error"
|
|
46
52
|
},
|
|
47
53
|
{
|
|
48
54
|
"inputs": [],
|
|
49
|
-
"name": "
|
|
55
|
+
"name": "InvalidDataRemainder",
|
|
50
56
|
"type": "error"
|
|
51
57
|
},
|
|
52
58
|
{
|
|
53
59
|
"inputs": [],
|
|
54
|
-
"name": "
|
|
60
|
+
"name": "InvalidHeader",
|
|
55
61
|
"type": "error"
|
|
56
62
|
},
|
|
57
63
|
{
|
|
58
64
|
"inputs": [],
|
|
59
|
-
"name": "
|
|
65
|
+
"name": "OptimismPortal_AlreadyFinalized",
|
|
60
66
|
"type": "error"
|
|
61
67
|
},
|
|
62
68
|
{
|
|
63
69
|
"inputs": [],
|
|
64
|
-
"name": "
|
|
70
|
+
"name": "OptimismPortal_BadTarget",
|
|
65
71
|
"type": "error"
|
|
66
72
|
},
|
|
67
73
|
{
|
|
68
74
|
"inputs": [],
|
|
69
|
-
"name": "
|
|
75
|
+
"name": "OptimismPortal_CallPaused",
|
|
76
|
+
"type": "error"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"inputs": [],
|
|
80
|
+
"name": "OptimismPortal_CalldataTooLarge",
|
|
81
|
+
"type": "error"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"inputs": [],
|
|
85
|
+
"name": "OptimismPortal_GasEstimation",
|
|
86
|
+
"type": "error"
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"inputs": [],
|
|
90
|
+
"name": "OptimismPortal_GasLimitTooLow",
|
|
91
|
+
"type": "error"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"inputs": [],
|
|
95
|
+
"name": "OptimismPortal_ImproperDisputeGame",
|
|
96
|
+
"type": "error"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"inputs": [],
|
|
100
|
+
"name": "OptimismPortal_InvalidDisputeGame",
|
|
101
|
+
"type": "error"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"inputs": [],
|
|
105
|
+
"name": "OptimismPortal_InvalidInteropState",
|
|
106
|
+
"type": "error"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"inputs": [],
|
|
110
|
+
"name": "OptimismPortal_InvalidLockboxState",
|
|
111
|
+
"type": "error"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"inputs": [],
|
|
115
|
+
"name": "OptimismPortal_InvalidMerkleProof",
|
|
70
116
|
"type": "error"
|
|
71
117
|
},
|
|
72
118
|
{
|
|
73
119
|
"inputs": [],
|
|
74
|
-
"name": "
|
|
120
|
+
"name": "OptimismPortal_InvalidOutputRootProof",
|
|
75
121
|
"type": "error"
|
|
76
122
|
},
|
|
77
123
|
{
|
|
78
124
|
"inputs": [],
|
|
79
|
-
"name": "
|
|
125
|
+
"name": "OptimismPortal_InvalidProofTimestamp",
|
|
80
126
|
"type": "error"
|
|
81
127
|
},
|
|
82
128
|
{
|
|
83
129
|
"inputs": [],
|
|
84
|
-
"name": "
|
|
130
|
+
"name": "OptimismPortal_InvalidRootClaim",
|
|
85
131
|
"type": "error"
|
|
86
132
|
},
|
|
87
133
|
{
|
|
88
134
|
"inputs": [],
|
|
89
|
-
"name": "
|
|
135
|
+
"name": "OptimismPortal_LockboxNotAuthorizedForPortal",
|
|
136
|
+
"type": "error"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"inputs": [],
|
|
140
|
+
"name": "OptimismPortal_MigratingToSameRegistry",
|
|
141
|
+
"type": "error"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"inputs": [],
|
|
145
|
+
"name": "OptimismPortal_NoReentrancy",
|
|
146
|
+
"type": "error"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"inputs": [],
|
|
150
|
+
"name": "OptimismPortal_NotAllowedOnCGTMode",
|
|
151
|
+
"type": "error"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"inputs": [],
|
|
155
|
+
"name": "OptimismPortal_NotUsingInterop",
|
|
156
|
+
"type": "error"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"inputs": [],
|
|
160
|
+
"name": "OptimismPortal_ProofNotOldEnough",
|
|
161
|
+
"type": "error"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"inputs": [],
|
|
165
|
+
"name": "OptimismPortal_Unproven",
|
|
166
|
+
"type": "error"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"inputs": [],
|
|
170
|
+
"name": "OptimismPortal_ZeroAddress",
|
|
90
171
|
"type": "error"
|
|
91
172
|
},
|
|
92
173
|
{
|
|
@@ -96,17 +177,37 @@ export const OptimismPortal_jsonAbi = [
|
|
|
96
177
|
},
|
|
97
178
|
{
|
|
98
179
|
"inputs": [],
|
|
99
|
-
"name": "
|
|
180
|
+
"name": "ProxyAdminOwnedBase_NotProxyAdmin",
|
|
181
|
+
"type": "error"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"inputs": [],
|
|
185
|
+
"name": "ProxyAdminOwnedBase_NotProxyAdminOrProxyAdminOwner",
|
|
186
|
+
"type": "error"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"inputs": [],
|
|
190
|
+
"name": "ProxyAdminOwnedBase_NotProxyAdminOwner",
|
|
100
191
|
"type": "error"
|
|
101
192
|
},
|
|
102
193
|
{
|
|
103
194
|
"inputs": [],
|
|
104
|
-
"name": "
|
|
195
|
+
"name": "ProxyAdminOwnedBase_NotResolvedDelegateProxy",
|
|
105
196
|
"type": "error"
|
|
106
197
|
},
|
|
107
198
|
{
|
|
108
199
|
"inputs": [],
|
|
109
|
-
"name": "
|
|
200
|
+
"name": "ProxyAdminOwnedBase_NotSharedProxyAdminOwner",
|
|
201
|
+
"type": "error"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"inputs": [],
|
|
205
|
+
"name": "ProxyAdminOwnedBase_ProxyAdminNotFound",
|
|
206
|
+
"type": "error"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"inputs": [],
|
|
210
|
+
"name": "ReinitializableBase_ZeroInitVersion",
|
|
110
211
|
"type": "error"
|
|
111
212
|
},
|
|
112
213
|
{
|
|
@@ -119,6 +220,25 @@ export const OptimismPortal_jsonAbi = [
|
|
|
119
220
|
"name": "UnexpectedString",
|
|
120
221
|
"type": "error"
|
|
121
222
|
},
|
|
223
|
+
{
|
|
224
|
+
"anonymous": false,
|
|
225
|
+
"inputs": [
|
|
226
|
+
{
|
|
227
|
+
"indexed": true,
|
|
228
|
+
"internalType": "address",
|
|
229
|
+
"name": "lockbox",
|
|
230
|
+
"type": "address"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"indexed": false,
|
|
234
|
+
"internalType": "uint256",
|
|
235
|
+
"name": "balance",
|
|
236
|
+
"type": "uint256"
|
|
237
|
+
}
|
|
238
|
+
],
|
|
239
|
+
"name": "ETHMigrated",
|
|
240
|
+
"type": "event"
|
|
241
|
+
},
|
|
122
242
|
{
|
|
123
243
|
"anonymous": false,
|
|
124
244
|
"inputs": [
|
|
@@ -132,6 +252,37 @@ export const OptimismPortal_jsonAbi = [
|
|
|
132
252
|
"name": "Initialized",
|
|
133
253
|
"type": "event"
|
|
134
254
|
},
|
|
255
|
+
{
|
|
256
|
+
"anonymous": false,
|
|
257
|
+
"inputs": [
|
|
258
|
+
{
|
|
259
|
+
"indexed": false,
|
|
260
|
+
"internalType": "contract IETHLockbox",
|
|
261
|
+
"name": "oldLockbox",
|
|
262
|
+
"type": "address"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"indexed": false,
|
|
266
|
+
"internalType": "contract IETHLockbox",
|
|
267
|
+
"name": "newLockbox",
|
|
268
|
+
"type": "address"
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"indexed": false,
|
|
272
|
+
"internalType": "contract IAnchorStateRegistry",
|
|
273
|
+
"name": "oldAnchorStateRegistry",
|
|
274
|
+
"type": "address"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"indexed": false,
|
|
278
|
+
"internalType": "contract IAnchorStateRegistry",
|
|
279
|
+
"name": "newAnchorStateRegistry",
|
|
280
|
+
"type": "address"
|
|
281
|
+
}
|
|
282
|
+
],
|
|
283
|
+
"name": "PortalMigrated",
|
|
284
|
+
"type": "event"
|
|
285
|
+
},
|
|
135
286
|
{
|
|
136
287
|
"anonymous": false,
|
|
137
288
|
"inputs": [
|
|
@@ -207,14 +358,33 @@ export const OptimismPortal_jsonAbi = [
|
|
|
207
358
|
"name": "WithdrawalProven",
|
|
208
359
|
"type": "event"
|
|
209
360
|
},
|
|
361
|
+
{
|
|
362
|
+
"anonymous": false,
|
|
363
|
+
"inputs": [
|
|
364
|
+
{
|
|
365
|
+
"indexed": true,
|
|
366
|
+
"internalType": "bytes32",
|
|
367
|
+
"name": "withdrawalHash",
|
|
368
|
+
"type": "bytes32"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"indexed": true,
|
|
372
|
+
"internalType": "address",
|
|
373
|
+
"name": "proofSubmitter",
|
|
374
|
+
"type": "address"
|
|
375
|
+
}
|
|
376
|
+
],
|
|
377
|
+
"name": "WithdrawalProvenExtension1",
|
|
378
|
+
"type": "event"
|
|
379
|
+
},
|
|
210
380
|
{
|
|
211
381
|
"inputs": [],
|
|
212
|
-
"name": "
|
|
382
|
+
"name": "anchorStateRegistry",
|
|
213
383
|
"outputs": [
|
|
214
384
|
{
|
|
215
|
-
"internalType": "
|
|
385
|
+
"internalType": "contract IAnchorStateRegistry",
|
|
216
386
|
"name": "",
|
|
217
|
-
"type": "
|
|
387
|
+
"type": "address"
|
|
218
388
|
}
|
|
219
389
|
],
|
|
220
390
|
"stateMutability": "view",
|
|
@@ -223,39 +393,19 @@ export const OptimismPortal_jsonAbi = [
|
|
|
223
393
|
{
|
|
224
394
|
"inputs": [
|
|
225
395
|
{
|
|
226
|
-
"internalType": "
|
|
227
|
-
"name": "
|
|
228
|
-
"type": "
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
"internalType": "uint256",
|
|
232
|
-
"name": "_mint",
|
|
233
|
-
"type": "uint256"
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
"internalType": "uint256",
|
|
237
|
-
"name": "_value",
|
|
238
|
-
"type": "uint256"
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
"internalType": "uint64",
|
|
242
|
-
"name": "_gasLimit",
|
|
243
|
-
"type": "uint64"
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
"internalType": "bool",
|
|
247
|
-
"name": "_isCreation",
|
|
248
|
-
"type": "bool"
|
|
396
|
+
"internalType": "bytes32",
|
|
397
|
+
"name": "_withdrawalHash",
|
|
398
|
+
"type": "bytes32"
|
|
249
399
|
},
|
|
250
400
|
{
|
|
251
|
-
"internalType": "
|
|
252
|
-
"name": "
|
|
253
|
-
"type": "
|
|
401
|
+
"internalType": "address",
|
|
402
|
+
"name": "_proofSubmitter",
|
|
403
|
+
"type": "address"
|
|
254
404
|
}
|
|
255
405
|
],
|
|
256
|
-
"name": "
|
|
406
|
+
"name": "checkWithdrawal",
|
|
257
407
|
"outputs": [],
|
|
258
|
-
"stateMutability": "
|
|
408
|
+
"stateMutability": "view",
|
|
259
409
|
"type": "function"
|
|
260
410
|
},
|
|
261
411
|
{
|
|
@@ -291,6 +441,51 @@ export const OptimismPortal_jsonAbi = [
|
|
|
291
441
|
"stateMutability": "payable",
|
|
292
442
|
"type": "function"
|
|
293
443
|
},
|
|
444
|
+
{
|
|
445
|
+
"inputs": [
|
|
446
|
+
{
|
|
447
|
+
"internalType": "contract IDisputeGame",
|
|
448
|
+
"name": "_disputeGame",
|
|
449
|
+
"type": "address"
|
|
450
|
+
}
|
|
451
|
+
],
|
|
452
|
+
"name": "disputeGameBlacklist",
|
|
453
|
+
"outputs": [
|
|
454
|
+
{
|
|
455
|
+
"internalType": "bool",
|
|
456
|
+
"name": "",
|
|
457
|
+
"type": "bool"
|
|
458
|
+
}
|
|
459
|
+
],
|
|
460
|
+
"stateMutability": "view",
|
|
461
|
+
"type": "function"
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
"inputs": [],
|
|
465
|
+
"name": "disputeGameFactory",
|
|
466
|
+
"outputs": [
|
|
467
|
+
{
|
|
468
|
+
"internalType": "contract IDisputeGameFactory",
|
|
469
|
+
"name": "",
|
|
470
|
+
"type": "address"
|
|
471
|
+
}
|
|
472
|
+
],
|
|
473
|
+
"stateMutability": "view",
|
|
474
|
+
"type": "function"
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
"inputs": [],
|
|
478
|
+
"name": "disputeGameFinalityDelaySeconds",
|
|
479
|
+
"outputs": [
|
|
480
|
+
{
|
|
481
|
+
"internalType": "uint256",
|
|
482
|
+
"name": "",
|
|
483
|
+
"type": "uint256"
|
|
484
|
+
}
|
|
485
|
+
],
|
|
486
|
+
"stateMutability": "view",
|
|
487
|
+
"type": "function"
|
|
488
|
+
},
|
|
294
489
|
{
|
|
295
490
|
"inputs": [],
|
|
296
491
|
"name": "donateETH",
|
|
@@ -298,6 +493,19 @@ export const OptimismPortal_jsonAbi = [
|
|
|
298
493
|
"stateMutability": "payable",
|
|
299
494
|
"type": "function"
|
|
300
495
|
},
|
|
496
|
+
{
|
|
497
|
+
"inputs": [],
|
|
498
|
+
"name": "ethLockbox",
|
|
499
|
+
"outputs": [
|
|
500
|
+
{
|
|
501
|
+
"internalType": "contract IETHLockbox",
|
|
502
|
+
"name": "",
|
|
503
|
+
"type": "address"
|
|
504
|
+
}
|
|
505
|
+
],
|
|
506
|
+
"stateMutability": "view",
|
|
507
|
+
"type": "function"
|
|
508
|
+
},
|
|
301
509
|
{
|
|
302
510
|
"inputs": [
|
|
303
511
|
{
|
|
@@ -343,6 +551,56 @@ export const OptimismPortal_jsonAbi = [
|
|
|
343
551
|
"stateMutability": "nonpayable",
|
|
344
552
|
"type": "function"
|
|
345
553
|
},
|
|
554
|
+
{
|
|
555
|
+
"inputs": [
|
|
556
|
+
{
|
|
557
|
+
"components": [
|
|
558
|
+
{
|
|
559
|
+
"internalType": "uint256",
|
|
560
|
+
"name": "nonce",
|
|
561
|
+
"type": "uint256"
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
"internalType": "address",
|
|
565
|
+
"name": "sender",
|
|
566
|
+
"type": "address"
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
"internalType": "address",
|
|
570
|
+
"name": "target",
|
|
571
|
+
"type": "address"
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
"internalType": "uint256",
|
|
575
|
+
"name": "value",
|
|
576
|
+
"type": "uint256"
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"internalType": "uint256",
|
|
580
|
+
"name": "gasLimit",
|
|
581
|
+
"type": "uint256"
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
"internalType": "bytes",
|
|
585
|
+
"name": "data",
|
|
586
|
+
"type": "bytes"
|
|
587
|
+
}
|
|
588
|
+
],
|
|
589
|
+
"internalType": "struct Types.WithdrawalTransaction",
|
|
590
|
+
"name": "_tx",
|
|
591
|
+
"type": "tuple"
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
"internalType": "address",
|
|
595
|
+
"name": "_proofSubmitter",
|
|
596
|
+
"type": "address"
|
|
597
|
+
}
|
|
598
|
+
],
|
|
599
|
+
"name": "finalizeWithdrawalTransactionExternalProof",
|
|
600
|
+
"outputs": [],
|
|
601
|
+
"stateMutability": "nonpayable",
|
|
602
|
+
"type": "function"
|
|
603
|
+
},
|
|
346
604
|
{
|
|
347
605
|
"inputs": [
|
|
348
606
|
{
|
|
@@ -375,21 +633,34 @@ export const OptimismPortal_jsonAbi = [
|
|
|
375
633
|
"stateMutability": "view",
|
|
376
634
|
"type": "function"
|
|
377
635
|
},
|
|
636
|
+
{
|
|
637
|
+
"inputs": [],
|
|
638
|
+
"name": "initVersion",
|
|
639
|
+
"outputs": [
|
|
640
|
+
{
|
|
641
|
+
"internalType": "uint8",
|
|
642
|
+
"name": "",
|
|
643
|
+
"type": "uint8"
|
|
644
|
+
}
|
|
645
|
+
],
|
|
646
|
+
"stateMutability": "view",
|
|
647
|
+
"type": "function"
|
|
648
|
+
},
|
|
378
649
|
{
|
|
379
650
|
"inputs": [
|
|
380
651
|
{
|
|
381
|
-
"internalType": "contract
|
|
382
|
-
"name": "
|
|
652
|
+
"internalType": "contract ISystemConfig",
|
|
653
|
+
"name": "_systemConfig",
|
|
383
654
|
"type": "address"
|
|
384
655
|
},
|
|
385
656
|
{
|
|
386
|
-
"internalType": "contract
|
|
387
|
-
"name": "
|
|
657
|
+
"internalType": "contract IAnchorStateRegistry",
|
|
658
|
+
"name": "_anchorStateRegistry",
|
|
388
659
|
"type": "address"
|
|
389
660
|
},
|
|
390
661
|
{
|
|
391
|
-
"internalType": "contract
|
|
392
|
-
"name": "
|
|
662
|
+
"internalType": "contract IETHLockbox",
|
|
663
|
+
"name": "_ethLockbox",
|
|
393
664
|
"type": "address"
|
|
394
665
|
}
|
|
395
666
|
],
|
|
@@ -399,19 +670,13 @@ export const OptimismPortal_jsonAbi = [
|
|
|
399
670
|
"type": "function"
|
|
400
671
|
},
|
|
401
672
|
{
|
|
402
|
-
"inputs": [
|
|
403
|
-
|
|
404
|
-
"internalType": "uint256",
|
|
405
|
-
"name": "_l2OutputIndex",
|
|
406
|
-
"type": "uint256"
|
|
407
|
-
}
|
|
408
|
-
],
|
|
409
|
-
"name": "isOutputFinalized",
|
|
673
|
+
"inputs": [],
|
|
674
|
+
"name": "l2Sender",
|
|
410
675
|
"outputs": [
|
|
411
676
|
{
|
|
412
|
-
"internalType": "
|
|
677
|
+
"internalType": "address",
|
|
413
678
|
"name": "",
|
|
414
|
-
"type": "
|
|
679
|
+
"type": "address"
|
|
415
680
|
}
|
|
416
681
|
],
|
|
417
682
|
"stateMutability": "view",
|
|
@@ -419,28 +684,27 @@ export const OptimismPortal_jsonAbi = [
|
|
|
419
684
|
},
|
|
420
685
|
{
|
|
421
686
|
"inputs": [],
|
|
422
|
-
"name": "
|
|
423
|
-
"outputs": [
|
|
424
|
-
|
|
425
|
-
"internalType": "contract L2OutputOracle",
|
|
426
|
-
"name": "",
|
|
427
|
-
"type": "address"
|
|
428
|
-
}
|
|
429
|
-
],
|
|
430
|
-
"stateMutability": "view",
|
|
687
|
+
"name": "migrateLiquidity",
|
|
688
|
+
"outputs": [],
|
|
689
|
+
"stateMutability": "nonpayable",
|
|
431
690
|
"type": "function"
|
|
432
691
|
},
|
|
433
692
|
{
|
|
434
|
-
"inputs": [
|
|
435
|
-
"name": "l2Sender",
|
|
436
|
-
"outputs": [
|
|
693
|
+
"inputs": [
|
|
437
694
|
{
|
|
438
|
-
"internalType": "
|
|
439
|
-
"name": "",
|
|
695
|
+
"internalType": "contract IETHLockbox",
|
|
696
|
+
"name": "_newLockbox",
|
|
697
|
+
"type": "address"
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
"internalType": "contract IAnchorStateRegistry",
|
|
701
|
+
"name": "_newAnchorStateRegistry",
|
|
440
702
|
"type": "address"
|
|
441
703
|
}
|
|
442
704
|
],
|
|
443
|
-
"
|
|
705
|
+
"name": "migrateToSharedDisputeGame",
|
|
706
|
+
"outputs": [],
|
|
707
|
+
"stateMutability": "nonpayable",
|
|
444
708
|
"type": "function"
|
|
445
709
|
},
|
|
446
710
|
{
|
|
@@ -462,6 +726,25 @@ export const OptimismPortal_jsonAbi = [
|
|
|
462
726
|
"stateMutability": "pure",
|
|
463
727
|
"type": "function"
|
|
464
728
|
},
|
|
729
|
+
{
|
|
730
|
+
"inputs": [
|
|
731
|
+
{
|
|
732
|
+
"internalType": "bytes32",
|
|
733
|
+
"name": "_withdrawalHash",
|
|
734
|
+
"type": "bytes32"
|
|
735
|
+
}
|
|
736
|
+
],
|
|
737
|
+
"name": "numProofSubmitters",
|
|
738
|
+
"outputs": [
|
|
739
|
+
{
|
|
740
|
+
"internalType": "uint256",
|
|
741
|
+
"name": "",
|
|
742
|
+
"type": "uint256"
|
|
743
|
+
}
|
|
744
|
+
],
|
|
745
|
+
"stateMutability": "view",
|
|
746
|
+
"type": "function"
|
|
747
|
+
},
|
|
465
748
|
{
|
|
466
749
|
"inputs": [],
|
|
467
750
|
"name": "params",
|
|
@@ -491,13 +774,50 @@ export const OptimismPortal_jsonAbi = [
|
|
|
491
774
|
"outputs": [
|
|
492
775
|
{
|
|
493
776
|
"internalType": "bool",
|
|
494
|
-
"name": "
|
|
777
|
+
"name": "",
|
|
495
778
|
"type": "bool"
|
|
496
779
|
}
|
|
497
780
|
],
|
|
498
781
|
"stateMutability": "view",
|
|
499
782
|
"type": "function"
|
|
500
783
|
},
|
|
784
|
+
{
|
|
785
|
+
"inputs": [],
|
|
786
|
+
"name": "proofMaturityDelaySeconds",
|
|
787
|
+
"outputs": [
|
|
788
|
+
{
|
|
789
|
+
"internalType": "uint256",
|
|
790
|
+
"name": "",
|
|
791
|
+
"type": "uint256"
|
|
792
|
+
}
|
|
793
|
+
],
|
|
794
|
+
"stateMutability": "view",
|
|
795
|
+
"type": "function"
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
"inputs": [
|
|
799
|
+
{
|
|
800
|
+
"internalType": "bytes32",
|
|
801
|
+
"name": "",
|
|
802
|
+
"type": "bytes32"
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
"internalType": "uint256",
|
|
806
|
+
"name": "",
|
|
807
|
+
"type": "uint256"
|
|
808
|
+
}
|
|
809
|
+
],
|
|
810
|
+
"name": "proofSubmitters",
|
|
811
|
+
"outputs": [
|
|
812
|
+
{
|
|
813
|
+
"internalType": "address",
|
|
814
|
+
"name": "",
|
|
815
|
+
"type": "address"
|
|
816
|
+
}
|
|
817
|
+
],
|
|
818
|
+
"stateMutability": "view",
|
|
819
|
+
"type": "function"
|
|
820
|
+
},
|
|
501
821
|
{
|
|
502
822
|
"inputs": [
|
|
503
823
|
{
|
|
@@ -539,7 +859,7 @@ export const OptimismPortal_jsonAbi = [
|
|
|
539
859
|
},
|
|
540
860
|
{
|
|
541
861
|
"internalType": "uint256",
|
|
542
|
-
"name": "
|
|
862
|
+
"name": "_disputeGameIndex",
|
|
543
863
|
"type": "uint256"
|
|
544
864
|
},
|
|
545
865
|
{
|
|
@@ -586,55 +906,79 @@ export const OptimismPortal_jsonAbi = [
|
|
|
586
906
|
"internalType": "bytes32",
|
|
587
907
|
"name": "",
|
|
588
908
|
"type": "bytes32"
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
"internalType": "address",
|
|
912
|
+
"name": "",
|
|
913
|
+
"type": "address"
|
|
589
914
|
}
|
|
590
915
|
],
|
|
591
916
|
"name": "provenWithdrawals",
|
|
592
917
|
"outputs": [
|
|
593
918
|
{
|
|
594
|
-
"internalType": "
|
|
595
|
-
"name": "
|
|
596
|
-
"type": "
|
|
919
|
+
"internalType": "contract IDisputeGame",
|
|
920
|
+
"name": "disputeGameProxy",
|
|
921
|
+
"type": "address"
|
|
597
922
|
},
|
|
598
923
|
{
|
|
599
|
-
"internalType": "
|
|
924
|
+
"internalType": "uint64",
|
|
600
925
|
"name": "timestamp",
|
|
601
|
-
"type": "
|
|
602
|
-
}
|
|
926
|
+
"type": "uint64"
|
|
927
|
+
}
|
|
928
|
+
],
|
|
929
|
+
"stateMutability": "view",
|
|
930
|
+
"type": "function"
|
|
931
|
+
},
|
|
932
|
+
{
|
|
933
|
+
"inputs": [],
|
|
934
|
+
"name": "proxyAdmin",
|
|
935
|
+
"outputs": [
|
|
603
936
|
{
|
|
604
|
-
"internalType": "
|
|
605
|
-
"name": "
|
|
606
|
-
"type": "
|
|
937
|
+
"internalType": "contract IProxyAdmin",
|
|
938
|
+
"name": "",
|
|
939
|
+
"type": "address"
|
|
607
940
|
}
|
|
608
941
|
],
|
|
609
942
|
"stateMutability": "view",
|
|
610
943
|
"type": "function"
|
|
611
944
|
},
|
|
612
945
|
{
|
|
613
|
-
"inputs": [
|
|
946
|
+
"inputs": [],
|
|
947
|
+
"name": "proxyAdminOwner",
|
|
948
|
+
"outputs": [
|
|
614
949
|
{
|
|
615
950
|
"internalType": "address",
|
|
616
|
-
"name": "
|
|
951
|
+
"name": "",
|
|
617
952
|
"type": "address"
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
953
|
+
}
|
|
954
|
+
],
|
|
955
|
+
"stateMutability": "view",
|
|
956
|
+
"type": "function"
|
|
957
|
+
},
|
|
958
|
+
{
|
|
959
|
+
"inputs": [],
|
|
960
|
+
"name": "respectedGameType",
|
|
961
|
+
"outputs": [
|
|
624
962
|
{
|
|
625
|
-
"internalType": "
|
|
626
|
-
"name": "
|
|
627
|
-
"type": "
|
|
628
|
-
}
|
|
963
|
+
"internalType": "GameType",
|
|
964
|
+
"name": "",
|
|
965
|
+
"type": "uint32"
|
|
966
|
+
}
|
|
967
|
+
],
|
|
968
|
+
"stateMutability": "view",
|
|
969
|
+
"type": "function"
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
"inputs": [],
|
|
973
|
+
"name": "respectedGameTypeUpdatedAt",
|
|
974
|
+
"outputs": [
|
|
629
975
|
{
|
|
630
|
-
"internalType": "
|
|
631
|
-
"name": "
|
|
632
|
-
"type": "
|
|
976
|
+
"internalType": "uint64",
|
|
977
|
+
"name": "",
|
|
978
|
+
"type": "uint64"
|
|
633
979
|
}
|
|
634
980
|
],
|
|
635
|
-
"
|
|
636
|
-
"outputs": [],
|
|
637
|
-
"stateMutability": "nonpayable",
|
|
981
|
+
"stateMutability": "view",
|
|
638
982
|
"type": "function"
|
|
639
983
|
},
|
|
640
984
|
{
|
|
@@ -642,7 +986,7 @@ export const OptimismPortal_jsonAbi = [
|
|
|
642
986
|
"name": "superchainConfig",
|
|
643
987
|
"outputs": [
|
|
644
988
|
{
|
|
645
|
-
"internalType": "contract
|
|
989
|
+
"internalType": "contract ISuperchainConfig",
|
|
646
990
|
"name": "",
|
|
647
991
|
"type": "address"
|
|
648
992
|
}
|
|
@@ -655,7 +999,7 @@ export const OptimismPortal_jsonAbi = [
|
|
|
655
999
|
"name": "systemConfig",
|
|
656
1000
|
"outputs": [
|
|
657
1001
|
{
|
|
658
|
-
"internalType": "contract
|
|
1002
|
+
"internalType": "contract ISystemConfig",
|
|
659
1003
|
"name": "",
|
|
660
1004
|
"type": "address"
|
|
661
1005
|
}
|
|
@@ -683,19 +1027,19 @@ export const OptimismPortal_jsonAbi = [
|
|
|
683
1027
|
] as const satisfies Abi;
|
|
684
1028
|
|
|
685
1029
|
/**
|
|
686
|
-
* Type-safe ABI for
|
|
1030
|
+
* Type-safe ABI for OptimismPortal2_json
|
|
687
1031
|
*/
|
|
688
|
-
export type
|
|
1032
|
+
export type OptimismPortal2_jsonAbi = typeof OptimismPortal2_jsonAbi;
|
|
689
1033
|
|
|
690
1034
|
/**
|
|
691
|
-
* Contract instance type for
|
|
1035
|
+
* Contract instance type for OptimismPortal2_json
|
|
692
1036
|
*/
|
|
693
1037
|
// Use any for contract type to avoid complex viem type issues
|
|
694
1038
|
// The runtime behavior is type-safe through viem's ABI typing
|
|
695
|
-
export type
|
|
1039
|
+
export type OptimismPortal2_jsonContract = any;
|
|
696
1040
|
|
|
697
1041
|
/**
|
|
698
|
-
*
|
|
1042
|
+
* OptimismPortal2_json Contract Class
|
|
699
1043
|
*
|
|
700
1044
|
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
701
1045
|
*
|
|
@@ -703,12 +1047,12 @@ export type OptimismPortal_jsonContract = any;
|
|
|
703
1047
|
* ```typescript
|
|
704
1048
|
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
705
1049
|
* import { mainnet } from 'viem/chains';
|
|
706
|
-
* import {
|
|
1050
|
+
* import { OptimismPortal2_json } from 'OptimismPortal2_json';
|
|
707
1051
|
*
|
|
708
1052
|
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
709
1053
|
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
710
1054
|
*
|
|
711
|
-
* const contract = new
|
|
1055
|
+
* const contract = new OptimismPortal2_json('0x...', { publicClient, walletClient });
|
|
712
1056
|
*
|
|
713
1057
|
* // Read functions
|
|
714
1058
|
* const result = await contract.balanceOf('0x...');
|
|
@@ -726,8 +1070,8 @@ export type OptimismPortal_jsonContract = any;
|
|
|
726
1070
|
* });
|
|
727
1071
|
* ```
|
|
728
1072
|
*/
|
|
729
|
-
export class
|
|
730
|
-
private contract:
|
|
1073
|
+
export class OptimismPortal2_json {
|
|
1074
|
+
private contract: OptimismPortal2_jsonContract;
|
|
731
1075
|
private contractAddress: Address;
|
|
732
1076
|
private publicClient: PublicClient;
|
|
733
1077
|
|
|
@@ -742,7 +1086,7 @@ export class OptimismPortal_json {
|
|
|
742
1086
|
this.publicClient = clients.publicClient;
|
|
743
1087
|
this.contract = getContract({
|
|
744
1088
|
address,
|
|
745
|
-
abi:
|
|
1089
|
+
abi: OptimismPortal2_jsonAbi,
|
|
746
1090
|
client: {
|
|
747
1091
|
public: clients.publicClient,
|
|
748
1092
|
wallet: clients.walletClient,
|
|
@@ -760,16 +1104,56 @@ export class OptimismPortal_json {
|
|
|
760
1104
|
/**
|
|
761
1105
|
* Get the underlying viem contract instance
|
|
762
1106
|
*/
|
|
763
|
-
getContract():
|
|
1107
|
+
getContract(): OptimismPortal2_jsonContract {
|
|
764
1108
|
return this.contract;
|
|
765
1109
|
}
|
|
766
1110
|
|
|
767
1111
|
/**
|
|
768
|
-
*
|
|
1112
|
+
* anchorStateRegistry
|
|
1113
|
+
* view
|
|
1114
|
+
*/
|
|
1115
|
+
async anchorStateRegistry(): Promise<`0x${string}`> {
|
|
1116
|
+
return this.contract.read.anchorStateRegistry() as Promise<`0x${string}`>;
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
/**
|
|
1120
|
+
* checkWithdrawal
|
|
1121
|
+
* view
|
|
1122
|
+
*/
|
|
1123
|
+
async checkWithdrawal(_withdrawalHash: `0x${string}`, _proofSubmitter: `0x${string}`): Promise<void> {
|
|
1124
|
+
return this.contract.read.checkWithdrawal([_withdrawalHash, _proofSubmitter] as const) as Promise<void>;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
/**
|
|
1128
|
+
* disputeGameBlacklist
|
|
1129
|
+
* view
|
|
1130
|
+
*/
|
|
1131
|
+
async disputeGameBlacklist(_disputeGame: `0x${string}`): Promise<boolean> {
|
|
1132
|
+
return this.contract.read.disputeGameBlacklist([_disputeGame] as const) as Promise<boolean>;
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
/**
|
|
1136
|
+
* disputeGameFactory
|
|
1137
|
+
* view
|
|
1138
|
+
*/
|
|
1139
|
+
async disputeGameFactory(): Promise<`0x${string}`> {
|
|
1140
|
+
return this.contract.read.disputeGameFactory() as Promise<`0x${string}`>;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
/**
|
|
1144
|
+
* disputeGameFinalityDelaySeconds
|
|
1145
|
+
* view
|
|
1146
|
+
*/
|
|
1147
|
+
async disputeGameFinalityDelaySeconds(): Promise<bigint> {
|
|
1148
|
+
return this.contract.read.disputeGameFinalityDelaySeconds() as Promise<bigint>;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* ethLockbox
|
|
769
1153
|
* view
|
|
770
1154
|
*/
|
|
771
|
-
async
|
|
772
|
-
return this.contract.read.
|
|
1155
|
+
async ethLockbox(): Promise<`0x${string}`> {
|
|
1156
|
+
return this.contract.read.ethLockbox() as Promise<`0x${string}`>;
|
|
773
1157
|
}
|
|
774
1158
|
|
|
775
1159
|
/**
|
|
@@ -789,19 +1173,11 @@ export class OptimismPortal_json {
|
|
|
789
1173
|
}
|
|
790
1174
|
|
|
791
1175
|
/**
|
|
792
|
-
*
|
|
793
|
-
* view
|
|
794
|
-
*/
|
|
795
|
-
async isOutputFinalized(_l2OutputIndex: bigint): Promise<boolean> {
|
|
796
|
-
return this.contract.read.isOutputFinalized([_l2OutputIndex] as const) as Promise<boolean>;
|
|
797
|
-
}
|
|
798
|
-
|
|
799
|
-
/**
|
|
800
|
-
* l2Oracle
|
|
1176
|
+
* initVersion
|
|
801
1177
|
* view
|
|
802
1178
|
*/
|
|
803
|
-
async
|
|
804
|
-
return this.contract.read.
|
|
1179
|
+
async initVersion(): Promise<bigint> {
|
|
1180
|
+
return this.contract.read.initVersion() as Promise<bigint>;
|
|
805
1181
|
}
|
|
806
1182
|
|
|
807
1183
|
/**
|
|
@@ -820,6 +1196,14 @@ export class OptimismPortal_json {
|
|
|
820
1196
|
return this.contract.read.minimumGasLimit([_byteCount] as const) as Promise<bigint>;
|
|
821
1197
|
}
|
|
822
1198
|
|
|
1199
|
+
/**
|
|
1200
|
+
* numProofSubmitters
|
|
1201
|
+
* view
|
|
1202
|
+
*/
|
|
1203
|
+
async numProofSubmitters(_withdrawalHash: `0x${string}`): Promise<bigint> {
|
|
1204
|
+
return this.contract.read.numProofSubmitters([_withdrawalHash] as const) as Promise<bigint>;
|
|
1205
|
+
}
|
|
1206
|
+
|
|
823
1207
|
/**
|
|
824
1208
|
* params
|
|
825
1209
|
* view
|
|
@@ -836,12 +1220,60 @@ export class OptimismPortal_json {
|
|
|
836
1220
|
return this.contract.read.paused() as Promise<boolean>;
|
|
837
1221
|
}
|
|
838
1222
|
|
|
1223
|
+
/**
|
|
1224
|
+
* proofMaturityDelaySeconds
|
|
1225
|
+
* view
|
|
1226
|
+
*/
|
|
1227
|
+
async proofMaturityDelaySeconds(): Promise<bigint> {
|
|
1228
|
+
return this.contract.read.proofMaturityDelaySeconds() as Promise<bigint>;
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
/**
|
|
1232
|
+
* proofSubmitters
|
|
1233
|
+
* view
|
|
1234
|
+
*/
|
|
1235
|
+
async proofSubmitters(arg0: `0x${string}`, arg1: bigint): Promise<`0x${string}`> {
|
|
1236
|
+
return this.contract.read.proofSubmitters([arg0, arg1] as const) as Promise<`0x${string}`>;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
839
1239
|
/**
|
|
840
1240
|
* provenWithdrawals
|
|
841
1241
|
* view
|
|
842
1242
|
*/
|
|
843
|
-
async provenWithdrawals(arg0: `0x${string}`): Promise<[`0x${string}`, bigint
|
|
844
|
-
return this.contract.read.provenWithdrawals([arg0] as const) as Promise<[`0x${string}`, bigint
|
|
1243
|
+
async provenWithdrawals(arg0: `0x${string}`, arg1: `0x${string}`): Promise<[`0x${string}`, bigint]> {
|
|
1244
|
+
return this.contract.read.provenWithdrawals([arg0, arg1] as const) as Promise<[`0x${string}`, bigint]>;
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
/**
|
|
1248
|
+
* proxyAdmin
|
|
1249
|
+
* view
|
|
1250
|
+
*/
|
|
1251
|
+
async proxyAdmin(): Promise<`0x${string}`> {
|
|
1252
|
+
return this.contract.read.proxyAdmin() as Promise<`0x${string}`>;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
/**
|
|
1256
|
+
* proxyAdminOwner
|
|
1257
|
+
* view
|
|
1258
|
+
*/
|
|
1259
|
+
async proxyAdminOwner(): Promise<`0x${string}`> {
|
|
1260
|
+
return this.contract.read.proxyAdminOwner() as Promise<`0x${string}`>;
|
|
1261
|
+
}
|
|
1262
|
+
|
|
1263
|
+
/**
|
|
1264
|
+
* respectedGameType
|
|
1265
|
+
* view
|
|
1266
|
+
*/
|
|
1267
|
+
async respectedGameType(): Promise<bigint> {
|
|
1268
|
+
return this.contract.read.respectedGameType() as Promise<bigint>;
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
/**
|
|
1272
|
+
* respectedGameTypeUpdatedAt
|
|
1273
|
+
* view
|
|
1274
|
+
*/
|
|
1275
|
+
async respectedGameTypeUpdatedAt(): Promise<bigint> {
|
|
1276
|
+
return this.contract.read.respectedGameTypeUpdatedAt() as Promise<bigint>;
|
|
845
1277
|
}
|
|
846
1278
|
|
|
847
1279
|
/**
|
|
@@ -869,11 +1301,11 @@ export class OptimismPortal_json {
|
|
|
869
1301
|
}
|
|
870
1302
|
|
|
871
1303
|
/**
|
|
872
|
-
*
|
|
873
|
-
*
|
|
1304
|
+
* depositTransaction
|
|
1305
|
+
* payable
|
|
874
1306
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
875
1307
|
*/
|
|
876
|
-
async
|
|
1308
|
+
async depositTransaction(_to: `0x${string}`, _value: bigint, _gasLimit: bigint, _isCreation: boolean, _data: `0x${string}`, options?: {
|
|
877
1309
|
accessList?: import('viem').AccessList;
|
|
878
1310
|
authorizationList?: import('viem').AuthorizationList;
|
|
879
1311
|
chain?: import('viem').Chain | null;
|
|
@@ -888,15 +1320,15 @@ export class OptimismPortal_json {
|
|
|
888
1320
|
if (!this.contract.write) {
|
|
889
1321
|
throw new Error('Wallet client is required for write operations');
|
|
890
1322
|
}
|
|
891
|
-
return this.contract.write.
|
|
1323
|
+
return this.contract.write.depositTransaction([_to, _value, _gasLimit, _isCreation, _data] as const, options) as Promise<`0x${string}`>;
|
|
892
1324
|
}
|
|
893
1325
|
|
|
894
1326
|
/**
|
|
895
|
-
*
|
|
1327
|
+
* donateETH
|
|
896
1328
|
* payable
|
|
897
1329
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
898
1330
|
*/
|
|
899
|
-
async
|
|
1331
|
+
async donateETH(options?: {
|
|
900
1332
|
accessList?: import('viem').AccessList;
|
|
901
1333
|
authorizationList?: import('viem').AuthorizationList;
|
|
902
1334
|
chain?: import('viem').Chain | null;
|
|
@@ -911,15 +1343,15 @@ export class OptimismPortal_json {
|
|
|
911
1343
|
if (!this.contract.write) {
|
|
912
1344
|
throw new Error('Wallet client is required for write operations');
|
|
913
1345
|
}
|
|
914
|
-
return this.contract.write.
|
|
1346
|
+
return this.contract.write.donateETH(options) as Promise<`0x${string}`>;
|
|
915
1347
|
}
|
|
916
1348
|
|
|
917
1349
|
/**
|
|
918
|
-
*
|
|
919
|
-
*
|
|
1350
|
+
* finalizeWithdrawalTransaction
|
|
1351
|
+
* nonpayable
|
|
920
1352
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
921
1353
|
*/
|
|
922
|
-
async
|
|
1354
|
+
async finalizeWithdrawalTransaction(_tx: Types_WithdrawalTransaction, options?: {
|
|
923
1355
|
accessList?: import('viem').AccessList;
|
|
924
1356
|
authorizationList?: import('viem').AuthorizationList;
|
|
925
1357
|
chain?: import('viem').Chain | null;
|
|
@@ -934,15 +1366,15 @@ export class OptimismPortal_json {
|
|
|
934
1366
|
if (!this.contract.write) {
|
|
935
1367
|
throw new Error('Wallet client is required for write operations');
|
|
936
1368
|
}
|
|
937
|
-
return this.contract.write.
|
|
1369
|
+
return this.contract.write.finalizeWithdrawalTransaction([_tx] as const, options) as Promise<`0x${string}`>;
|
|
938
1370
|
}
|
|
939
1371
|
|
|
940
1372
|
/**
|
|
941
|
-
*
|
|
1373
|
+
* finalizeWithdrawalTransactionExternalProof
|
|
942
1374
|
* nonpayable
|
|
943
1375
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
944
1376
|
*/
|
|
945
|
-
async
|
|
1377
|
+
async finalizeWithdrawalTransactionExternalProof(_tx: Types_WithdrawalTransaction, _proofSubmitter: `0x${string}`, options?: {
|
|
946
1378
|
accessList?: import('viem').AccessList;
|
|
947
1379
|
authorizationList?: import('viem').AuthorizationList;
|
|
948
1380
|
chain?: import('viem').Chain | null;
|
|
@@ -957,7 +1389,7 @@ export class OptimismPortal_json {
|
|
|
957
1389
|
if (!this.contract.write) {
|
|
958
1390
|
throw new Error('Wallet client is required for write operations');
|
|
959
1391
|
}
|
|
960
|
-
return this.contract.write.
|
|
1392
|
+
return this.contract.write.finalizeWithdrawalTransactionExternalProof([_tx, _proofSubmitter] as const, options) as Promise<`0x${string}`>;
|
|
961
1393
|
}
|
|
962
1394
|
|
|
963
1395
|
/**
|
|
@@ -965,7 +1397,7 @@ export class OptimismPortal_json {
|
|
|
965
1397
|
* nonpayable
|
|
966
1398
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
967
1399
|
*/
|
|
968
|
-
async initialize(
|
|
1400
|
+
async initialize(_systemConfig: `0x${string}`, _anchorStateRegistry: `0x${string}`, _ethLockbox: `0x${string}`, options?: {
|
|
969
1401
|
accessList?: import('viem').AccessList;
|
|
970
1402
|
authorizationList?: import('viem').AuthorizationList;
|
|
971
1403
|
chain?: import('viem').Chain | null;
|
|
@@ -980,15 +1412,38 @@ export class OptimismPortal_json {
|
|
|
980
1412
|
if (!this.contract.write) {
|
|
981
1413
|
throw new Error('Wallet client is required for write operations');
|
|
982
1414
|
}
|
|
983
|
-
return this.contract.write.initialize([
|
|
1415
|
+
return this.contract.write.initialize([_systemConfig, _anchorStateRegistry, _ethLockbox] as const, options) as Promise<`0x${string}`>;
|
|
984
1416
|
}
|
|
985
1417
|
|
|
986
1418
|
/**
|
|
987
|
-
*
|
|
1419
|
+
* migrateLiquidity
|
|
1420
|
+
* nonpayable
|
|
1421
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1422
|
+
*/
|
|
1423
|
+
async migrateLiquidity(options?: {
|
|
1424
|
+
accessList?: import('viem').AccessList;
|
|
1425
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1426
|
+
chain?: import('viem').Chain | null;
|
|
1427
|
+
dataSuffix?: `0x${string}`;
|
|
1428
|
+
gas?: bigint;
|
|
1429
|
+
gasPrice?: bigint;
|
|
1430
|
+
maxFeePerGas?: bigint;
|
|
1431
|
+
maxPriorityFeePerGas?: bigint;
|
|
1432
|
+
nonce?: number;
|
|
1433
|
+
value?: bigint;
|
|
1434
|
+
}): Promise<`0x${string}`> {
|
|
1435
|
+
if (!this.contract.write) {
|
|
1436
|
+
throw new Error('Wallet client is required for write operations');
|
|
1437
|
+
}
|
|
1438
|
+
return this.contract.write.migrateLiquidity(options) as Promise<`0x${string}`>;
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
/**
|
|
1442
|
+
* migrateToSharedDisputeGame
|
|
988
1443
|
* nonpayable
|
|
989
1444
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
990
1445
|
*/
|
|
991
|
-
async
|
|
1446
|
+
async migrateToSharedDisputeGame(_newLockbox: `0x${string}`, _newAnchorStateRegistry: `0x${string}`, options?: {
|
|
992
1447
|
accessList?: import('viem').AccessList;
|
|
993
1448
|
authorizationList?: import('viem').AuthorizationList;
|
|
994
1449
|
chain?: import('viem').Chain | null;
|
|
@@ -1003,15 +1458,15 @@ export class OptimismPortal_json {
|
|
|
1003
1458
|
if (!this.contract.write) {
|
|
1004
1459
|
throw new Error('Wallet client is required for write operations');
|
|
1005
1460
|
}
|
|
1006
|
-
return this.contract.write.
|
|
1461
|
+
return this.contract.write.migrateToSharedDisputeGame([_newLockbox, _newAnchorStateRegistry] as const, options) as Promise<`0x${string}`>;
|
|
1007
1462
|
}
|
|
1008
1463
|
|
|
1009
1464
|
/**
|
|
1010
|
-
*
|
|
1465
|
+
* proveWithdrawalTransaction
|
|
1011
1466
|
* nonpayable
|
|
1012
1467
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1013
1468
|
*/
|
|
1014
|
-
async
|
|
1469
|
+
async proveWithdrawalTransaction(_tx: Types_WithdrawalTransaction, _disputeGameIndex: bigint, _outputRootProof: Types_OutputRootProof, _withdrawalProof: `0x${string}`[], options?: {
|
|
1015
1470
|
accessList?: import('viem').AccessList;
|
|
1016
1471
|
authorizationList?: import('viem').AuthorizationList;
|
|
1017
1472
|
chain?: import('viem').Chain | null;
|
|
@@ -1026,7 +1481,7 @@ export class OptimismPortal_json {
|
|
|
1026
1481
|
if (!this.contract.write) {
|
|
1027
1482
|
throw new Error('Wallet client is required for write operations');
|
|
1028
1483
|
}
|
|
1029
|
-
return this.contract.write.
|
|
1484
|
+
return this.contract.write.proveWithdrawalTransaction([_tx, _disputeGameIndex, _outputRootProof, _withdrawalProof] as const, options) as Promise<`0x${string}`>;
|
|
1030
1485
|
}
|
|
1031
1486
|
|
|
1032
1487
|
|
|
@@ -1046,11 +1501,11 @@ export class OptimismPortal_json {
|
|
|
1046
1501
|
}
|
|
1047
1502
|
return {
|
|
1048
1503
|
/**
|
|
1049
|
-
* Simulate
|
|
1504
|
+
* Simulate depositTransaction
|
|
1050
1505
|
* Returns gas estimate and result without sending transaction
|
|
1051
1506
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1052
1507
|
*/
|
|
1053
|
-
async
|
|
1508
|
+
async depositTransaction(_to: `0x${string}`, _value: bigint, _gasLimit: bigint, _isCreation: boolean, _data: `0x${string}`, options?: {
|
|
1054
1509
|
accessList?: import('viem').AccessList;
|
|
1055
1510
|
authorizationList?: import('viem').AuthorizationList;
|
|
1056
1511
|
chain?: import('viem').Chain | null;
|
|
@@ -1062,14 +1517,14 @@ export class OptimismPortal_json {
|
|
|
1062
1517
|
nonce?: number;
|
|
1063
1518
|
value?: bigint;
|
|
1064
1519
|
}): Promise<void> {
|
|
1065
|
-
return contract.simulate.
|
|
1520
|
+
return contract.simulate.depositTransaction([_to, _value, _gasLimit, _isCreation, _data] as const, options) as Promise<void>;
|
|
1066
1521
|
},
|
|
1067
1522
|
/**
|
|
1068
|
-
* Simulate
|
|
1523
|
+
* Simulate donateETH
|
|
1069
1524
|
* Returns gas estimate and result without sending transaction
|
|
1070
1525
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1071
1526
|
*/
|
|
1072
|
-
async
|
|
1527
|
+
async donateETH(options?: {
|
|
1073
1528
|
accessList?: import('viem').AccessList;
|
|
1074
1529
|
authorizationList?: import('viem').AuthorizationList;
|
|
1075
1530
|
chain?: import('viem').Chain | null;
|
|
@@ -1081,14 +1536,14 @@ export class OptimismPortal_json {
|
|
|
1081
1536
|
nonce?: number;
|
|
1082
1537
|
value?: bigint;
|
|
1083
1538
|
}): Promise<void> {
|
|
1084
|
-
return contract.simulate.
|
|
1539
|
+
return contract.simulate.donateETH(options) as Promise<void>;
|
|
1085
1540
|
},
|
|
1086
1541
|
/**
|
|
1087
|
-
* Simulate
|
|
1542
|
+
* Simulate finalizeWithdrawalTransaction
|
|
1088
1543
|
* Returns gas estimate and result without sending transaction
|
|
1089
1544
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1090
1545
|
*/
|
|
1091
|
-
async
|
|
1546
|
+
async finalizeWithdrawalTransaction(_tx: Types_WithdrawalTransaction, options?: {
|
|
1092
1547
|
accessList?: import('viem').AccessList;
|
|
1093
1548
|
authorizationList?: import('viem').AuthorizationList;
|
|
1094
1549
|
chain?: import('viem').Chain | null;
|
|
@@ -1100,14 +1555,14 @@ export class OptimismPortal_json {
|
|
|
1100
1555
|
nonce?: number;
|
|
1101
1556
|
value?: bigint;
|
|
1102
1557
|
}): Promise<void> {
|
|
1103
|
-
return contract.simulate.
|
|
1558
|
+
return contract.simulate.finalizeWithdrawalTransaction([_tx] as const, options) as Promise<void>;
|
|
1104
1559
|
},
|
|
1105
1560
|
/**
|
|
1106
|
-
* Simulate
|
|
1561
|
+
* Simulate finalizeWithdrawalTransactionExternalProof
|
|
1107
1562
|
* Returns gas estimate and result without sending transaction
|
|
1108
1563
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1109
1564
|
*/
|
|
1110
|
-
async
|
|
1565
|
+
async finalizeWithdrawalTransactionExternalProof(_tx: Types_WithdrawalTransaction, _proofSubmitter: `0x${string}`, options?: {
|
|
1111
1566
|
accessList?: import('viem').AccessList;
|
|
1112
1567
|
authorizationList?: import('viem').AuthorizationList;
|
|
1113
1568
|
chain?: import('viem').Chain | null;
|
|
@@ -1119,14 +1574,14 @@ export class OptimismPortal_json {
|
|
|
1119
1574
|
nonce?: number;
|
|
1120
1575
|
value?: bigint;
|
|
1121
1576
|
}): Promise<void> {
|
|
1122
|
-
return contract.simulate.
|
|
1577
|
+
return contract.simulate.finalizeWithdrawalTransactionExternalProof([_tx, _proofSubmitter] as const, options) as Promise<void>;
|
|
1123
1578
|
},
|
|
1124
1579
|
/**
|
|
1125
1580
|
* Simulate initialize
|
|
1126
1581
|
* Returns gas estimate and result without sending transaction
|
|
1127
1582
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1128
1583
|
*/
|
|
1129
|
-
async initialize(
|
|
1584
|
+
async initialize(_systemConfig: `0x${string}`, _anchorStateRegistry: `0x${string}`, _ethLockbox: `0x${string}`, options?: {
|
|
1130
1585
|
accessList?: import('viem').AccessList;
|
|
1131
1586
|
authorizationList?: import('viem').AuthorizationList;
|
|
1132
1587
|
chain?: import('viem').Chain | null;
|
|
@@ -1138,14 +1593,33 @@ export class OptimismPortal_json {
|
|
|
1138
1593
|
nonce?: number;
|
|
1139
1594
|
value?: bigint;
|
|
1140
1595
|
}): Promise<void> {
|
|
1141
|
-
return contract.simulate.initialize([
|
|
1596
|
+
return contract.simulate.initialize([_systemConfig, _anchorStateRegistry, _ethLockbox] as const, options) as Promise<void>;
|
|
1142
1597
|
},
|
|
1143
1598
|
/**
|
|
1144
|
-
* Simulate
|
|
1599
|
+
* Simulate migrateLiquidity
|
|
1600
|
+
* Returns gas estimate and result without sending transaction
|
|
1601
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1602
|
+
*/
|
|
1603
|
+
async migrateLiquidity(options?: {
|
|
1604
|
+
accessList?: import('viem').AccessList;
|
|
1605
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1606
|
+
chain?: import('viem').Chain | null;
|
|
1607
|
+
dataSuffix?: `0x${string}`;
|
|
1608
|
+
gas?: bigint;
|
|
1609
|
+
gasPrice?: bigint;
|
|
1610
|
+
maxFeePerGas?: bigint;
|
|
1611
|
+
maxPriorityFeePerGas?: bigint;
|
|
1612
|
+
nonce?: number;
|
|
1613
|
+
value?: bigint;
|
|
1614
|
+
}): Promise<void> {
|
|
1615
|
+
return contract.simulate.migrateLiquidity(options) as Promise<void>;
|
|
1616
|
+
},
|
|
1617
|
+
/**
|
|
1618
|
+
* Simulate migrateToSharedDisputeGame
|
|
1145
1619
|
* Returns gas estimate and result without sending transaction
|
|
1146
1620
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1147
1621
|
*/
|
|
1148
|
-
async
|
|
1622
|
+
async migrateToSharedDisputeGame(_newLockbox: `0x${string}`, _newAnchorStateRegistry: `0x${string}`, options?: {
|
|
1149
1623
|
accessList?: import('viem').AccessList;
|
|
1150
1624
|
authorizationList?: import('viem').AuthorizationList;
|
|
1151
1625
|
chain?: import('viem').Chain | null;
|
|
@@ -1157,14 +1631,14 @@ export class OptimismPortal_json {
|
|
|
1157
1631
|
nonce?: number;
|
|
1158
1632
|
value?: bigint;
|
|
1159
1633
|
}): Promise<void> {
|
|
1160
|
-
return contract.simulate.
|
|
1634
|
+
return contract.simulate.migrateToSharedDisputeGame([_newLockbox, _newAnchorStateRegistry] as const, options) as Promise<void>;
|
|
1161
1635
|
},
|
|
1162
1636
|
/**
|
|
1163
|
-
* Simulate
|
|
1637
|
+
* Simulate proveWithdrawalTransaction
|
|
1164
1638
|
* Returns gas estimate and result without sending transaction
|
|
1165
1639
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1166
1640
|
*/
|
|
1167
|
-
async
|
|
1641
|
+
async proveWithdrawalTransaction(_tx: Types_WithdrawalTransaction, _disputeGameIndex: bigint, _outputRootProof: Types_OutputRootProof, _withdrawalProof: `0x${string}`[], options?: {
|
|
1168
1642
|
accessList?: import('viem').AccessList;
|
|
1169
1643
|
authorizationList?: import('viem').AuthorizationList;
|
|
1170
1644
|
chain?: import('viem').Chain | null;
|
|
@@ -1176,7 +1650,7 @@ export class OptimismPortal_json {
|
|
|
1176
1650
|
nonce?: number;
|
|
1177
1651
|
value?: bigint;
|
|
1178
1652
|
}): Promise<void> {
|
|
1179
|
-
return contract.simulate.
|
|
1653
|
+
return contract.simulate.proveWithdrawalTransaction([_tx, _disputeGameIndex, _outputRootProof, _withdrawalProof] as const, options) as Promise<void>;
|
|
1180
1654
|
}
|
|
1181
1655
|
};
|
|
1182
1656
|
}
|
|
@@ -1195,6 +1669,25 @@ export class OptimismPortal_json {
|
|
|
1195
1669
|
*/
|
|
1196
1670
|
get watch() {
|
|
1197
1671
|
return {
|
|
1672
|
+
/**
|
|
1673
|
+
* Watch ETHMigrated events
|
|
1674
|
+
* @param callback Function to call when event is emitted
|
|
1675
|
+
* @param filter Optional filter for indexed parameters
|
|
1676
|
+
* @returns Unwatch function to stop listening
|
|
1677
|
+
*/
|
|
1678
|
+
ETHMigrated: (callback: (event: { lockbox: `0x${string}`; balance: bigint }) => void, filter?: { lockbox: `0x${string}` }) => {
|
|
1679
|
+
return this.publicClient.watchContractEvent({
|
|
1680
|
+
address: this.contractAddress,
|
|
1681
|
+
abi: OptimismPortal2_jsonAbi,
|
|
1682
|
+
eventName: 'ETHMigrated',
|
|
1683
|
+
args: filter,
|
|
1684
|
+
onLogs: (logs: any[]) => {
|
|
1685
|
+
logs.forEach((log: any) => {
|
|
1686
|
+
callback(log.args as any);
|
|
1687
|
+
});
|
|
1688
|
+
},
|
|
1689
|
+
}) as () => void;
|
|
1690
|
+
},
|
|
1198
1691
|
/**
|
|
1199
1692
|
* Watch Initialized events
|
|
1200
1693
|
* @param callback Function to call when event is emitted
|
|
@@ -1204,7 +1697,7 @@ export class OptimismPortal_json {
|
|
|
1204
1697
|
Initialized: (callback: (event: { version: bigint }) => void) => {
|
|
1205
1698
|
return this.publicClient.watchContractEvent({
|
|
1206
1699
|
address: this.contractAddress,
|
|
1207
|
-
abi:
|
|
1700
|
+
abi: OptimismPortal2_jsonAbi,
|
|
1208
1701
|
eventName: 'Initialized',
|
|
1209
1702
|
|
|
1210
1703
|
onLogs: (logs: any[]) => {
|
|
@@ -1214,6 +1707,25 @@ export class OptimismPortal_json {
|
|
|
1214
1707
|
},
|
|
1215
1708
|
}) as () => void;
|
|
1216
1709
|
},
|
|
1710
|
+
/**
|
|
1711
|
+
* Watch PortalMigrated events
|
|
1712
|
+
* @param callback Function to call when event is emitted
|
|
1713
|
+
* @param filter Optional filter for indexed parameters
|
|
1714
|
+
* @returns Unwatch function to stop listening
|
|
1715
|
+
*/
|
|
1716
|
+
PortalMigrated: (callback: (event: { oldLockbox: `0x${string}`; newLockbox: `0x${string}`; oldAnchorStateRegistry: `0x${string}`; newAnchorStateRegistry: `0x${string}` }) => void) => {
|
|
1717
|
+
return this.publicClient.watchContractEvent({
|
|
1718
|
+
address: this.contractAddress,
|
|
1719
|
+
abi: OptimismPortal2_jsonAbi,
|
|
1720
|
+
eventName: 'PortalMigrated',
|
|
1721
|
+
|
|
1722
|
+
onLogs: (logs: any[]) => {
|
|
1723
|
+
logs.forEach((log: any) => {
|
|
1724
|
+
callback(log.args as any);
|
|
1725
|
+
});
|
|
1726
|
+
},
|
|
1727
|
+
}) as () => void;
|
|
1728
|
+
},
|
|
1217
1729
|
/**
|
|
1218
1730
|
* Watch TransactionDeposited events
|
|
1219
1731
|
* @param callback Function to call when event is emitted
|
|
@@ -1223,7 +1735,7 @@ export class OptimismPortal_json {
|
|
|
1223
1735
|
TransactionDeposited: (callback: (event: { from: `0x${string}`; to: `0x${string}`; version: bigint; opaqueData: `0x${string}` }) => void, filter?: { from: `0x${string}`; to: `0x${string}`; version: bigint }) => {
|
|
1224
1736
|
return this.publicClient.watchContractEvent({
|
|
1225
1737
|
address: this.contractAddress,
|
|
1226
|
-
abi:
|
|
1738
|
+
abi: OptimismPortal2_jsonAbi,
|
|
1227
1739
|
eventName: 'TransactionDeposited',
|
|
1228
1740
|
args: filter,
|
|
1229
1741
|
onLogs: (logs: any[]) => {
|
|
@@ -1242,7 +1754,7 @@ export class OptimismPortal_json {
|
|
|
1242
1754
|
WithdrawalFinalized: (callback: (event: { withdrawalHash: `0x${string}`; success: boolean }) => void, filter?: { withdrawalHash: `0x${string}` }) => {
|
|
1243
1755
|
return this.publicClient.watchContractEvent({
|
|
1244
1756
|
address: this.contractAddress,
|
|
1245
|
-
abi:
|
|
1757
|
+
abi: OptimismPortal2_jsonAbi,
|
|
1246
1758
|
eventName: 'WithdrawalFinalized',
|
|
1247
1759
|
args: filter,
|
|
1248
1760
|
onLogs: (logs: any[]) => {
|
|
@@ -1261,7 +1773,7 @@ export class OptimismPortal_json {
|
|
|
1261
1773
|
WithdrawalProven: (callback: (event: { withdrawalHash: `0x${string}`; from: `0x${string}`; to: `0x${string}` }) => void, filter?: { withdrawalHash: `0x${string}`; from: `0x${string}`; to: `0x${string}` }) => {
|
|
1262
1774
|
return this.publicClient.watchContractEvent({
|
|
1263
1775
|
address: this.contractAddress,
|
|
1264
|
-
abi:
|
|
1776
|
+
abi: OptimismPortal2_jsonAbi,
|
|
1265
1777
|
eventName: 'WithdrawalProven',
|
|
1266
1778
|
args: filter,
|
|
1267
1779
|
onLogs: (logs: any[]) => {
|
|
@@ -1270,6 +1782,25 @@ export class OptimismPortal_json {
|
|
|
1270
1782
|
});
|
|
1271
1783
|
},
|
|
1272
1784
|
}) as () => void;
|
|
1785
|
+
},
|
|
1786
|
+
/**
|
|
1787
|
+
* Watch WithdrawalProvenExtension1 events
|
|
1788
|
+
* @param callback Function to call when event is emitted
|
|
1789
|
+
* @param filter Optional filter for indexed parameters
|
|
1790
|
+
* @returns Unwatch function to stop listening
|
|
1791
|
+
*/
|
|
1792
|
+
WithdrawalProvenExtension1: (callback: (event: { withdrawalHash: `0x${string}`; proofSubmitter: `0x${string}` }) => void, filter?: { withdrawalHash: `0x${string}`; proofSubmitter: `0x${string}` }) => {
|
|
1793
|
+
return this.publicClient.watchContractEvent({
|
|
1794
|
+
address: this.contractAddress,
|
|
1795
|
+
abi: OptimismPortal2_jsonAbi,
|
|
1796
|
+
eventName: 'WithdrawalProvenExtension1',
|
|
1797
|
+
args: filter,
|
|
1798
|
+
onLogs: (logs: any[]) => {
|
|
1799
|
+
logs.forEach((log: any) => {
|
|
1800
|
+
callback(log.args as any);
|
|
1801
|
+
});
|
|
1802
|
+
},
|
|
1803
|
+
}) as () => void;
|
|
1273
1804
|
}
|
|
1274
1805
|
};
|
|
1275
1806
|
}
|