@gitmyabi/optimismportal 1.0.0 → 1.0.1
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
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Auto-generated TypeScript type bindings for **OptimismPortal**
|
|
4
4
|
|
|
5
|
-
- **Build ID**: `etherscan-optimismportal-
|
|
5
|
+
- **Build ID**: `etherscan-optimismportal-84db318e-1787634369313`
|
|
6
6
|
- **Build Number**: 1
|
|
7
|
-
- **Commit**: `
|
|
7
|
+
- **Commit**: `8ba32b3`
|
|
8
8
|
- **Branch**: `etherscan`
|
|
9
9
|
- **Target**: `ethers-v6`
|
|
10
10
|
- **Contracts**: 2
|
|
@@ -12,7 +12,7 @@ Auto-generated TypeScript type bindings for **OptimismPortal**
|
|
|
12
12
|
## Installation
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
npm install @gitmyabi/optimismportal@1.0.
|
|
15
|
+
npm install @gitmyabi/optimismportal@1.0.1
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
## Usage
|
|
@@ -80,6 +80,10 @@ export declare const OptimismPortal2_jsonAbi: readonly [{
|
|
|
80
80
|
readonly inputs: readonly [];
|
|
81
81
|
readonly name: "OptimismPortal_InvalidDisputeGame";
|
|
82
82
|
readonly type: "error";
|
|
83
|
+
}, {
|
|
84
|
+
readonly inputs: readonly [];
|
|
85
|
+
readonly name: "OptimismPortal_InvalidInteropState";
|
|
86
|
+
readonly type: "error";
|
|
83
87
|
}, {
|
|
84
88
|
readonly inputs: readonly [];
|
|
85
89
|
readonly name: "OptimismPortal_InvalidLockboxState";
|
|
@@ -100,6 +104,10 @@ export declare const OptimismPortal2_jsonAbi: readonly [{
|
|
|
100
104
|
readonly inputs: readonly [];
|
|
101
105
|
readonly name: "OptimismPortal_InvalidRootClaim";
|
|
102
106
|
readonly type: "error";
|
|
107
|
+
}, {
|
|
108
|
+
readonly inputs: readonly [];
|
|
109
|
+
readonly name: "OptimismPortal_MigratingToSameRegistry";
|
|
110
|
+
readonly type: "error";
|
|
103
111
|
}, {
|
|
104
112
|
readonly inputs: readonly [];
|
|
105
113
|
readonly name: "OptimismPortal_NoReentrancy";
|
|
@@ -108,6 +116,10 @@ export declare const OptimismPortal2_jsonAbi: readonly [{
|
|
|
108
116
|
readonly inputs: readonly [];
|
|
109
117
|
readonly name: "OptimismPortal_NotAllowedOnCGTMode";
|
|
110
118
|
readonly type: "error";
|
|
119
|
+
}, {
|
|
120
|
+
readonly inputs: readonly [];
|
|
121
|
+
readonly name: "OptimismPortal_NotUsingInterop";
|
|
122
|
+
readonly type: "error";
|
|
111
123
|
}, {
|
|
112
124
|
readonly inputs: readonly [];
|
|
113
125
|
readonly name: "OptimismPortal_ProofNotOldEnough";
|
|
@@ -156,6 +168,21 @@ export declare const OptimismPortal2_jsonAbi: readonly [{
|
|
|
156
168
|
readonly inputs: readonly [];
|
|
157
169
|
readonly name: "UnexpectedString";
|
|
158
170
|
readonly type: "error";
|
|
171
|
+
}, {
|
|
172
|
+
readonly anonymous: false;
|
|
173
|
+
readonly inputs: readonly [{
|
|
174
|
+
readonly indexed: true;
|
|
175
|
+
readonly internalType: "address";
|
|
176
|
+
readonly name: "lockbox";
|
|
177
|
+
readonly type: "address";
|
|
178
|
+
}, {
|
|
179
|
+
readonly indexed: false;
|
|
180
|
+
readonly internalType: "uint256";
|
|
181
|
+
readonly name: "balance";
|
|
182
|
+
readonly type: "uint256";
|
|
183
|
+
}];
|
|
184
|
+
readonly name: "ETHMigrated";
|
|
185
|
+
readonly type: "event";
|
|
159
186
|
}, {
|
|
160
187
|
readonly anonymous: false;
|
|
161
188
|
readonly inputs: readonly [{
|
|
@@ -166,6 +193,31 @@ export declare const OptimismPortal2_jsonAbi: readonly [{
|
|
|
166
193
|
}];
|
|
167
194
|
readonly name: "Initialized";
|
|
168
195
|
readonly type: "event";
|
|
196
|
+
}, {
|
|
197
|
+
readonly anonymous: false;
|
|
198
|
+
readonly inputs: readonly [{
|
|
199
|
+
readonly indexed: false;
|
|
200
|
+
readonly internalType: "contract IETHLockbox";
|
|
201
|
+
readonly name: "oldLockbox";
|
|
202
|
+
readonly type: "address";
|
|
203
|
+
}, {
|
|
204
|
+
readonly indexed: false;
|
|
205
|
+
readonly internalType: "contract IETHLockbox";
|
|
206
|
+
readonly name: "newLockbox";
|
|
207
|
+
readonly type: "address";
|
|
208
|
+
}, {
|
|
209
|
+
readonly indexed: false;
|
|
210
|
+
readonly internalType: "contract IAnchorStateRegistry";
|
|
211
|
+
readonly name: "oldAnchorStateRegistry";
|
|
212
|
+
readonly type: "address";
|
|
213
|
+
}, {
|
|
214
|
+
readonly indexed: false;
|
|
215
|
+
readonly internalType: "contract IAnchorStateRegistry";
|
|
216
|
+
readonly name: "newAnchorStateRegistry";
|
|
217
|
+
readonly type: "address";
|
|
218
|
+
}];
|
|
219
|
+
readonly name: "PortalMigrated";
|
|
220
|
+
readonly type: "event";
|
|
169
221
|
}, {
|
|
170
222
|
readonly anonymous: false;
|
|
171
223
|
readonly inputs: readonly [{
|
|
@@ -458,6 +510,10 @@ export declare const OptimismPortal2_jsonAbi: readonly [{
|
|
|
458
510
|
readonly internalType: "contract IAnchorStateRegistry";
|
|
459
511
|
readonly name: "_anchorStateRegistry";
|
|
460
512
|
readonly type: "address";
|
|
513
|
+
}, {
|
|
514
|
+
readonly internalType: "contract IETHLockbox";
|
|
515
|
+
readonly name: "_ethLockbox";
|
|
516
|
+
readonly type: "address";
|
|
461
517
|
}];
|
|
462
518
|
readonly name: "initialize";
|
|
463
519
|
readonly outputs: readonly [];
|
|
@@ -473,6 +529,26 @@ export declare const OptimismPortal2_jsonAbi: readonly [{
|
|
|
473
529
|
}];
|
|
474
530
|
readonly stateMutability: "view";
|
|
475
531
|
readonly type: "function";
|
|
532
|
+
}, {
|
|
533
|
+
readonly inputs: readonly [];
|
|
534
|
+
readonly name: "migrateLiquidity";
|
|
535
|
+
readonly outputs: readonly [];
|
|
536
|
+
readonly stateMutability: "nonpayable";
|
|
537
|
+
readonly type: "function";
|
|
538
|
+
}, {
|
|
539
|
+
readonly inputs: readonly [{
|
|
540
|
+
readonly internalType: "contract IETHLockbox";
|
|
541
|
+
readonly name: "_newLockbox";
|
|
542
|
+
readonly type: "address";
|
|
543
|
+
}, {
|
|
544
|
+
readonly internalType: "contract IAnchorStateRegistry";
|
|
545
|
+
readonly name: "_newAnchorStateRegistry";
|
|
546
|
+
readonly type: "address";
|
|
547
|
+
}];
|
|
548
|
+
readonly name: "migrateToSharedDisputeGame";
|
|
549
|
+
readonly outputs: readonly [];
|
|
550
|
+
readonly stateMutability: "nonpayable";
|
|
551
|
+
readonly type: "function";
|
|
476
552
|
}, {
|
|
477
553
|
readonly inputs: readonly [{
|
|
478
554
|
readonly internalType: "uint64";
|
|
@@ -966,7 +1042,41 @@ export declare class OptimismPortal2_json {
|
|
|
966
1042
|
* nonpayable
|
|
967
1043
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
968
1044
|
*/
|
|
969
|
-
initialize(_systemConfig: `0x${string}`, _anchorStateRegistry: `0x${string}`, options?: {
|
|
1045
|
+
initialize(_systemConfig: `0x${string}`, _anchorStateRegistry: `0x${string}`, _ethLockbox: `0x${string}`, options?: {
|
|
1046
|
+
accessList?: import('viem').AccessList;
|
|
1047
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1048
|
+
chain?: import('viem').Chain | null;
|
|
1049
|
+
dataSuffix?: `0x${string}`;
|
|
1050
|
+
gas?: bigint;
|
|
1051
|
+
gasPrice?: bigint;
|
|
1052
|
+
maxFeePerGas?: bigint;
|
|
1053
|
+
maxPriorityFeePerGas?: bigint;
|
|
1054
|
+
nonce?: number;
|
|
1055
|
+
value?: bigint;
|
|
1056
|
+
}): Promise<`0x${string}`>;
|
|
1057
|
+
/**
|
|
1058
|
+
* migrateLiquidity
|
|
1059
|
+
* nonpayable
|
|
1060
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1061
|
+
*/
|
|
1062
|
+
migrateLiquidity(options?: {
|
|
1063
|
+
accessList?: import('viem').AccessList;
|
|
1064
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1065
|
+
chain?: import('viem').Chain | null;
|
|
1066
|
+
dataSuffix?: `0x${string}`;
|
|
1067
|
+
gas?: bigint;
|
|
1068
|
+
gasPrice?: bigint;
|
|
1069
|
+
maxFeePerGas?: bigint;
|
|
1070
|
+
maxPriorityFeePerGas?: bigint;
|
|
1071
|
+
nonce?: number;
|
|
1072
|
+
value?: bigint;
|
|
1073
|
+
}): Promise<`0x${string}`>;
|
|
1074
|
+
/**
|
|
1075
|
+
* migrateToSharedDisputeGame
|
|
1076
|
+
* nonpayable
|
|
1077
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1078
|
+
*/
|
|
1079
|
+
migrateToSharedDisputeGame(_newLockbox: `0x${string}`, _newAnchorStateRegistry: `0x${string}`, options?: {
|
|
970
1080
|
accessList?: import('viem').AccessList;
|
|
971
1081
|
authorizationList?: import('viem').AuthorizationList;
|
|
972
1082
|
chain?: import('viem').Chain | null;
|
|
@@ -1077,7 +1187,41 @@ export declare class OptimismPortal2_json {
|
|
|
1077
1187
|
* Returns gas estimate and result without sending transaction
|
|
1078
1188
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1079
1189
|
*/
|
|
1080
|
-
initialize(_systemConfig: `0x${string}`, _anchorStateRegistry: `0x${string}`, options?: {
|
|
1190
|
+
initialize(_systemConfig: `0x${string}`, _anchorStateRegistry: `0x${string}`, _ethLockbox: `0x${string}`, options?: {
|
|
1191
|
+
accessList?: import("viem").AccessList;
|
|
1192
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1193
|
+
chain?: import("viem").Chain | null;
|
|
1194
|
+
dataSuffix?: `0x${string}`;
|
|
1195
|
+
gas?: bigint;
|
|
1196
|
+
gasPrice?: bigint;
|
|
1197
|
+
maxFeePerGas?: bigint;
|
|
1198
|
+
maxPriorityFeePerGas?: bigint;
|
|
1199
|
+
nonce?: number;
|
|
1200
|
+
value?: bigint;
|
|
1201
|
+
}): Promise<void>;
|
|
1202
|
+
/**
|
|
1203
|
+
* Simulate migrateLiquidity
|
|
1204
|
+
* Returns gas estimate and result without sending transaction
|
|
1205
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1206
|
+
*/
|
|
1207
|
+
migrateLiquidity(options?: {
|
|
1208
|
+
accessList?: import("viem").AccessList;
|
|
1209
|
+
authorizationList?: import("viem").AuthorizationList;
|
|
1210
|
+
chain?: import("viem").Chain | null;
|
|
1211
|
+
dataSuffix?: `0x${string}`;
|
|
1212
|
+
gas?: bigint;
|
|
1213
|
+
gasPrice?: bigint;
|
|
1214
|
+
maxFeePerGas?: bigint;
|
|
1215
|
+
maxPriorityFeePerGas?: bigint;
|
|
1216
|
+
nonce?: number;
|
|
1217
|
+
value?: bigint;
|
|
1218
|
+
}): Promise<void>;
|
|
1219
|
+
/**
|
|
1220
|
+
* Simulate migrateToSharedDisputeGame
|
|
1221
|
+
* Returns gas estimate and result without sending transaction
|
|
1222
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1223
|
+
*/
|
|
1224
|
+
migrateToSharedDisputeGame(_newLockbox: `0x${string}`, _newAnchorStateRegistry: `0x${string}`, options?: {
|
|
1081
1225
|
accessList?: import("viem").AccessList;
|
|
1082
1226
|
authorizationList?: import("viem").AuthorizationList;
|
|
1083
1227
|
chain?: import("viem").Chain | null;
|
|
@@ -1120,6 +1264,18 @@ export declare class OptimismPortal2_json {
|
|
|
1120
1264
|
* unwatch();
|
|
1121
1265
|
*/
|
|
1122
1266
|
get watch(): {
|
|
1267
|
+
/**
|
|
1268
|
+
* Watch ETHMigrated events
|
|
1269
|
+
* @param callback Function to call when event is emitted
|
|
1270
|
+
* @param filter Optional filter for indexed parameters
|
|
1271
|
+
* @returns Unwatch function to stop listening
|
|
1272
|
+
*/
|
|
1273
|
+
ETHMigrated: (callback: (event: {
|
|
1274
|
+
lockbox: `0x${string}`;
|
|
1275
|
+
balance: bigint;
|
|
1276
|
+
}) => void, filter?: {
|
|
1277
|
+
lockbox: `0x${string}`;
|
|
1278
|
+
}) => () => void;
|
|
1123
1279
|
/**
|
|
1124
1280
|
* Watch Initialized events
|
|
1125
1281
|
* @param callback Function to call when event is emitted
|
|
@@ -1129,6 +1285,18 @@ export declare class OptimismPortal2_json {
|
|
|
1129
1285
|
Initialized: (callback: (event: {
|
|
1130
1286
|
version: bigint;
|
|
1131
1287
|
}) => void) => () => void;
|
|
1288
|
+
/**
|
|
1289
|
+
* Watch PortalMigrated events
|
|
1290
|
+
* @param callback Function to call when event is emitted
|
|
1291
|
+
* @param filter Optional filter for indexed parameters
|
|
1292
|
+
* @returns Unwatch function to stop listening
|
|
1293
|
+
*/
|
|
1294
|
+
PortalMigrated: (callback: (event: {
|
|
1295
|
+
oldLockbox: `0x${string}`;
|
|
1296
|
+
newLockbox: `0x${string}`;
|
|
1297
|
+
oldAnchorStateRegistry: `0x${string}`;
|
|
1298
|
+
newAnchorStateRegistry: `0x${string}`;
|
|
1299
|
+
}) => void) => () => void;
|
|
1132
1300
|
/**
|
|
1133
1301
|
* Watch TransactionDeposited events
|
|
1134
1302
|
* @param callback Function to call when event is emitted
|
|
@@ -79,6 +79,11 @@ exports.OptimismPortal2_jsonAbi = [
|
|
|
79
79
|
"name": "OptimismPortal_InvalidDisputeGame",
|
|
80
80
|
"type": "error"
|
|
81
81
|
},
|
|
82
|
+
{
|
|
83
|
+
"inputs": [],
|
|
84
|
+
"name": "OptimismPortal_InvalidInteropState",
|
|
85
|
+
"type": "error"
|
|
86
|
+
},
|
|
82
87
|
{
|
|
83
88
|
"inputs": [],
|
|
84
89
|
"name": "OptimismPortal_InvalidLockboxState",
|
|
@@ -104,6 +109,11 @@ exports.OptimismPortal2_jsonAbi = [
|
|
|
104
109
|
"name": "OptimismPortal_InvalidRootClaim",
|
|
105
110
|
"type": "error"
|
|
106
111
|
},
|
|
112
|
+
{
|
|
113
|
+
"inputs": [],
|
|
114
|
+
"name": "OptimismPortal_MigratingToSameRegistry",
|
|
115
|
+
"type": "error"
|
|
116
|
+
},
|
|
107
117
|
{
|
|
108
118
|
"inputs": [],
|
|
109
119
|
"name": "OptimismPortal_NoReentrancy",
|
|
@@ -114,6 +124,11 @@ exports.OptimismPortal2_jsonAbi = [
|
|
|
114
124
|
"name": "OptimismPortal_NotAllowedOnCGTMode",
|
|
115
125
|
"type": "error"
|
|
116
126
|
},
|
|
127
|
+
{
|
|
128
|
+
"inputs": [],
|
|
129
|
+
"name": "OptimismPortal_NotUsingInterop",
|
|
130
|
+
"type": "error"
|
|
131
|
+
},
|
|
117
132
|
{
|
|
118
133
|
"inputs": [],
|
|
119
134
|
"name": "OptimismPortal_ProofNotOldEnough",
|
|
@@ -174,6 +189,25 @@ exports.OptimismPortal2_jsonAbi = [
|
|
|
174
189
|
"name": "UnexpectedString",
|
|
175
190
|
"type": "error"
|
|
176
191
|
},
|
|
192
|
+
{
|
|
193
|
+
"anonymous": false,
|
|
194
|
+
"inputs": [
|
|
195
|
+
{
|
|
196
|
+
"indexed": true,
|
|
197
|
+
"internalType": "address",
|
|
198
|
+
"name": "lockbox",
|
|
199
|
+
"type": "address"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"indexed": false,
|
|
203
|
+
"internalType": "uint256",
|
|
204
|
+
"name": "balance",
|
|
205
|
+
"type": "uint256"
|
|
206
|
+
}
|
|
207
|
+
],
|
|
208
|
+
"name": "ETHMigrated",
|
|
209
|
+
"type": "event"
|
|
210
|
+
},
|
|
177
211
|
{
|
|
178
212
|
"anonymous": false,
|
|
179
213
|
"inputs": [
|
|
@@ -187,6 +221,37 @@ exports.OptimismPortal2_jsonAbi = [
|
|
|
187
221
|
"name": "Initialized",
|
|
188
222
|
"type": "event"
|
|
189
223
|
},
|
|
224
|
+
{
|
|
225
|
+
"anonymous": false,
|
|
226
|
+
"inputs": [
|
|
227
|
+
{
|
|
228
|
+
"indexed": false,
|
|
229
|
+
"internalType": "contract IETHLockbox",
|
|
230
|
+
"name": "oldLockbox",
|
|
231
|
+
"type": "address"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"indexed": false,
|
|
235
|
+
"internalType": "contract IETHLockbox",
|
|
236
|
+
"name": "newLockbox",
|
|
237
|
+
"type": "address"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"indexed": false,
|
|
241
|
+
"internalType": "contract IAnchorStateRegistry",
|
|
242
|
+
"name": "oldAnchorStateRegistry",
|
|
243
|
+
"type": "address"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"indexed": false,
|
|
247
|
+
"internalType": "contract IAnchorStateRegistry",
|
|
248
|
+
"name": "newAnchorStateRegistry",
|
|
249
|
+
"type": "address"
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
"name": "PortalMigrated",
|
|
253
|
+
"type": "event"
|
|
254
|
+
},
|
|
190
255
|
{
|
|
191
256
|
"anonymous": false,
|
|
192
257
|
"inputs": [
|
|
@@ -561,6 +626,11 @@ exports.OptimismPortal2_jsonAbi = [
|
|
|
561
626
|
"internalType": "contract IAnchorStateRegistry",
|
|
562
627
|
"name": "_anchorStateRegistry",
|
|
563
628
|
"type": "address"
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
"internalType": "contract IETHLockbox",
|
|
632
|
+
"name": "_ethLockbox",
|
|
633
|
+
"type": "address"
|
|
564
634
|
}
|
|
565
635
|
],
|
|
566
636
|
"name": "initialize",
|
|
@@ -581,6 +651,31 @@ exports.OptimismPortal2_jsonAbi = [
|
|
|
581
651
|
"stateMutability": "view",
|
|
582
652
|
"type": "function"
|
|
583
653
|
},
|
|
654
|
+
{
|
|
655
|
+
"inputs": [],
|
|
656
|
+
"name": "migrateLiquidity",
|
|
657
|
+
"outputs": [],
|
|
658
|
+
"stateMutability": "nonpayable",
|
|
659
|
+
"type": "function"
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
"inputs": [
|
|
663
|
+
{
|
|
664
|
+
"internalType": "contract IETHLockbox",
|
|
665
|
+
"name": "_newLockbox",
|
|
666
|
+
"type": "address"
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
"internalType": "contract IAnchorStateRegistry",
|
|
670
|
+
"name": "_newAnchorStateRegistry",
|
|
671
|
+
"type": "address"
|
|
672
|
+
}
|
|
673
|
+
],
|
|
674
|
+
"name": "migrateToSharedDisputeGame",
|
|
675
|
+
"outputs": [],
|
|
676
|
+
"stateMutability": "nonpayable",
|
|
677
|
+
"type": "function"
|
|
678
|
+
},
|
|
584
679
|
{
|
|
585
680
|
"inputs": [
|
|
586
681
|
{
|
|
@@ -1173,11 +1268,33 @@ class OptimismPortal2_json {
|
|
|
1173
1268
|
* nonpayable
|
|
1174
1269
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1175
1270
|
*/
|
|
1176
|
-
async initialize(_systemConfig, _anchorStateRegistry, options) {
|
|
1271
|
+
async initialize(_systemConfig, _anchorStateRegistry, _ethLockbox, options) {
|
|
1272
|
+
if (!this.contract.write) {
|
|
1273
|
+
throw new Error('Wallet client is required for write operations');
|
|
1274
|
+
}
|
|
1275
|
+
return this.contract.write.initialize([_systemConfig, _anchorStateRegistry, _ethLockbox], options);
|
|
1276
|
+
}
|
|
1277
|
+
/**
|
|
1278
|
+
* migrateLiquidity
|
|
1279
|
+
* nonpayable
|
|
1280
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1281
|
+
*/
|
|
1282
|
+
async migrateLiquidity(options) {
|
|
1177
1283
|
if (!this.contract.write) {
|
|
1178
1284
|
throw new Error('Wallet client is required for write operations');
|
|
1179
1285
|
}
|
|
1180
|
-
return this.contract.write.
|
|
1286
|
+
return this.contract.write.migrateLiquidity(options);
|
|
1287
|
+
}
|
|
1288
|
+
/**
|
|
1289
|
+
* migrateToSharedDisputeGame
|
|
1290
|
+
* nonpayable
|
|
1291
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1292
|
+
*/
|
|
1293
|
+
async migrateToSharedDisputeGame(_newLockbox, _newAnchorStateRegistry, options) {
|
|
1294
|
+
if (!this.contract.write) {
|
|
1295
|
+
throw new Error('Wallet client is required for write operations');
|
|
1296
|
+
}
|
|
1297
|
+
return this.contract.write.migrateToSharedDisputeGame([_newLockbox, _newAnchorStateRegistry], options);
|
|
1181
1298
|
}
|
|
1182
1299
|
/**
|
|
1183
1300
|
* proveWithdrawalTransaction
|
|
@@ -1241,8 +1358,24 @@ class OptimismPortal2_json {
|
|
|
1241
1358
|
* Returns gas estimate and result without sending transaction
|
|
1242
1359
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1243
1360
|
*/
|
|
1244
|
-
async initialize(_systemConfig, _anchorStateRegistry, options) {
|
|
1245
|
-
return contract.simulate.initialize([_systemConfig, _anchorStateRegistry], options);
|
|
1361
|
+
async initialize(_systemConfig, _anchorStateRegistry, _ethLockbox, options) {
|
|
1362
|
+
return contract.simulate.initialize([_systemConfig, _anchorStateRegistry, _ethLockbox], options);
|
|
1363
|
+
},
|
|
1364
|
+
/**
|
|
1365
|
+
* Simulate migrateLiquidity
|
|
1366
|
+
* Returns gas estimate and result without sending transaction
|
|
1367
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1368
|
+
*/
|
|
1369
|
+
async migrateLiquidity(options) {
|
|
1370
|
+
return contract.simulate.migrateLiquidity(options);
|
|
1371
|
+
},
|
|
1372
|
+
/**
|
|
1373
|
+
* Simulate migrateToSharedDisputeGame
|
|
1374
|
+
* Returns gas estimate and result without sending transaction
|
|
1375
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1376
|
+
*/
|
|
1377
|
+
async migrateToSharedDisputeGame(_newLockbox, _newAnchorStateRegistry, options) {
|
|
1378
|
+
return contract.simulate.migrateToSharedDisputeGame([_newLockbox, _newAnchorStateRegistry], options);
|
|
1246
1379
|
},
|
|
1247
1380
|
/**
|
|
1248
1381
|
* Simulate proveWithdrawalTransaction
|
|
@@ -1268,6 +1401,25 @@ class OptimismPortal2_json {
|
|
|
1268
1401
|
*/
|
|
1269
1402
|
get watch() {
|
|
1270
1403
|
return {
|
|
1404
|
+
/**
|
|
1405
|
+
* Watch ETHMigrated events
|
|
1406
|
+
* @param callback Function to call when event is emitted
|
|
1407
|
+
* @param filter Optional filter for indexed parameters
|
|
1408
|
+
* @returns Unwatch function to stop listening
|
|
1409
|
+
*/
|
|
1410
|
+
ETHMigrated: (callback, filter) => {
|
|
1411
|
+
return this.publicClient.watchContractEvent({
|
|
1412
|
+
address: this.contractAddress,
|
|
1413
|
+
abi: exports.OptimismPortal2_jsonAbi,
|
|
1414
|
+
eventName: 'ETHMigrated',
|
|
1415
|
+
args: filter,
|
|
1416
|
+
onLogs: (logs) => {
|
|
1417
|
+
logs.forEach((log) => {
|
|
1418
|
+
callback(log.args);
|
|
1419
|
+
});
|
|
1420
|
+
},
|
|
1421
|
+
});
|
|
1422
|
+
},
|
|
1271
1423
|
/**
|
|
1272
1424
|
* Watch Initialized events
|
|
1273
1425
|
* @param callback Function to call when event is emitted
|
|
@@ -1286,6 +1438,24 @@ class OptimismPortal2_json {
|
|
|
1286
1438
|
},
|
|
1287
1439
|
});
|
|
1288
1440
|
},
|
|
1441
|
+
/**
|
|
1442
|
+
* Watch PortalMigrated events
|
|
1443
|
+
* @param callback Function to call when event is emitted
|
|
1444
|
+
* @param filter Optional filter for indexed parameters
|
|
1445
|
+
* @returns Unwatch function to stop listening
|
|
1446
|
+
*/
|
|
1447
|
+
PortalMigrated: (callback) => {
|
|
1448
|
+
return this.publicClient.watchContractEvent({
|
|
1449
|
+
address: this.contractAddress,
|
|
1450
|
+
abi: exports.OptimismPortal2_jsonAbi,
|
|
1451
|
+
eventName: 'PortalMigrated',
|
|
1452
|
+
onLogs: (logs) => {
|
|
1453
|
+
logs.forEach((log) => {
|
|
1454
|
+
callback(log.args);
|
|
1455
|
+
});
|
|
1456
|
+
},
|
|
1457
|
+
});
|
|
1458
|
+
},
|
|
1289
1459
|
/**
|
|
1290
1460
|
* Watch TransactionDeposited events
|
|
1291
1461
|
* @param callback Function to call when event is emitted
|
|
@@ -100,6 +100,11 @@ export const OptimismPortal2_jsonAbi = [
|
|
|
100
100
|
"name": "OptimismPortal_InvalidDisputeGame",
|
|
101
101
|
"type": "error"
|
|
102
102
|
},
|
|
103
|
+
{
|
|
104
|
+
"inputs": [],
|
|
105
|
+
"name": "OptimismPortal_InvalidInteropState",
|
|
106
|
+
"type": "error"
|
|
107
|
+
},
|
|
103
108
|
{
|
|
104
109
|
"inputs": [],
|
|
105
110
|
"name": "OptimismPortal_InvalidLockboxState",
|
|
@@ -125,6 +130,11 @@ export const OptimismPortal2_jsonAbi = [
|
|
|
125
130
|
"name": "OptimismPortal_InvalidRootClaim",
|
|
126
131
|
"type": "error"
|
|
127
132
|
},
|
|
133
|
+
{
|
|
134
|
+
"inputs": [],
|
|
135
|
+
"name": "OptimismPortal_MigratingToSameRegistry",
|
|
136
|
+
"type": "error"
|
|
137
|
+
},
|
|
128
138
|
{
|
|
129
139
|
"inputs": [],
|
|
130
140
|
"name": "OptimismPortal_NoReentrancy",
|
|
@@ -135,6 +145,11 @@ export const OptimismPortal2_jsonAbi = [
|
|
|
135
145
|
"name": "OptimismPortal_NotAllowedOnCGTMode",
|
|
136
146
|
"type": "error"
|
|
137
147
|
},
|
|
148
|
+
{
|
|
149
|
+
"inputs": [],
|
|
150
|
+
"name": "OptimismPortal_NotUsingInterop",
|
|
151
|
+
"type": "error"
|
|
152
|
+
},
|
|
138
153
|
{
|
|
139
154
|
"inputs": [],
|
|
140
155
|
"name": "OptimismPortal_ProofNotOldEnough",
|
|
@@ -195,6 +210,25 @@ export const OptimismPortal2_jsonAbi = [
|
|
|
195
210
|
"name": "UnexpectedString",
|
|
196
211
|
"type": "error"
|
|
197
212
|
},
|
|
213
|
+
{
|
|
214
|
+
"anonymous": false,
|
|
215
|
+
"inputs": [
|
|
216
|
+
{
|
|
217
|
+
"indexed": true,
|
|
218
|
+
"internalType": "address",
|
|
219
|
+
"name": "lockbox",
|
|
220
|
+
"type": "address"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"indexed": false,
|
|
224
|
+
"internalType": "uint256",
|
|
225
|
+
"name": "balance",
|
|
226
|
+
"type": "uint256"
|
|
227
|
+
}
|
|
228
|
+
],
|
|
229
|
+
"name": "ETHMigrated",
|
|
230
|
+
"type": "event"
|
|
231
|
+
},
|
|
198
232
|
{
|
|
199
233
|
"anonymous": false,
|
|
200
234
|
"inputs": [
|
|
@@ -208,6 +242,37 @@ export const OptimismPortal2_jsonAbi = [
|
|
|
208
242
|
"name": "Initialized",
|
|
209
243
|
"type": "event"
|
|
210
244
|
},
|
|
245
|
+
{
|
|
246
|
+
"anonymous": false,
|
|
247
|
+
"inputs": [
|
|
248
|
+
{
|
|
249
|
+
"indexed": false,
|
|
250
|
+
"internalType": "contract IETHLockbox",
|
|
251
|
+
"name": "oldLockbox",
|
|
252
|
+
"type": "address"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"indexed": false,
|
|
256
|
+
"internalType": "contract IETHLockbox",
|
|
257
|
+
"name": "newLockbox",
|
|
258
|
+
"type": "address"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"indexed": false,
|
|
262
|
+
"internalType": "contract IAnchorStateRegistry",
|
|
263
|
+
"name": "oldAnchorStateRegistry",
|
|
264
|
+
"type": "address"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"indexed": false,
|
|
268
|
+
"internalType": "contract IAnchorStateRegistry",
|
|
269
|
+
"name": "newAnchorStateRegistry",
|
|
270
|
+
"type": "address"
|
|
271
|
+
}
|
|
272
|
+
],
|
|
273
|
+
"name": "PortalMigrated",
|
|
274
|
+
"type": "event"
|
|
275
|
+
},
|
|
211
276
|
{
|
|
212
277
|
"anonymous": false,
|
|
213
278
|
"inputs": [
|
|
@@ -582,6 +647,11 @@ export const OptimismPortal2_jsonAbi = [
|
|
|
582
647
|
"internalType": "contract IAnchorStateRegistry",
|
|
583
648
|
"name": "_anchorStateRegistry",
|
|
584
649
|
"type": "address"
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
"internalType": "contract IETHLockbox",
|
|
653
|
+
"name": "_ethLockbox",
|
|
654
|
+
"type": "address"
|
|
585
655
|
}
|
|
586
656
|
],
|
|
587
657
|
"name": "initialize",
|
|
@@ -602,6 +672,31 @@ export const OptimismPortal2_jsonAbi = [
|
|
|
602
672
|
"stateMutability": "view",
|
|
603
673
|
"type": "function"
|
|
604
674
|
},
|
|
675
|
+
{
|
|
676
|
+
"inputs": [],
|
|
677
|
+
"name": "migrateLiquidity",
|
|
678
|
+
"outputs": [],
|
|
679
|
+
"stateMutability": "nonpayable",
|
|
680
|
+
"type": "function"
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
"inputs": [
|
|
684
|
+
{
|
|
685
|
+
"internalType": "contract IETHLockbox",
|
|
686
|
+
"name": "_newLockbox",
|
|
687
|
+
"type": "address"
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
"internalType": "contract IAnchorStateRegistry",
|
|
691
|
+
"name": "_newAnchorStateRegistry",
|
|
692
|
+
"type": "address"
|
|
693
|
+
}
|
|
694
|
+
],
|
|
695
|
+
"name": "migrateToSharedDisputeGame",
|
|
696
|
+
"outputs": [],
|
|
697
|
+
"stateMutability": "nonpayable",
|
|
698
|
+
"type": "function"
|
|
699
|
+
},
|
|
605
700
|
{
|
|
606
701
|
"inputs": [
|
|
607
702
|
{
|
|
@@ -1292,7 +1387,7 @@ export class OptimismPortal2_json {
|
|
|
1292
1387
|
* nonpayable
|
|
1293
1388
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1294
1389
|
*/
|
|
1295
|
-
async initialize(_systemConfig: `0x${string}`, _anchorStateRegistry: `0x${string}`, options?: {
|
|
1390
|
+
async initialize(_systemConfig: `0x${string}`, _anchorStateRegistry: `0x${string}`, _ethLockbox: `0x${string}`, options?: {
|
|
1296
1391
|
accessList?: import('viem').AccessList;
|
|
1297
1392
|
authorizationList?: import('viem').AuthorizationList;
|
|
1298
1393
|
chain?: import('viem').Chain | null;
|
|
@@ -1307,7 +1402,53 @@ export class OptimismPortal2_json {
|
|
|
1307
1402
|
if (!this.contract.write) {
|
|
1308
1403
|
throw new Error('Wallet client is required for write operations');
|
|
1309
1404
|
}
|
|
1310
|
-
return this.contract.write.initialize([_systemConfig, _anchorStateRegistry] as const, options) as Promise<`0x${string}`>;
|
|
1405
|
+
return this.contract.write.initialize([_systemConfig, _anchorStateRegistry, _ethLockbox] as const, options) as Promise<`0x${string}`>;
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
/**
|
|
1409
|
+
* migrateLiquidity
|
|
1410
|
+
* nonpayable
|
|
1411
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1412
|
+
*/
|
|
1413
|
+
async migrateLiquidity(options?: {
|
|
1414
|
+
accessList?: import('viem').AccessList;
|
|
1415
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1416
|
+
chain?: import('viem').Chain | null;
|
|
1417
|
+
dataSuffix?: `0x${string}`;
|
|
1418
|
+
gas?: bigint;
|
|
1419
|
+
gasPrice?: bigint;
|
|
1420
|
+
maxFeePerGas?: bigint;
|
|
1421
|
+
maxPriorityFeePerGas?: bigint;
|
|
1422
|
+
nonce?: number;
|
|
1423
|
+
value?: bigint;
|
|
1424
|
+
}): Promise<`0x${string}`> {
|
|
1425
|
+
if (!this.contract.write) {
|
|
1426
|
+
throw new Error('Wallet client is required for write operations');
|
|
1427
|
+
}
|
|
1428
|
+
return this.contract.write.migrateLiquidity(options) as Promise<`0x${string}`>;
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
/**
|
|
1432
|
+
* migrateToSharedDisputeGame
|
|
1433
|
+
* nonpayable
|
|
1434
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1435
|
+
*/
|
|
1436
|
+
async migrateToSharedDisputeGame(_newLockbox: `0x${string}`, _newAnchorStateRegistry: `0x${string}`, options?: {
|
|
1437
|
+
accessList?: import('viem').AccessList;
|
|
1438
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1439
|
+
chain?: import('viem').Chain | null;
|
|
1440
|
+
dataSuffix?: `0x${string}`;
|
|
1441
|
+
gas?: bigint;
|
|
1442
|
+
gasPrice?: bigint;
|
|
1443
|
+
maxFeePerGas?: bigint;
|
|
1444
|
+
maxPriorityFeePerGas?: bigint;
|
|
1445
|
+
nonce?: number;
|
|
1446
|
+
value?: bigint;
|
|
1447
|
+
}): Promise<`0x${string}`> {
|
|
1448
|
+
if (!this.contract.write) {
|
|
1449
|
+
throw new Error('Wallet client is required for write operations');
|
|
1450
|
+
}
|
|
1451
|
+
return this.contract.write.migrateToSharedDisputeGame([_newLockbox, _newAnchorStateRegistry] as const, options) as Promise<`0x${string}`>;
|
|
1311
1452
|
}
|
|
1312
1453
|
|
|
1313
1454
|
/**
|
|
@@ -1430,7 +1571,7 @@ export class OptimismPortal2_json {
|
|
|
1430
1571
|
* Returns gas estimate and result without sending transaction
|
|
1431
1572
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1432
1573
|
*/
|
|
1433
|
-
async initialize(_systemConfig: `0x${string}`, _anchorStateRegistry: `0x${string}`, options?: {
|
|
1574
|
+
async initialize(_systemConfig: `0x${string}`, _anchorStateRegistry: `0x${string}`, _ethLockbox: `0x${string}`, options?: {
|
|
1434
1575
|
accessList?: import('viem').AccessList;
|
|
1435
1576
|
authorizationList?: import('viem').AuthorizationList;
|
|
1436
1577
|
chain?: import('viem').Chain | null;
|
|
@@ -1442,7 +1583,45 @@ export class OptimismPortal2_json {
|
|
|
1442
1583
|
nonce?: number;
|
|
1443
1584
|
value?: bigint;
|
|
1444
1585
|
}): Promise<void> {
|
|
1445
|
-
return contract.simulate.initialize([_systemConfig, _anchorStateRegistry] as const, options) as Promise<void>;
|
|
1586
|
+
return contract.simulate.initialize([_systemConfig, _anchorStateRegistry, _ethLockbox] as const, options) as Promise<void>;
|
|
1587
|
+
},
|
|
1588
|
+
/**
|
|
1589
|
+
* Simulate migrateLiquidity
|
|
1590
|
+
* Returns gas estimate and result without sending transaction
|
|
1591
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1592
|
+
*/
|
|
1593
|
+
async migrateLiquidity(options?: {
|
|
1594
|
+
accessList?: import('viem').AccessList;
|
|
1595
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1596
|
+
chain?: import('viem').Chain | null;
|
|
1597
|
+
dataSuffix?: `0x${string}`;
|
|
1598
|
+
gas?: bigint;
|
|
1599
|
+
gasPrice?: bigint;
|
|
1600
|
+
maxFeePerGas?: bigint;
|
|
1601
|
+
maxPriorityFeePerGas?: bigint;
|
|
1602
|
+
nonce?: number;
|
|
1603
|
+
value?: bigint;
|
|
1604
|
+
}): Promise<void> {
|
|
1605
|
+
return contract.simulate.migrateLiquidity(options) as Promise<void>;
|
|
1606
|
+
},
|
|
1607
|
+
/**
|
|
1608
|
+
* Simulate migrateToSharedDisputeGame
|
|
1609
|
+
* Returns gas estimate and result without sending transaction
|
|
1610
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
1611
|
+
*/
|
|
1612
|
+
async migrateToSharedDisputeGame(_newLockbox: `0x${string}`, _newAnchorStateRegistry: `0x${string}`, options?: {
|
|
1613
|
+
accessList?: import('viem').AccessList;
|
|
1614
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
1615
|
+
chain?: import('viem').Chain | null;
|
|
1616
|
+
dataSuffix?: `0x${string}`;
|
|
1617
|
+
gas?: bigint;
|
|
1618
|
+
gasPrice?: bigint;
|
|
1619
|
+
maxFeePerGas?: bigint;
|
|
1620
|
+
maxPriorityFeePerGas?: bigint;
|
|
1621
|
+
nonce?: number;
|
|
1622
|
+
value?: bigint;
|
|
1623
|
+
}): Promise<void> {
|
|
1624
|
+
return contract.simulate.migrateToSharedDisputeGame([_newLockbox, _newAnchorStateRegistry] as const, options) as Promise<void>;
|
|
1446
1625
|
},
|
|
1447
1626
|
/**
|
|
1448
1627
|
* Simulate proveWithdrawalTransaction
|
|
@@ -1480,6 +1659,25 @@ export class OptimismPortal2_json {
|
|
|
1480
1659
|
*/
|
|
1481
1660
|
get watch() {
|
|
1482
1661
|
return {
|
|
1662
|
+
/**
|
|
1663
|
+
* Watch ETHMigrated events
|
|
1664
|
+
* @param callback Function to call when event is emitted
|
|
1665
|
+
* @param filter Optional filter for indexed parameters
|
|
1666
|
+
* @returns Unwatch function to stop listening
|
|
1667
|
+
*/
|
|
1668
|
+
ETHMigrated: (callback: (event: { lockbox: `0x${string}`; balance: bigint }) => void, filter?: { lockbox: `0x${string}` }) => {
|
|
1669
|
+
return this.publicClient.watchContractEvent({
|
|
1670
|
+
address: this.contractAddress,
|
|
1671
|
+
abi: OptimismPortal2_jsonAbi,
|
|
1672
|
+
eventName: 'ETHMigrated',
|
|
1673
|
+
args: filter,
|
|
1674
|
+
onLogs: (logs: any[]) => {
|
|
1675
|
+
logs.forEach((log: any) => {
|
|
1676
|
+
callback(log.args as any);
|
|
1677
|
+
});
|
|
1678
|
+
},
|
|
1679
|
+
}) as () => void;
|
|
1680
|
+
},
|
|
1483
1681
|
/**
|
|
1484
1682
|
* Watch Initialized events
|
|
1485
1683
|
* @param callback Function to call when event is emitted
|
|
@@ -1499,6 +1697,25 @@ export class OptimismPortal2_json {
|
|
|
1499
1697
|
},
|
|
1500
1698
|
}) as () => void;
|
|
1501
1699
|
},
|
|
1700
|
+
/**
|
|
1701
|
+
* Watch PortalMigrated events
|
|
1702
|
+
* @param callback Function to call when event is emitted
|
|
1703
|
+
* @param filter Optional filter for indexed parameters
|
|
1704
|
+
* @returns Unwatch function to stop listening
|
|
1705
|
+
*/
|
|
1706
|
+
PortalMigrated: (callback: (event: { oldLockbox: `0x${string}`; newLockbox: `0x${string}`; oldAnchorStateRegistry: `0x${string}`; newAnchorStateRegistry: `0x${string}` }) => void) => {
|
|
1707
|
+
return this.publicClient.watchContractEvent({
|
|
1708
|
+
address: this.contractAddress,
|
|
1709
|
+
abi: OptimismPortal2_jsonAbi,
|
|
1710
|
+
eventName: 'PortalMigrated',
|
|
1711
|
+
|
|
1712
|
+
onLogs: (logs: any[]) => {
|
|
1713
|
+
logs.forEach((log: any) => {
|
|
1714
|
+
callback(log.args as any);
|
|
1715
|
+
});
|
|
1716
|
+
},
|
|
1717
|
+
}) as () => void;
|
|
1718
|
+
},
|
|
1502
1719
|
/**
|
|
1503
1720
|
* Watch TransactionDeposited events
|
|
1504
1721
|
* @param callback Function to call when event is emitted
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitmyabi/optimismportal",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Auto-generated TypeScript type bindings for OptimismPortal (build etherscan-optimismportal-
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Auto-generated TypeScript type bindings for OptimismPortal (build etherscan-optimismportal-84db318e-1787634369313, commit 8ba32b3, branch etherscan)",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"url": "https://github.com/etherscan/optimismportal"
|
|
40
40
|
},
|
|
41
41
|
"branch": "etherscan",
|
|
42
|
-
"shortHash": "
|
|
42
|
+
"shortHash": "8ba32b3"
|
|
43
43
|
}
|