@gitmyabi/optimismportal 1.0.0
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 +108 -0
- package/contracts/OptimismPortal2_json.d.ts +1189 -0
- package/contracts/OptimismPortal2_json.js +1368 -0
- package/contracts/OptimismPortal2_json.ts +1580 -0
- package/contracts/Proxy_json.d.ts +376 -0
- package/contracts/Proxy_json.js +362 -0
- package/contracts/Proxy_json.ts +506 -0
- package/contracts/index.d.ts +4 -0
- package/contracts/index.js +10 -0
- package/contracts/index.ts +5 -0
- package/index.d.ts +1 -0
- package/index.js +19 -0
- package/package.json +43 -0
|
@@ -0,0 +1,1189 @@
|
|
|
1
|
+
import type { Address, PublicClient, WalletClient } from 'viem';
|
|
2
|
+
/**
|
|
3
|
+
* Types.WithdrawalTransaction struct type
|
|
4
|
+
*/
|
|
5
|
+
export type Types_WithdrawalTransaction = {
|
|
6
|
+
nonce: bigint;
|
|
7
|
+
sender: `0x${string}`;
|
|
8
|
+
target: `0x${string}`;
|
|
9
|
+
value: bigint;
|
|
10
|
+
gasLimit: bigint;
|
|
11
|
+
data: `0x${string}`;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Types.OutputRootProof struct type
|
|
15
|
+
*/
|
|
16
|
+
export type Types_OutputRootProof = {
|
|
17
|
+
version: `0x${string}`;
|
|
18
|
+
stateRoot: `0x${string}`;
|
|
19
|
+
messagePasserStorageRoot: `0x${string}`;
|
|
20
|
+
latestBlockhash: `0x${string}`;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* OptimismPortal2_json ABI
|
|
24
|
+
*
|
|
25
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
26
|
+
*/
|
|
27
|
+
export declare const OptimismPortal2_jsonAbi: readonly [{
|
|
28
|
+
readonly inputs: readonly [{
|
|
29
|
+
readonly internalType: "uint256";
|
|
30
|
+
readonly name: "_proofMaturityDelaySeconds";
|
|
31
|
+
readonly type: "uint256";
|
|
32
|
+
}];
|
|
33
|
+
readonly stateMutability: "nonpayable";
|
|
34
|
+
readonly type: "constructor";
|
|
35
|
+
}, {
|
|
36
|
+
readonly inputs: readonly [];
|
|
37
|
+
readonly name: "ContentLengthMismatch";
|
|
38
|
+
readonly type: "error";
|
|
39
|
+
}, {
|
|
40
|
+
readonly inputs: readonly [];
|
|
41
|
+
readonly name: "EmptyItem";
|
|
42
|
+
readonly type: "error";
|
|
43
|
+
}, {
|
|
44
|
+
readonly inputs: readonly [];
|
|
45
|
+
readonly name: "InvalidDataRemainder";
|
|
46
|
+
readonly type: "error";
|
|
47
|
+
}, {
|
|
48
|
+
readonly inputs: readonly [];
|
|
49
|
+
readonly name: "InvalidHeader";
|
|
50
|
+
readonly type: "error";
|
|
51
|
+
}, {
|
|
52
|
+
readonly inputs: readonly [];
|
|
53
|
+
readonly name: "OptimismPortal_AlreadyFinalized";
|
|
54
|
+
readonly type: "error";
|
|
55
|
+
}, {
|
|
56
|
+
readonly inputs: readonly [];
|
|
57
|
+
readonly name: "OptimismPortal_BadTarget";
|
|
58
|
+
readonly type: "error";
|
|
59
|
+
}, {
|
|
60
|
+
readonly inputs: readonly [];
|
|
61
|
+
readonly name: "OptimismPortal_CallPaused";
|
|
62
|
+
readonly type: "error";
|
|
63
|
+
}, {
|
|
64
|
+
readonly inputs: readonly [];
|
|
65
|
+
readonly name: "OptimismPortal_CalldataTooLarge";
|
|
66
|
+
readonly type: "error";
|
|
67
|
+
}, {
|
|
68
|
+
readonly inputs: readonly [];
|
|
69
|
+
readonly name: "OptimismPortal_GasEstimation";
|
|
70
|
+
readonly type: "error";
|
|
71
|
+
}, {
|
|
72
|
+
readonly inputs: readonly [];
|
|
73
|
+
readonly name: "OptimismPortal_GasLimitTooLow";
|
|
74
|
+
readonly type: "error";
|
|
75
|
+
}, {
|
|
76
|
+
readonly inputs: readonly [];
|
|
77
|
+
readonly name: "OptimismPortal_ImproperDisputeGame";
|
|
78
|
+
readonly type: "error";
|
|
79
|
+
}, {
|
|
80
|
+
readonly inputs: readonly [];
|
|
81
|
+
readonly name: "OptimismPortal_InvalidDisputeGame";
|
|
82
|
+
readonly type: "error";
|
|
83
|
+
}, {
|
|
84
|
+
readonly inputs: readonly [];
|
|
85
|
+
readonly name: "OptimismPortal_InvalidLockboxState";
|
|
86
|
+
readonly type: "error";
|
|
87
|
+
}, {
|
|
88
|
+
readonly inputs: readonly [];
|
|
89
|
+
readonly name: "OptimismPortal_InvalidMerkleProof";
|
|
90
|
+
readonly type: "error";
|
|
91
|
+
}, {
|
|
92
|
+
readonly inputs: readonly [];
|
|
93
|
+
readonly name: "OptimismPortal_InvalidOutputRootProof";
|
|
94
|
+
readonly type: "error";
|
|
95
|
+
}, {
|
|
96
|
+
readonly inputs: readonly [];
|
|
97
|
+
readonly name: "OptimismPortal_InvalidProofTimestamp";
|
|
98
|
+
readonly type: "error";
|
|
99
|
+
}, {
|
|
100
|
+
readonly inputs: readonly [];
|
|
101
|
+
readonly name: "OptimismPortal_InvalidRootClaim";
|
|
102
|
+
readonly type: "error";
|
|
103
|
+
}, {
|
|
104
|
+
readonly inputs: readonly [];
|
|
105
|
+
readonly name: "OptimismPortal_NoReentrancy";
|
|
106
|
+
readonly type: "error";
|
|
107
|
+
}, {
|
|
108
|
+
readonly inputs: readonly [];
|
|
109
|
+
readonly name: "OptimismPortal_NotAllowedOnCGTMode";
|
|
110
|
+
readonly type: "error";
|
|
111
|
+
}, {
|
|
112
|
+
readonly inputs: readonly [];
|
|
113
|
+
readonly name: "OptimismPortal_ProofNotOldEnough";
|
|
114
|
+
readonly type: "error";
|
|
115
|
+
}, {
|
|
116
|
+
readonly inputs: readonly [];
|
|
117
|
+
readonly name: "OptimismPortal_Unproven";
|
|
118
|
+
readonly type: "error";
|
|
119
|
+
}, {
|
|
120
|
+
readonly inputs: readonly [];
|
|
121
|
+
readonly name: "OutOfGas";
|
|
122
|
+
readonly type: "error";
|
|
123
|
+
}, {
|
|
124
|
+
readonly inputs: readonly [];
|
|
125
|
+
readonly name: "ProxyAdminOwnedBase_NotProxyAdmin";
|
|
126
|
+
readonly type: "error";
|
|
127
|
+
}, {
|
|
128
|
+
readonly inputs: readonly [];
|
|
129
|
+
readonly name: "ProxyAdminOwnedBase_NotProxyAdminOrProxyAdminOwner";
|
|
130
|
+
readonly type: "error";
|
|
131
|
+
}, {
|
|
132
|
+
readonly inputs: readonly [];
|
|
133
|
+
readonly name: "ProxyAdminOwnedBase_NotProxyAdminOwner";
|
|
134
|
+
readonly type: "error";
|
|
135
|
+
}, {
|
|
136
|
+
readonly inputs: readonly [];
|
|
137
|
+
readonly name: "ProxyAdminOwnedBase_NotResolvedDelegateProxy";
|
|
138
|
+
readonly type: "error";
|
|
139
|
+
}, {
|
|
140
|
+
readonly inputs: readonly [];
|
|
141
|
+
readonly name: "ProxyAdminOwnedBase_NotSharedProxyAdminOwner";
|
|
142
|
+
readonly type: "error";
|
|
143
|
+
}, {
|
|
144
|
+
readonly inputs: readonly [];
|
|
145
|
+
readonly name: "ProxyAdminOwnedBase_ProxyAdminNotFound";
|
|
146
|
+
readonly type: "error";
|
|
147
|
+
}, {
|
|
148
|
+
readonly inputs: readonly [];
|
|
149
|
+
readonly name: "ReinitializableBase_ZeroInitVersion";
|
|
150
|
+
readonly type: "error";
|
|
151
|
+
}, {
|
|
152
|
+
readonly inputs: readonly [];
|
|
153
|
+
readonly name: "UnexpectedList";
|
|
154
|
+
readonly type: "error";
|
|
155
|
+
}, {
|
|
156
|
+
readonly inputs: readonly [];
|
|
157
|
+
readonly name: "UnexpectedString";
|
|
158
|
+
readonly type: "error";
|
|
159
|
+
}, {
|
|
160
|
+
readonly anonymous: false;
|
|
161
|
+
readonly inputs: readonly [{
|
|
162
|
+
readonly indexed: false;
|
|
163
|
+
readonly internalType: "uint8";
|
|
164
|
+
readonly name: "version";
|
|
165
|
+
readonly type: "uint8";
|
|
166
|
+
}];
|
|
167
|
+
readonly name: "Initialized";
|
|
168
|
+
readonly type: "event";
|
|
169
|
+
}, {
|
|
170
|
+
readonly anonymous: false;
|
|
171
|
+
readonly inputs: readonly [{
|
|
172
|
+
readonly indexed: true;
|
|
173
|
+
readonly internalType: "address";
|
|
174
|
+
readonly name: "from";
|
|
175
|
+
readonly type: "address";
|
|
176
|
+
}, {
|
|
177
|
+
readonly indexed: true;
|
|
178
|
+
readonly internalType: "address";
|
|
179
|
+
readonly name: "to";
|
|
180
|
+
readonly type: "address";
|
|
181
|
+
}, {
|
|
182
|
+
readonly indexed: true;
|
|
183
|
+
readonly internalType: "uint256";
|
|
184
|
+
readonly name: "version";
|
|
185
|
+
readonly type: "uint256";
|
|
186
|
+
}, {
|
|
187
|
+
readonly indexed: false;
|
|
188
|
+
readonly internalType: "bytes";
|
|
189
|
+
readonly name: "opaqueData";
|
|
190
|
+
readonly type: "bytes";
|
|
191
|
+
}];
|
|
192
|
+
readonly name: "TransactionDeposited";
|
|
193
|
+
readonly type: "event";
|
|
194
|
+
}, {
|
|
195
|
+
readonly anonymous: false;
|
|
196
|
+
readonly inputs: readonly [{
|
|
197
|
+
readonly indexed: true;
|
|
198
|
+
readonly internalType: "bytes32";
|
|
199
|
+
readonly name: "withdrawalHash";
|
|
200
|
+
readonly type: "bytes32";
|
|
201
|
+
}, {
|
|
202
|
+
readonly indexed: false;
|
|
203
|
+
readonly internalType: "bool";
|
|
204
|
+
readonly name: "success";
|
|
205
|
+
readonly type: "bool";
|
|
206
|
+
}];
|
|
207
|
+
readonly name: "WithdrawalFinalized";
|
|
208
|
+
readonly type: "event";
|
|
209
|
+
}, {
|
|
210
|
+
readonly anonymous: false;
|
|
211
|
+
readonly inputs: readonly [{
|
|
212
|
+
readonly indexed: true;
|
|
213
|
+
readonly internalType: "bytes32";
|
|
214
|
+
readonly name: "withdrawalHash";
|
|
215
|
+
readonly type: "bytes32";
|
|
216
|
+
}, {
|
|
217
|
+
readonly indexed: true;
|
|
218
|
+
readonly internalType: "address";
|
|
219
|
+
readonly name: "from";
|
|
220
|
+
readonly type: "address";
|
|
221
|
+
}, {
|
|
222
|
+
readonly indexed: true;
|
|
223
|
+
readonly internalType: "address";
|
|
224
|
+
readonly name: "to";
|
|
225
|
+
readonly type: "address";
|
|
226
|
+
}];
|
|
227
|
+
readonly name: "WithdrawalProven";
|
|
228
|
+
readonly type: "event";
|
|
229
|
+
}, {
|
|
230
|
+
readonly anonymous: false;
|
|
231
|
+
readonly inputs: readonly [{
|
|
232
|
+
readonly indexed: true;
|
|
233
|
+
readonly internalType: "bytes32";
|
|
234
|
+
readonly name: "withdrawalHash";
|
|
235
|
+
readonly type: "bytes32";
|
|
236
|
+
}, {
|
|
237
|
+
readonly indexed: true;
|
|
238
|
+
readonly internalType: "address";
|
|
239
|
+
readonly name: "proofSubmitter";
|
|
240
|
+
readonly type: "address";
|
|
241
|
+
}];
|
|
242
|
+
readonly name: "WithdrawalProvenExtension1";
|
|
243
|
+
readonly type: "event";
|
|
244
|
+
}, {
|
|
245
|
+
readonly inputs: readonly [];
|
|
246
|
+
readonly name: "anchorStateRegistry";
|
|
247
|
+
readonly outputs: readonly [{
|
|
248
|
+
readonly internalType: "contract IAnchorStateRegistry";
|
|
249
|
+
readonly name: "";
|
|
250
|
+
readonly type: "address";
|
|
251
|
+
}];
|
|
252
|
+
readonly stateMutability: "view";
|
|
253
|
+
readonly type: "function";
|
|
254
|
+
}, {
|
|
255
|
+
readonly inputs: readonly [{
|
|
256
|
+
readonly internalType: "bytes32";
|
|
257
|
+
readonly name: "_withdrawalHash";
|
|
258
|
+
readonly type: "bytes32";
|
|
259
|
+
}, {
|
|
260
|
+
readonly internalType: "address";
|
|
261
|
+
readonly name: "_proofSubmitter";
|
|
262
|
+
readonly type: "address";
|
|
263
|
+
}];
|
|
264
|
+
readonly name: "checkWithdrawal";
|
|
265
|
+
readonly outputs: readonly [];
|
|
266
|
+
readonly stateMutability: "view";
|
|
267
|
+
readonly type: "function";
|
|
268
|
+
}, {
|
|
269
|
+
readonly inputs: readonly [{
|
|
270
|
+
readonly internalType: "address";
|
|
271
|
+
readonly name: "_to";
|
|
272
|
+
readonly type: "address";
|
|
273
|
+
}, {
|
|
274
|
+
readonly internalType: "uint256";
|
|
275
|
+
readonly name: "_value";
|
|
276
|
+
readonly type: "uint256";
|
|
277
|
+
}, {
|
|
278
|
+
readonly internalType: "uint64";
|
|
279
|
+
readonly name: "_gasLimit";
|
|
280
|
+
readonly type: "uint64";
|
|
281
|
+
}, {
|
|
282
|
+
readonly internalType: "bool";
|
|
283
|
+
readonly name: "_isCreation";
|
|
284
|
+
readonly type: "bool";
|
|
285
|
+
}, {
|
|
286
|
+
readonly internalType: "bytes";
|
|
287
|
+
readonly name: "_data";
|
|
288
|
+
readonly type: "bytes";
|
|
289
|
+
}];
|
|
290
|
+
readonly name: "depositTransaction";
|
|
291
|
+
readonly outputs: readonly [];
|
|
292
|
+
readonly stateMutability: "payable";
|
|
293
|
+
readonly type: "function";
|
|
294
|
+
}, {
|
|
295
|
+
readonly inputs: readonly [{
|
|
296
|
+
readonly internalType: "contract IDisputeGame";
|
|
297
|
+
readonly name: "_disputeGame";
|
|
298
|
+
readonly type: "address";
|
|
299
|
+
}];
|
|
300
|
+
readonly name: "disputeGameBlacklist";
|
|
301
|
+
readonly outputs: readonly [{
|
|
302
|
+
readonly internalType: "bool";
|
|
303
|
+
readonly name: "";
|
|
304
|
+
readonly type: "bool";
|
|
305
|
+
}];
|
|
306
|
+
readonly stateMutability: "view";
|
|
307
|
+
readonly type: "function";
|
|
308
|
+
}, {
|
|
309
|
+
readonly inputs: readonly [];
|
|
310
|
+
readonly name: "disputeGameFactory";
|
|
311
|
+
readonly outputs: readonly [{
|
|
312
|
+
readonly internalType: "contract IDisputeGameFactory";
|
|
313
|
+
readonly name: "";
|
|
314
|
+
readonly type: "address";
|
|
315
|
+
}];
|
|
316
|
+
readonly stateMutability: "view";
|
|
317
|
+
readonly type: "function";
|
|
318
|
+
}, {
|
|
319
|
+
readonly inputs: readonly [];
|
|
320
|
+
readonly name: "disputeGameFinalityDelaySeconds";
|
|
321
|
+
readonly outputs: readonly [{
|
|
322
|
+
readonly internalType: "uint256";
|
|
323
|
+
readonly name: "";
|
|
324
|
+
readonly type: "uint256";
|
|
325
|
+
}];
|
|
326
|
+
readonly stateMutability: "view";
|
|
327
|
+
readonly type: "function";
|
|
328
|
+
}, {
|
|
329
|
+
readonly inputs: readonly [];
|
|
330
|
+
readonly name: "donateETH";
|
|
331
|
+
readonly outputs: readonly [];
|
|
332
|
+
readonly stateMutability: "payable";
|
|
333
|
+
readonly type: "function";
|
|
334
|
+
}, {
|
|
335
|
+
readonly inputs: readonly [];
|
|
336
|
+
readonly name: "ethLockbox";
|
|
337
|
+
readonly outputs: readonly [{
|
|
338
|
+
readonly internalType: "contract IETHLockbox";
|
|
339
|
+
readonly name: "";
|
|
340
|
+
readonly type: "address";
|
|
341
|
+
}];
|
|
342
|
+
readonly stateMutability: "view";
|
|
343
|
+
readonly type: "function";
|
|
344
|
+
}, {
|
|
345
|
+
readonly inputs: readonly [{
|
|
346
|
+
readonly components: readonly [{
|
|
347
|
+
readonly internalType: "uint256";
|
|
348
|
+
readonly name: "nonce";
|
|
349
|
+
readonly type: "uint256";
|
|
350
|
+
}, {
|
|
351
|
+
readonly internalType: "address";
|
|
352
|
+
readonly name: "sender";
|
|
353
|
+
readonly type: "address";
|
|
354
|
+
}, {
|
|
355
|
+
readonly internalType: "address";
|
|
356
|
+
readonly name: "target";
|
|
357
|
+
readonly type: "address";
|
|
358
|
+
}, {
|
|
359
|
+
readonly internalType: "uint256";
|
|
360
|
+
readonly name: "value";
|
|
361
|
+
readonly type: "uint256";
|
|
362
|
+
}, {
|
|
363
|
+
readonly internalType: "uint256";
|
|
364
|
+
readonly name: "gasLimit";
|
|
365
|
+
readonly type: "uint256";
|
|
366
|
+
}, {
|
|
367
|
+
readonly internalType: "bytes";
|
|
368
|
+
readonly name: "data";
|
|
369
|
+
readonly type: "bytes";
|
|
370
|
+
}];
|
|
371
|
+
readonly internalType: "struct Types.WithdrawalTransaction";
|
|
372
|
+
readonly name: "_tx";
|
|
373
|
+
readonly type: "tuple";
|
|
374
|
+
}];
|
|
375
|
+
readonly name: "finalizeWithdrawalTransaction";
|
|
376
|
+
readonly outputs: readonly [];
|
|
377
|
+
readonly stateMutability: "nonpayable";
|
|
378
|
+
readonly type: "function";
|
|
379
|
+
}, {
|
|
380
|
+
readonly inputs: readonly [{
|
|
381
|
+
readonly components: readonly [{
|
|
382
|
+
readonly internalType: "uint256";
|
|
383
|
+
readonly name: "nonce";
|
|
384
|
+
readonly type: "uint256";
|
|
385
|
+
}, {
|
|
386
|
+
readonly internalType: "address";
|
|
387
|
+
readonly name: "sender";
|
|
388
|
+
readonly type: "address";
|
|
389
|
+
}, {
|
|
390
|
+
readonly internalType: "address";
|
|
391
|
+
readonly name: "target";
|
|
392
|
+
readonly type: "address";
|
|
393
|
+
}, {
|
|
394
|
+
readonly internalType: "uint256";
|
|
395
|
+
readonly name: "value";
|
|
396
|
+
readonly type: "uint256";
|
|
397
|
+
}, {
|
|
398
|
+
readonly internalType: "uint256";
|
|
399
|
+
readonly name: "gasLimit";
|
|
400
|
+
readonly type: "uint256";
|
|
401
|
+
}, {
|
|
402
|
+
readonly internalType: "bytes";
|
|
403
|
+
readonly name: "data";
|
|
404
|
+
readonly type: "bytes";
|
|
405
|
+
}];
|
|
406
|
+
readonly internalType: "struct Types.WithdrawalTransaction";
|
|
407
|
+
readonly name: "_tx";
|
|
408
|
+
readonly type: "tuple";
|
|
409
|
+
}, {
|
|
410
|
+
readonly internalType: "address";
|
|
411
|
+
readonly name: "_proofSubmitter";
|
|
412
|
+
readonly type: "address";
|
|
413
|
+
}];
|
|
414
|
+
readonly name: "finalizeWithdrawalTransactionExternalProof";
|
|
415
|
+
readonly outputs: readonly [];
|
|
416
|
+
readonly stateMutability: "nonpayable";
|
|
417
|
+
readonly type: "function";
|
|
418
|
+
}, {
|
|
419
|
+
readonly inputs: readonly [{
|
|
420
|
+
readonly internalType: "bytes32";
|
|
421
|
+
readonly name: "";
|
|
422
|
+
readonly type: "bytes32";
|
|
423
|
+
}];
|
|
424
|
+
readonly name: "finalizedWithdrawals";
|
|
425
|
+
readonly outputs: readonly [{
|
|
426
|
+
readonly internalType: "bool";
|
|
427
|
+
readonly name: "";
|
|
428
|
+
readonly type: "bool";
|
|
429
|
+
}];
|
|
430
|
+
readonly stateMutability: "view";
|
|
431
|
+
readonly type: "function";
|
|
432
|
+
}, {
|
|
433
|
+
readonly inputs: readonly [];
|
|
434
|
+
readonly name: "guardian";
|
|
435
|
+
readonly outputs: readonly [{
|
|
436
|
+
readonly internalType: "address";
|
|
437
|
+
readonly name: "";
|
|
438
|
+
readonly type: "address";
|
|
439
|
+
}];
|
|
440
|
+
readonly stateMutability: "view";
|
|
441
|
+
readonly type: "function";
|
|
442
|
+
}, {
|
|
443
|
+
readonly inputs: readonly [];
|
|
444
|
+
readonly name: "initVersion";
|
|
445
|
+
readonly outputs: readonly [{
|
|
446
|
+
readonly internalType: "uint8";
|
|
447
|
+
readonly name: "";
|
|
448
|
+
readonly type: "uint8";
|
|
449
|
+
}];
|
|
450
|
+
readonly stateMutability: "view";
|
|
451
|
+
readonly type: "function";
|
|
452
|
+
}, {
|
|
453
|
+
readonly inputs: readonly [{
|
|
454
|
+
readonly internalType: "contract ISystemConfig";
|
|
455
|
+
readonly name: "_systemConfig";
|
|
456
|
+
readonly type: "address";
|
|
457
|
+
}, {
|
|
458
|
+
readonly internalType: "contract IAnchorStateRegistry";
|
|
459
|
+
readonly name: "_anchorStateRegistry";
|
|
460
|
+
readonly type: "address";
|
|
461
|
+
}];
|
|
462
|
+
readonly name: "initialize";
|
|
463
|
+
readonly outputs: readonly [];
|
|
464
|
+
readonly stateMutability: "nonpayable";
|
|
465
|
+
readonly type: "function";
|
|
466
|
+
}, {
|
|
467
|
+
readonly inputs: readonly [];
|
|
468
|
+
readonly name: "l2Sender";
|
|
469
|
+
readonly outputs: readonly [{
|
|
470
|
+
readonly internalType: "address";
|
|
471
|
+
readonly name: "";
|
|
472
|
+
readonly type: "address";
|
|
473
|
+
}];
|
|
474
|
+
readonly stateMutability: "view";
|
|
475
|
+
readonly type: "function";
|
|
476
|
+
}, {
|
|
477
|
+
readonly inputs: readonly [{
|
|
478
|
+
readonly internalType: "uint64";
|
|
479
|
+
readonly name: "_byteCount";
|
|
480
|
+
readonly type: "uint64";
|
|
481
|
+
}];
|
|
482
|
+
readonly name: "minimumGasLimit";
|
|
483
|
+
readonly outputs: readonly [{
|
|
484
|
+
readonly internalType: "uint64";
|
|
485
|
+
readonly name: "";
|
|
486
|
+
readonly type: "uint64";
|
|
487
|
+
}];
|
|
488
|
+
readonly stateMutability: "pure";
|
|
489
|
+
readonly type: "function";
|
|
490
|
+
}, {
|
|
491
|
+
readonly inputs: readonly [{
|
|
492
|
+
readonly internalType: "bytes32";
|
|
493
|
+
readonly name: "_withdrawalHash";
|
|
494
|
+
readonly type: "bytes32";
|
|
495
|
+
}];
|
|
496
|
+
readonly name: "numProofSubmitters";
|
|
497
|
+
readonly outputs: readonly [{
|
|
498
|
+
readonly internalType: "uint256";
|
|
499
|
+
readonly name: "";
|
|
500
|
+
readonly type: "uint256";
|
|
501
|
+
}];
|
|
502
|
+
readonly stateMutability: "view";
|
|
503
|
+
readonly type: "function";
|
|
504
|
+
}, {
|
|
505
|
+
readonly inputs: readonly [];
|
|
506
|
+
readonly name: "params";
|
|
507
|
+
readonly outputs: readonly [{
|
|
508
|
+
readonly internalType: "uint128";
|
|
509
|
+
readonly name: "prevBaseFee";
|
|
510
|
+
readonly type: "uint128";
|
|
511
|
+
}, {
|
|
512
|
+
readonly internalType: "uint64";
|
|
513
|
+
readonly name: "prevBoughtGas";
|
|
514
|
+
readonly type: "uint64";
|
|
515
|
+
}, {
|
|
516
|
+
readonly internalType: "uint64";
|
|
517
|
+
readonly name: "prevBlockNum";
|
|
518
|
+
readonly type: "uint64";
|
|
519
|
+
}];
|
|
520
|
+
readonly stateMutability: "view";
|
|
521
|
+
readonly type: "function";
|
|
522
|
+
}, {
|
|
523
|
+
readonly inputs: readonly [];
|
|
524
|
+
readonly name: "paused";
|
|
525
|
+
readonly outputs: readonly [{
|
|
526
|
+
readonly internalType: "bool";
|
|
527
|
+
readonly name: "";
|
|
528
|
+
readonly type: "bool";
|
|
529
|
+
}];
|
|
530
|
+
readonly stateMutability: "view";
|
|
531
|
+
readonly type: "function";
|
|
532
|
+
}, {
|
|
533
|
+
readonly inputs: readonly [];
|
|
534
|
+
readonly name: "proofMaturityDelaySeconds";
|
|
535
|
+
readonly outputs: readonly [{
|
|
536
|
+
readonly internalType: "uint256";
|
|
537
|
+
readonly name: "";
|
|
538
|
+
readonly type: "uint256";
|
|
539
|
+
}];
|
|
540
|
+
readonly stateMutability: "view";
|
|
541
|
+
readonly type: "function";
|
|
542
|
+
}, {
|
|
543
|
+
readonly inputs: readonly [{
|
|
544
|
+
readonly internalType: "bytes32";
|
|
545
|
+
readonly name: "";
|
|
546
|
+
readonly type: "bytes32";
|
|
547
|
+
}, {
|
|
548
|
+
readonly internalType: "uint256";
|
|
549
|
+
readonly name: "";
|
|
550
|
+
readonly type: "uint256";
|
|
551
|
+
}];
|
|
552
|
+
readonly name: "proofSubmitters";
|
|
553
|
+
readonly outputs: readonly [{
|
|
554
|
+
readonly internalType: "address";
|
|
555
|
+
readonly name: "";
|
|
556
|
+
readonly type: "address";
|
|
557
|
+
}];
|
|
558
|
+
readonly stateMutability: "view";
|
|
559
|
+
readonly type: "function";
|
|
560
|
+
}, {
|
|
561
|
+
readonly inputs: readonly [{
|
|
562
|
+
readonly components: readonly [{
|
|
563
|
+
readonly internalType: "uint256";
|
|
564
|
+
readonly name: "nonce";
|
|
565
|
+
readonly type: "uint256";
|
|
566
|
+
}, {
|
|
567
|
+
readonly internalType: "address";
|
|
568
|
+
readonly name: "sender";
|
|
569
|
+
readonly type: "address";
|
|
570
|
+
}, {
|
|
571
|
+
readonly internalType: "address";
|
|
572
|
+
readonly name: "target";
|
|
573
|
+
readonly type: "address";
|
|
574
|
+
}, {
|
|
575
|
+
readonly internalType: "uint256";
|
|
576
|
+
readonly name: "value";
|
|
577
|
+
readonly type: "uint256";
|
|
578
|
+
}, {
|
|
579
|
+
readonly internalType: "uint256";
|
|
580
|
+
readonly name: "gasLimit";
|
|
581
|
+
readonly type: "uint256";
|
|
582
|
+
}, {
|
|
583
|
+
readonly internalType: "bytes";
|
|
584
|
+
readonly name: "data";
|
|
585
|
+
readonly type: "bytes";
|
|
586
|
+
}];
|
|
587
|
+
readonly internalType: "struct Types.WithdrawalTransaction";
|
|
588
|
+
readonly name: "_tx";
|
|
589
|
+
readonly type: "tuple";
|
|
590
|
+
}, {
|
|
591
|
+
readonly internalType: "uint256";
|
|
592
|
+
readonly name: "_disputeGameIndex";
|
|
593
|
+
readonly type: "uint256";
|
|
594
|
+
}, {
|
|
595
|
+
readonly components: readonly [{
|
|
596
|
+
readonly internalType: "bytes32";
|
|
597
|
+
readonly name: "version";
|
|
598
|
+
readonly type: "bytes32";
|
|
599
|
+
}, {
|
|
600
|
+
readonly internalType: "bytes32";
|
|
601
|
+
readonly name: "stateRoot";
|
|
602
|
+
readonly type: "bytes32";
|
|
603
|
+
}, {
|
|
604
|
+
readonly internalType: "bytes32";
|
|
605
|
+
readonly name: "messagePasserStorageRoot";
|
|
606
|
+
readonly type: "bytes32";
|
|
607
|
+
}, {
|
|
608
|
+
readonly internalType: "bytes32";
|
|
609
|
+
readonly name: "latestBlockhash";
|
|
610
|
+
readonly type: "bytes32";
|
|
611
|
+
}];
|
|
612
|
+
readonly internalType: "struct Types.OutputRootProof";
|
|
613
|
+
readonly name: "_outputRootProof";
|
|
614
|
+
readonly type: "tuple";
|
|
615
|
+
}, {
|
|
616
|
+
readonly internalType: "bytes[]";
|
|
617
|
+
readonly name: "_withdrawalProof";
|
|
618
|
+
readonly type: "bytes[]";
|
|
619
|
+
}];
|
|
620
|
+
readonly name: "proveWithdrawalTransaction";
|
|
621
|
+
readonly outputs: readonly [];
|
|
622
|
+
readonly stateMutability: "nonpayable";
|
|
623
|
+
readonly type: "function";
|
|
624
|
+
}, {
|
|
625
|
+
readonly inputs: readonly [{
|
|
626
|
+
readonly internalType: "bytes32";
|
|
627
|
+
readonly name: "";
|
|
628
|
+
readonly type: "bytes32";
|
|
629
|
+
}, {
|
|
630
|
+
readonly internalType: "address";
|
|
631
|
+
readonly name: "";
|
|
632
|
+
readonly type: "address";
|
|
633
|
+
}];
|
|
634
|
+
readonly name: "provenWithdrawals";
|
|
635
|
+
readonly outputs: readonly [{
|
|
636
|
+
readonly internalType: "contract IDisputeGame";
|
|
637
|
+
readonly name: "disputeGameProxy";
|
|
638
|
+
readonly type: "address";
|
|
639
|
+
}, {
|
|
640
|
+
readonly internalType: "uint64";
|
|
641
|
+
readonly name: "timestamp";
|
|
642
|
+
readonly type: "uint64";
|
|
643
|
+
}];
|
|
644
|
+
readonly stateMutability: "view";
|
|
645
|
+
readonly type: "function";
|
|
646
|
+
}, {
|
|
647
|
+
readonly inputs: readonly [];
|
|
648
|
+
readonly name: "proxyAdmin";
|
|
649
|
+
readonly outputs: readonly [{
|
|
650
|
+
readonly internalType: "contract IProxyAdmin";
|
|
651
|
+
readonly name: "";
|
|
652
|
+
readonly type: "address";
|
|
653
|
+
}];
|
|
654
|
+
readonly stateMutability: "view";
|
|
655
|
+
readonly type: "function";
|
|
656
|
+
}, {
|
|
657
|
+
readonly inputs: readonly [];
|
|
658
|
+
readonly name: "proxyAdminOwner";
|
|
659
|
+
readonly outputs: readonly [{
|
|
660
|
+
readonly internalType: "address";
|
|
661
|
+
readonly name: "";
|
|
662
|
+
readonly type: "address";
|
|
663
|
+
}];
|
|
664
|
+
readonly stateMutability: "view";
|
|
665
|
+
readonly type: "function";
|
|
666
|
+
}, {
|
|
667
|
+
readonly inputs: readonly [];
|
|
668
|
+
readonly name: "respectedGameType";
|
|
669
|
+
readonly outputs: readonly [{
|
|
670
|
+
readonly internalType: "GameType";
|
|
671
|
+
readonly name: "";
|
|
672
|
+
readonly type: "uint32";
|
|
673
|
+
}];
|
|
674
|
+
readonly stateMutability: "view";
|
|
675
|
+
readonly type: "function";
|
|
676
|
+
}, {
|
|
677
|
+
readonly inputs: readonly [];
|
|
678
|
+
readonly name: "respectedGameTypeUpdatedAt";
|
|
679
|
+
readonly outputs: readonly [{
|
|
680
|
+
readonly internalType: "uint64";
|
|
681
|
+
readonly name: "";
|
|
682
|
+
readonly type: "uint64";
|
|
683
|
+
}];
|
|
684
|
+
readonly stateMutability: "view";
|
|
685
|
+
readonly type: "function";
|
|
686
|
+
}, {
|
|
687
|
+
readonly inputs: readonly [];
|
|
688
|
+
readonly name: "superchainConfig";
|
|
689
|
+
readonly outputs: readonly [{
|
|
690
|
+
readonly internalType: "contract ISuperchainConfig";
|
|
691
|
+
readonly name: "";
|
|
692
|
+
readonly type: "address";
|
|
693
|
+
}];
|
|
694
|
+
readonly stateMutability: "view";
|
|
695
|
+
readonly type: "function";
|
|
696
|
+
}, {
|
|
697
|
+
readonly inputs: readonly [];
|
|
698
|
+
readonly name: "systemConfig";
|
|
699
|
+
readonly outputs: readonly [{
|
|
700
|
+
readonly internalType: "contract ISystemConfig";
|
|
701
|
+
readonly name: "";
|
|
702
|
+
readonly type: "address";
|
|
703
|
+
}];
|
|
704
|
+
readonly stateMutability: "view";
|
|
705
|
+
readonly type: "function";
|
|
706
|
+
}, {
|
|
707
|
+
readonly inputs: readonly [];
|
|
708
|
+
readonly name: "version";
|
|
709
|
+
readonly outputs: readonly [{
|
|
710
|
+
readonly internalType: "string";
|
|
711
|
+
readonly name: "";
|
|
712
|
+
readonly type: "string";
|
|
713
|
+
}];
|
|
714
|
+
readonly stateMutability: "pure";
|
|
715
|
+
readonly type: "function";
|
|
716
|
+
}, {
|
|
717
|
+
readonly stateMutability: "payable";
|
|
718
|
+
readonly type: "receive";
|
|
719
|
+
}];
|
|
720
|
+
/**
|
|
721
|
+
* Type-safe ABI for OptimismPortal2_json
|
|
722
|
+
*/
|
|
723
|
+
export type OptimismPortal2_jsonAbi = typeof OptimismPortal2_jsonAbi;
|
|
724
|
+
/**
|
|
725
|
+
* Contract instance type for OptimismPortal2_json
|
|
726
|
+
*/
|
|
727
|
+
export type OptimismPortal2_jsonContract = any;
|
|
728
|
+
/**
|
|
729
|
+
* OptimismPortal2_json Contract Class
|
|
730
|
+
*
|
|
731
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
732
|
+
*
|
|
733
|
+
* @example
|
|
734
|
+
* ```typescript
|
|
735
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
736
|
+
* import { mainnet } from 'viem/chains';
|
|
737
|
+
* import { OptimismPortal2_json } from 'OptimismPortal2_json';
|
|
738
|
+
*
|
|
739
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
740
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
741
|
+
*
|
|
742
|
+
* const contract = new OptimismPortal2_json('0x...', { publicClient, walletClient });
|
|
743
|
+
*
|
|
744
|
+
* // Read functions
|
|
745
|
+
* const result = await contract.balanceOf('0x...');
|
|
746
|
+
*
|
|
747
|
+
* // Write functions
|
|
748
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
749
|
+
*
|
|
750
|
+
* // Simulate transactions (dry-run)
|
|
751
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
752
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
753
|
+
*
|
|
754
|
+
* // Watch events
|
|
755
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
756
|
+
* console.log('Transfer event:', event);
|
|
757
|
+
* });
|
|
758
|
+
* ```
|
|
759
|
+
*/
|
|
760
|
+
export declare class OptimismPortal2_json {
|
|
761
|
+
private contract;
|
|
762
|
+
private contractAddress;
|
|
763
|
+
private publicClient;
|
|
764
|
+
constructor(address: Address, clients: {
|
|
765
|
+
publicClient: PublicClient;
|
|
766
|
+
walletClient?: WalletClient;
|
|
767
|
+
});
|
|
768
|
+
/**
|
|
769
|
+
* Get the contract address
|
|
770
|
+
*/
|
|
771
|
+
get address(): Address;
|
|
772
|
+
/**
|
|
773
|
+
* Get the underlying viem contract instance
|
|
774
|
+
*/
|
|
775
|
+
getContract(): OptimismPortal2_jsonContract;
|
|
776
|
+
/**
|
|
777
|
+
* anchorStateRegistry
|
|
778
|
+
* view
|
|
779
|
+
*/
|
|
780
|
+
anchorStateRegistry(): Promise<`0x${string}`>;
|
|
781
|
+
/**
|
|
782
|
+
* checkWithdrawal
|
|
783
|
+
* view
|
|
784
|
+
*/
|
|
785
|
+
checkWithdrawal(_withdrawalHash: `0x${string}`, _proofSubmitter: `0x${string}`): Promise<void>;
|
|
786
|
+
/**
|
|
787
|
+
* disputeGameBlacklist
|
|
788
|
+
* view
|
|
789
|
+
*/
|
|
790
|
+
disputeGameBlacklist(_disputeGame: `0x${string}`): Promise<boolean>;
|
|
791
|
+
/**
|
|
792
|
+
* disputeGameFactory
|
|
793
|
+
* view
|
|
794
|
+
*/
|
|
795
|
+
disputeGameFactory(): Promise<`0x${string}`>;
|
|
796
|
+
/**
|
|
797
|
+
* disputeGameFinalityDelaySeconds
|
|
798
|
+
* view
|
|
799
|
+
*/
|
|
800
|
+
disputeGameFinalityDelaySeconds(): Promise<bigint>;
|
|
801
|
+
/**
|
|
802
|
+
* ethLockbox
|
|
803
|
+
* view
|
|
804
|
+
*/
|
|
805
|
+
ethLockbox(): Promise<`0x${string}`>;
|
|
806
|
+
/**
|
|
807
|
+
* finalizedWithdrawals
|
|
808
|
+
* view
|
|
809
|
+
*/
|
|
810
|
+
finalizedWithdrawals(arg0: `0x${string}`): Promise<boolean>;
|
|
811
|
+
/**
|
|
812
|
+
* guardian
|
|
813
|
+
* view
|
|
814
|
+
*/
|
|
815
|
+
guardian(): Promise<`0x${string}`>;
|
|
816
|
+
/**
|
|
817
|
+
* initVersion
|
|
818
|
+
* view
|
|
819
|
+
*/
|
|
820
|
+
initVersion(): Promise<bigint>;
|
|
821
|
+
/**
|
|
822
|
+
* l2Sender
|
|
823
|
+
* view
|
|
824
|
+
*/
|
|
825
|
+
l2Sender(): Promise<`0x${string}`>;
|
|
826
|
+
/**
|
|
827
|
+
* minimumGasLimit
|
|
828
|
+
* pure
|
|
829
|
+
*/
|
|
830
|
+
minimumGasLimit(_byteCount: bigint): Promise<bigint>;
|
|
831
|
+
/**
|
|
832
|
+
* numProofSubmitters
|
|
833
|
+
* view
|
|
834
|
+
*/
|
|
835
|
+
numProofSubmitters(_withdrawalHash: `0x${string}`): Promise<bigint>;
|
|
836
|
+
/**
|
|
837
|
+
* params
|
|
838
|
+
* view
|
|
839
|
+
*/
|
|
840
|
+
params(): Promise<[bigint, bigint, bigint]>;
|
|
841
|
+
/**
|
|
842
|
+
* paused
|
|
843
|
+
* view
|
|
844
|
+
*/
|
|
845
|
+
paused(): Promise<boolean>;
|
|
846
|
+
/**
|
|
847
|
+
* proofMaturityDelaySeconds
|
|
848
|
+
* view
|
|
849
|
+
*/
|
|
850
|
+
proofMaturityDelaySeconds(): Promise<bigint>;
|
|
851
|
+
/**
|
|
852
|
+
* proofSubmitters
|
|
853
|
+
* view
|
|
854
|
+
*/
|
|
855
|
+
proofSubmitters(arg0: `0x${string}`, arg1: bigint): Promise<`0x${string}`>;
|
|
856
|
+
/**
|
|
857
|
+
* provenWithdrawals
|
|
858
|
+
* view
|
|
859
|
+
*/
|
|
860
|
+
provenWithdrawals(arg0: `0x${string}`, arg1: `0x${string}`): Promise<[`0x${string}`, bigint]>;
|
|
861
|
+
/**
|
|
862
|
+
* proxyAdmin
|
|
863
|
+
* view
|
|
864
|
+
*/
|
|
865
|
+
proxyAdmin(): Promise<`0x${string}`>;
|
|
866
|
+
/**
|
|
867
|
+
* proxyAdminOwner
|
|
868
|
+
* view
|
|
869
|
+
*/
|
|
870
|
+
proxyAdminOwner(): Promise<`0x${string}`>;
|
|
871
|
+
/**
|
|
872
|
+
* respectedGameType
|
|
873
|
+
* view
|
|
874
|
+
*/
|
|
875
|
+
respectedGameType(): Promise<bigint>;
|
|
876
|
+
/**
|
|
877
|
+
* respectedGameTypeUpdatedAt
|
|
878
|
+
* view
|
|
879
|
+
*/
|
|
880
|
+
respectedGameTypeUpdatedAt(): Promise<bigint>;
|
|
881
|
+
/**
|
|
882
|
+
* superchainConfig
|
|
883
|
+
* view
|
|
884
|
+
*/
|
|
885
|
+
superchainConfig(): Promise<`0x${string}`>;
|
|
886
|
+
/**
|
|
887
|
+
* systemConfig
|
|
888
|
+
* view
|
|
889
|
+
*/
|
|
890
|
+
systemConfig(): Promise<`0x${string}`>;
|
|
891
|
+
/**
|
|
892
|
+
* version
|
|
893
|
+
* pure
|
|
894
|
+
*/
|
|
895
|
+
version(): Promise<string>;
|
|
896
|
+
/**
|
|
897
|
+
* depositTransaction
|
|
898
|
+
* payable
|
|
899
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
900
|
+
*/
|
|
901
|
+
depositTransaction(_to: `0x${string}`, _value: bigint, _gasLimit: bigint, _isCreation: boolean, _data: `0x${string}`, options?: {
|
|
902
|
+
accessList?: import('viem').AccessList;
|
|
903
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
904
|
+
chain?: import('viem').Chain | null;
|
|
905
|
+
dataSuffix?: `0x${string}`;
|
|
906
|
+
gas?: bigint;
|
|
907
|
+
gasPrice?: bigint;
|
|
908
|
+
maxFeePerGas?: bigint;
|
|
909
|
+
maxPriorityFeePerGas?: bigint;
|
|
910
|
+
nonce?: number;
|
|
911
|
+
value?: bigint;
|
|
912
|
+
}): Promise<`0x${string}`>;
|
|
913
|
+
/**
|
|
914
|
+
* donateETH
|
|
915
|
+
* payable
|
|
916
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
917
|
+
*/
|
|
918
|
+
donateETH(options?: {
|
|
919
|
+
accessList?: import('viem').AccessList;
|
|
920
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
921
|
+
chain?: import('viem').Chain | null;
|
|
922
|
+
dataSuffix?: `0x${string}`;
|
|
923
|
+
gas?: bigint;
|
|
924
|
+
gasPrice?: bigint;
|
|
925
|
+
maxFeePerGas?: bigint;
|
|
926
|
+
maxPriorityFeePerGas?: bigint;
|
|
927
|
+
nonce?: number;
|
|
928
|
+
value?: bigint;
|
|
929
|
+
}): Promise<`0x${string}`>;
|
|
930
|
+
/**
|
|
931
|
+
* finalizeWithdrawalTransaction
|
|
932
|
+
* nonpayable
|
|
933
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
934
|
+
*/
|
|
935
|
+
finalizeWithdrawalTransaction(_tx: Types_WithdrawalTransaction, options?: {
|
|
936
|
+
accessList?: import('viem').AccessList;
|
|
937
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
938
|
+
chain?: import('viem').Chain | null;
|
|
939
|
+
dataSuffix?: `0x${string}`;
|
|
940
|
+
gas?: bigint;
|
|
941
|
+
gasPrice?: bigint;
|
|
942
|
+
maxFeePerGas?: bigint;
|
|
943
|
+
maxPriorityFeePerGas?: bigint;
|
|
944
|
+
nonce?: number;
|
|
945
|
+
value?: bigint;
|
|
946
|
+
}): Promise<`0x${string}`>;
|
|
947
|
+
/**
|
|
948
|
+
* finalizeWithdrawalTransactionExternalProof
|
|
949
|
+
* nonpayable
|
|
950
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
951
|
+
*/
|
|
952
|
+
finalizeWithdrawalTransactionExternalProof(_tx: Types_WithdrawalTransaction, _proofSubmitter: `0x${string}`, options?: {
|
|
953
|
+
accessList?: import('viem').AccessList;
|
|
954
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
955
|
+
chain?: import('viem').Chain | null;
|
|
956
|
+
dataSuffix?: `0x${string}`;
|
|
957
|
+
gas?: bigint;
|
|
958
|
+
gasPrice?: bigint;
|
|
959
|
+
maxFeePerGas?: bigint;
|
|
960
|
+
maxPriorityFeePerGas?: bigint;
|
|
961
|
+
nonce?: number;
|
|
962
|
+
value?: bigint;
|
|
963
|
+
}): Promise<`0x${string}`>;
|
|
964
|
+
/**
|
|
965
|
+
* initialize
|
|
966
|
+
* nonpayable
|
|
967
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
968
|
+
*/
|
|
969
|
+
initialize(_systemConfig: `0x${string}`, _anchorStateRegistry: `0x${string}`, options?: {
|
|
970
|
+
accessList?: import('viem').AccessList;
|
|
971
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
972
|
+
chain?: import('viem').Chain | null;
|
|
973
|
+
dataSuffix?: `0x${string}`;
|
|
974
|
+
gas?: bigint;
|
|
975
|
+
gasPrice?: bigint;
|
|
976
|
+
maxFeePerGas?: bigint;
|
|
977
|
+
maxPriorityFeePerGas?: bigint;
|
|
978
|
+
nonce?: number;
|
|
979
|
+
value?: bigint;
|
|
980
|
+
}): Promise<`0x${string}`>;
|
|
981
|
+
/**
|
|
982
|
+
* proveWithdrawalTransaction
|
|
983
|
+
* nonpayable
|
|
984
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
985
|
+
*/
|
|
986
|
+
proveWithdrawalTransaction(_tx: Types_WithdrawalTransaction, _disputeGameIndex: bigint, _outputRootProof: Types_OutputRootProof, _withdrawalProof: `0x${string}`[], options?: {
|
|
987
|
+
accessList?: import('viem').AccessList;
|
|
988
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
989
|
+
chain?: import('viem').Chain | null;
|
|
990
|
+
dataSuffix?: `0x${string}`;
|
|
991
|
+
gas?: bigint;
|
|
992
|
+
gasPrice?: bigint;
|
|
993
|
+
maxFeePerGas?: bigint;
|
|
994
|
+
maxPriorityFeePerGas?: bigint;
|
|
995
|
+
nonce?: number;
|
|
996
|
+
value?: bigint;
|
|
997
|
+
}): Promise<`0x${string}`>;
|
|
998
|
+
/**
|
|
999
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
1000
|
+
*
|
|
1001
|
+
* @example
|
|
1002
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
1003
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
1004
|
+
* console.log('Would succeed:', result.result);
|
|
1005
|
+
*/
|
|
1006
|
+
get simulate(): {
|
|
1007
|
+
/**
|
|
1008
|
+
* Simulate depositTransaction
|
|
1009
|
+
* Returns gas estimate and result without sending transaction
|
|
1010
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1011
|
+
*/
|
|
1012
|
+
depositTransaction(_to: `0x${string}`, _value: bigint, _gasLimit: bigint, _isCreation: boolean, _data: `0x${string}`, options?: {
|
|
1013
|
+
accessList?: import("viem").AccessList;
|
|
1014
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1015
|
+
chain?: import("viem").Chain | null;
|
|
1016
|
+
dataSuffix?: `0x${string}`;
|
|
1017
|
+
gas?: bigint;
|
|
1018
|
+
gasPrice?: bigint;
|
|
1019
|
+
maxFeePerGas?: bigint;
|
|
1020
|
+
maxPriorityFeePerGas?: bigint;
|
|
1021
|
+
nonce?: number;
|
|
1022
|
+
value?: bigint;
|
|
1023
|
+
}): Promise<void>;
|
|
1024
|
+
/**
|
|
1025
|
+
* Simulate donateETH
|
|
1026
|
+
* Returns gas estimate and result without sending transaction
|
|
1027
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1028
|
+
*/
|
|
1029
|
+
donateETH(options?: {
|
|
1030
|
+
accessList?: import("viem").AccessList;
|
|
1031
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1032
|
+
chain?: import("viem").Chain | null;
|
|
1033
|
+
dataSuffix?: `0x${string}`;
|
|
1034
|
+
gas?: bigint;
|
|
1035
|
+
gasPrice?: bigint;
|
|
1036
|
+
maxFeePerGas?: bigint;
|
|
1037
|
+
maxPriorityFeePerGas?: bigint;
|
|
1038
|
+
nonce?: number;
|
|
1039
|
+
value?: bigint;
|
|
1040
|
+
}): Promise<void>;
|
|
1041
|
+
/**
|
|
1042
|
+
* Simulate finalizeWithdrawalTransaction
|
|
1043
|
+
* Returns gas estimate and result without sending transaction
|
|
1044
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1045
|
+
*/
|
|
1046
|
+
finalizeWithdrawalTransaction(_tx: Types_WithdrawalTransaction, options?: {
|
|
1047
|
+
accessList?: import("viem").AccessList;
|
|
1048
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1049
|
+
chain?: import("viem").Chain | null;
|
|
1050
|
+
dataSuffix?: `0x${string}`;
|
|
1051
|
+
gas?: bigint;
|
|
1052
|
+
gasPrice?: bigint;
|
|
1053
|
+
maxFeePerGas?: bigint;
|
|
1054
|
+
maxPriorityFeePerGas?: bigint;
|
|
1055
|
+
nonce?: number;
|
|
1056
|
+
value?: bigint;
|
|
1057
|
+
}): Promise<void>;
|
|
1058
|
+
/**
|
|
1059
|
+
* Simulate finalizeWithdrawalTransactionExternalProof
|
|
1060
|
+
* Returns gas estimate and result without sending transaction
|
|
1061
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1062
|
+
*/
|
|
1063
|
+
finalizeWithdrawalTransactionExternalProof(_tx: Types_WithdrawalTransaction, _proofSubmitter: `0x${string}`, options?: {
|
|
1064
|
+
accessList?: import("viem").AccessList;
|
|
1065
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1066
|
+
chain?: import("viem").Chain | null;
|
|
1067
|
+
dataSuffix?: `0x${string}`;
|
|
1068
|
+
gas?: bigint;
|
|
1069
|
+
gasPrice?: bigint;
|
|
1070
|
+
maxFeePerGas?: bigint;
|
|
1071
|
+
maxPriorityFeePerGas?: bigint;
|
|
1072
|
+
nonce?: number;
|
|
1073
|
+
value?: bigint;
|
|
1074
|
+
}): Promise<void>;
|
|
1075
|
+
/**
|
|
1076
|
+
* Simulate initialize
|
|
1077
|
+
* Returns gas estimate and result without sending transaction
|
|
1078
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1079
|
+
*/
|
|
1080
|
+
initialize(_systemConfig: `0x${string}`, _anchorStateRegistry: `0x${string}`, options?: {
|
|
1081
|
+
accessList?: import("viem").AccessList;
|
|
1082
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1083
|
+
chain?: import("viem").Chain | null;
|
|
1084
|
+
dataSuffix?: `0x${string}`;
|
|
1085
|
+
gas?: bigint;
|
|
1086
|
+
gasPrice?: bigint;
|
|
1087
|
+
maxFeePerGas?: bigint;
|
|
1088
|
+
maxPriorityFeePerGas?: bigint;
|
|
1089
|
+
nonce?: number;
|
|
1090
|
+
value?: bigint;
|
|
1091
|
+
}): Promise<void>;
|
|
1092
|
+
/**
|
|
1093
|
+
* Simulate proveWithdrawalTransaction
|
|
1094
|
+
* Returns gas estimate and result without sending transaction
|
|
1095
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1096
|
+
*/
|
|
1097
|
+
proveWithdrawalTransaction(_tx: Types_WithdrawalTransaction, _disputeGameIndex: bigint, _outputRootProof: Types_OutputRootProof, _withdrawalProof: `0x${string}`[], options?: {
|
|
1098
|
+
accessList?: import("viem").AccessList;
|
|
1099
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1100
|
+
chain?: import("viem").Chain | null;
|
|
1101
|
+
dataSuffix?: `0x${string}`;
|
|
1102
|
+
gas?: bigint;
|
|
1103
|
+
gasPrice?: bigint;
|
|
1104
|
+
maxFeePerGas?: bigint;
|
|
1105
|
+
maxPriorityFeePerGas?: bigint;
|
|
1106
|
+
nonce?: number;
|
|
1107
|
+
value?: bigint;
|
|
1108
|
+
}): Promise<void>;
|
|
1109
|
+
};
|
|
1110
|
+
/**
|
|
1111
|
+
* Watch contract events
|
|
1112
|
+
*
|
|
1113
|
+
* @example
|
|
1114
|
+
* // Watch all Transfer events
|
|
1115
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
1116
|
+
* console.log('Transfer:', event);
|
|
1117
|
+
* });
|
|
1118
|
+
*
|
|
1119
|
+
* // Stop watching
|
|
1120
|
+
* unwatch();
|
|
1121
|
+
*/
|
|
1122
|
+
get watch(): {
|
|
1123
|
+
/**
|
|
1124
|
+
* Watch Initialized events
|
|
1125
|
+
* @param callback Function to call when event is emitted
|
|
1126
|
+
* @param filter Optional filter for indexed parameters
|
|
1127
|
+
* @returns Unwatch function to stop listening
|
|
1128
|
+
*/
|
|
1129
|
+
Initialized: (callback: (event: {
|
|
1130
|
+
version: bigint;
|
|
1131
|
+
}) => void) => () => void;
|
|
1132
|
+
/**
|
|
1133
|
+
* Watch TransactionDeposited events
|
|
1134
|
+
* @param callback Function to call when event is emitted
|
|
1135
|
+
* @param filter Optional filter for indexed parameters
|
|
1136
|
+
* @returns Unwatch function to stop listening
|
|
1137
|
+
*/
|
|
1138
|
+
TransactionDeposited: (callback: (event: {
|
|
1139
|
+
from: `0x${string}`;
|
|
1140
|
+
to: `0x${string}`;
|
|
1141
|
+
version: bigint;
|
|
1142
|
+
opaqueData: `0x${string}`;
|
|
1143
|
+
}) => void, filter?: {
|
|
1144
|
+
from: `0x${string}`;
|
|
1145
|
+
to: `0x${string}`;
|
|
1146
|
+
version: bigint;
|
|
1147
|
+
}) => () => void;
|
|
1148
|
+
/**
|
|
1149
|
+
* Watch WithdrawalFinalized events
|
|
1150
|
+
* @param callback Function to call when event is emitted
|
|
1151
|
+
* @param filter Optional filter for indexed parameters
|
|
1152
|
+
* @returns Unwatch function to stop listening
|
|
1153
|
+
*/
|
|
1154
|
+
WithdrawalFinalized: (callback: (event: {
|
|
1155
|
+
withdrawalHash: `0x${string}`;
|
|
1156
|
+
success: boolean;
|
|
1157
|
+
}) => void, filter?: {
|
|
1158
|
+
withdrawalHash: `0x${string}`;
|
|
1159
|
+
}) => () => void;
|
|
1160
|
+
/**
|
|
1161
|
+
* Watch WithdrawalProven events
|
|
1162
|
+
* @param callback Function to call when event is emitted
|
|
1163
|
+
* @param filter Optional filter for indexed parameters
|
|
1164
|
+
* @returns Unwatch function to stop listening
|
|
1165
|
+
*/
|
|
1166
|
+
WithdrawalProven: (callback: (event: {
|
|
1167
|
+
withdrawalHash: `0x${string}`;
|
|
1168
|
+
from: `0x${string}`;
|
|
1169
|
+
to: `0x${string}`;
|
|
1170
|
+
}) => void, filter?: {
|
|
1171
|
+
withdrawalHash: `0x${string}`;
|
|
1172
|
+
from: `0x${string}`;
|
|
1173
|
+
to: `0x${string}`;
|
|
1174
|
+
}) => () => void;
|
|
1175
|
+
/**
|
|
1176
|
+
* Watch WithdrawalProvenExtension1 events
|
|
1177
|
+
* @param callback Function to call when event is emitted
|
|
1178
|
+
* @param filter Optional filter for indexed parameters
|
|
1179
|
+
* @returns Unwatch function to stop listening
|
|
1180
|
+
*/
|
|
1181
|
+
WithdrawalProvenExtension1: (callback: (event: {
|
|
1182
|
+
withdrawalHash: `0x${string}`;
|
|
1183
|
+
proofSubmitter: `0x${string}`;
|
|
1184
|
+
}) => void, filter?: {
|
|
1185
|
+
withdrawalHash: `0x${string}`;
|
|
1186
|
+
proofSubmitter: `0x${string}`;
|
|
1187
|
+
}) => () => void;
|
|
1188
|
+
};
|
|
1189
|
+
}
|