@gitmyabi/zklighter 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 +108 -0
- package/contracts/Proxy_json.d.ts +250 -0
- package/contracts/Proxy_json.js +267 -0
- package/contracts/Proxy_json.ts +344 -0
- package/contracts/ZkLighter_json.d.ts +3619 -0
- package/contracts/ZkLighter_json.js +3870 -0
- package/contracts/ZkLighter_json.ts +4747 -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,4747 @@
|
|
|
1
|
+
import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
|
|
2
|
+
import { getContract } from 'viem';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* TxTypes.CreateMarket struct type
|
|
7
|
+
*/
|
|
8
|
+
export type TxTypes_CreateMarket = {
|
|
9
|
+
marketIndex: bigint;
|
|
10
|
+
marketType: bigint;
|
|
11
|
+
marketData: `0x${string}`;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* TxTypes.UpdateMarket struct type
|
|
16
|
+
*/
|
|
17
|
+
export type TxTypes_UpdateMarket = {
|
|
18
|
+
marketIndex: bigint;
|
|
19
|
+
marketType: bigint;
|
|
20
|
+
marketData: `0x${string}`;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* IZkLighter.CommitBatchInfo struct type
|
|
25
|
+
*/
|
|
26
|
+
export type IZkLighter_CommitBatchInfo = {
|
|
27
|
+
endBlockNumber: bigint;
|
|
28
|
+
batchSize: bigint;
|
|
29
|
+
startTimestamp: bigint;
|
|
30
|
+
endTimestamp: bigint;
|
|
31
|
+
priorityRequestCount: bigint;
|
|
32
|
+
prefixPriorityRequestHash: `0x${string}`;
|
|
33
|
+
onChainOperationsHash: `0x${string}`;
|
|
34
|
+
newStateRoot: `0x${string}`;
|
|
35
|
+
newValidiumRoot: `0x${string}`;
|
|
36
|
+
pubdataCommitments: `0x${string}`;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Storage.StoredBatchInfo struct type
|
|
41
|
+
*/
|
|
42
|
+
export type Storage_StoredBatchInfo = {
|
|
43
|
+
batchNumber: bigint;
|
|
44
|
+
endBlockNumber: bigint;
|
|
45
|
+
batchSize: bigint;
|
|
46
|
+
startTimestamp: bigint;
|
|
47
|
+
endTimestamp: bigint;
|
|
48
|
+
priorityRequestCount: bigint;
|
|
49
|
+
prefixPriorityRequestHash: `0x${string}`;
|
|
50
|
+
onChainOperationsHash: `0x${string}`;
|
|
51
|
+
stateRoot: `0x${string}`;
|
|
52
|
+
validiumRoot: `0x${string}`;
|
|
53
|
+
commitment: `0x${string}`;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* TxTypes.RegisterAsset struct type
|
|
58
|
+
*/
|
|
59
|
+
export type TxTypes_RegisterAsset = {
|
|
60
|
+
assetIndex: bigint;
|
|
61
|
+
extensionMultiplier: bigint;
|
|
62
|
+
minL2TransferAmount: bigint;
|
|
63
|
+
minL2WithdrawalAmount: bigint;
|
|
64
|
+
marginMode: bigint;
|
|
65
|
+
loanToValue: bigint;
|
|
66
|
+
liquidationThreshold: bigint;
|
|
67
|
+
liquidationFactor: bigint;
|
|
68
|
+
liquidationFee: bigint;
|
|
69
|
+
indexPriceDivider: bigint;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* TxTypes.SetSystemConfig struct type
|
|
74
|
+
*/
|
|
75
|
+
export type TxTypes_SetSystemConfig = {
|
|
76
|
+
liquidityPoolIndex: bigint;
|
|
77
|
+
stakingPoolIndex: bigint;
|
|
78
|
+
liquidityPoolCooldownPeriod: bigint;
|
|
79
|
+
stakingPoolLockupPeriod: bigint;
|
|
80
|
+
maxIntegratorPerpsTakerFee: bigint;
|
|
81
|
+
maxIntegratorPerpsMakerFee: bigint;
|
|
82
|
+
maxIntegratorSpotTakerFee: bigint;
|
|
83
|
+
maxIntegratorSpotMakerFee: bigint;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* TxTypes.UpdateAsset struct type
|
|
88
|
+
*/
|
|
89
|
+
export type TxTypes_UpdateAsset = {
|
|
90
|
+
assetIndex: bigint;
|
|
91
|
+
minL2TransferAmount: bigint;
|
|
92
|
+
minL2WithdrawalAmount: bigint;
|
|
93
|
+
marginMode: bigint;
|
|
94
|
+
loanToValue: bigint;
|
|
95
|
+
liquidationThreshold: bigint;
|
|
96
|
+
liquidationFactor: bigint;
|
|
97
|
+
liquidationFee: bigint;
|
|
98
|
+
indexPriceDivider: bigint;
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* ZkLighter_json ABI
|
|
102
|
+
*
|
|
103
|
+
* This ABI is typed using viem's type system for full type safety.
|
|
104
|
+
*/
|
|
105
|
+
export const ZkLighter_jsonAbi = [
|
|
106
|
+
{
|
|
107
|
+
"inputs": [],
|
|
108
|
+
"stateMutability": "nonpayable",
|
|
109
|
+
"type": "constructor"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"inputs": [],
|
|
113
|
+
"name": "ZkLighter_BatchNotInOnChainQueue",
|
|
114
|
+
"type": "error"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"inputs": [],
|
|
118
|
+
"name": "ZkLighter_CannotBeInitialisedByImpl",
|
|
119
|
+
"type": "error"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"inputs": [],
|
|
123
|
+
"name": "ZkLighter_CannotExecuteNonVerifiedBatch",
|
|
124
|
+
"type": "error"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"inputs": [],
|
|
128
|
+
"name": "ZkLighter_CannotRevertExecutedBatch",
|
|
129
|
+
"type": "error"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"inputs": [],
|
|
133
|
+
"name": "ZkLighter_CannotRevertGenesisBatch",
|
|
134
|
+
"type": "error"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"inputs": [],
|
|
138
|
+
"name": "ZkLighter_CannotVerifyNonCommittedBatch",
|
|
139
|
+
"type": "error"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"inputs": [],
|
|
143
|
+
"name": "ZkLighter_CommitBatchPriorityRequestCountMismatch",
|
|
144
|
+
"type": "error"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"inputs": [],
|
|
148
|
+
"name": "ZkLighter_DesertError",
|
|
149
|
+
"type": "error"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"inputs": [],
|
|
153
|
+
"name": "ZkLighter_DesertModeActive",
|
|
154
|
+
"type": "error"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"inputs": [],
|
|
158
|
+
"name": "ZkLighter_ETHTransferFailed",
|
|
159
|
+
"type": "error"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"inputs": [],
|
|
163
|
+
"name": "ZkLighter_ExecuteInputLengthGreaterThanPendingCount",
|
|
164
|
+
"type": "error"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"inputs": [],
|
|
168
|
+
"name": "ZkLighter_ExecuteInputLengthMismatch",
|
|
169
|
+
"type": "error"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"inputs": [],
|
|
173
|
+
"name": "ZkLighter_ImplCantDelegateToAddl",
|
|
174
|
+
"type": "error"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"inputs": [],
|
|
178
|
+
"name": "ZkLighter_InsuranceFundOperatorCannotBeInUse",
|
|
179
|
+
"type": "error"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"inputs": [],
|
|
183
|
+
"name": "ZkLighter_InsuranceFundOperatorCannotBeZero",
|
|
184
|
+
"type": "error"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"inputs": [],
|
|
188
|
+
"name": "ZkLighter_InvalidAssetConfigParams",
|
|
189
|
+
"type": "error"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"inputs": [],
|
|
193
|
+
"name": "ZkLighter_InvalidAssetIndex",
|
|
194
|
+
"type": "error"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"inputs": [],
|
|
198
|
+
"name": "ZkLighter_InvalidBatchSize",
|
|
199
|
+
"type": "error"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"inputs": [],
|
|
203
|
+
"name": "ZkLighter_InvalidBlobCommitmentParams",
|
|
204
|
+
"type": "error"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"inputs": [
|
|
208
|
+
{
|
|
209
|
+
"internalType": "uint256",
|
|
210
|
+
"name": "",
|
|
211
|
+
"type": "uint256"
|
|
212
|
+
}
|
|
213
|
+
],
|
|
214
|
+
"name": "ZkLighter_InvalidBlobCount",
|
|
215
|
+
"type": "error"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
"inputs": [],
|
|
219
|
+
"name": "ZkLighter_InvalidInitializeParameters",
|
|
220
|
+
"type": "error"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"inputs": [],
|
|
224
|
+
"name": "ZkLighter_InvalidPointEvaluationParams",
|
|
225
|
+
"type": "error"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"inputs": [],
|
|
229
|
+
"name": "ZkLighter_InvalidPubDataLength",
|
|
230
|
+
"type": "error"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"inputs": [],
|
|
234
|
+
"name": "ZkLighter_InvalidPubDataMode",
|
|
235
|
+
"type": "error"
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"inputs": [],
|
|
239
|
+
"name": "ZkLighter_InvalidPubDataType",
|
|
240
|
+
"type": "error"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"inputs": [],
|
|
244
|
+
"name": "ZkLighter_InvalidUpgradeParameters",
|
|
245
|
+
"type": "error"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"inputs": [],
|
|
249
|
+
"name": "ZkLighter_InvalidWithdrawAmount",
|
|
250
|
+
"type": "error"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"inputs": [],
|
|
254
|
+
"name": "ZkLighter_NonIncreasingBlockNumber",
|
|
255
|
+
"type": "error"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"inputs": [],
|
|
259
|
+
"name": "ZkLighter_NonIncreasingTimestamp",
|
|
260
|
+
"type": "error"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"inputs": [],
|
|
264
|
+
"name": "ZkLighter_OnChainOperationsHashMismatch",
|
|
265
|
+
"type": "error"
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"inputs": [],
|
|
269
|
+
"name": "ZkLighter_OnlyProxyCanCallUpgrade",
|
|
270
|
+
"type": "error"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"inputs": [],
|
|
274
|
+
"name": "ZkLighter_OnlyZkLighter",
|
|
275
|
+
"type": "error"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"inputs": [],
|
|
279
|
+
"name": "ZkLighter_PriorityRequestPrefixHashMismatch",
|
|
280
|
+
"type": "error"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"inputs": [],
|
|
284
|
+
"name": "ZkLighter_RollUpBalanceBiggerThanMaxAmount",
|
|
285
|
+
"type": "error"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"inputs": [],
|
|
289
|
+
"name": "ZkLighter_StoredBatchInfoMismatch",
|
|
290
|
+
"type": "error"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"inputs": [],
|
|
294
|
+
"name": "ZkLighter_TransferredAmountNotMultipleOfTickSize",
|
|
295
|
+
"type": "error"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"inputs": [],
|
|
299
|
+
"name": "ZkLighter_TreasuryCannotBeInUse",
|
|
300
|
+
"type": "error"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"inputs": [],
|
|
304
|
+
"name": "ZkLighter_TreasuryCannotBeZero",
|
|
305
|
+
"type": "error"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"inputs": [],
|
|
309
|
+
"name": "ZkLighter_VerifyBatchNotInOrder",
|
|
310
|
+
"type": "error"
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
"inputs": [],
|
|
314
|
+
"name": "ZkLighter_VerifyBatchProofFailed",
|
|
315
|
+
"type": "error"
|
|
316
|
+
},
|
|
317
|
+
{
|
|
318
|
+
"anonymous": false,
|
|
319
|
+
"inputs": [
|
|
320
|
+
{
|
|
321
|
+
"indexed": false,
|
|
322
|
+
"internalType": "uint64",
|
|
323
|
+
"name": "batchNumber",
|
|
324
|
+
"type": "uint64"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"indexed": false,
|
|
328
|
+
"internalType": "uint32",
|
|
329
|
+
"name": "batchSize",
|
|
330
|
+
"type": "uint32"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"indexed": false,
|
|
334
|
+
"internalType": "uint64",
|
|
335
|
+
"name": "endBlockNumber",
|
|
336
|
+
"type": "uint64"
|
|
337
|
+
}
|
|
338
|
+
],
|
|
339
|
+
"name": "BatchCommit",
|
|
340
|
+
"type": "event"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"anonymous": false,
|
|
344
|
+
"inputs": [
|
|
345
|
+
{
|
|
346
|
+
"indexed": false,
|
|
347
|
+
"internalType": "uint64",
|
|
348
|
+
"name": "batchNumber",
|
|
349
|
+
"type": "uint64"
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"indexed": false,
|
|
353
|
+
"internalType": "uint32",
|
|
354
|
+
"name": "batchSize",
|
|
355
|
+
"type": "uint32"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"indexed": false,
|
|
359
|
+
"internalType": "uint64",
|
|
360
|
+
"name": "endBlockNumber",
|
|
361
|
+
"type": "uint64"
|
|
362
|
+
}
|
|
363
|
+
],
|
|
364
|
+
"name": "BatchVerification",
|
|
365
|
+
"type": "event"
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"anonymous": false,
|
|
369
|
+
"inputs": [
|
|
370
|
+
{
|
|
371
|
+
"indexed": false,
|
|
372
|
+
"internalType": "uint64",
|
|
373
|
+
"name": "batchNumber",
|
|
374
|
+
"type": "uint64"
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"indexed": false,
|
|
378
|
+
"internalType": "uint64",
|
|
379
|
+
"name": "endBlockNumber",
|
|
380
|
+
"type": "uint64"
|
|
381
|
+
}
|
|
382
|
+
],
|
|
383
|
+
"name": "BatchesExecuted",
|
|
384
|
+
"type": "event"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"anonymous": false,
|
|
388
|
+
"inputs": [
|
|
389
|
+
{
|
|
390
|
+
"indexed": false,
|
|
391
|
+
"internalType": "uint64",
|
|
392
|
+
"name": "newTotalBlocksCommitted",
|
|
393
|
+
"type": "uint64"
|
|
394
|
+
}
|
|
395
|
+
],
|
|
396
|
+
"name": "BatchesRevert",
|
|
397
|
+
"type": "event"
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"anonymous": false,
|
|
401
|
+
"inputs": [
|
|
402
|
+
{
|
|
403
|
+
"components": [
|
|
404
|
+
{
|
|
405
|
+
"internalType": "uint16",
|
|
406
|
+
"name": "marketIndex",
|
|
407
|
+
"type": "uint16"
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
"internalType": "enum TxTypes.MarketType",
|
|
411
|
+
"name": "marketType",
|
|
412
|
+
"type": "uint8"
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
"internalType": "bytes",
|
|
416
|
+
"name": "marketData",
|
|
417
|
+
"type": "bytes"
|
|
418
|
+
}
|
|
419
|
+
],
|
|
420
|
+
"indexed": false,
|
|
421
|
+
"internalType": "struct TxTypes.CreateMarket",
|
|
422
|
+
"name": "params",
|
|
423
|
+
"type": "tuple"
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
"indexed": false,
|
|
427
|
+
"internalType": "uint8",
|
|
428
|
+
"name": "sizeDecimals",
|
|
429
|
+
"type": "uint8"
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
"indexed": false,
|
|
433
|
+
"internalType": "uint8",
|
|
434
|
+
"name": "priceDecimals",
|
|
435
|
+
"type": "uint8"
|
|
436
|
+
},
|
|
437
|
+
{
|
|
438
|
+
"indexed": false,
|
|
439
|
+
"internalType": "bytes32",
|
|
440
|
+
"name": "symbol",
|
|
441
|
+
"type": "bytes32"
|
|
442
|
+
}
|
|
443
|
+
],
|
|
444
|
+
"name": "CreateMarket",
|
|
445
|
+
"type": "event"
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
"anonymous": false,
|
|
449
|
+
"inputs": [
|
|
450
|
+
{
|
|
451
|
+
"indexed": false,
|
|
452
|
+
"internalType": "uint48",
|
|
453
|
+
"name": "toAccountIndex",
|
|
454
|
+
"type": "uint48"
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"indexed": false,
|
|
458
|
+
"internalType": "address",
|
|
459
|
+
"name": "toAddress",
|
|
460
|
+
"type": "address"
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
"indexed": false,
|
|
464
|
+
"internalType": "uint16",
|
|
465
|
+
"name": "assetIndex",
|
|
466
|
+
"type": "uint16"
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"indexed": false,
|
|
470
|
+
"internalType": "enum TxTypes.RouteType",
|
|
471
|
+
"name": "routeType",
|
|
472
|
+
"type": "uint8"
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"indexed": false,
|
|
476
|
+
"internalType": "uint128",
|
|
477
|
+
"name": "baseAmount",
|
|
478
|
+
"type": "uint128"
|
|
479
|
+
}
|
|
480
|
+
],
|
|
481
|
+
"name": "Deposit",
|
|
482
|
+
"type": "event"
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
"anonymous": false,
|
|
486
|
+
"inputs": [],
|
|
487
|
+
"name": "DesertMode",
|
|
488
|
+
"type": "event"
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
"anonymous": false,
|
|
492
|
+
"inputs": [
|
|
493
|
+
{
|
|
494
|
+
"indexed": false,
|
|
495
|
+
"internalType": "uint8",
|
|
496
|
+
"name": "version",
|
|
497
|
+
"type": "uint8"
|
|
498
|
+
}
|
|
499
|
+
],
|
|
500
|
+
"name": "Initialized",
|
|
501
|
+
"type": "event"
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
"anonymous": false,
|
|
505
|
+
"inputs": [
|
|
506
|
+
{
|
|
507
|
+
"indexed": false,
|
|
508
|
+
"internalType": "address",
|
|
509
|
+
"name": "newInsuranceFundOperator",
|
|
510
|
+
"type": "address"
|
|
511
|
+
}
|
|
512
|
+
],
|
|
513
|
+
"name": "InsuranceFundOperatorUpdate",
|
|
514
|
+
"type": "event"
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
"anonymous": false,
|
|
518
|
+
"inputs": [
|
|
519
|
+
{
|
|
520
|
+
"indexed": false,
|
|
521
|
+
"internalType": "address",
|
|
522
|
+
"name": "sender",
|
|
523
|
+
"type": "address"
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
"indexed": false,
|
|
527
|
+
"internalType": "uint64",
|
|
528
|
+
"name": "serialId",
|
|
529
|
+
"type": "uint64"
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
"indexed": false,
|
|
533
|
+
"internalType": "uint8",
|
|
534
|
+
"name": "pubdataType",
|
|
535
|
+
"type": "uint8"
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
"indexed": false,
|
|
539
|
+
"internalType": "bytes",
|
|
540
|
+
"name": "pubData",
|
|
541
|
+
"type": "bytes"
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
"indexed": false,
|
|
545
|
+
"internalType": "uint64",
|
|
546
|
+
"name": "expirationTimestamp",
|
|
547
|
+
"type": "uint64"
|
|
548
|
+
}
|
|
549
|
+
],
|
|
550
|
+
"name": "NewPriorityRequest",
|
|
551
|
+
"type": "event"
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
"anonymous": false,
|
|
555
|
+
"inputs": [
|
|
556
|
+
{
|
|
557
|
+
"indexed": false,
|
|
558
|
+
"internalType": "uint16",
|
|
559
|
+
"name": "assetIndex",
|
|
560
|
+
"type": "uint16"
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
"indexed": false,
|
|
564
|
+
"internalType": "address",
|
|
565
|
+
"name": "tokenAddress",
|
|
566
|
+
"type": "address"
|
|
567
|
+
},
|
|
568
|
+
{
|
|
569
|
+
"indexed": false,
|
|
570
|
+
"internalType": "uint8",
|
|
571
|
+
"name": "withdrawalsEnabled",
|
|
572
|
+
"type": "uint8"
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
"indexed": false,
|
|
576
|
+
"internalType": "uint56",
|
|
577
|
+
"name": "extensionMultiplier",
|
|
578
|
+
"type": "uint56"
|
|
579
|
+
},
|
|
580
|
+
{
|
|
581
|
+
"indexed": false,
|
|
582
|
+
"internalType": "uint128",
|
|
583
|
+
"name": "tickSize",
|
|
584
|
+
"type": "uint128"
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
"indexed": false,
|
|
588
|
+
"internalType": "uint64",
|
|
589
|
+
"name": "depositCapTicks",
|
|
590
|
+
"type": "uint64"
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
"indexed": false,
|
|
594
|
+
"internalType": "uint64",
|
|
595
|
+
"name": "minDepositTicks",
|
|
596
|
+
"type": "uint64"
|
|
597
|
+
}
|
|
598
|
+
],
|
|
599
|
+
"name": "RegisterAssetConfig",
|
|
600
|
+
"type": "event"
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
"anonymous": false,
|
|
604
|
+
"inputs": [
|
|
605
|
+
{
|
|
606
|
+
"indexed": false,
|
|
607
|
+
"internalType": "uint64",
|
|
608
|
+
"name": "batchNumber",
|
|
609
|
+
"type": "uint64"
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
"indexed": false,
|
|
613
|
+
"internalType": "bytes32",
|
|
614
|
+
"name": "oldStateRoot",
|
|
615
|
+
"type": "bytes32"
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
"indexed": false,
|
|
619
|
+
"internalType": "bytes32",
|
|
620
|
+
"name": "newStateRoot",
|
|
621
|
+
"type": "bytes32"
|
|
622
|
+
}
|
|
623
|
+
],
|
|
624
|
+
"name": "StateRootUpdate",
|
|
625
|
+
"type": "event"
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
"anonymous": false,
|
|
629
|
+
"inputs": [
|
|
630
|
+
{
|
|
631
|
+
"indexed": false,
|
|
632
|
+
"internalType": "address",
|
|
633
|
+
"name": "newTreasury",
|
|
634
|
+
"type": "address"
|
|
635
|
+
}
|
|
636
|
+
],
|
|
637
|
+
"name": "TreasuryUpdate",
|
|
638
|
+
"type": "event"
|
|
639
|
+
},
|
|
640
|
+
{
|
|
641
|
+
"anonymous": false,
|
|
642
|
+
"inputs": [
|
|
643
|
+
{
|
|
644
|
+
"indexed": false,
|
|
645
|
+
"internalType": "uint16",
|
|
646
|
+
"name": "assetIndex",
|
|
647
|
+
"type": "uint16"
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
"indexed": false,
|
|
651
|
+
"internalType": "uint8",
|
|
652
|
+
"name": "withdrawalsEnabled",
|
|
653
|
+
"type": "uint8"
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
"indexed": false,
|
|
657
|
+
"internalType": "uint64",
|
|
658
|
+
"name": "depositCapTicks",
|
|
659
|
+
"type": "uint64"
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
"indexed": false,
|
|
663
|
+
"internalType": "uint64",
|
|
664
|
+
"name": "minDepositTicks",
|
|
665
|
+
"type": "uint64"
|
|
666
|
+
}
|
|
667
|
+
],
|
|
668
|
+
"name": "UpdateAssetConfig",
|
|
669
|
+
"type": "event"
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
"anonymous": false,
|
|
673
|
+
"inputs": [
|
|
674
|
+
{
|
|
675
|
+
"components": [
|
|
676
|
+
{
|
|
677
|
+
"internalType": "uint16",
|
|
678
|
+
"name": "marketIndex",
|
|
679
|
+
"type": "uint16"
|
|
680
|
+
},
|
|
681
|
+
{
|
|
682
|
+
"internalType": "enum TxTypes.MarketType",
|
|
683
|
+
"name": "marketType",
|
|
684
|
+
"type": "uint8"
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
"internalType": "bytes",
|
|
688
|
+
"name": "marketData",
|
|
689
|
+
"type": "bytes"
|
|
690
|
+
}
|
|
691
|
+
],
|
|
692
|
+
"indexed": false,
|
|
693
|
+
"internalType": "struct TxTypes.UpdateMarket",
|
|
694
|
+
"name": "params",
|
|
695
|
+
"type": "tuple"
|
|
696
|
+
}
|
|
697
|
+
],
|
|
698
|
+
"name": "UpdateMarket",
|
|
699
|
+
"type": "event"
|
|
700
|
+
},
|
|
701
|
+
{
|
|
702
|
+
"anonymous": false,
|
|
703
|
+
"inputs": [
|
|
704
|
+
{
|
|
705
|
+
"indexed": true,
|
|
706
|
+
"internalType": "address",
|
|
707
|
+
"name": "owner",
|
|
708
|
+
"type": "address"
|
|
709
|
+
},
|
|
710
|
+
{
|
|
711
|
+
"indexed": false,
|
|
712
|
+
"internalType": "uint16",
|
|
713
|
+
"name": "assetIndex",
|
|
714
|
+
"type": "uint16"
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
"indexed": false,
|
|
718
|
+
"internalType": "uint128",
|
|
719
|
+
"name": "baseAmount",
|
|
720
|
+
"type": "uint128"
|
|
721
|
+
}
|
|
722
|
+
],
|
|
723
|
+
"name": "WithdrawPending",
|
|
724
|
+
"type": "event"
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
"inputs": [],
|
|
728
|
+
"name": "MAX_ACCOUNT_INDEX",
|
|
729
|
+
"outputs": [
|
|
730
|
+
{
|
|
731
|
+
"internalType": "uint48",
|
|
732
|
+
"name": "",
|
|
733
|
+
"type": "uint48"
|
|
734
|
+
}
|
|
735
|
+
],
|
|
736
|
+
"stateMutability": "view",
|
|
737
|
+
"type": "function"
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
"inputs": [],
|
|
741
|
+
"name": "MAX_API_KEY_INDEX",
|
|
742
|
+
"outputs": [
|
|
743
|
+
{
|
|
744
|
+
"internalType": "uint8",
|
|
745
|
+
"name": "",
|
|
746
|
+
"type": "uint8"
|
|
747
|
+
}
|
|
748
|
+
],
|
|
749
|
+
"stateMutability": "view",
|
|
750
|
+
"type": "function"
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
"inputs": [],
|
|
754
|
+
"name": "MAX_ASSET_INDEX",
|
|
755
|
+
"outputs": [
|
|
756
|
+
{
|
|
757
|
+
"internalType": "uint16",
|
|
758
|
+
"name": "",
|
|
759
|
+
"type": "uint16"
|
|
760
|
+
}
|
|
761
|
+
],
|
|
762
|
+
"stateMutability": "view",
|
|
763
|
+
"type": "function"
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
"inputs": [],
|
|
767
|
+
"name": "MAX_BATCH_DEPOSIT_LENGTH",
|
|
768
|
+
"outputs": [
|
|
769
|
+
{
|
|
770
|
+
"internalType": "uint64",
|
|
771
|
+
"name": "",
|
|
772
|
+
"type": "uint64"
|
|
773
|
+
}
|
|
774
|
+
],
|
|
775
|
+
"stateMutability": "view",
|
|
776
|
+
"type": "function"
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
"inputs": [],
|
|
780
|
+
"name": "MAX_DEPOSIT_CAP_TICKS",
|
|
781
|
+
"outputs": [
|
|
782
|
+
{
|
|
783
|
+
"internalType": "uint64",
|
|
784
|
+
"name": "",
|
|
785
|
+
"type": "uint64"
|
|
786
|
+
}
|
|
787
|
+
],
|
|
788
|
+
"stateMutability": "view",
|
|
789
|
+
"type": "function"
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
"inputs": [],
|
|
793
|
+
"name": "MAX_MASTER_ACCOUNT_INDEX",
|
|
794
|
+
"outputs": [
|
|
795
|
+
{
|
|
796
|
+
"internalType": "uint48",
|
|
797
|
+
"name": "",
|
|
798
|
+
"type": "uint48"
|
|
799
|
+
}
|
|
800
|
+
],
|
|
801
|
+
"stateMutability": "view",
|
|
802
|
+
"type": "function"
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
"inputs": [],
|
|
806
|
+
"name": "MAX_ORDER_BASE_AMOUNT",
|
|
807
|
+
"outputs": [
|
|
808
|
+
{
|
|
809
|
+
"internalType": "uint48",
|
|
810
|
+
"name": "",
|
|
811
|
+
"type": "uint48"
|
|
812
|
+
}
|
|
813
|
+
],
|
|
814
|
+
"stateMutability": "view",
|
|
815
|
+
"type": "function"
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
"inputs": [],
|
|
819
|
+
"name": "MAX_ORDER_PRICE",
|
|
820
|
+
"outputs": [
|
|
821
|
+
{
|
|
822
|
+
"internalType": "uint32",
|
|
823
|
+
"name": "",
|
|
824
|
+
"type": "uint32"
|
|
825
|
+
}
|
|
826
|
+
],
|
|
827
|
+
"stateMutability": "view",
|
|
828
|
+
"type": "function"
|
|
829
|
+
},
|
|
830
|
+
{
|
|
831
|
+
"inputs": [],
|
|
832
|
+
"name": "MAX_ORDER_QUOTE_AMOUNT",
|
|
833
|
+
"outputs": [
|
|
834
|
+
{
|
|
835
|
+
"internalType": "uint48",
|
|
836
|
+
"name": "",
|
|
837
|
+
"type": "uint48"
|
|
838
|
+
}
|
|
839
|
+
],
|
|
840
|
+
"stateMutability": "view",
|
|
841
|
+
"type": "function"
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
"inputs": [],
|
|
845
|
+
"name": "MAX_PERPS_MARKET_INDEX",
|
|
846
|
+
"outputs": [
|
|
847
|
+
{
|
|
848
|
+
"internalType": "uint16",
|
|
849
|
+
"name": "",
|
|
850
|
+
"type": "uint16"
|
|
851
|
+
}
|
|
852
|
+
],
|
|
853
|
+
"stateMutability": "view",
|
|
854
|
+
"type": "function"
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
"inputs": [],
|
|
858
|
+
"name": "MAX_POOL_SHARES_TO_MINT_OR_BURN",
|
|
859
|
+
"outputs": [
|
|
860
|
+
{
|
|
861
|
+
"internalType": "uint64",
|
|
862
|
+
"name": "",
|
|
863
|
+
"type": "uint64"
|
|
864
|
+
}
|
|
865
|
+
],
|
|
866
|
+
"stateMutability": "view",
|
|
867
|
+
"type": "function"
|
|
868
|
+
},
|
|
869
|
+
{
|
|
870
|
+
"inputs": [],
|
|
871
|
+
"name": "MAX_SPOT_MARKET_INDEX",
|
|
872
|
+
"outputs": [
|
|
873
|
+
{
|
|
874
|
+
"internalType": "uint16",
|
|
875
|
+
"name": "",
|
|
876
|
+
"type": "uint16"
|
|
877
|
+
}
|
|
878
|
+
],
|
|
879
|
+
"stateMutability": "view",
|
|
880
|
+
"type": "function"
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
"inputs": [],
|
|
884
|
+
"name": "MAX_STAKING_SHARES_TO_MINT_OR_BURN",
|
|
885
|
+
"outputs": [
|
|
886
|
+
{
|
|
887
|
+
"internalType": "uint64",
|
|
888
|
+
"name": "",
|
|
889
|
+
"type": "uint64"
|
|
890
|
+
}
|
|
891
|
+
],
|
|
892
|
+
"stateMutability": "view",
|
|
893
|
+
"type": "function"
|
|
894
|
+
},
|
|
895
|
+
{
|
|
896
|
+
"inputs": [],
|
|
897
|
+
"name": "MAX_TICK_SIZE",
|
|
898
|
+
"outputs": [
|
|
899
|
+
{
|
|
900
|
+
"internalType": "uint128",
|
|
901
|
+
"name": "",
|
|
902
|
+
"type": "uint128"
|
|
903
|
+
}
|
|
904
|
+
],
|
|
905
|
+
"stateMutability": "view",
|
|
906
|
+
"type": "function"
|
|
907
|
+
},
|
|
908
|
+
{
|
|
909
|
+
"inputs": [],
|
|
910
|
+
"name": "MIN_ASSET_INDEX",
|
|
911
|
+
"outputs": [
|
|
912
|
+
{
|
|
913
|
+
"internalType": "uint16",
|
|
914
|
+
"name": "",
|
|
915
|
+
"type": "uint16"
|
|
916
|
+
}
|
|
917
|
+
],
|
|
918
|
+
"stateMutability": "view",
|
|
919
|
+
"type": "function"
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
"inputs": [],
|
|
923
|
+
"name": "MIN_ORDER_PRICE",
|
|
924
|
+
"outputs": [
|
|
925
|
+
{
|
|
926
|
+
"internalType": "uint32",
|
|
927
|
+
"name": "",
|
|
928
|
+
"type": "uint32"
|
|
929
|
+
}
|
|
930
|
+
],
|
|
931
|
+
"stateMutability": "view",
|
|
932
|
+
"type": "function"
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
"inputs": [],
|
|
936
|
+
"name": "MIN_POOL_SHARES_TO_MINT_OR_BURN",
|
|
937
|
+
"outputs": [
|
|
938
|
+
{
|
|
939
|
+
"internalType": "uint64",
|
|
940
|
+
"name": "",
|
|
941
|
+
"type": "uint64"
|
|
942
|
+
}
|
|
943
|
+
],
|
|
944
|
+
"stateMutability": "view",
|
|
945
|
+
"type": "function"
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
"inputs": [],
|
|
949
|
+
"name": "MIN_SPOT_MARKET_INDEX",
|
|
950
|
+
"outputs": [
|
|
951
|
+
{
|
|
952
|
+
"internalType": "uint16",
|
|
953
|
+
"name": "",
|
|
954
|
+
"type": "uint16"
|
|
955
|
+
}
|
|
956
|
+
],
|
|
957
|
+
"stateMutability": "view",
|
|
958
|
+
"type": "function"
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
"inputs": [],
|
|
962
|
+
"name": "MIN_STAKING_SHARES_TO_MINT_OR_BURN",
|
|
963
|
+
"outputs": [
|
|
964
|
+
{
|
|
965
|
+
"internalType": "uint64",
|
|
966
|
+
"name": "",
|
|
967
|
+
"type": "uint64"
|
|
968
|
+
}
|
|
969
|
+
],
|
|
970
|
+
"stateMutability": "view",
|
|
971
|
+
"type": "function"
|
|
972
|
+
},
|
|
973
|
+
{
|
|
974
|
+
"inputs": [],
|
|
975
|
+
"name": "NATIVE_ASSET_INDEX",
|
|
976
|
+
"outputs": [
|
|
977
|
+
{
|
|
978
|
+
"internalType": "uint16",
|
|
979
|
+
"name": "",
|
|
980
|
+
"type": "uint16"
|
|
981
|
+
}
|
|
982
|
+
],
|
|
983
|
+
"stateMutability": "view",
|
|
984
|
+
"type": "function"
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
"inputs": [],
|
|
988
|
+
"name": "NIL_ACCOUNT_INDEX",
|
|
989
|
+
"outputs": [
|
|
990
|
+
{
|
|
991
|
+
"internalType": "uint48",
|
|
992
|
+
"name": "",
|
|
993
|
+
"type": "uint48"
|
|
994
|
+
}
|
|
995
|
+
],
|
|
996
|
+
"stateMutability": "view",
|
|
997
|
+
"type": "function"
|
|
998
|
+
},
|
|
999
|
+
{
|
|
1000
|
+
"inputs": [],
|
|
1001
|
+
"name": "PRIORITY_EXPIRATION",
|
|
1002
|
+
"outputs": [
|
|
1003
|
+
{
|
|
1004
|
+
"internalType": "uint256",
|
|
1005
|
+
"name": "",
|
|
1006
|
+
"type": "uint256"
|
|
1007
|
+
}
|
|
1008
|
+
],
|
|
1009
|
+
"stateMutability": "view",
|
|
1010
|
+
"type": "function"
|
|
1011
|
+
},
|
|
1012
|
+
{
|
|
1013
|
+
"inputs": [],
|
|
1014
|
+
"name": "USDC_ASSET_INDEX",
|
|
1015
|
+
"outputs": [
|
|
1016
|
+
{
|
|
1017
|
+
"internalType": "uint16",
|
|
1018
|
+
"name": "",
|
|
1019
|
+
"type": "uint16"
|
|
1020
|
+
}
|
|
1021
|
+
],
|
|
1022
|
+
"stateMutability": "view",
|
|
1023
|
+
"type": "function"
|
|
1024
|
+
},
|
|
1025
|
+
{
|
|
1026
|
+
"inputs": [
|
|
1027
|
+
{
|
|
1028
|
+
"internalType": "uint64",
|
|
1029
|
+
"name": "",
|
|
1030
|
+
"type": "uint64"
|
|
1031
|
+
}
|
|
1032
|
+
],
|
|
1033
|
+
"name": "__DEPRECATED_stateRootUpdates",
|
|
1034
|
+
"outputs": [
|
|
1035
|
+
{
|
|
1036
|
+
"internalType": "bytes32",
|
|
1037
|
+
"name": "",
|
|
1038
|
+
"type": "bytes32"
|
|
1039
|
+
}
|
|
1040
|
+
],
|
|
1041
|
+
"stateMutability": "view",
|
|
1042
|
+
"type": "function"
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
"inputs": [],
|
|
1046
|
+
"name": "activateDesertMode",
|
|
1047
|
+
"outputs": [
|
|
1048
|
+
{
|
|
1049
|
+
"internalType": "bool",
|
|
1050
|
+
"name": "",
|
|
1051
|
+
"type": "bool"
|
|
1052
|
+
}
|
|
1053
|
+
],
|
|
1054
|
+
"stateMutability": "nonpayable",
|
|
1055
|
+
"type": "function"
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
"inputs": [
|
|
1059
|
+
{
|
|
1060
|
+
"internalType": "address",
|
|
1061
|
+
"name": "",
|
|
1062
|
+
"type": "address"
|
|
1063
|
+
}
|
|
1064
|
+
],
|
|
1065
|
+
"name": "addressToAccountIndex",
|
|
1066
|
+
"outputs": [
|
|
1067
|
+
{
|
|
1068
|
+
"internalType": "uint48",
|
|
1069
|
+
"name": "",
|
|
1070
|
+
"type": "uint48"
|
|
1071
|
+
}
|
|
1072
|
+
],
|
|
1073
|
+
"stateMutability": "view",
|
|
1074
|
+
"type": "function"
|
|
1075
|
+
},
|
|
1076
|
+
{
|
|
1077
|
+
"inputs": [
|
|
1078
|
+
{
|
|
1079
|
+
"internalType": "uint16",
|
|
1080
|
+
"name": "",
|
|
1081
|
+
"type": "uint16"
|
|
1082
|
+
}
|
|
1083
|
+
],
|
|
1084
|
+
"name": "assetConfigs",
|
|
1085
|
+
"outputs": [
|
|
1086
|
+
{
|
|
1087
|
+
"internalType": "address",
|
|
1088
|
+
"name": "tokenAddress",
|
|
1089
|
+
"type": "address"
|
|
1090
|
+
},
|
|
1091
|
+
{
|
|
1092
|
+
"internalType": "uint8",
|
|
1093
|
+
"name": "withdrawalsEnabled",
|
|
1094
|
+
"type": "uint8"
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
"internalType": "uint56",
|
|
1098
|
+
"name": "extensionMultiplier",
|
|
1099
|
+
"type": "uint56"
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
"internalType": "uint128",
|
|
1103
|
+
"name": "tickSize",
|
|
1104
|
+
"type": "uint128"
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
"internalType": "uint64",
|
|
1108
|
+
"name": "depositCapTicks",
|
|
1109
|
+
"type": "uint64"
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
"internalType": "uint64",
|
|
1113
|
+
"name": "minDepositTicks",
|
|
1114
|
+
"type": "uint64"
|
|
1115
|
+
}
|
|
1116
|
+
],
|
|
1117
|
+
"stateMutability": "view",
|
|
1118
|
+
"type": "function"
|
|
1119
|
+
},
|
|
1120
|
+
{
|
|
1121
|
+
"inputs": [
|
|
1122
|
+
{
|
|
1123
|
+
"internalType": "uint48",
|
|
1124
|
+
"name": "_accountIndex",
|
|
1125
|
+
"type": "uint48"
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
"internalType": "uint48",
|
|
1129
|
+
"name": "_publicPoolIndex",
|
|
1130
|
+
"type": "uint48"
|
|
1131
|
+
},
|
|
1132
|
+
{
|
|
1133
|
+
"internalType": "uint64",
|
|
1134
|
+
"name": "_shareAmount",
|
|
1135
|
+
"type": "uint64"
|
|
1136
|
+
}
|
|
1137
|
+
],
|
|
1138
|
+
"name": "burnShares",
|
|
1139
|
+
"outputs": [],
|
|
1140
|
+
"stateMutability": "nonpayable",
|
|
1141
|
+
"type": "function"
|
|
1142
|
+
},
|
|
1143
|
+
{
|
|
1144
|
+
"inputs": [
|
|
1145
|
+
{
|
|
1146
|
+
"internalType": "uint48",
|
|
1147
|
+
"name": "_accountIndex",
|
|
1148
|
+
"type": "uint48"
|
|
1149
|
+
}
|
|
1150
|
+
],
|
|
1151
|
+
"name": "cancelAllOrders",
|
|
1152
|
+
"outputs": [],
|
|
1153
|
+
"stateMutability": "nonpayable",
|
|
1154
|
+
"type": "function"
|
|
1155
|
+
},
|
|
1156
|
+
{
|
|
1157
|
+
"inputs": [
|
|
1158
|
+
{
|
|
1159
|
+
"internalType": "uint64",
|
|
1160
|
+
"name": "_n",
|
|
1161
|
+
"type": "uint64"
|
|
1162
|
+
},
|
|
1163
|
+
{
|
|
1164
|
+
"internalType": "bytes[]",
|
|
1165
|
+
"name": "_priorityPubData",
|
|
1166
|
+
"type": "bytes[]"
|
|
1167
|
+
}
|
|
1168
|
+
],
|
|
1169
|
+
"name": "cancelOutstandingDepositsForDesertMode",
|
|
1170
|
+
"outputs": [],
|
|
1171
|
+
"stateMutability": "nonpayable",
|
|
1172
|
+
"type": "function"
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
"inputs": [
|
|
1176
|
+
{
|
|
1177
|
+
"internalType": "uint48",
|
|
1178
|
+
"name": "_accountIndex",
|
|
1179
|
+
"type": "uint48"
|
|
1180
|
+
},
|
|
1181
|
+
{
|
|
1182
|
+
"internalType": "uint8",
|
|
1183
|
+
"name": "_apiKeyIndex",
|
|
1184
|
+
"type": "uint8"
|
|
1185
|
+
},
|
|
1186
|
+
{
|
|
1187
|
+
"internalType": "bytes",
|
|
1188
|
+
"name": "_pubKey",
|
|
1189
|
+
"type": "bytes"
|
|
1190
|
+
}
|
|
1191
|
+
],
|
|
1192
|
+
"name": "changePubKey",
|
|
1193
|
+
"outputs": [],
|
|
1194
|
+
"stateMutability": "nonpayable",
|
|
1195
|
+
"type": "function"
|
|
1196
|
+
},
|
|
1197
|
+
{
|
|
1198
|
+
"inputs": [
|
|
1199
|
+
{
|
|
1200
|
+
"components": [
|
|
1201
|
+
{
|
|
1202
|
+
"internalType": "uint64",
|
|
1203
|
+
"name": "endBlockNumber",
|
|
1204
|
+
"type": "uint64"
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
"internalType": "uint32",
|
|
1208
|
+
"name": "batchSize",
|
|
1209
|
+
"type": "uint32"
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
"internalType": "uint64",
|
|
1213
|
+
"name": "startTimestamp",
|
|
1214
|
+
"type": "uint64"
|
|
1215
|
+
},
|
|
1216
|
+
{
|
|
1217
|
+
"internalType": "uint64",
|
|
1218
|
+
"name": "endTimestamp",
|
|
1219
|
+
"type": "uint64"
|
|
1220
|
+
},
|
|
1221
|
+
{
|
|
1222
|
+
"internalType": "uint32",
|
|
1223
|
+
"name": "priorityRequestCount",
|
|
1224
|
+
"type": "uint32"
|
|
1225
|
+
},
|
|
1226
|
+
{
|
|
1227
|
+
"internalType": "bytes32",
|
|
1228
|
+
"name": "prefixPriorityRequestHash",
|
|
1229
|
+
"type": "bytes32"
|
|
1230
|
+
},
|
|
1231
|
+
{
|
|
1232
|
+
"internalType": "bytes32",
|
|
1233
|
+
"name": "onChainOperationsHash",
|
|
1234
|
+
"type": "bytes32"
|
|
1235
|
+
},
|
|
1236
|
+
{
|
|
1237
|
+
"internalType": "bytes32",
|
|
1238
|
+
"name": "newStateRoot",
|
|
1239
|
+
"type": "bytes32"
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
"internalType": "bytes32",
|
|
1243
|
+
"name": "newValidiumRoot",
|
|
1244
|
+
"type": "bytes32"
|
|
1245
|
+
},
|
|
1246
|
+
{
|
|
1247
|
+
"internalType": "bytes",
|
|
1248
|
+
"name": "pubdataCommitments",
|
|
1249
|
+
"type": "bytes"
|
|
1250
|
+
}
|
|
1251
|
+
],
|
|
1252
|
+
"internalType": "struct IZkLighter.CommitBatchInfo",
|
|
1253
|
+
"name": "newBatchData",
|
|
1254
|
+
"type": "tuple"
|
|
1255
|
+
},
|
|
1256
|
+
{
|
|
1257
|
+
"components": [
|
|
1258
|
+
{
|
|
1259
|
+
"internalType": "uint64",
|
|
1260
|
+
"name": "batchNumber",
|
|
1261
|
+
"type": "uint64"
|
|
1262
|
+
},
|
|
1263
|
+
{
|
|
1264
|
+
"internalType": "uint64",
|
|
1265
|
+
"name": "endBlockNumber",
|
|
1266
|
+
"type": "uint64"
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
"internalType": "uint32",
|
|
1270
|
+
"name": "batchSize",
|
|
1271
|
+
"type": "uint32"
|
|
1272
|
+
},
|
|
1273
|
+
{
|
|
1274
|
+
"internalType": "uint64",
|
|
1275
|
+
"name": "startTimestamp",
|
|
1276
|
+
"type": "uint64"
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
"internalType": "uint64",
|
|
1280
|
+
"name": "endTimestamp",
|
|
1281
|
+
"type": "uint64"
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
"internalType": "uint32",
|
|
1285
|
+
"name": "priorityRequestCount",
|
|
1286
|
+
"type": "uint32"
|
|
1287
|
+
},
|
|
1288
|
+
{
|
|
1289
|
+
"internalType": "bytes32",
|
|
1290
|
+
"name": "prefixPriorityRequestHash",
|
|
1291
|
+
"type": "bytes32"
|
|
1292
|
+
},
|
|
1293
|
+
{
|
|
1294
|
+
"internalType": "bytes32",
|
|
1295
|
+
"name": "onChainOperationsHash",
|
|
1296
|
+
"type": "bytes32"
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
"internalType": "bytes32",
|
|
1300
|
+
"name": "stateRoot",
|
|
1301
|
+
"type": "bytes32"
|
|
1302
|
+
},
|
|
1303
|
+
{
|
|
1304
|
+
"internalType": "bytes32",
|
|
1305
|
+
"name": "validiumRoot",
|
|
1306
|
+
"type": "bytes32"
|
|
1307
|
+
},
|
|
1308
|
+
{
|
|
1309
|
+
"internalType": "bytes32",
|
|
1310
|
+
"name": "commitment",
|
|
1311
|
+
"type": "bytes32"
|
|
1312
|
+
}
|
|
1313
|
+
],
|
|
1314
|
+
"internalType": "struct Storage.StoredBatchInfo",
|
|
1315
|
+
"name": "lastStoredBatch",
|
|
1316
|
+
"type": "tuple"
|
|
1317
|
+
}
|
|
1318
|
+
],
|
|
1319
|
+
"name": "commitBatch",
|
|
1320
|
+
"outputs": [],
|
|
1321
|
+
"stateMutability": "nonpayable",
|
|
1322
|
+
"type": "function"
|
|
1323
|
+
},
|
|
1324
|
+
{
|
|
1325
|
+
"inputs": [],
|
|
1326
|
+
"name": "committedBatchesCount",
|
|
1327
|
+
"outputs": [
|
|
1328
|
+
{
|
|
1329
|
+
"internalType": "uint64",
|
|
1330
|
+
"name": "",
|
|
1331
|
+
"type": "uint64"
|
|
1332
|
+
}
|
|
1333
|
+
],
|
|
1334
|
+
"stateMutability": "view",
|
|
1335
|
+
"type": "function"
|
|
1336
|
+
},
|
|
1337
|
+
{
|
|
1338
|
+
"inputs": [],
|
|
1339
|
+
"name": "committedPriorityRequestCount",
|
|
1340
|
+
"outputs": [
|
|
1341
|
+
{
|
|
1342
|
+
"internalType": "uint64",
|
|
1343
|
+
"name": "",
|
|
1344
|
+
"type": "uint64"
|
|
1345
|
+
}
|
|
1346
|
+
],
|
|
1347
|
+
"stateMutability": "view",
|
|
1348
|
+
"type": "function"
|
|
1349
|
+
},
|
|
1350
|
+
{
|
|
1351
|
+
"inputs": [
|
|
1352
|
+
{
|
|
1353
|
+
"internalType": "uint8",
|
|
1354
|
+
"name": "_size_decimals",
|
|
1355
|
+
"type": "uint8"
|
|
1356
|
+
},
|
|
1357
|
+
{
|
|
1358
|
+
"internalType": "uint8",
|
|
1359
|
+
"name": "_price_decimals",
|
|
1360
|
+
"type": "uint8"
|
|
1361
|
+
},
|
|
1362
|
+
{
|
|
1363
|
+
"internalType": "bytes32",
|
|
1364
|
+
"name": "_symbol",
|
|
1365
|
+
"type": "bytes32"
|
|
1366
|
+
},
|
|
1367
|
+
{
|
|
1368
|
+
"components": [
|
|
1369
|
+
{
|
|
1370
|
+
"internalType": "uint16",
|
|
1371
|
+
"name": "marketIndex",
|
|
1372
|
+
"type": "uint16"
|
|
1373
|
+
},
|
|
1374
|
+
{
|
|
1375
|
+
"internalType": "enum TxTypes.MarketType",
|
|
1376
|
+
"name": "marketType",
|
|
1377
|
+
"type": "uint8"
|
|
1378
|
+
},
|
|
1379
|
+
{
|
|
1380
|
+
"internalType": "bytes",
|
|
1381
|
+
"name": "marketData",
|
|
1382
|
+
"type": "bytes"
|
|
1383
|
+
}
|
|
1384
|
+
],
|
|
1385
|
+
"internalType": "struct TxTypes.CreateMarket",
|
|
1386
|
+
"name": "_params",
|
|
1387
|
+
"type": "tuple"
|
|
1388
|
+
}
|
|
1389
|
+
],
|
|
1390
|
+
"name": "createMarket",
|
|
1391
|
+
"outputs": [],
|
|
1392
|
+
"stateMutability": "nonpayable",
|
|
1393
|
+
"type": "function"
|
|
1394
|
+
},
|
|
1395
|
+
{
|
|
1396
|
+
"inputs": [
|
|
1397
|
+
{
|
|
1398
|
+
"internalType": "uint48",
|
|
1399
|
+
"name": "_accountIndex",
|
|
1400
|
+
"type": "uint48"
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
"internalType": "uint16",
|
|
1404
|
+
"name": "_marketIndex",
|
|
1405
|
+
"type": "uint16"
|
|
1406
|
+
},
|
|
1407
|
+
{
|
|
1408
|
+
"internalType": "uint48",
|
|
1409
|
+
"name": "_baseAmount",
|
|
1410
|
+
"type": "uint48"
|
|
1411
|
+
},
|
|
1412
|
+
{
|
|
1413
|
+
"internalType": "uint32",
|
|
1414
|
+
"name": "_price",
|
|
1415
|
+
"type": "uint32"
|
|
1416
|
+
},
|
|
1417
|
+
{
|
|
1418
|
+
"internalType": "uint8",
|
|
1419
|
+
"name": "_isAsk",
|
|
1420
|
+
"type": "uint8"
|
|
1421
|
+
},
|
|
1422
|
+
{
|
|
1423
|
+
"internalType": "uint8",
|
|
1424
|
+
"name": "_orderType",
|
|
1425
|
+
"type": "uint8"
|
|
1426
|
+
}
|
|
1427
|
+
],
|
|
1428
|
+
"name": "createOrder",
|
|
1429
|
+
"outputs": [],
|
|
1430
|
+
"stateMutability": "nonpayable",
|
|
1431
|
+
"type": "function"
|
|
1432
|
+
},
|
|
1433
|
+
{
|
|
1434
|
+
"inputs": [
|
|
1435
|
+
{
|
|
1436
|
+
"internalType": "address",
|
|
1437
|
+
"name": "_to",
|
|
1438
|
+
"type": "address"
|
|
1439
|
+
},
|
|
1440
|
+
{
|
|
1441
|
+
"internalType": "uint16",
|
|
1442
|
+
"name": "_assetIndex",
|
|
1443
|
+
"type": "uint16"
|
|
1444
|
+
},
|
|
1445
|
+
{
|
|
1446
|
+
"internalType": "enum TxTypes.RouteType",
|
|
1447
|
+
"name": "_routeType",
|
|
1448
|
+
"type": "uint8"
|
|
1449
|
+
},
|
|
1450
|
+
{
|
|
1451
|
+
"internalType": "uint256",
|
|
1452
|
+
"name": "_amount",
|
|
1453
|
+
"type": "uint256"
|
|
1454
|
+
}
|
|
1455
|
+
],
|
|
1456
|
+
"name": "deposit",
|
|
1457
|
+
"outputs": [],
|
|
1458
|
+
"stateMutability": "payable",
|
|
1459
|
+
"type": "function"
|
|
1460
|
+
},
|
|
1461
|
+
{
|
|
1462
|
+
"inputs": [
|
|
1463
|
+
{
|
|
1464
|
+
"internalType": "uint64[]",
|
|
1465
|
+
"name": "_amount",
|
|
1466
|
+
"type": "uint64[]"
|
|
1467
|
+
},
|
|
1468
|
+
{
|
|
1469
|
+
"internalType": "address[]",
|
|
1470
|
+
"name": "_to",
|
|
1471
|
+
"type": "address[]"
|
|
1472
|
+
},
|
|
1473
|
+
{
|
|
1474
|
+
"internalType": "uint48[]",
|
|
1475
|
+
"name": "_accountIndex",
|
|
1476
|
+
"type": "uint48[]"
|
|
1477
|
+
}
|
|
1478
|
+
],
|
|
1479
|
+
"name": "depositBatch",
|
|
1480
|
+
"outputs": [],
|
|
1481
|
+
"stateMutability": "nonpayable",
|
|
1482
|
+
"type": "function"
|
|
1483
|
+
},
|
|
1484
|
+
{
|
|
1485
|
+
"inputs": [],
|
|
1486
|
+
"name": "desertMode",
|
|
1487
|
+
"outputs": [
|
|
1488
|
+
{
|
|
1489
|
+
"internalType": "bool",
|
|
1490
|
+
"name": "",
|
|
1491
|
+
"type": "bool"
|
|
1492
|
+
}
|
|
1493
|
+
],
|
|
1494
|
+
"stateMutability": "view",
|
|
1495
|
+
"type": "function"
|
|
1496
|
+
},
|
|
1497
|
+
{
|
|
1498
|
+
"inputs": [
|
|
1499
|
+
{
|
|
1500
|
+
"components": [
|
|
1501
|
+
{
|
|
1502
|
+
"internalType": "uint64",
|
|
1503
|
+
"name": "batchNumber",
|
|
1504
|
+
"type": "uint64"
|
|
1505
|
+
},
|
|
1506
|
+
{
|
|
1507
|
+
"internalType": "uint64",
|
|
1508
|
+
"name": "endBlockNumber",
|
|
1509
|
+
"type": "uint64"
|
|
1510
|
+
},
|
|
1511
|
+
{
|
|
1512
|
+
"internalType": "uint32",
|
|
1513
|
+
"name": "batchSize",
|
|
1514
|
+
"type": "uint32"
|
|
1515
|
+
},
|
|
1516
|
+
{
|
|
1517
|
+
"internalType": "uint64",
|
|
1518
|
+
"name": "startTimestamp",
|
|
1519
|
+
"type": "uint64"
|
|
1520
|
+
},
|
|
1521
|
+
{
|
|
1522
|
+
"internalType": "uint64",
|
|
1523
|
+
"name": "endTimestamp",
|
|
1524
|
+
"type": "uint64"
|
|
1525
|
+
},
|
|
1526
|
+
{
|
|
1527
|
+
"internalType": "uint32",
|
|
1528
|
+
"name": "priorityRequestCount",
|
|
1529
|
+
"type": "uint32"
|
|
1530
|
+
},
|
|
1531
|
+
{
|
|
1532
|
+
"internalType": "bytes32",
|
|
1533
|
+
"name": "prefixPriorityRequestHash",
|
|
1534
|
+
"type": "bytes32"
|
|
1535
|
+
},
|
|
1536
|
+
{
|
|
1537
|
+
"internalType": "bytes32",
|
|
1538
|
+
"name": "onChainOperationsHash",
|
|
1539
|
+
"type": "bytes32"
|
|
1540
|
+
},
|
|
1541
|
+
{
|
|
1542
|
+
"internalType": "bytes32",
|
|
1543
|
+
"name": "stateRoot",
|
|
1544
|
+
"type": "bytes32"
|
|
1545
|
+
},
|
|
1546
|
+
{
|
|
1547
|
+
"internalType": "bytes32",
|
|
1548
|
+
"name": "validiumRoot",
|
|
1549
|
+
"type": "bytes32"
|
|
1550
|
+
},
|
|
1551
|
+
{
|
|
1552
|
+
"internalType": "bytes32",
|
|
1553
|
+
"name": "commitment",
|
|
1554
|
+
"type": "bytes32"
|
|
1555
|
+
}
|
|
1556
|
+
],
|
|
1557
|
+
"internalType": "struct Storage.StoredBatchInfo[]",
|
|
1558
|
+
"name": "batches",
|
|
1559
|
+
"type": "tuple[]"
|
|
1560
|
+
},
|
|
1561
|
+
{
|
|
1562
|
+
"internalType": "bytes[]",
|
|
1563
|
+
"name": "onChainOperationsPubData",
|
|
1564
|
+
"type": "bytes[]"
|
|
1565
|
+
}
|
|
1566
|
+
],
|
|
1567
|
+
"name": "executeBatches",
|
|
1568
|
+
"outputs": [],
|
|
1569
|
+
"stateMutability": "nonpayable",
|
|
1570
|
+
"type": "function"
|
|
1571
|
+
},
|
|
1572
|
+
{
|
|
1573
|
+
"inputs": [],
|
|
1574
|
+
"name": "executedBatchesCount",
|
|
1575
|
+
"outputs": [
|
|
1576
|
+
{
|
|
1577
|
+
"internalType": "uint64",
|
|
1578
|
+
"name": "",
|
|
1579
|
+
"type": "uint64"
|
|
1580
|
+
}
|
|
1581
|
+
],
|
|
1582
|
+
"stateMutability": "view",
|
|
1583
|
+
"type": "function"
|
|
1584
|
+
},
|
|
1585
|
+
{
|
|
1586
|
+
"inputs": [],
|
|
1587
|
+
"name": "executedOnChainBatchesCount",
|
|
1588
|
+
"outputs": [
|
|
1589
|
+
{
|
|
1590
|
+
"internalType": "uint64",
|
|
1591
|
+
"name": "",
|
|
1592
|
+
"type": "uint64"
|
|
1593
|
+
}
|
|
1594
|
+
],
|
|
1595
|
+
"stateMutability": "view",
|
|
1596
|
+
"type": "function"
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
"inputs": [],
|
|
1600
|
+
"name": "executedPriorityRequestCount",
|
|
1601
|
+
"outputs": [
|
|
1602
|
+
{
|
|
1603
|
+
"internalType": "uint64",
|
|
1604
|
+
"name": "",
|
|
1605
|
+
"type": "uint64"
|
|
1606
|
+
}
|
|
1607
|
+
],
|
|
1608
|
+
"stateMutability": "view",
|
|
1609
|
+
"type": "function"
|
|
1610
|
+
},
|
|
1611
|
+
{
|
|
1612
|
+
"inputs": [
|
|
1613
|
+
{
|
|
1614
|
+
"internalType": "address",
|
|
1615
|
+
"name": "_owner",
|
|
1616
|
+
"type": "address"
|
|
1617
|
+
},
|
|
1618
|
+
{
|
|
1619
|
+
"internalType": "uint16",
|
|
1620
|
+
"name": "_assetIndex",
|
|
1621
|
+
"type": "uint16"
|
|
1622
|
+
}
|
|
1623
|
+
],
|
|
1624
|
+
"name": "getPendingBalance",
|
|
1625
|
+
"outputs": [
|
|
1626
|
+
{
|
|
1627
|
+
"internalType": "uint128",
|
|
1628
|
+
"name": "",
|
|
1629
|
+
"type": "uint128"
|
|
1630
|
+
}
|
|
1631
|
+
],
|
|
1632
|
+
"stateMutability": "view",
|
|
1633
|
+
"type": "function"
|
|
1634
|
+
},
|
|
1635
|
+
{
|
|
1636
|
+
"inputs": [
|
|
1637
|
+
{
|
|
1638
|
+
"internalType": "address",
|
|
1639
|
+
"name": "_owner",
|
|
1640
|
+
"type": "address"
|
|
1641
|
+
}
|
|
1642
|
+
],
|
|
1643
|
+
"name": "getPendingBalanceLegacy",
|
|
1644
|
+
"outputs": [
|
|
1645
|
+
{
|
|
1646
|
+
"internalType": "uint128",
|
|
1647
|
+
"name": "",
|
|
1648
|
+
"type": "uint128"
|
|
1649
|
+
}
|
|
1650
|
+
],
|
|
1651
|
+
"stateMutability": "view",
|
|
1652
|
+
"type": "function"
|
|
1653
|
+
},
|
|
1654
|
+
{
|
|
1655
|
+
"inputs": [
|
|
1656
|
+
{
|
|
1657
|
+
"internalType": "bytes",
|
|
1658
|
+
"name": "initializationParameters",
|
|
1659
|
+
"type": "bytes"
|
|
1660
|
+
}
|
|
1661
|
+
],
|
|
1662
|
+
"name": "initialize",
|
|
1663
|
+
"outputs": [],
|
|
1664
|
+
"stateMutability": "nonpayable",
|
|
1665
|
+
"type": "function"
|
|
1666
|
+
},
|
|
1667
|
+
{
|
|
1668
|
+
"inputs": [],
|
|
1669
|
+
"name": "insuranceFundOperator",
|
|
1670
|
+
"outputs": [
|
|
1671
|
+
{
|
|
1672
|
+
"internalType": "address",
|
|
1673
|
+
"name": "",
|
|
1674
|
+
"type": "address"
|
|
1675
|
+
}
|
|
1676
|
+
],
|
|
1677
|
+
"stateMutability": "view",
|
|
1678
|
+
"type": "function"
|
|
1679
|
+
},
|
|
1680
|
+
{
|
|
1681
|
+
"inputs": [],
|
|
1682
|
+
"name": "lastAccountIndex",
|
|
1683
|
+
"outputs": [
|
|
1684
|
+
{
|
|
1685
|
+
"internalType": "uint48",
|
|
1686
|
+
"name": "",
|
|
1687
|
+
"type": "uint48"
|
|
1688
|
+
}
|
|
1689
|
+
],
|
|
1690
|
+
"stateMutability": "view",
|
|
1691
|
+
"type": "function"
|
|
1692
|
+
},
|
|
1693
|
+
{
|
|
1694
|
+
"inputs": [],
|
|
1695
|
+
"name": "lastVerifiedEndBlockNumber",
|
|
1696
|
+
"outputs": [
|
|
1697
|
+
{
|
|
1698
|
+
"internalType": "uint64",
|
|
1699
|
+
"name": "",
|
|
1700
|
+
"type": "uint64"
|
|
1701
|
+
}
|
|
1702
|
+
],
|
|
1703
|
+
"stateMutability": "view",
|
|
1704
|
+
"type": "function"
|
|
1705
|
+
},
|
|
1706
|
+
{
|
|
1707
|
+
"inputs": [],
|
|
1708
|
+
"name": "lastVerifiedStateRoot",
|
|
1709
|
+
"outputs": [
|
|
1710
|
+
{
|
|
1711
|
+
"internalType": "bytes32",
|
|
1712
|
+
"name": "",
|
|
1713
|
+
"type": "bytes32"
|
|
1714
|
+
}
|
|
1715
|
+
],
|
|
1716
|
+
"stateMutability": "view",
|
|
1717
|
+
"type": "function"
|
|
1718
|
+
},
|
|
1719
|
+
{
|
|
1720
|
+
"inputs": [],
|
|
1721
|
+
"name": "lastVerifiedValidiumRoot",
|
|
1722
|
+
"outputs": [
|
|
1723
|
+
{
|
|
1724
|
+
"internalType": "bytes32",
|
|
1725
|
+
"name": "",
|
|
1726
|
+
"type": "bytes32"
|
|
1727
|
+
}
|
|
1728
|
+
],
|
|
1729
|
+
"stateMutability": "view",
|
|
1730
|
+
"type": "function"
|
|
1731
|
+
},
|
|
1732
|
+
{
|
|
1733
|
+
"inputs": [],
|
|
1734
|
+
"name": "openPriorityRequestCount",
|
|
1735
|
+
"outputs": [
|
|
1736
|
+
{
|
|
1737
|
+
"internalType": "uint64",
|
|
1738
|
+
"name": "",
|
|
1739
|
+
"type": "uint64"
|
|
1740
|
+
}
|
|
1741
|
+
],
|
|
1742
|
+
"stateMutability": "view",
|
|
1743
|
+
"type": "function"
|
|
1744
|
+
},
|
|
1745
|
+
{
|
|
1746
|
+
"inputs": [],
|
|
1747
|
+
"name": "pendingOnChainBatchesCount",
|
|
1748
|
+
"outputs": [
|
|
1749
|
+
{
|
|
1750
|
+
"internalType": "uint64",
|
|
1751
|
+
"name": "",
|
|
1752
|
+
"type": "uint64"
|
|
1753
|
+
}
|
|
1754
|
+
],
|
|
1755
|
+
"stateMutability": "view",
|
|
1756
|
+
"type": "function"
|
|
1757
|
+
},
|
|
1758
|
+
{
|
|
1759
|
+
"inputs": [
|
|
1760
|
+
{
|
|
1761
|
+
"internalType": "uint48",
|
|
1762
|
+
"name": "_accountIndex",
|
|
1763
|
+
"type": "uint48"
|
|
1764
|
+
},
|
|
1765
|
+
{
|
|
1766
|
+
"internalType": "address",
|
|
1767
|
+
"name": "_l1Address",
|
|
1768
|
+
"type": "address"
|
|
1769
|
+
},
|
|
1770
|
+
{
|
|
1771
|
+
"internalType": "uint16",
|
|
1772
|
+
"name": "_assetIndex",
|
|
1773
|
+
"type": "uint16"
|
|
1774
|
+
},
|
|
1775
|
+
{
|
|
1776
|
+
"internalType": "uint128",
|
|
1777
|
+
"name": "_totalBaseAmount",
|
|
1778
|
+
"type": "uint128"
|
|
1779
|
+
},
|
|
1780
|
+
{
|
|
1781
|
+
"internalType": "bytes",
|
|
1782
|
+
"name": "proof",
|
|
1783
|
+
"type": "bytes"
|
|
1784
|
+
}
|
|
1785
|
+
],
|
|
1786
|
+
"name": "performDesert",
|
|
1787
|
+
"outputs": [],
|
|
1788
|
+
"stateMutability": "nonpayable",
|
|
1789
|
+
"type": "function"
|
|
1790
|
+
},
|
|
1791
|
+
{
|
|
1792
|
+
"inputs": [
|
|
1793
|
+
{
|
|
1794
|
+
"internalType": "uint8",
|
|
1795
|
+
"name": "_l1Decimals",
|
|
1796
|
+
"type": "uint8"
|
|
1797
|
+
},
|
|
1798
|
+
{
|
|
1799
|
+
"internalType": "uint8",
|
|
1800
|
+
"name": "_l2Decimals",
|
|
1801
|
+
"type": "uint8"
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
"internalType": "uint8",
|
|
1805
|
+
"name": "_priceDecimals",
|
|
1806
|
+
"type": "uint8"
|
|
1807
|
+
},
|
|
1808
|
+
{
|
|
1809
|
+
"internalType": "bytes32",
|
|
1810
|
+
"name": "_symbol",
|
|
1811
|
+
"type": "bytes32"
|
|
1812
|
+
},
|
|
1813
|
+
{
|
|
1814
|
+
"components": [
|
|
1815
|
+
{
|
|
1816
|
+
"internalType": "uint16",
|
|
1817
|
+
"name": "assetIndex",
|
|
1818
|
+
"type": "uint16"
|
|
1819
|
+
},
|
|
1820
|
+
{
|
|
1821
|
+
"internalType": "uint56",
|
|
1822
|
+
"name": "extensionMultiplier",
|
|
1823
|
+
"type": "uint56"
|
|
1824
|
+
},
|
|
1825
|
+
{
|
|
1826
|
+
"internalType": "uint64",
|
|
1827
|
+
"name": "minL2TransferAmount",
|
|
1828
|
+
"type": "uint64"
|
|
1829
|
+
},
|
|
1830
|
+
{
|
|
1831
|
+
"internalType": "uint64",
|
|
1832
|
+
"name": "minL2WithdrawalAmount",
|
|
1833
|
+
"type": "uint64"
|
|
1834
|
+
},
|
|
1835
|
+
{
|
|
1836
|
+
"internalType": "uint8",
|
|
1837
|
+
"name": "marginMode",
|
|
1838
|
+
"type": "uint8"
|
|
1839
|
+
},
|
|
1840
|
+
{
|
|
1841
|
+
"internalType": "uint16",
|
|
1842
|
+
"name": "loanToValue",
|
|
1843
|
+
"type": "uint16"
|
|
1844
|
+
},
|
|
1845
|
+
{
|
|
1846
|
+
"internalType": "uint16",
|
|
1847
|
+
"name": "liquidationThreshold",
|
|
1848
|
+
"type": "uint16"
|
|
1849
|
+
},
|
|
1850
|
+
{
|
|
1851
|
+
"internalType": "uint16",
|
|
1852
|
+
"name": "liquidationFactor",
|
|
1853
|
+
"type": "uint16"
|
|
1854
|
+
},
|
|
1855
|
+
{
|
|
1856
|
+
"internalType": "uint32",
|
|
1857
|
+
"name": "liquidationFee",
|
|
1858
|
+
"type": "uint32"
|
|
1859
|
+
},
|
|
1860
|
+
{
|
|
1861
|
+
"internalType": "uint56",
|
|
1862
|
+
"name": "indexPriceDivider",
|
|
1863
|
+
"type": "uint56"
|
|
1864
|
+
}
|
|
1865
|
+
],
|
|
1866
|
+
"internalType": "struct TxTypes.RegisterAsset",
|
|
1867
|
+
"name": "_params",
|
|
1868
|
+
"type": "tuple"
|
|
1869
|
+
}
|
|
1870
|
+
],
|
|
1871
|
+
"name": "registerAsset",
|
|
1872
|
+
"outputs": [],
|
|
1873
|
+
"stateMutability": "nonpayable",
|
|
1874
|
+
"type": "function"
|
|
1875
|
+
},
|
|
1876
|
+
{
|
|
1877
|
+
"inputs": [
|
|
1878
|
+
{
|
|
1879
|
+
"internalType": "uint16",
|
|
1880
|
+
"name": "assetIndex",
|
|
1881
|
+
"type": "uint16"
|
|
1882
|
+
},
|
|
1883
|
+
{
|
|
1884
|
+
"internalType": "address",
|
|
1885
|
+
"name": "tokenAddress",
|
|
1886
|
+
"type": "address"
|
|
1887
|
+
},
|
|
1888
|
+
{
|
|
1889
|
+
"internalType": "uint8",
|
|
1890
|
+
"name": "withdrawalsEnabled",
|
|
1891
|
+
"type": "uint8"
|
|
1892
|
+
},
|
|
1893
|
+
{
|
|
1894
|
+
"internalType": "uint56",
|
|
1895
|
+
"name": "extensionMultiplier",
|
|
1896
|
+
"type": "uint56"
|
|
1897
|
+
},
|
|
1898
|
+
{
|
|
1899
|
+
"internalType": "uint128",
|
|
1900
|
+
"name": "tickSize",
|
|
1901
|
+
"type": "uint128"
|
|
1902
|
+
},
|
|
1903
|
+
{
|
|
1904
|
+
"internalType": "uint64",
|
|
1905
|
+
"name": "depositCapTicks",
|
|
1906
|
+
"type": "uint64"
|
|
1907
|
+
},
|
|
1908
|
+
{
|
|
1909
|
+
"internalType": "uint64",
|
|
1910
|
+
"name": "minDepositTicks",
|
|
1911
|
+
"type": "uint64"
|
|
1912
|
+
}
|
|
1913
|
+
],
|
|
1914
|
+
"name": "registerAssetConfig",
|
|
1915
|
+
"outputs": [],
|
|
1916
|
+
"stateMutability": "nonpayable",
|
|
1917
|
+
"type": "function"
|
|
1918
|
+
},
|
|
1919
|
+
{
|
|
1920
|
+
"inputs": [
|
|
1921
|
+
{
|
|
1922
|
+
"components": [
|
|
1923
|
+
{
|
|
1924
|
+
"internalType": "uint64",
|
|
1925
|
+
"name": "batchNumber",
|
|
1926
|
+
"type": "uint64"
|
|
1927
|
+
},
|
|
1928
|
+
{
|
|
1929
|
+
"internalType": "uint64",
|
|
1930
|
+
"name": "endBlockNumber",
|
|
1931
|
+
"type": "uint64"
|
|
1932
|
+
},
|
|
1933
|
+
{
|
|
1934
|
+
"internalType": "uint32",
|
|
1935
|
+
"name": "batchSize",
|
|
1936
|
+
"type": "uint32"
|
|
1937
|
+
},
|
|
1938
|
+
{
|
|
1939
|
+
"internalType": "uint64",
|
|
1940
|
+
"name": "startTimestamp",
|
|
1941
|
+
"type": "uint64"
|
|
1942
|
+
},
|
|
1943
|
+
{
|
|
1944
|
+
"internalType": "uint64",
|
|
1945
|
+
"name": "endTimestamp",
|
|
1946
|
+
"type": "uint64"
|
|
1947
|
+
},
|
|
1948
|
+
{
|
|
1949
|
+
"internalType": "uint32",
|
|
1950
|
+
"name": "priorityRequestCount",
|
|
1951
|
+
"type": "uint32"
|
|
1952
|
+
},
|
|
1953
|
+
{
|
|
1954
|
+
"internalType": "bytes32",
|
|
1955
|
+
"name": "prefixPriorityRequestHash",
|
|
1956
|
+
"type": "bytes32"
|
|
1957
|
+
},
|
|
1958
|
+
{
|
|
1959
|
+
"internalType": "bytes32",
|
|
1960
|
+
"name": "onChainOperationsHash",
|
|
1961
|
+
"type": "bytes32"
|
|
1962
|
+
},
|
|
1963
|
+
{
|
|
1964
|
+
"internalType": "bytes32",
|
|
1965
|
+
"name": "stateRoot",
|
|
1966
|
+
"type": "bytes32"
|
|
1967
|
+
},
|
|
1968
|
+
{
|
|
1969
|
+
"internalType": "bytes32",
|
|
1970
|
+
"name": "validiumRoot",
|
|
1971
|
+
"type": "bytes32"
|
|
1972
|
+
},
|
|
1973
|
+
{
|
|
1974
|
+
"internalType": "bytes32",
|
|
1975
|
+
"name": "commitment",
|
|
1976
|
+
"type": "bytes32"
|
|
1977
|
+
}
|
|
1978
|
+
],
|
|
1979
|
+
"internalType": "struct Storage.StoredBatchInfo[]",
|
|
1980
|
+
"name": "_batchesToRevert",
|
|
1981
|
+
"type": "tuple[]"
|
|
1982
|
+
},
|
|
1983
|
+
{
|
|
1984
|
+
"components": [
|
|
1985
|
+
{
|
|
1986
|
+
"internalType": "uint64",
|
|
1987
|
+
"name": "batchNumber",
|
|
1988
|
+
"type": "uint64"
|
|
1989
|
+
},
|
|
1990
|
+
{
|
|
1991
|
+
"internalType": "uint64",
|
|
1992
|
+
"name": "endBlockNumber",
|
|
1993
|
+
"type": "uint64"
|
|
1994
|
+
},
|
|
1995
|
+
{
|
|
1996
|
+
"internalType": "uint32",
|
|
1997
|
+
"name": "batchSize",
|
|
1998
|
+
"type": "uint32"
|
|
1999
|
+
},
|
|
2000
|
+
{
|
|
2001
|
+
"internalType": "uint64",
|
|
2002
|
+
"name": "startTimestamp",
|
|
2003
|
+
"type": "uint64"
|
|
2004
|
+
},
|
|
2005
|
+
{
|
|
2006
|
+
"internalType": "uint64",
|
|
2007
|
+
"name": "endTimestamp",
|
|
2008
|
+
"type": "uint64"
|
|
2009
|
+
},
|
|
2010
|
+
{
|
|
2011
|
+
"internalType": "uint32",
|
|
2012
|
+
"name": "priorityRequestCount",
|
|
2013
|
+
"type": "uint32"
|
|
2014
|
+
},
|
|
2015
|
+
{
|
|
2016
|
+
"internalType": "bytes32",
|
|
2017
|
+
"name": "prefixPriorityRequestHash",
|
|
2018
|
+
"type": "bytes32"
|
|
2019
|
+
},
|
|
2020
|
+
{
|
|
2021
|
+
"internalType": "bytes32",
|
|
2022
|
+
"name": "onChainOperationsHash",
|
|
2023
|
+
"type": "bytes32"
|
|
2024
|
+
},
|
|
2025
|
+
{
|
|
2026
|
+
"internalType": "bytes32",
|
|
2027
|
+
"name": "stateRoot",
|
|
2028
|
+
"type": "bytes32"
|
|
2029
|
+
},
|
|
2030
|
+
{
|
|
2031
|
+
"internalType": "bytes32",
|
|
2032
|
+
"name": "validiumRoot",
|
|
2033
|
+
"type": "bytes32"
|
|
2034
|
+
},
|
|
2035
|
+
{
|
|
2036
|
+
"internalType": "bytes32",
|
|
2037
|
+
"name": "commitment",
|
|
2038
|
+
"type": "bytes32"
|
|
2039
|
+
}
|
|
2040
|
+
],
|
|
2041
|
+
"internalType": "struct Storage.StoredBatchInfo",
|
|
2042
|
+
"name": "_remainingBatch",
|
|
2043
|
+
"type": "tuple"
|
|
2044
|
+
}
|
|
2045
|
+
],
|
|
2046
|
+
"name": "revertBatches",
|
|
2047
|
+
"outputs": [],
|
|
2048
|
+
"stateMutability": "nonpayable",
|
|
2049
|
+
"type": "function"
|
|
2050
|
+
},
|
|
2051
|
+
{
|
|
2052
|
+
"inputs": [
|
|
2053
|
+
{
|
|
2054
|
+
"internalType": "address",
|
|
2055
|
+
"name": "_newInsuranceFundOperator",
|
|
2056
|
+
"type": "address"
|
|
2057
|
+
}
|
|
2058
|
+
],
|
|
2059
|
+
"name": "setInsuranceFundOperator",
|
|
2060
|
+
"outputs": [],
|
|
2061
|
+
"stateMutability": "nonpayable",
|
|
2062
|
+
"type": "function"
|
|
2063
|
+
},
|
|
2064
|
+
{
|
|
2065
|
+
"inputs": [
|
|
2066
|
+
{
|
|
2067
|
+
"components": [
|
|
2068
|
+
{
|
|
2069
|
+
"internalType": "uint48",
|
|
2070
|
+
"name": "liquidityPoolIndex",
|
|
2071
|
+
"type": "uint48"
|
|
2072
|
+
},
|
|
2073
|
+
{
|
|
2074
|
+
"internalType": "uint48",
|
|
2075
|
+
"name": "stakingPoolIndex",
|
|
2076
|
+
"type": "uint48"
|
|
2077
|
+
},
|
|
2078
|
+
{
|
|
2079
|
+
"internalType": "uint48",
|
|
2080
|
+
"name": "liquidityPoolCooldownPeriod",
|
|
2081
|
+
"type": "uint48"
|
|
2082
|
+
},
|
|
2083
|
+
{
|
|
2084
|
+
"internalType": "uint48",
|
|
2085
|
+
"name": "stakingPoolLockupPeriod",
|
|
2086
|
+
"type": "uint48"
|
|
2087
|
+
},
|
|
2088
|
+
{
|
|
2089
|
+
"internalType": "uint32",
|
|
2090
|
+
"name": "maxIntegratorPerpsTakerFee",
|
|
2091
|
+
"type": "uint32"
|
|
2092
|
+
},
|
|
2093
|
+
{
|
|
2094
|
+
"internalType": "uint32",
|
|
2095
|
+
"name": "maxIntegratorPerpsMakerFee",
|
|
2096
|
+
"type": "uint32"
|
|
2097
|
+
},
|
|
2098
|
+
{
|
|
2099
|
+
"internalType": "uint32",
|
|
2100
|
+
"name": "maxIntegratorSpotTakerFee",
|
|
2101
|
+
"type": "uint32"
|
|
2102
|
+
},
|
|
2103
|
+
{
|
|
2104
|
+
"internalType": "uint32",
|
|
2105
|
+
"name": "maxIntegratorSpotMakerFee",
|
|
2106
|
+
"type": "uint32"
|
|
2107
|
+
}
|
|
2108
|
+
],
|
|
2109
|
+
"internalType": "struct TxTypes.SetSystemConfig",
|
|
2110
|
+
"name": "_params",
|
|
2111
|
+
"type": "tuple"
|
|
2112
|
+
}
|
|
2113
|
+
],
|
|
2114
|
+
"name": "setSystemConfig",
|
|
2115
|
+
"outputs": [],
|
|
2116
|
+
"stateMutability": "nonpayable",
|
|
2117
|
+
"type": "function"
|
|
2118
|
+
},
|
|
2119
|
+
{
|
|
2120
|
+
"inputs": [
|
|
2121
|
+
{
|
|
2122
|
+
"internalType": "address",
|
|
2123
|
+
"name": "_newTreasury",
|
|
2124
|
+
"type": "address"
|
|
2125
|
+
}
|
|
2126
|
+
],
|
|
2127
|
+
"name": "setTreasury",
|
|
2128
|
+
"outputs": [],
|
|
2129
|
+
"stateMutability": "nonpayable",
|
|
2130
|
+
"type": "function"
|
|
2131
|
+
},
|
|
2132
|
+
{
|
|
2133
|
+
"inputs": [],
|
|
2134
|
+
"name": "stateRoot",
|
|
2135
|
+
"outputs": [
|
|
2136
|
+
{
|
|
2137
|
+
"internalType": "bytes32",
|
|
2138
|
+
"name": "",
|
|
2139
|
+
"type": "bytes32"
|
|
2140
|
+
}
|
|
2141
|
+
],
|
|
2142
|
+
"stateMutability": "view",
|
|
2143
|
+
"type": "function"
|
|
2144
|
+
},
|
|
2145
|
+
{
|
|
2146
|
+
"inputs": [
|
|
2147
|
+
{
|
|
2148
|
+
"internalType": "uint64",
|
|
2149
|
+
"name": "",
|
|
2150
|
+
"type": "uint64"
|
|
2151
|
+
}
|
|
2152
|
+
],
|
|
2153
|
+
"name": "stateRootUpdates",
|
|
2154
|
+
"outputs": [
|
|
2155
|
+
{
|
|
2156
|
+
"internalType": "bytes32",
|
|
2157
|
+
"name": "",
|
|
2158
|
+
"type": "bytes32"
|
|
2159
|
+
}
|
|
2160
|
+
],
|
|
2161
|
+
"stateMutability": "view",
|
|
2162
|
+
"type": "function"
|
|
2163
|
+
},
|
|
2164
|
+
{
|
|
2165
|
+
"inputs": [
|
|
2166
|
+
{
|
|
2167
|
+
"internalType": "uint64",
|
|
2168
|
+
"name": "",
|
|
2169
|
+
"type": "uint64"
|
|
2170
|
+
}
|
|
2171
|
+
],
|
|
2172
|
+
"name": "storedBatchHashes",
|
|
2173
|
+
"outputs": [
|
|
2174
|
+
{
|
|
2175
|
+
"internalType": "bytes32",
|
|
2176
|
+
"name": "",
|
|
2177
|
+
"type": "bytes32"
|
|
2178
|
+
}
|
|
2179
|
+
],
|
|
2180
|
+
"stateMutability": "view",
|
|
2181
|
+
"type": "function"
|
|
2182
|
+
},
|
|
2183
|
+
{
|
|
2184
|
+
"inputs": [
|
|
2185
|
+
{
|
|
2186
|
+
"internalType": "address",
|
|
2187
|
+
"name": "",
|
|
2188
|
+
"type": "address"
|
|
2189
|
+
}
|
|
2190
|
+
],
|
|
2191
|
+
"name": "tokenToAssetIndex",
|
|
2192
|
+
"outputs": [
|
|
2193
|
+
{
|
|
2194
|
+
"internalType": "uint16",
|
|
2195
|
+
"name": "",
|
|
2196
|
+
"type": "uint16"
|
|
2197
|
+
}
|
|
2198
|
+
],
|
|
2199
|
+
"stateMutability": "view",
|
|
2200
|
+
"type": "function"
|
|
2201
|
+
},
|
|
2202
|
+
{
|
|
2203
|
+
"inputs": [
|
|
2204
|
+
{
|
|
2205
|
+
"internalType": "contract IERC20",
|
|
2206
|
+
"name": "_token",
|
|
2207
|
+
"type": "address"
|
|
2208
|
+
},
|
|
2209
|
+
{
|
|
2210
|
+
"internalType": "address",
|
|
2211
|
+
"name": "_to",
|
|
2212
|
+
"type": "address"
|
|
2213
|
+
},
|
|
2214
|
+
{
|
|
2215
|
+
"internalType": "uint256",
|
|
2216
|
+
"name": "_amount",
|
|
2217
|
+
"type": "uint256"
|
|
2218
|
+
},
|
|
2219
|
+
{
|
|
2220
|
+
"internalType": "uint256",
|
|
2221
|
+
"name": "_maxAmount",
|
|
2222
|
+
"type": "uint256"
|
|
2223
|
+
}
|
|
2224
|
+
],
|
|
2225
|
+
"name": "transferERC20",
|
|
2226
|
+
"outputs": [
|
|
2227
|
+
{
|
|
2228
|
+
"internalType": "uint256",
|
|
2229
|
+
"name": "",
|
|
2230
|
+
"type": "uint256"
|
|
2231
|
+
}
|
|
2232
|
+
],
|
|
2233
|
+
"stateMutability": "nonpayable",
|
|
2234
|
+
"type": "function"
|
|
2235
|
+
},
|
|
2236
|
+
{
|
|
2237
|
+
"inputs": [
|
|
2238
|
+
{
|
|
2239
|
+
"internalType": "address",
|
|
2240
|
+
"name": "_to",
|
|
2241
|
+
"type": "address"
|
|
2242
|
+
},
|
|
2243
|
+
{
|
|
2244
|
+
"internalType": "uint256",
|
|
2245
|
+
"name": "_amount",
|
|
2246
|
+
"type": "uint256"
|
|
2247
|
+
}
|
|
2248
|
+
],
|
|
2249
|
+
"name": "transferETH",
|
|
2250
|
+
"outputs": [
|
|
2251
|
+
{
|
|
2252
|
+
"internalType": "uint256",
|
|
2253
|
+
"name": "",
|
|
2254
|
+
"type": "uint256"
|
|
2255
|
+
}
|
|
2256
|
+
],
|
|
2257
|
+
"stateMutability": "nonpayable",
|
|
2258
|
+
"type": "function"
|
|
2259
|
+
},
|
|
2260
|
+
{
|
|
2261
|
+
"inputs": [],
|
|
2262
|
+
"name": "treasury",
|
|
2263
|
+
"outputs": [
|
|
2264
|
+
{
|
|
2265
|
+
"internalType": "address",
|
|
2266
|
+
"name": "",
|
|
2267
|
+
"type": "address"
|
|
2268
|
+
}
|
|
2269
|
+
],
|
|
2270
|
+
"stateMutability": "view",
|
|
2271
|
+
"type": "function"
|
|
2272
|
+
},
|
|
2273
|
+
{
|
|
2274
|
+
"inputs": [
|
|
2275
|
+
{
|
|
2276
|
+
"components": [
|
|
2277
|
+
{
|
|
2278
|
+
"internalType": "uint16",
|
|
2279
|
+
"name": "assetIndex",
|
|
2280
|
+
"type": "uint16"
|
|
2281
|
+
},
|
|
2282
|
+
{
|
|
2283
|
+
"internalType": "uint64",
|
|
2284
|
+
"name": "minL2TransferAmount",
|
|
2285
|
+
"type": "uint64"
|
|
2286
|
+
},
|
|
2287
|
+
{
|
|
2288
|
+
"internalType": "uint64",
|
|
2289
|
+
"name": "minL2WithdrawalAmount",
|
|
2290
|
+
"type": "uint64"
|
|
2291
|
+
},
|
|
2292
|
+
{
|
|
2293
|
+
"internalType": "uint8",
|
|
2294
|
+
"name": "marginMode",
|
|
2295
|
+
"type": "uint8"
|
|
2296
|
+
},
|
|
2297
|
+
{
|
|
2298
|
+
"internalType": "uint16",
|
|
2299
|
+
"name": "loanToValue",
|
|
2300
|
+
"type": "uint16"
|
|
2301
|
+
},
|
|
2302
|
+
{
|
|
2303
|
+
"internalType": "uint16",
|
|
2304
|
+
"name": "liquidationThreshold",
|
|
2305
|
+
"type": "uint16"
|
|
2306
|
+
},
|
|
2307
|
+
{
|
|
2308
|
+
"internalType": "uint16",
|
|
2309
|
+
"name": "liquidationFactor",
|
|
2310
|
+
"type": "uint16"
|
|
2311
|
+
},
|
|
2312
|
+
{
|
|
2313
|
+
"internalType": "uint32",
|
|
2314
|
+
"name": "liquidationFee",
|
|
2315
|
+
"type": "uint32"
|
|
2316
|
+
},
|
|
2317
|
+
{
|
|
2318
|
+
"internalType": "uint56",
|
|
2319
|
+
"name": "indexPriceDivider",
|
|
2320
|
+
"type": "uint56"
|
|
2321
|
+
}
|
|
2322
|
+
],
|
|
2323
|
+
"internalType": "struct TxTypes.UpdateAsset",
|
|
2324
|
+
"name": "_params",
|
|
2325
|
+
"type": "tuple"
|
|
2326
|
+
}
|
|
2327
|
+
],
|
|
2328
|
+
"name": "updateAsset",
|
|
2329
|
+
"outputs": [],
|
|
2330
|
+
"stateMutability": "nonpayable",
|
|
2331
|
+
"type": "function"
|
|
2332
|
+
},
|
|
2333
|
+
{
|
|
2334
|
+
"inputs": [
|
|
2335
|
+
{
|
|
2336
|
+
"internalType": "uint16",
|
|
2337
|
+
"name": "assetIndex",
|
|
2338
|
+
"type": "uint16"
|
|
2339
|
+
},
|
|
2340
|
+
{
|
|
2341
|
+
"internalType": "uint8",
|
|
2342
|
+
"name": "withdrawalsEnabled",
|
|
2343
|
+
"type": "uint8"
|
|
2344
|
+
},
|
|
2345
|
+
{
|
|
2346
|
+
"internalType": "uint64",
|
|
2347
|
+
"name": "depositCapTicks",
|
|
2348
|
+
"type": "uint64"
|
|
2349
|
+
},
|
|
2350
|
+
{
|
|
2351
|
+
"internalType": "uint64",
|
|
2352
|
+
"name": "minDepositTicks",
|
|
2353
|
+
"type": "uint64"
|
|
2354
|
+
}
|
|
2355
|
+
],
|
|
2356
|
+
"name": "updateAssetConfig",
|
|
2357
|
+
"outputs": [],
|
|
2358
|
+
"stateMutability": "nonpayable",
|
|
2359
|
+
"type": "function"
|
|
2360
|
+
},
|
|
2361
|
+
{
|
|
2362
|
+
"inputs": [
|
|
2363
|
+
{
|
|
2364
|
+
"components": [
|
|
2365
|
+
{
|
|
2366
|
+
"internalType": "uint16",
|
|
2367
|
+
"name": "marketIndex",
|
|
2368
|
+
"type": "uint16"
|
|
2369
|
+
},
|
|
2370
|
+
{
|
|
2371
|
+
"internalType": "enum TxTypes.MarketType",
|
|
2372
|
+
"name": "marketType",
|
|
2373
|
+
"type": "uint8"
|
|
2374
|
+
},
|
|
2375
|
+
{
|
|
2376
|
+
"internalType": "bytes",
|
|
2377
|
+
"name": "marketData",
|
|
2378
|
+
"type": "bytes"
|
|
2379
|
+
}
|
|
2380
|
+
],
|
|
2381
|
+
"internalType": "struct TxTypes.UpdateMarket",
|
|
2382
|
+
"name": "_params",
|
|
2383
|
+
"type": "tuple"
|
|
2384
|
+
}
|
|
2385
|
+
],
|
|
2386
|
+
"name": "updateMarket",
|
|
2387
|
+
"outputs": [],
|
|
2388
|
+
"stateMutability": "nonpayable",
|
|
2389
|
+
"type": "function"
|
|
2390
|
+
},
|
|
2391
|
+
{
|
|
2392
|
+
"inputs": [
|
|
2393
|
+
{
|
|
2394
|
+
"components": [
|
|
2395
|
+
{
|
|
2396
|
+
"internalType": "uint64",
|
|
2397
|
+
"name": "batchNumber",
|
|
2398
|
+
"type": "uint64"
|
|
2399
|
+
},
|
|
2400
|
+
{
|
|
2401
|
+
"internalType": "uint64",
|
|
2402
|
+
"name": "endBlockNumber",
|
|
2403
|
+
"type": "uint64"
|
|
2404
|
+
},
|
|
2405
|
+
{
|
|
2406
|
+
"internalType": "uint32",
|
|
2407
|
+
"name": "batchSize",
|
|
2408
|
+
"type": "uint32"
|
|
2409
|
+
},
|
|
2410
|
+
{
|
|
2411
|
+
"internalType": "uint64",
|
|
2412
|
+
"name": "startTimestamp",
|
|
2413
|
+
"type": "uint64"
|
|
2414
|
+
},
|
|
2415
|
+
{
|
|
2416
|
+
"internalType": "uint64",
|
|
2417
|
+
"name": "endTimestamp",
|
|
2418
|
+
"type": "uint64"
|
|
2419
|
+
},
|
|
2420
|
+
{
|
|
2421
|
+
"internalType": "uint32",
|
|
2422
|
+
"name": "priorityRequestCount",
|
|
2423
|
+
"type": "uint32"
|
|
2424
|
+
},
|
|
2425
|
+
{
|
|
2426
|
+
"internalType": "bytes32",
|
|
2427
|
+
"name": "prefixPriorityRequestHash",
|
|
2428
|
+
"type": "bytes32"
|
|
2429
|
+
},
|
|
2430
|
+
{
|
|
2431
|
+
"internalType": "bytes32",
|
|
2432
|
+
"name": "onChainOperationsHash",
|
|
2433
|
+
"type": "bytes32"
|
|
2434
|
+
},
|
|
2435
|
+
{
|
|
2436
|
+
"internalType": "bytes32",
|
|
2437
|
+
"name": "stateRoot",
|
|
2438
|
+
"type": "bytes32"
|
|
2439
|
+
},
|
|
2440
|
+
{
|
|
2441
|
+
"internalType": "bytes32",
|
|
2442
|
+
"name": "validiumRoot",
|
|
2443
|
+
"type": "bytes32"
|
|
2444
|
+
},
|
|
2445
|
+
{
|
|
2446
|
+
"internalType": "bytes32",
|
|
2447
|
+
"name": "commitment",
|
|
2448
|
+
"type": "bytes32"
|
|
2449
|
+
}
|
|
2450
|
+
],
|
|
2451
|
+
"internalType": "struct Storage.StoredBatchInfo",
|
|
2452
|
+
"name": "_lastStoredBatch",
|
|
2453
|
+
"type": "tuple"
|
|
2454
|
+
},
|
|
2455
|
+
{
|
|
2456
|
+
"internalType": "bytes32",
|
|
2457
|
+
"name": "_stateRoot",
|
|
2458
|
+
"type": "bytes32"
|
|
2459
|
+
},
|
|
2460
|
+
{
|
|
2461
|
+
"internalType": "bytes32",
|
|
2462
|
+
"name": "_validiumRoot",
|
|
2463
|
+
"type": "bytes32"
|
|
2464
|
+
},
|
|
2465
|
+
{
|
|
2466
|
+
"internalType": "bytes",
|
|
2467
|
+
"name": "proof",
|
|
2468
|
+
"type": "bytes"
|
|
2469
|
+
}
|
|
2470
|
+
],
|
|
2471
|
+
"name": "updateStateRoot",
|
|
2472
|
+
"outputs": [],
|
|
2473
|
+
"stateMutability": "nonpayable",
|
|
2474
|
+
"type": "function"
|
|
2475
|
+
},
|
|
2476
|
+
{
|
|
2477
|
+
"inputs": [
|
|
2478
|
+
{
|
|
2479
|
+
"internalType": "bytes",
|
|
2480
|
+
"name": "upgradeParameters",
|
|
2481
|
+
"type": "bytes"
|
|
2482
|
+
}
|
|
2483
|
+
],
|
|
2484
|
+
"name": "upgrade",
|
|
2485
|
+
"outputs": [],
|
|
2486
|
+
"stateMutability": "nonpayable",
|
|
2487
|
+
"type": "function"
|
|
2488
|
+
},
|
|
2489
|
+
{
|
|
2490
|
+
"inputs": [],
|
|
2491
|
+
"name": "validiumRoot",
|
|
2492
|
+
"outputs": [
|
|
2493
|
+
{
|
|
2494
|
+
"internalType": "bytes32",
|
|
2495
|
+
"name": "",
|
|
2496
|
+
"type": "bytes32"
|
|
2497
|
+
}
|
|
2498
|
+
],
|
|
2499
|
+
"stateMutability": "view",
|
|
2500
|
+
"type": "function"
|
|
2501
|
+
},
|
|
2502
|
+
{
|
|
2503
|
+
"inputs": [],
|
|
2504
|
+
"name": "verifiedBatchesCount",
|
|
2505
|
+
"outputs": [
|
|
2506
|
+
{
|
|
2507
|
+
"internalType": "uint64",
|
|
2508
|
+
"name": "",
|
|
2509
|
+
"type": "uint64"
|
|
2510
|
+
}
|
|
2511
|
+
],
|
|
2512
|
+
"stateMutability": "view",
|
|
2513
|
+
"type": "function"
|
|
2514
|
+
},
|
|
2515
|
+
{
|
|
2516
|
+
"inputs": [],
|
|
2517
|
+
"name": "verifiedPriorityRequestCount",
|
|
2518
|
+
"outputs": [
|
|
2519
|
+
{
|
|
2520
|
+
"internalType": "uint64",
|
|
2521
|
+
"name": "",
|
|
2522
|
+
"type": "uint64"
|
|
2523
|
+
}
|
|
2524
|
+
],
|
|
2525
|
+
"stateMutability": "view",
|
|
2526
|
+
"type": "function"
|
|
2527
|
+
},
|
|
2528
|
+
{
|
|
2529
|
+
"inputs": [
|
|
2530
|
+
{
|
|
2531
|
+
"components": [
|
|
2532
|
+
{
|
|
2533
|
+
"internalType": "uint64",
|
|
2534
|
+
"name": "batchNumber",
|
|
2535
|
+
"type": "uint64"
|
|
2536
|
+
},
|
|
2537
|
+
{
|
|
2538
|
+
"internalType": "uint64",
|
|
2539
|
+
"name": "endBlockNumber",
|
|
2540
|
+
"type": "uint64"
|
|
2541
|
+
},
|
|
2542
|
+
{
|
|
2543
|
+
"internalType": "uint32",
|
|
2544
|
+
"name": "batchSize",
|
|
2545
|
+
"type": "uint32"
|
|
2546
|
+
},
|
|
2547
|
+
{
|
|
2548
|
+
"internalType": "uint64",
|
|
2549
|
+
"name": "startTimestamp",
|
|
2550
|
+
"type": "uint64"
|
|
2551
|
+
},
|
|
2552
|
+
{
|
|
2553
|
+
"internalType": "uint64",
|
|
2554
|
+
"name": "endTimestamp",
|
|
2555
|
+
"type": "uint64"
|
|
2556
|
+
},
|
|
2557
|
+
{
|
|
2558
|
+
"internalType": "uint32",
|
|
2559
|
+
"name": "priorityRequestCount",
|
|
2560
|
+
"type": "uint32"
|
|
2561
|
+
},
|
|
2562
|
+
{
|
|
2563
|
+
"internalType": "bytes32",
|
|
2564
|
+
"name": "prefixPriorityRequestHash",
|
|
2565
|
+
"type": "bytes32"
|
|
2566
|
+
},
|
|
2567
|
+
{
|
|
2568
|
+
"internalType": "bytes32",
|
|
2569
|
+
"name": "onChainOperationsHash",
|
|
2570
|
+
"type": "bytes32"
|
|
2571
|
+
},
|
|
2572
|
+
{
|
|
2573
|
+
"internalType": "bytes32",
|
|
2574
|
+
"name": "stateRoot",
|
|
2575
|
+
"type": "bytes32"
|
|
2576
|
+
},
|
|
2577
|
+
{
|
|
2578
|
+
"internalType": "bytes32",
|
|
2579
|
+
"name": "validiumRoot",
|
|
2580
|
+
"type": "bytes32"
|
|
2581
|
+
},
|
|
2582
|
+
{
|
|
2583
|
+
"internalType": "bytes32",
|
|
2584
|
+
"name": "commitment",
|
|
2585
|
+
"type": "bytes32"
|
|
2586
|
+
}
|
|
2587
|
+
],
|
|
2588
|
+
"internalType": "struct Storage.StoredBatchInfo",
|
|
2589
|
+
"name": "batch",
|
|
2590
|
+
"type": "tuple"
|
|
2591
|
+
},
|
|
2592
|
+
{
|
|
2593
|
+
"internalType": "bytes",
|
|
2594
|
+
"name": "proof",
|
|
2595
|
+
"type": "bytes"
|
|
2596
|
+
}
|
|
2597
|
+
],
|
|
2598
|
+
"name": "verifyBatch",
|
|
2599
|
+
"outputs": [],
|
|
2600
|
+
"stateMutability": "nonpayable",
|
|
2601
|
+
"type": "function"
|
|
2602
|
+
},
|
|
2603
|
+
{
|
|
2604
|
+
"inputs": [
|
|
2605
|
+
{
|
|
2606
|
+
"internalType": "uint48",
|
|
2607
|
+
"name": "_accountIndex",
|
|
2608
|
+
"type": "uint48"
|
|
2609
|
+
},
|
|
2610
|
+
{
|
|
2611
|
+
"internalType": "uint16",
|
|
2612
|
+
"name": "_assetIndex",
|
|
2613
|
+
"type": "uint16"
|
|
2614
|
+
},
|
|
2615
|
+
{
|
|
2616
|
+
"internalType": "enum TxTypes.RouteType",
|
|
2617
|
+
"name": "_routeType",
|
|
2618
|
+
"type": "uint8"
|
|
2619
|
+
},
|
|
2620
|
+
{
|
|
2621
|
+
"internalType": "uint64",
|
|
2622
|
+
"name": "_baseAmount",
|
|
2623
|
+
"type": "uint64"
|
|
2624
|
+
}
|
|
2625
|
+
],
|
|
2626
|
+
"name": "withdraw",
|
|
2627
|
+
"outputs": [],
|
|
2628
|
+
"stateMutability": "nonpayable",
|
|
2629
|
+
"type": "function"
|
|
2630
|
+
},
|
|
2631
|
+
{
|
|
2632
|
+
"inputs": [
|
|
2633
|
+
{
|
|
2634
|
+
"internalType": "address",
|
|
2635
|
+
"name": "_owner",
|
|
2636
|
+
"type": "address"
|
|
2637
|
+
},
|
|
2638
|
+
{
|
|
2639
|
+
"internalType": "uint16",
|
|
2640
|
+
"name": "_assetIndex",
|
|
2641
|
+
"type": "uint16"
|
|
2642
|
+
},
|
|
2643
|
+
{
|
|
2644
|
+
"internalType": "uint128",
|
|
2645
|
+
"name": "_baseAmount",
|
|
2646
|
+
"type": "uint128"
|
|
2647
|
+
}
|
|
2648
|
+
],
|
|
2649
|
+
"name": "withdrawPendingBalance",
|
|
2650
|
+
"outputs": [],
|
|
2651
|
+
"stateMutability": "nonpayable",
|
|
2652
|
+
"type": "function"
|
|
2653
|
+
},
|
|
2654
|
+
{
|
|
2655
|
+
"inputs": [
|
|
2656
|
+
{
|
|
2657
|
+
"internalType": "address",
|
|
2658
|
+
"name": "_owner",
|
|
2659
|
+
"type": "address"
|
|
2660
|
+
},
|
|
2661
|
+
{
|
|
2662
|
+
"internalType": "uint128",
|
|
2663
|
+
"name": "_baseAmount",
|
|
2664
|
+
"type": "uint128"
|
|
2665
|
+
}
|
|
2666
|
+
],
|
|
2667
|
+
"name": "withdrawPendingBalanceLegacy",
|
|
2668
|
+
"outputs": [],
|
|
2669
|
+
"stateMutability": "nonpayable",
|
|
2670
|
+
"type": "function"
|
|
2671
|
+
}
|
|
2672
|
+
] as const satisfies Abi;
|
|
2673
|
+
|
|
2674
|
+
/**
|
|
2675
|
+
* Type-safe ABI for ZkLighter_json
|
|
2676
|
+
*/
|
|
2677
|
+
export type ZkLighter_jsonAbi = typeof ZkLighter_jsonAbi;
|
|
2678
|
+
|
|
2679
|
+
/**
|
|
2680
|
+
* Contract instance type for ZkLighter_json
|
|
2681
|
+
*/
|
|
2682
|
+
// Use any for contract type to avoid complex viem type issues
|
|
2683
|
+
// The runtime behavior is type-safe through viem's ABI typing
|
|
2684
|
+
export type ZkLighter_jsonContract = any;
|
|
2685
|
+
|
|
2686
|
+
/**
|
|
2687
|
+
* ZkLighter_json Contract Class
|
|
2688
|
+
*
|
|
2689
|
+
* Provides a class-based API similar to TypeChain for interacting with the contract.
|
|
2690
|
+
*
|
|
2691
|
+
* @example
|
|
2692
|
+
* ```typescript
|
|
2693
|
+
* import { createPublicClient, createWalletClient, http } from 'viem';
|
|
2694
|
+
* import { mainnet } from 'viem/chains';
|
|
2695
|
+
* import { ZkLighter_json } from 'ZkLighter_json';
|
|
2696
|
+
*
|
|
2697
|
+
* const publicClient = createPublicClient({ chain: mainnet, transport: http() });
|
|
2698
|
+
* const walletClient = createWalletClient({ chain: mainnet, transport: http() });
|
|
2699
|
+
*
|
|
2700
|
+
* const contract = new ZkLighter_json('0x...', { publicClient, walletClient });
|
|
2701
|
+
*
|
|
2702
|
+
* // Read functions
|
|
2703
|
+
* const result = await contract.balanceOf('0x...');
|
|
2704
|
+
*
|
|
2705
|
+
* // Write functions
|
|
2706
|
+
* const hash = await contract.transfer('0x...', 1000n);
|
|
2707
|
+
*
|
|
2708
|
+
* // Simulate transactions (dry-run)
|
|
2709
|
+
* const simulation = await contract.simulate.transfer('0x...', 1000n);
|
|
2710
|
+
* console.log('Gas estimate:', simulation.request.gas);
|
|
2711
|
+
*
|
|
2712
|
+
* // Watch events
|
|
2713
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
2714
|
+
* console.log('Transfer event:', event);
|
|
2715
|
+
* });
|
|
2716
|
+
* ```
|
|
2717
|
+
*/
|
|
2718
|
+
export class ZkLighter_json {
|
|
2719
|
+
private contract: ZkLighter_jsonContract;
|
|
2720
|
+
private contractAddress: Address;
|
|
2721
|
+
private publicClient: PublicClient;
|
|
2722
|
+
|
|
2723
|
+
constructor(
|
|
2724
|
+
address: Address,
|
|
2725
|
+
clients: {
|
|
2726
|
+
publicClient: PublicClient;
|
|
2727
|
+
walletClient?: WalletClient;
|
|
2728
|
+
}
|
|
2729
|
+
) {
|
|
2730
|
+
this.contractAddress = address;
|
|
2731
|
+
this.publicClient = clients.publicClient;
|
|
2732
|
+
this.contract = getContract({
|
|
2733
|
+
address,
|
|
2734
|
+
abi: ZkLighter_jsonAbi,
|
|
2735
|
+
client: {
|
|
2736
|
+
public: clients.publicClient,
|
|
2737
|
+
wallet: clients.walletClient,
|
|
2738
|
+
},
|
|
2739
|
+
});
|
|
2740
|
+
}
|
|
2741
|
+
|
|
2742
|
+
/**
|
|
2743
|
+
* Get the contract address
|
|
2744
|
+
*/
|
|
2745
|
+
get address(): Address {
|
|
2746
|
+
return this.contractAddress;
|
|
2747
|
+
}
|
|
2748
|
+
|
|
2749
|
+
/**
|
|
2750
|
+
* Get the underlying viem contract instance
|
|
2751
|
+
*/
|
|
2752
|
+
getContract(): ZkLighter_jsonContract {
|
|
2753
|
+
return this.contract;
|
|
2754
|
+
}
|
|
2755
|
+
|
|
2756
|
+
/**
|
|
2757
|
+
* MAX_ACCOUNT_INDEX
|
|
2758
|
+
* view
|
|
2759
|
+
*/
|
|
2760
|
+
async MAX_ACCOUNT_INDEX(): Promise<bigint> {
|
|
2761
|
+
return this.contract.read.MAX_ACCOUNT_INDEX() as Promise<bigint>;
|
|
2762
|
+
}
|
|
2763
|
+
|
|
2764
|
+
/**
|
|
2765
|
+
* MAX_API_KEY_INDEX
|
|
2766
|
+
* view
|
|
2767
|
+
*/
|
|
2768
|
+
async MAX_API_KEY_INDEX(): Promise<bigint> {
|
|
2769
|
+
return this.contract.read.MAX_API_KEY_INDEX() as Promise<bigint>;
|
|
2770
|
+
}
|
|
2771
|
+
|
|
2772
|
+
/**
|
|
2773
|
+
* MAX_ASSET_INDEX
|
|
2774
|
+
* view
|
|
2775
|
+
*/
|
|
2776
|
+
async MAX_ASSET_INDEX(): Promise<bigint> {
|
|
2777
|
+
return this.contract.read.MAX_ASSET_INDEX() as Promise<bigint>;
|
|
2778
|
+
}
|
|
2779
|
+
|
|
2780
|
+
/**
|
|
2781
|
+
* MAX_BATCH_DEPOSIT_LENGTH
|
|
2782
|
+
* view
|
|
2783
|
+
*/
|
|
2784
|
+
async MAX_BATCH_DEPOSIT_LENGTH(): Promise<bigint> {
|
|
2785
|
+
return this.contract.read.MAX_BATCH_DEPOSIT_LENGTH() as Promise<bigint>;
|
|
2786
|
+
}
|
|
2787
|
+
|
|
2788
|
+
/**
|
|
2789
|
+
* MAX_DEPOSIT_CAP_TICKS
|
|
2790
|
+
* view
|
|
2791
|
+
*/
|
|
2792
|
+
async MAX_DEPOSIT_CAP_TICKS(): Promise<bigint> {
|
|
2793
|
+
return this.contract.read.MAX_DEPOSIT_CAP_TICKS() as Promise<bigint>;
|
|
2794
|
+
}
|
|
2795
|
+
|
|
2796
|
+
/**
|
|
2797
|
+
* MAX_MASTER_ACCOUNT_INDEX
|
|
2798
|
+
* view
|
|
2799
|
+
*/
|
|
2800
|
+
async MAX_MASTER_ACCOUNT_INDEX(): Promise<bigint> {
|
|
2801
|
+
return this.contract.read.MAX_MASTER_ACCOUNT_INDEX() as Promise<bigint>;
|
|
2802
|
+
}
|
|
2803
|
+
|
|
2804
|
+
/**
|
|
2805
|
+
* MAX_ORDER_BASE_AMOUNT
|
|
2806
|
+
* view
|
|
2807
|
+
*/
|
|
2808
|
+
async MAX_ORDER_BASE_AMOUNT(): Promise<bigint> {
|
|
2809
|
+
return this.contract.read.MAX_ORDER_BASE_AMOUNT() as Promise<bigint>;
|
|
2810
|
+
}
|
|
2811
|
+
|
|
2812
|
+
/**
|
|
2813
|
+
* MAX_ORDER_PRICE
|
|
2814
|
+
* view
|
|
2815
|
+
*/
|
|
2816
|
+
async MAX_ORDER_PRICE(): Promise<bigint> {
|
|
2817
|
+
return this.contract.read.MAX_ORDER_PRICE() as Promise<bigint>;
|
|
2818
|
+
}
|
|
2819
|
+
|
|
2820
|
+
/**
|
|
2821
|
+
* MAX_ORDER_QUOTE_AMOUNT
|
|
2822
|
+
* view
|
|
2823
|
+
*/
|
|
2824
|
+
async MAX_ORDER_QUOTE_AMOUNT(): Promise<bigint> {
|
|
2825
|
+
return this.contract.read.MAX_ORDER_QUOTE_AMOUNT() as Promise<bigint>;
|
|
2826
|
+
}
|
|
2827
|
+
|
|
2828
|
+
/**
|
|
2829
|
+
* MAX_PERPS_MARKET_INDEX
|
|
2830
|
+
* view
|
|
2831
|
+
*/
|
|
2832
|
+
async MAX_PERPS_MARKET_INDEX(): Promise<bigint> {
|
|
2833
|
+
return this.contract.read.MAX_PERPS_MARKET_INDEX() as Promise<bigint>;
|
|
2834
|
+
}
|
|
2835
|
+
|
|
2836
|
+
/**
|
|
2837
|
+
* MAX_POOL_SHARES_TO_MINT_OR_BURN
|
|
2838
|
+
* view
|
|
2839
|
+
*/
|
|
2840
|
+
async MAX_POOL_SHARES_TO_MINT_OR_BURN(): Promise<bigint> {
|
|
2841
|
+
return this.contract.read.MAX_POOL_SHARES_TO_MINT_OR_BURN() as Promise<bigint>;
|
|
2842
|
+
}
|
|
2843
|
+
|
|
2844
|
+
/**
|
|
2845
|
+
* MAX_SPOT_MARKET_INDEX
|
|
2846
|
+
* view
|
|
2847
|
+
*/
|
|
2848
|
+
async MAX_SPOT_MARKET_INDEX(): Promise<bigint> {
|
|
2849
|
+
return this.contract.read.MAX_SPOT_MARKET_INDEX() as Promise<bigint>;
|
|
2850
|
+
}
|
|
2851
|
+
|
|
2852
|
+
/**
|
|
2853
|
+
* MAX_STAKING_SHARES_TO_MINT_OR_BURN
|
|
2854
|
+
* view
|
|
2855
|
+
*/
|
|
2856
|
+
async MAX_STAKING_SHARES_TO_MINT_OR_BURN(): Promise<bigint> {
|
|
2857
|
+
return this.contract.read.MAX_STAKING_SHARES_TO_MINT_OR_BURN() as Promise<bigint>;
|
|
2858
|
+
}
|
|
2859
|
+
|
|
2860
|
+
/**
|
|
2861
|
+
* MAX_TICK_SIZE
|
|
2862
|
+
* view
|
|
2863
|
+
*/
|
|
2864
|
+
async MAX_TICK_SIZE(): Promise<bigint> {
|
|
2865
|
+
return this.contract.read.MAX_TICK_SIZE() as Promise<bigint>;
|
|
2866
|
+
}
|
|
2867
|
+
|
|
2868
|
+
/**
|
|
2869
|
+
* MIN_ASSET_INDEX
|
|
2870
|
+
* view
|
|
2871
|
+
*/
|
|
2872
|
+
async MIN_ASSET_INDEX(): Promise<bigint> {
|
|
2873
|
+
return this.contract.read.MIN_ASSET_INDEX() as Promise<bigint>;
|
|
2874
|
+
}
|
|
2875
|
+
|
|
2876
|
+
/**
|
|
2877
|
+
* MIN_ORDER_PRICE
|
|
2878
|
+
* view
|
|
2879
|
+
*/
|
|
2880
|
+
async MIN_ORDER_PRICE(): Promise<bigint> {
|
|
2881
|
+
return this.contract.read.MIN_ORDER_PRICE() as Promise<bigint>;
|
|
2882
|
+
}
|
|
2883
|
+
|
|
2884
|
+
/**
|
|
2885
|
+
* MIN_POOL_SHARES_TO_MINT_OR_BURN
|
|
2886
|
+
* view
|
|
2887
|
+
*/
|
|
2888
|
+
async MIN_POOL_SHARES_TO_MINT_OR_BURN(): Promise<bigint> {
|
|
2889
|
+
return this.contract.read.MIN_POOL_SHARES_TO_MINT_OR_BURN() as Promise<bigint>;
|
|
2890
|
+
}
|
|
2891
|
+
|
|
2892
|
+
/**
|
|
2893
|
+
* MIN_SPOT_MARKET_INDEX
|
|
2894
|
+
* view
|
|
2895
|
+
*/
|
|
2896
|
+
async MIN_SPOT_MARKET_INDEX(): Promise<bigint> {
|
|
2897
|
+
return this.contract.read.MIN_SPOT_MARKET_INDEX() as Promise<bigint>;
|
|
2898
|
+
}
|
|
2899
|
+
|
|
2900
|
+
/**
|
|
2901
|
+
* MIN_STAKING_SHARES_TO_MINT_OR_BURN
|
|
2902
|
+
* view
|
|
2903
|
+
*/
|
|
2904
|
+
async MIN_STAKING_SHARES_TO_MINT_OR_BURN(): Promise<bigint> {
|
|
2905
|
+
return this.contract.read.MIN_STAKING_SHARES_TO_MINT_OR_BURN() as Promise<bigint>;
|
|
2906
|
+
}
|
|
2907
|
+
|
|
2908
|
+
/**
|
|
2909
|
+
* NATIVE_ASSET_INDEX
|
|
2910
|
+
* view
|
|
2911
|
+
*/
|
|
2912
|
+
async NATIVE_ASSET_INDEX(): Promise<bigint> {
|
|
2913
|
+
return this.contract.read.NATIVE_ASSET_INDEX() as Promise<bigint>;
|
|
2914
|
+
}
|
|
2915
|
+
|
|
2916
|
+
/**
|
|
2917
|
+
* NIL_ACCOUNT_INDEX
|
|
2918
|
+
* view
|
|
2919
|
+
*/
|
|
2920
|
+
async NIL_ACCOUNT_INDEX(): Promise<bigint> {
|
|
2921
|
+
return this.contract.read.NIL_ACCOUNT_INDEX() as Promise<bigint>;
|
|
2922
|
+
}
|
|
2923
|
+
|
|
2924
|
+
/**
|
|
2925
|
+
* PRIORITY_EXPIRATION
|
|
2926
|
+
* view
|
|
2927
|
+
*/
|
|
2928
|
+
async PRIORITY_EXPIRATION(): Promise<bigint> {
|
|
2929
|
+
return this.contract.read.PRIORITY_EXPIRATION() as Promise<bigint>;
|
|
2930
|
+
}
|
|
2931
|
+
|
|
2932
|
+
/**
|
|
2933
|
+
* USDC_ASSET_INDEX
|
|
2934
|
+
* view
|
|
2935
|
+
*/
|
|
2936
|
+
async USDC_ASSET_INDEX(): Promise<bigint> {
|
|
2937
|
+
return this.contract.read.USDC_ASSET_INDEX() as Promise<bigint>;
|
|
2938
|
+
}
|
|
2939
|
+
|
|
2940
|
+
/**
|
|
2941
|
+
* __DEPRECATED_stateRootUpdates
|
|
2942
|
+
* view
|
|
2943
|
+
*/
|
|
2944
|
+
async __DEPRECATED_stateRootUpdates(arg0: bigint): Promise<`0x${string}`> {
|
|
2945
|
+
return this.contract.read.__DEPRECATED_stateRootUpdates([arg0] as const) as Promise<`0x${string}`>;
|
|
2946
|
+
}
|
|
2947
|
+
|
|
2948
|
+
/**
|
|
2949
|
+
* addressToAccountIndex
|
|
2950
|
+
* view
|
|
2951
|
+
*/
|
|
2952
|
+
async addressToAccountIndex(arg0: `0x${string}`): Promise<bigint> {
|
|
2953
|
+
return this.contract.read.addressToAccountIndex([arg0] as const) as Promise<bigint>;
|
|
2954
|
+
}
|
|
2955
|
+
|
|
2956
|
+
/**
|
|
2957
|
+
* assetConfigs
|
|
2958
|
+
* view
|
|
2959
|
+
*/
|
|
2960
|
+
async assetConfigs(arg0: bigint): Promise<[`0x${string}`, bigint, bigint, bigint, bigint, bigint]> {
|
|
2961
|
+
return this.contract.read.assetConfigs([arg0] as const) as Promise<[`0x${string}`, bigint, bigint, bigint, bigint, bigint]>;
|
|
2962
|
+
}
|
|
2963
|
+
|
|
2964
|
+
/**
|
|
2965
|
+
* committedBatchesCount
|
|
2966
|
+
* view
|
|
2967
|
+
*/
|
|
2968
|
+
async committedBatchesCount(): Promise<bigint> {
|
|
2969
|
+
return this.contract.read.committedBatchesCount() as Promise<bigint>;
|
|
2970
|
+
}
|
|
2971
|
+
|
|
2972
|
+
/**
|
|
2973
|
+
* committedPriorityRequestCount
|
|
2974
|
+
* view
|
|
2975
|
+
*/
|
|
2976
|
+
async committedPriorityRequestCount(): Promise<bigint> {
|
|
2977
|
+
return this.contract.read.committedPriorityRequestCount() as Promise<bigint>;
|
|
2978
|
+
}
|
|
2979
|
+
|
|
2980
|
+
/**
|
|
2981
|
+
* desertMode
|
|
2982
|
+
* view
|
|
2983
|
+
*/
|
|
2984
|
+
async desertMode(): Promise<boolean> {
|
|
2985
|
+
return this.contract.read.desertMode() as Promise<boolean>;
|
|
2986
|
+
}
|
|
2987
|
+
|
|
2988
|
+
/**
|
|
2989
|
+
* executedBatchesCount
|
|
2990
|
+
* view
|
|
2991
|
+
*/
|
|
2992
|
+
async executedBatchesCount(): Promise<bigint> {
|
|
2993
|
+
return this.contract.read.executedBatchesCount() as Promise<bigint>;
|
|
2994
|
+
}
|
|
2995
|
+
|
|
2996
|
+
/**
|
|
2997
|
+
* executedOnChainBatchesCount
|
|
2998
|
+
* view
|
|
2999
|
+
*/
|
|
3000
|
+
async executedOnChainBatchesCount(): Promise<bigint> {
|
|
3001
|
+
return this.contract.read.executedOnChainBatchesCount() as Promise<bigint>;
|
|
3002
|
+
}
|
|
3003
|
+
|
|
3004
|
+
/**
|
|
3005
|
+
* executedPriorityRequestCount
|
|
3006
|
+
* view
|
|
3007
|
+
*/
|
|
3008
|
+
async executedPriorityRequestCount(): Promise<bigint> {
|
|
3009
|
+
return this.contract.read.executedPriorityRequestCount() as Promise<bigint>;
|
|
3010
|
+
}
|
|
3011
|
+
|
|
3012
|
+
/**
|
|
3013
|
+
* getPendingBalance
|
|
3014
|
+
* view
|
|
3015
|
+
*/
|
|
3016
|
+
async getPendingBalance(_owner: `0x${string}`, _assetIndex: bigint): Promise<bigint> {
|
|
3017
|
+
return this.contract.read.getPendingBalance([_owner, _assetIndex] as const) as Promise<bigint>;
|
|
3018
|
+
}
|
|
3019
|
+
|
|
3020
|
+
/**
|
|
3021
|
+
* getPendingBalanceLegacy
|
|
3022
|
+
* view
|
|
3023
|
+
*/
|
|
3024
|
+
async getPendingBalanceLegacy(_owner: `0x${string}`): Promise<bigint> {
|
|
3025
|
+
return this.contract.read.getPendingBalanceLegacy([_owner] as const) as Promise<bigint>;
|
|
3026
|
+
}
|
|
3027
|
+
|
|
3028
|
+
/**
|
|
3029
|
+
* insuranceFundOperator
|
|
3030
|
+
* view
|
|
3031
|
+
*/
|
|
3032
|
+
async insuranceFundOperator(): Promise<`0x${string}`> {
|
|
3033
|
+
return this.contract.read.insuranceFundOperator() as Promise<`0x${string}`>;
|
|
3034
|
+
}
|
|
3035
|
+
|
|
3036
|
+
/**
|
|
3037
|
+
* lastAccountIndex
|
|
3038
|
+
* view
|
|
3039
|
+
*/
|
|
3040
|
+
async lastAccountIndex(): Promise<bigint> {
|
|
3041
|
+
return this.contract.read.lastAccountIndex() as Promise<bigint>;
|
|
3042
|
+
}
|
|
3043
|
+
|
|
3044
|
+
/**
|
|
3045
|
+
* lastVerifiedEndBlockNumber
|
|
3046
|
+
* view
|
|
3047
|
+
*/
|
|
3048
|
+
async lastVerifiedEndBlockNumber(): Promise<bigint> {
|
|
3049
|
+
return this.contract.read.lastVerifiedEndBlockNumber() as Promise<bigint>;
|
|
3050
|
+
}
|
|
3051
|
+
|
|
3052
|
+
/**
|
|
3053
|
+
* lastVerifiedStateRoot
|
|
3054
|
+
* view
|
|
3055
|
+
*/
|
|
3056
|
+
async lastVerifiedStateRoot(): Promise<`0x${string}`> {
|
|
3057
|
+
return this.contract.read.lastVerifiedStateRoot() as Promise<`0x${string}`>;
|
|
3058
|
+
}
|
|
3059
|
+
|
|
3060
|
+
/**
|
|
3061
|
+
* lastVerifiedValidiumRoot
|
|
3062
|
+
* view
|
|
3063
|
+
*/
|
|
3064
|
+
async lastVerifiedValidiumRoot(): Promise<`0x${string}`> {
|
|
3065
|
+
return this.contract.read.lastVerifiedValidiumRoot() as Promise<`0x${string}`>;
|
|
3066
|
+
}
|
|
3067
|
+
|
|
3068
|
+
/**
|
|
3069
|
+
* openPriorityRequestCount
|
|
3070
|
+
* view
|
|
3071
|
+
*/
|
|
3072
|
+
async openPriorityRequestCount(): Promise<bigint> {
|
|
3073
|
+
return this.contract.read.openPriorityRequestCount() as Promise<bigint>;
|
|
3074
|
+
}
|
|
3075
|
+
|
|
3076
|
+
/**
|
|
3077
|
+
* pendingOnChainBatchesCount
|
|
3078
|
+
* view
|
|
3079
|
+
*/
|
|
3080
|
+
async pendingOnChainBatchesCount(): Promise<bigint> {
|
|
3081
|
+
return this.contract.read.pendingOnChainBatchesCount() as Promise<bigint>;
|
|
3082
|
+
}
|
|
3083
|
+
|
|
3084
|
+
/**
|
|
3085
|
+
* stateRoot
|
|
3086
|
+
* view
|
|
3087
|
+
*/
|
|
3088
|
+
async stateRoot(): Promise<`0x${string}`> {
|
|
3089
|
+
return this.contract.read.stateRoot() as Promise<`0x${string}`>;
|
|
3090
|
+
}
|
|
3091
|
+
|
|
3092
|
+
/**
|
|
3093
|
+
* stateRootUpdates
|
|
3094
|
+
* view
|
|
3095
|
+
*/
|
|
3096
|
+
async stateRootUpdates(arg0: bigint): Promise<`0x${string}`> {
|
|
3097
|
+
return this.contract.read.stateRootUpdates([arg0] as const) as Promise<`0x${string}`>;
|
|
3098
|
+
}
|
|
3099
|
+
|
|
3100
|
+
/**
|
|
3101
|
+
* storedBatchHashes
|
|
3102
|
+
* view
|
|
3103
|
+
*/
|
|
3104
|
+
async storedBatchHashes(arg0: bigint): Promise<`0x${string}`> {
|
|
3105
|
+
return this.contract.read.storedBatchHashes([arg0] as const) as Promise<`0x${string}`>;
|
|
3106
|
+
}
|
|
3107
|
+
|
|
3108
|
+
/**
|
|
3109
|
+
* tokenToAssetIndex
|
|
3110
|
+
* view
|
|
3111
|
+
*/
|
|
3112
|
+
async tokenToAssetIndex(arg0: `0x${string}`): Promise<bigint> {
|
|
3113
|
+
return this.contract.read.tokenToAssetIndex([arg0] as const) as Promise<bigint>;
|
|
3114
|
+
}
|
|
3115
|
+
|
|
3116
|
+
/**
|
|
3117
|
+
* treasury
|
|
3118
|
+
* view
|
|
3119
|
+
*/
|
|
3120
|
+
async treasury(): Promise<`0x${string}`> {
|
|
3121
|
+
return this.contract.read.treasury() as Promise<`0x${string}`>;
|
|
3122
|
+
}
|
|
3123
|
+
|
|
3124
|
+
/**
|
|
3125
|
+
* validiumRoot
|
|
3126
|
+
* view
|
|
3127
|
+
*/
|
|
3128
|
+
async validiumRoot(): Promise<`0x${string}`> {
|
|
3129
|
+
return this.contract.read.validiumRoot() as Promise<`0x${string}`>;
|
|
3130
|
+
}
|
|
3131
|
+
|
|
3132
|
+
/**
|
|
3133
|
+
* verifiedBatchesCount
|
|
3134
|
+
* view
|
|
3135
|
+
*/
|
|
3136
|
+
async verifiedBatchesCount(): Promise<bigint> {
|
|
3137
|
+
return this.contract.read.verifiedBatchesCount() as Promise<bigint>;
|
|
3138
|
+
}
|
|
3139
|
+
|
|
3140
|
+
/**
|
|
3141
|
+
* verifiedPriorityRequestCount
|
|
3142
|
+
* view
|
|
3143
|
+
*/
|
|
3144
|
+
async verifiedPriorityRequestCount(): Promise<bigint> {
|
|
3145
|
+
return this.contract.read.verifiedPriorityRequestCount() as Promise<bigint>;
|
|
3146
|
+
}
|
|
3147
|
+
|
|
3148
|
+
/**
|
|
3149
|
+
* activateDesertMode
|
|
3150
|
+
* nonpayable
|
|
3151
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3152
|
+
*/
|
|
3153
|
+
async activateDesertMode(options?: {
|
|
3154
|
+
accessList?: import('viem').AccessList;
|
|
3155
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3156
|
+
chain?: import('viem').Chain | null;
|
|
3157
|
+
dataSuffix?: `0x${string}`;
|
|
3158
|
+
gas?: bigint;
|
|
3159
|
+
gasPrice?: bigint;
|
|
3160
|
+
maxFeePerGas?: bigint;
|
|
3161
|
+
maxPriorityFeePerGas?: bigint;
|
|
3162
|
+
nonce?: number;
|
|
3163
|
+
value?: bigint;
|
|
3164
|
+
}): Promise<`0x${string}`> {
|
|
3165
|
+
if (!this.contract.write) {
|
|
3166
|
+
throw new Error('Wallet client is required for write operations');
|
|
3167
|
+
}
|
|
3168
|
+
return this.contract.write.activateDesertMode(options) as Promise<`0x${string}`>;
|
|
3169
|
+
}
|
|
3170
|
+
|
|
3171
|
+
/**
|
|
3172
|
+
* burnShares
|
|
3173
|
+
* nonpayable
|
|
3174
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3175
|
+
*/
|
|
3176
|
+
async burnShares(_accountIndex: bigint, _publicPoolIndex: bigint, _shareAmount: bigint, options?: {
|
|
3177
|
+
accessList?: import('viem').AccessList;
|
|
3178
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3179
|
+
chain?: import('viem').Chain | null;
|
|
3180
|
+
dataSuffix?: `0x${string}`;
|
|
3181
|
+
gas?: bigint;
|
|
3182
|
+
gasPrice?: bigint;
|
|
3183
|
+
maxFeePerGas?: bigint;
|
|
3184
|
+
maxPriorityFeePerGas?: bigint;
|
|
3185
|
+
nonce?: number;
|
|
3186
|
+
value?: bigint;
|
|
3187
|
+
}): Promise<`0x${string}`> {
|
|
3188
|
+
if (!this.contract.write) {
|
|
3189
|
+
throw new Error('Wallet client is required for write operations');
|
|
3190
|
+
}
|
|
3191
|
+
return this.contract.write.burnShares([_accountIndex, _publicPoolIndex, _shareAmount] as const, options) as Promise<`0x${string}`>;
|
|
3192
|
+
}
|
|
3193
|
+
|
|
3194
|
+
/**
|
|
3195
|
+
* cancelAllOrders
|
|
3196
|
+
* nonpayable
|
|
3197
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3198
|
+
*/
|
|
3199
|
+
async cancelAllOrders(_accountIndex: bigint, options?: {
|
|
3200
|
+
accessList?: import('viem').AccessList;
|
|
3201
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3202
|
+
chain?: import('viem').Chain | null;
|
|
3203
|
+
dataSuffix?: `0x${string}`;
|
|
3204
|
+
gas?: bigint;
|
|
3205
|
+
gasPrice?: bigint;
|
|
3206
|
+
maxFeePerGas?: bigint;
|
|
3207
|
+
maxPriorityFeePerGas?: bigint;
|
|
3208
|
+
nonce?: number;
|
|
3209
|
+
value?: bigint;
|
|
3210
|
+
}): Promise<`0x${string}`> {
|
|
3211
|
+
if (!this.contract.write) {
|
|
3212
|
+
throw new Error('Wallet client is required for write operations');
|
|
3213
|
+
}
|
|
3214
|
+
return this.contract.write.cancelAllOrders([_accountIndex] as const, options) as Promise<`0x${string}`>;
|
|
3215
|
+
}
|
|
3216
|
+
|
|
3217
|
+
/**
|
|
3218
|
+
* cancelOutstandingDepositsForDesertMode
|
|
3219
|
+
* nonpayable
|
|
3220
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3221
|
+
*/
|
|
3222
|
+
async cancelOutstandingDepositsForDesertMode(_n: bigint, _priorityPubData: `0x${string}`[], options?: {
|
|
3223
|
+
accessList?: import('viem').AccessList;
|
|
3224
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3225
|
+
chain?: import('viem').Chain | null;
|
|
3226
|
+
dataSuffix?: `0x${string}`;
|
|
3227
|
+
gas?: bigint;
|
|
3228
|
+
gasPrice?: bigint;
|
|
3229
|
+
maxFeePerGas?: bigint;
|
|
3230
|
+
maxPriorityFeePerGas?: bigint;
|
|
3231
|
+
nonce?: number;
|
|
3232
|
+
value?: bigint;
|
|
3233
|
+
}): Promise<`0x${string}`> {
|
|
3234
|
+
if (!this.contract.write) {
|
|
3235
|
+
throw new Error('Wallet client is required for write operations');
|
|
3236
|
+
}
|
|
3237
|
+
return this.contract.write.cancelOutstandingDepositsForDesertMode([_n, _priorityPubData] as const, options) as Promise<`0x${string}`>;
|
|
3238
|
+
}
|
|
3239
|
+
|
|
3240
|
+
/**
|
|
3241
|
+
* changePubKey
|
|
3242
|
+
* nonpayable
|
|
3243
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3244
|
+
*/
|
|
3245
|
+
async changePubKey(_accountIndex: bigint, _apiKeyIndex: bigint, _pubKey: `0x${string}`, options?: {
|
|
3246
|
+
accessList?: import('viem').AccessList;
|
|
3247
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3248
|
+
chain?: import('viem').Chain | null;
|
|
3249
|
+
dataSuffix?: `0x${string}`;
|
|
3250
|
+
gas?: bigint;
|
|
3251
|
+
gasPrice?: bigint;
|
|
3252
|
+
maxFeePerGas?: bigint;
|
|
3253
|
+
maxPriorityFeePerGas?: bigint;
|
|
3254
|
+
nonce?: number;
|
|
3255
|
+
value?: bigint;
|
|
3256
|
+
}): Promise<`0x${string}`> {
|
|
3257
|
+
if (!this.contract.write) {
|
|
3258
|
+
throw new Error('Wallet client is required for write operations');
|
|
3259
|
+
}
|
|
3260
|
+
return this.contract.write.changePubKey([_accountIndex, _apiKeyIndex, _pubKey] as const, options) as Promise<`0x${string}`>;
|
|
3261
|
+
}
|
|
3262
|
+
|
|
3263
|
+
/**
|
|
3264
|
+
* commitBatch
|
|
3265
|
+
* nonpayable
|
|
3266
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3267
|
+
*/
|
|
3268
|
+
async commitBatch(newBatchData: IZkLighter_CommitBatchInfo, lastStoredBatch: Storage_StoredBatchInfo, options?: {
|
|
3269
|
+
accessList?: import('viem').AccessList;
|
|
3270
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3271
|
+
chain?: import('viem').Chain | null;
|
|
3272
|
+
dataSuffix?: `0x${string}`;
|
|
3273
|
+
gas?: bigint;
|
|
3274
|
+
gasPrice?: bigint;
|
|
3275
|
+
maxFeePerGas?: bigint;
|
|
3276
|
+
maxPriorityFeePerGas?: bigint;
|
|
3277
|
+
nonce?: number;
|
|
3278
|
+
value?: bigint;
|
|
3279
|
+
}): Promise<`0x${string}`> {
|
|
3280
|
+
if (!this.contract.write) {
|
|
3281
|
+
throw new Error('Wallet client is required for write operations');
|
|
3282
|
+
}
|
|
3283
|
+
return this.contract.write.commitBatch([newBatchData, lastStoredBatch] as const, options) as Promise<`0x${string}`>;
|
|
3284
|
+
}
|
|
3285
|
+
|
|
3286
|
+
/**
|
|
3287
|
+
* createMarket
|
|
3288
|
+
* nonpayable
|
|
3289
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3290
|
+
*/
|
|
3291
|
+
async createMarket(_size_decimals: bigint, _price_decimals: bigint, _symbol: `0x${string}`, _params: TxTypes_CreateMarket, options?: {
|
|
3292
|
+
accessList?: import('viem').AccessList;
|
|
3293
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3294
|
+
chain?: import('viem').Chain | null;
|
|
3295
|
+
dataSuffix?: `0x${string}`;
|
|
3296
|
+
gas?: bigint;
|
|
3297
|
+
gasPrice?: bigint;
|
|
3298
|
+
maxFeePerGas?: bigint;
|
|
3299
|
+
maxPriorityFeePerGas?: bigint;
|
|
3300
|
+
nonce?: number;
|
|
3301
|
+
value?: bigint;
|
|
3302
|
+
}): Promise<`0x${string}`> {
|
|
3303
|
+
if (!this.contract.write) {
|
|
3304
|
+
throw new Error('Wallet client is required for write operations');
|
|
3305
|
+
}
|
|
3306
|
+
return this.contract.write.createMarket([_size_decimals, _price_decimals, _symbol, _params] as const, options) as Promise<`0x${string}`>;
|
|
3307
|
+
}
|
|
3308
|
+
|
|
3309
|
+
/**
|
|
3310
|
+
* createOrder
|
|
3311
|
+
* nonpayable
|
|
3312
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3313
|
+
*/
|
|
3314
|
+
async createOrder(_accountIndex: bigint, _marketIndex: bigint, _baseAmount: bigint, _price: bigint, _isAsk: bigint, _orderType: bigint, options?: {
|
|
3315
|
+
accessList?: import('viem').AccessList;
|
|
3316
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3317
|
+
chain?: import('viem').Chain | null;
|
|
3318
|
+
dataSuffix?: `0x${string}`;
|
|
3319
|
+
gas?: bigint;
|
|
3320
|
+
gasPrice?: bigint;
|
|
3321
|
+
maxFeePerGas?: bigint;
|
|
3322
|
+
maxPriorityFeePerGas?: bigint;
|
|
3323
|
+
nonce?: number;
|
|
3324
|
+
value?: bigint;
|
|
3325
|
+
}): Promise<`0x${string}`> {
|
|
3326
|
+
if (!this.contract.write) {
|
|
3327
|
+
throw new Error('Wallet client is required for write operations');
|
|
3328
|
+
}
|
|
3329
|
+
return this.contract.write.createOrder([_accountIndex, _marketIndex, _baseAmount, _price, _isAsk, _orderType] as const, options) as Promise<`0x${string}`>;
|
|
3330
|
+
}
|
|
3331
|
+
|
|
3332
|
+
/**
|
|
3333
|
+
* deposit
|
|
3334
|
+
* payable
|
|
3335
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3336
|
+
*/
|
|
3337
|
+
async deposit(_to: `0x${string}`, _assetIndex: bigint, _routeType: bigint, _amount: bigint, options?: {
|
|
3338
|
+
accessList?: import('viem').AccessList;
|
|
3339
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3340
|
+
chain?: import('viem').Chain | null;
|
|
3341
|
+
dataSuffix?: `0x${string}`;
|
|
3342
|
+
gas?: bigint;
|
|
3343
|
+
gasPrice?: bigint;
|
|
3344
|
+
maxFeePerGas?: bigint;
|
|
3345
|
+
maxPriorityFeePerGas?: bigint;
|
|
3346
|
+
nonce?: number;
|
|
3347
|
+
value?: bigint;
|
|
3348
|
+
}): Promise<`0x${string}`> {
|
|
3349
|
+
if (!this.contract.write) {
|
|
3350
|
+
throw new Error('Wallet client is required for write operations');
|
|
3351
|
+
}
|
|
3352
|
+
return this.contract.write.deposit([_to, _assetIndex, _routeType, _amount] as const, options) as Promise<`0x${string}`>;
|
|
3353
|
+
}
|
|
3354
|
+
|
|
3355
|
+
/**
|
|
3356
|
+
* depositBatch
|
|
3357
|
+
* nonpayable
|
|
3358
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3359
|
+
*/
|
|
3360
|
+
async depositBatch(_amount: bigint[], _to: `0x${string}`[], _accountIndex: bigint[], options?: {
|
|
3361
|
+
accessList?: import('viem').AccessList;
|
|
3362
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3363
|
+
chain?: import('viem').Chain | null;
|
|
3364
|
+
dataSuffix?: `0x${string}`;
|
|
3365
|
+
gas?: bigint;
|
|
3366
|
+
gasPrice?: bigint;
|
|
3367
|
+
maxFeePerGas?: bigint;
|
|
3368
|
+
maxPriorityFeePerGas?: bigint;
|
|
3369
|
+
nonce?: number;
|
|
3370
|
+
value?: bigint;
|
|
3371
|
+
}): Promise<`0x${string}`> {
|
|
3372
|
+
if (!this.contract.write) {
|
|
3373
|
+
throw new Error('Wallet client is required for write operations');
|
|
3374
|
+
}
|
|
3375
|
+
return this.contract.write.depositBatch([_amount, _to, _accountIndex] as const, options) as Promise<`0x${string}`>;
|
|
3376
|
+
}
|
|
3377
|
+
|
|
3378
|
+
/**
|
|
3379
|
+
* executeBatches
|
|
3380
|
+
* nonpayable
|
|
3381
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3382
|
+
*/
|
|
3383
|
+
async executeBatches(batches: Storage_StoredBatchInfo[], onChainOperationsPubData: `0x${string}`[], options?: {
|
|
3384
|
+
accessList?: import('viem').AccessList;
|
|
3385
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3386
|
+
chain?: import('viem').Chain | null;
|
|
3387
|
+
dataSuffix?: `0x${string}`;
|
|
3388
|
+
gas?: bigint;
|
|
3389
|
+
gasPrice?: bigint;
|
|
3390
|
+
maxFeePerGas?: bigint;
|
|
3391
|
+
maxPriorityFeePerGas?: bigint;
|
|
3392
|
+
nonce?: number;
|
|
3393
|
+
value?: bigint;
|
|
3394
|
+
}): Promise<`0x${string}`> {
|
|
3395
|
+
if (!this.contract.write) {
|
|
3396
|
+
throw new Error('Wallet client is required for write operations');
|
|
3397
|
+
}
|
|
3398
|
+
return this.contract.write.executeBatches([batches, onChainOperationsPubData] as const, options) as Promise<`0x${string}`>;
|
|
3399
|
+
}
|
|
3400
|
+
|
|
3401
|
+
/**
|
|
3402
|
+
* initialize
|
|
3403
|
+
* nonpayable
|
|
3404
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3405
|
+
*/
|
|
3406
|
+
async initialize(initializationParameters: `0x${string}`, options?: {
|
|
3407
|
+
accessList?: import('viem').AccessList;
|
|
3408
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3409
|
+
chain?: import('viem').Chain | null;
|
|
3410
|
+
dataSuffix?: `0x${string}`;
|
|
3411
|
+
gas?: bigint;
|
|
3412
|
+
gasPrice?: bigint;
|
|
3413
|
+
maxFeePerGas?: bigint;
|
|
3414
|
+
maxPriorityFeePerGas?: bigint;
|
|
3415
|
+
nonce?: number;
|
|
3416
|
+
value?: bigint;
|
|
3417
|
+
}): Promise<`0x${string}`> {
|
|
3418
|
+
if (!this.contract.write) {
|
|
3419
|
+
throw new Error('Wallet client is required for write operations');
|
|
3420
|
+
}
|
|
3421
|
+
return this.contract.write.initialize([initializationParameters] as const, options) as Promise<`0x${string}`>;
|
|
3422
|
+
}
|
|
3423
|
+
|
|
3424
|
+
/**
|
|
3425
|
+
* performDesert
|
|
3426
|
+
* nonpayable
|
|
3427
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3428
|
+
*/
|
|
3429
|
+
async performDesert(_accountIndex: bigint, _l1Address: `0x${string}`, _assetIndex: bigint, _totalBaseAmount: bigint, proof: `0x${string}`, options?: {
|
|
3430
|
+
accessList?: import('viem').AccessList;
|
|
3431
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3432
|
+
chain?: import('viem').Chain | null;
|
|
3433
|
+
dataSuffix?: `0x${string}`;
|
|
3434
|
+
gas?: bigint;
|
|
3435
|
+
gasPrice?: bigint;
|
|
3436
|
+
maxFeePerGas?: bigint;
|
|
3437
|
+
maxPriorityFeePerGas?: bigint;
|
|
3438
|
+
nonce?: number;
|
|
3439
|
+
value?: bigint;
|
|
3440
|
+
}): Promise<`0x${string}`> {
|
|
3441
|
+
if (!this.contract.write) {
|
|
3442
|
+
throw new Error('Wallet client is required for write operations');
|
|
3443
|
+
}
|
|
3444
|
+
return this.contract.write.performDesert([_accountIndex, _l1Address, _assetIndex, _totalBaseAmount, proof] as const, options) as Promise<`0x${string}`>;
|
|
3445
|
+
}
|
|
3446
|
+
|
|
3447
|
+
/**
|
|
3448
|
+
* registerAsset
|
|
3449
|
+
* nonpayable
|
|
3450
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3451
|
+
*/
|
|
3452
|
+
async registerAsset(_l1Decimals: bigint, _l2Decimals: bigint, _priceDecimals: bigint, _symbol: `0x${string}`, _params: TxTypes_RegisterAsset, options?: {
|
|
3453
|
+
accessList?: import('viem').AccessList;
|
|
3454
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3455
|
+
chain?: import('viem').Chain | null;
|
|
3456
|
+
dataSuffix?: `0x${string}`;
|
|
3457
|
+
gas?: bigint;
|
|
3458
|
+
gasPrice?: bigint;
|
|
3459
|
+
maxFeePerGas?: bigint;
|
|
3460
|
+
maxPriorityFeePerGas?: bigint;
|
|
3461
|
+
nonce?: number;
|
|
3462
|
+
value?: bigint;
|
|
3463
|
+
}): Promise<`0x${string}`> {
|
|
3464
|
+
if (!this.contract.write) {
|
|
3465
|
+
throw new Error('Wallet client is required for write operations');
|
|
3466
|
+
}
|
|
3467
|
+
return this.contract.write.registerAsset([_l1Decimals, _l2Decimals, _priceDecimals, _symbol, _params] as const, options) as Promise<`0x${string}`>;
|
|
3468
|
+
}
|
|
3469
|
+
|
|
3470
|
+
/**
|
|
3471
|
+
* registerAssetConfig
|
|
3472
|
+
* nonpayable
|
|
3473
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3474
|
+
*/
|
|
3475
|
+
async registerAssetConfig(assetIndex: bigint, tokenAddress: `0x${string}`, withdrawalsEnabled: bigint, extensionMultiplier: bigint, tickSize: bigint, depositCapTicks: bigint, minDepositTicks: bigint, options?: {
|
|
3476
|
+
accessList?: import('viem').AccessList;
|
|
3477
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3478
|
+
chain?: import('viem').Chain | null;
|
|
3479
|
+
dataSuffix?: `0x${string}`;
|
|
3480
|
+
gas?: bigint;
|
|
3481
|
+
gasPrice?: bigint;
|
|
3482
|
+
maxFeePerGas?: bigint;
|
|
3483
|
+
maxPriorityFeePerGas?: bigint;
|
|
3484
|
+
nonce?: number;
|
|
3485
|
+
value?: bigint;
|
|
3486
|
+
}): Promise<`0x${string}`> {
|
|
3487
|
+
if (!this.contract.write) {
|
|
3488
|
+
throw new Error('Wallet client is required for write operations');
|
|
3489
|
+
}
|
|
3490
|
+
return this.contract.write.registerAssetConfig([assetIndex, tokenAddress, withdrawalsEnabled, extensionMultiplier, tickSize, depositCapTicks, minDepositTicks] as const, options) as Promise<`0x${string}`>;
|
|
3491
|
+
}
|
|
3492
|
+
|
|
3493
|
+
/**
|
|
3494
|
+
* revertBatches
|
|
3495
|
+
* nonpayable
|
|
3496
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3497
|
+
*/
|
|
3498
|
+
async revertBatches(_batchesToRevert: Storage_StoredBatchInfo[], _remainingBatch: Storage_StoredBatchInfo, options?: {
|
|
3499
|
+
accessList?: import('viem').AccessList;
|
|
3500
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3501
|
+
chain?: import('viem').Chain | null;
|
|
3502
|
+
dataSuffix?: `0x${string}`;
|
|
3503
|
+
gas?: bigint;
|
|
3504
|
+
gasPrice?: bigint;
|
|
3505
|
+
maxFeePerGas?: bigint;
|
|
3506
|
+
maxPriorityFeePerGas?: bigint;
|
|
3507
|
+
nonce?: number;
|
|
3508
|
+
value?: bigint;
|
|
3509
|
+
}): Promise<`0x${string}`> {
|
|
3510
|
+
if (!this.contract.write) {
|
|
3511
|
+
throw new Error('Wallet client is required for write operations');
|
|
3512
|
+
}
|
|
3513
|
+
return this.contract.write.revertBatches([_batchesToRevert, _remainingBatch] as const, options) as Promise<`0x${string}`>;
|
|
3514
|
+
}
|
|
3515
|
+
|
|
3516
|
+
/**
|
|
3517
|
+
* setInsuranceFundOperator
|
|
3518
|
+
* nonpayable
|
|
3519
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3520
|
+
*/
|
|
3521
|
+
async setInsuranceFundOperator(_newInsuranceFundOperator: `0x${string}`, options?: {
|
|
3522
|
+
accessList?: import('viem').AccessList;
|
|
3523
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3524
|
+
chain?: import('viem').Chain | null;
|
|
3525
|
+
dataSuffix?: `0x${string}`;
|
|
3526
|
+
gas?: bigint;
|
|
3527
|
+
gasPrice?: bigint;
|
|
3528
|
+
maxFeePerGas?: bigint;
|
|
3529
|
+
maxPriorityFeePerGas?: bigint;
|
|
3530
|
+
nonce?: number;
|
|
3531
|
+
value?: bigint;
|
|
3532
|
+
}): Promise<`0x${string}`> {
|
|
3533
|
+
if (!this.contract.write) {
|
|
3534
|
+
throw new Error('Wallet client is required for write operations');
|
|
3535
|
+
}
|
|
3536
|
+
return this.contract.write.setInsuranceFundOperator([_newInsuranceFundOperator] as const, options) as Promise<`0x${string}`>;
|
|
3537
|
+
}
|
|
3538
|
+
|
|
3539
|
+
/**
|
|
3540
|
+
* setSystemConfig
|
|
3541
|
+
* nonpayable
|
|
3542
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3543
|
+
*/
|
|
3544
|
+
async setSystemConfig(_params: TxTypes_SetSystemConfig, options?: {
|
|
3545
|
+
accessList?: import('viem').AccessList;
|
|
3546
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3547
|
+
chain?: import('viem').Chain | null;
|
|
3548
|
+
dataSuffix?: `0x${string}`;
|
|
3549
|
+
gas?: bigint;
|
|
3550
|
+
gasPrice?: bigint;
|
|
3551
|
+
maxFeePerGas?: bigint;
|
|
3552
|
+
maxPriorityFeePerGas?: bigint;
|
|
3553
|
+
nonce?: number;
|
|
3554
|
+
value?: bigint;
|
|
3555
|
+
}): Promise<`0x${string}`> {
|
|
3556
|
+
if (!this.contract.write) {
|
|
3557
|
+
throw new Error('Wallet client is required for write operations');
|
|
3558
|
+
}
|
|
3559
|
+
return this.contract.write.setSystemConfig([_params] as const, options) as Promise<`0x${string}`>;
|
|
3560
|
+
}
|
|
3561
|
+
|
|
3562
|
+
/**
|
|
3563
|
+
* setTreasury
|
|
3564
|
+
* nonpayable
|
|
3565
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3566
|
+
*/
|
|
3567
|
+
async setTreasury(_newTreasury: `0x${string}`, options?: {
|
|
3568
|
+
accessList?: import('viem').AccessList;
|
|
3569
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3570
|
+
chain?: import('viem').Chain | null;
|
|
3571
|
+
dataSuffix?: `0x${string}`;
|
|
3572
|
+
gas?: bigint;
|
|
3573
|
+
gasPrice?: bigint;
|
|
3574
|
+
maxFeePerGas?: bigint;
|
|
3575
|
+
maxPriorityFeePerGas?: bigint;
|
|
3576
|
+
nonce?: number;
|
|
3577
|
+
value?: bigint;
|
|
3578
|
+
}): Promise<`0x${string}`> {
|
|
3579
|
+
if (!this.contract.write) {
|
|
3580
|
+
throw new Error('Wallet client is required for write operations');
|
|
3581
|
+
}
|
|
3582
|
+
return this.contract.write.setTreasury([_newTreasury] as const, options) as Promise<`0x${string}`>;
|
|
3583
|
+
}
|
|
3584
|
+
|
|
3585
|
+
/**
|
|
3586
|
+
* transferERC20
|
|
3587
|
+
* nonpayable
|
|
3588
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3589
|
+
*/
|
|
3590
|
+
async transferERC20(_token: `0x${string}`, _to: `0x${string}`, _amount: bigint, _maxAmount: bigint, options?: {
|
|
3591
|
+
accessList?: import('viem').AccessList;
|
|
3592
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3593
|
+
chain?: import('viem').Chain | null;
|
|
3594
|
+
dataSuffix?: `0x${string}`;
|
|
3595
|
+
gas?: bigint;
|
|
3596
|
+
gasPrice?: bigint;
|
|
3597
|
+
maxFeePerGas?: bigint;
|
|
3598
|
+
maxPriorityFeePerGas?: bigint;
|
|
3599
|
+
nonce?: number;
|
|
3600
|
+
value?: bigint;
|
|
3601
|
+
}): Promise<`0x${string}`> {
|
|
3602
|
+
if (!this.contract.write) {
|
|
3603
|
+
throw new Error('Wallet client is required for write operations');
|
|
3604
|
+
}
|
|
3605
|
+
return this.contract.write.transferERC20([_token, _to, _amount, _maxAmount] as const, options) as Promise<`0x${string}`>;
|
|
3606
|
+
}
|
|
3607
|
+
|
|
3608
|
+
/**
|
|
3609
|
+
* transferETH
|
|
3610
|
+
* nonpayable
|
|
3611
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3612
|
+
*/
|
|
3613
|
+
async transferETH(_to: `0x${string}`, _amount: bigint, options?: {
|
|
3614
|
+
accessList?: import('viem').AccessList;
|
|
3615
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3616
|
+
chain?: import('viem').Chain | null;
|
|
3617
|
+
dataSuffix?: `0x${string}`;
|
|
3618
|
+
gas?: bigint;
|
|
3619
|
+
gasPrice?: bigint;
|
|
3620
|
+
maxFeePerGas?: bigint;
|
|
3621
|
+
maxPriorityFeePerGas?: bigint;
|
|
3622
|
+
nonce?: number;
|
|
3623
|
+
value?: bigint;
|
|
3624
|
+
}): Promise<`0x${string}`> {
|
|
3625
|
+
if (!this.contract.write) {
|
|
3626
|
+
throw new Error('Wallet client is required for write operations');
|
|
3627
|
+
}
|
|
3628
|
+
return this.contract.write.transferETH([_to, _amount] as const, options) as Promise<`0x${string}`>;
|
|
3629
|
+
}
|
|
3630
|
+
|
|
3631
|
+
/**
|
|
3632
|
+
* updateAsset
|
|
3633
|
+
* nonpayable
|
|
3634
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3635
|
+
*/
|
|
3636
|
+
async updateAsset(_params: TxTypes_UpdateAsset, options?: {
|
|
3637
|
+
accessList?: import('viem').AccessList;
|
|
3638
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3639
|
+
chain?: import('viem').Chain | null;
|
|
3640
|
+
dataSuffix?: `0x${string}`;
|
|
3641
|
+
gas?: bigint;
|
|
3642
|
+
gasPrice?: bigint;
|
|
3643
|
+
maxFeePerGas?: bigint;
|
|
3644
|
+
maxPriorityFeePerGas?: bigint;
|
|
3645
|
+
nonce?: number;
|
|
3646
|
+
value?: bigint;
|
|
3647
|
+
}): Promise<`0x${string}`> {
|
|
3648
|
+
if (!this.contract.write) {
|
|
3649
|
+
throw new Error('Wallet client is required for write operations');
|
|
3650
|
+
}
|
|
3651
|
+
return this.contract.write.updateAsset([_params] as const, options) as Promise<`0x${string}`>;
|
|
3652
|
+
}
|
|
3653
|
+
|
|
3654
|
+
/**
|
|
3655
|
+
* updateAssetConfig
|
|
3656
|
+
* nonpayable
|
|
3657
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3658
|
+
*/
|
|
3659
|
+
async updateAssetConfig(assetIndex: bigint, withdrawalsEnabled: bigint, depositCapTicks: bigint, minDepositTicks: bigint, options?: {
|
|
3660
|
+
accessList?: import('viem').AccessList;
|
|
3661
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3662
|
+
chain?: import('viem').Chain | null;
|
|
3663
|
+
dataSuffix?: `0x${string}`;
|
|
3664
|
+
gas?: bigint;
|
|
3665
|
+
gasPrice?: bigint;
|
|
3666
|
+
maxFeePerGas?: bigint;
|
|
3667
|
+
maxPriorityFeePerGas?: bigint;
|
|
3668
|
+
nonce?: number;
|
|
3669
|
+
value?: bigint;
|
|
3670
|
+
}): Promise<`0x${string}`> {
|
|
3671
|
+
if (!this.contract.write) {
|
|
3672
|
+
throw new Error('Wallet client is required for write operations');
|
|
3673
|
+
}
|
|
3674
|
+
return this.contract.write.updateAssetConfig([assetIndex, withdrawalsEnabled, depositCapTicks, minDepositTicks] as const, options) as Promise<`0x${string}`>;
|
|
3675
|
+
}
|
|
3676
|
+
|
|
3677
|
+
/**
|
|
3678
|
+
* updateMarket
|
|
3679
|
+
* nonpayable
|
|
3680
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3681
|
+
*/
|
|
3682
|
+
async updateMarket(_params: TxTypes_UpdateMarket, options?: {
|
|
3683
|
+
accessList?: import('viem').AccessList;
|
|
3684
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3685
|
+
chain?: import('viem').Chain | null;
|
|
3686
|
+
dataSuffix?: `0x${string}`;
|
|
3687
|
+
gas?: bigint;
|
|
3688
|
+
gasPrice?: bigint;
|
|
3689
|
+
maxFeePerGas?: bigint;
|
|
3690
|
+
maxPriorityFeePerGas?: bigint;
|
|
3691
|
+
nonce?: number;
|
|
3692
|
+
value?: bigint;
|
|
3693
|
+
}): Promise<`0x${string}`> {
|
|
3694
|
+
if (!this.contract.write) {
|
|
3695
|
+
throw new Error('Wallet client is required for write operations');
|
|
3696
|
+
}
|
|
3697
|
+
return this.contract.write.updateMarket([_params] as const, options) as Promise<`0x${string}`>;
|
|
3698
|
+
}
|
|
3699
|
+
|
|
3700
|
+
/**
|
|
3701
|
+
* updateStateRoot
|
|
3702
|
+
* nonpayable
|
|
3703
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3704
|
+
*/
|
|
3705
|
+
async updateStateRoot(_lastStoredBatch: Storage_StoredBatchInfo, _stateRoot: `0x${string}`, _validiumRoot: `0x${string}`, proof: `0x${string}`, options?: {
|
|
3706
|
+
accessList?: import('viem').AccessList;
|
|
3707
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3708
|
+
chain?: import('viem').Chain | null;
|
|
3709
|
+
dataSuffix?: `0x${string}`;
|
|
3710
|
+
gas?: bigint;
|
|
3711
|
+
gasPrice?: bigint;
|
|
3712
|
+
maxFeePerGas?: bigint;
|
|
3713
|
+
maxPriorityFeePerGas?: bigint;
|
|
3714
|
+
nonce?: number;
|
|
3715
|
+
value?: bigint;
|
|
3716
|
+
}): Promise<`0x${string}`> {
|
|
3717
|
+
if (!this.contract.write) {
|
|
3718
|
+
throw new Error('Wallet client is required for write operations');
|
|
3719
|
+
}
|
|
3720
|
+
return this.contract.write.updateStateRoot([_lastStoredBatch, _stateRoot, _validiumRoot, proof] as const, options) as Promise<`0x${string}`>;
|
|
3721
|
+
}
|
|
3722
|
+
|
|
3723
|
+
/**
|
|
3724
|
+
* upgrade
|
|
3725
|
+
* nonpayable
|
|
3726
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3727
|
+
*/
|
|
3728
|
+
async upgrade(upgradeParameters: `0x${string}`, options?: {
|
|
3729
|
+
accessList?: import('viem').AccessList;
|
|
3730
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3731
|
+
chain?: import('viem').Chain | null;
|
|
3732
|
+
dataSuffix?: `0x${string}`;
|
|
3733
|
+
gas?: bigint;
|
|
3734
|
+
gasPrice?: bigint;
|
|
3735
|
+
maxFeePerGas?: bigint;
|
|
3736
|
+
maxPriorityFeePerGas?: bigint;
|
|
3737
|
+
nonce?: number;
|
|
3738
|
+
value?: bigint;
|
|
3739
|
+
}): Promise<`0x${string}`> {
|
|
3740
|
+
if (!this.contract.write) {
|
|
3741
|
+
throw new Error('Wallet client is required for write operations');
|
|
3742
|
+
}
|
|
3743
|
+
return this.contract.write.upgrade([upgradeParameters] as const, options) as Promise<`0x${string}`>;
|
|
3744
|
+
}
|
|
3745
|
+
|
|
3746
|
+
/**
|
|
3747
|
+
* verifyBatch
|
|
3748
|
+
* nonpayable
|
|
3749
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3750
|
+
*/
|
|
3751
|
+
async verifyBatch(batch: Storage_StoredBatchInfo, proof: `0x${string}`, options?: {
|
|
3752
|
+
accessList?: import('viem').AccessList;
|
|
3753
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3754
|
+
chain?: import('viem').Chain | null;
|
|
3755
|
+
dataSuffix?: `0x${string}`;
|
|
3756
|
+
gas?: bigint;
|
|
3757
|
+
gasPrice?: bigint;
|
|
3758
|
+
maxFeePerGas?: bigint;
|
|
3759
|
+
maxPriorityFeePerGas?: bigint;
|
|
3760
|
+
nonce?: number;
|
|
3761
|
+
value?: bigint;
|
|
3762
|
+
}): Promise<`0x${string}`> {
|
|
3763
|
+
if (!this.contract.write) {
|
|
3764
|
+
throw new Error('Wallet client is required for write operations');
|
|
3765
|
+
}
|
|
3766
|
+
return this.contract.write.verifyBatch([batch, proof] as const, options) as Promise<`0x${string}`>;
|
|
3767
|
+
}
|
|
3768
|
+
|
|
3769
|
+
/**
|
|
3770
|
+
* withdraw
|
|
3771
|
+
* nonpayable
|
|
3772
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3773
|
+
*/
|
|
3774
|
+
async withdraw(_accountIndex: bigint, _assetIndex: bigint, _routeType: bigint, _baseAmount: bigint, options?: {
|
|
3775
|
+
accessList?: import('viem').AccessList;
|
|
3776
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3777
|
+
chain?: import('viem').Chain | null;
|
|
3778
|
+
dataSuffix?: `0x${string}`;
|
|
3779
|
+
gas?: bigint;
|
|
3780
|
+
gasPrice?: bigint;
|
|
3781
|
+
maxFeePerGas?: bigint;
|
|
3782
|
+
maxPriorityFeePerGas?: bigint;
|
|
3783
|
+
nonce?: number;
|
|
3784
|
+
value?: bigint;
|
|
3785
|
+
}): Promise<`0x${string}`> {
|
|
3786
|
+
if (!this.contract.write) {
|
|
3787
|
+
throw new Error('Wallet client is required for write operations');
|
|
3788
|
+
}
|
|
3789
|
+
return this.contract.write.withdraw([_accountIndex, _assetIndex, _routeType, _baseAmount] as const, options) as Promise<`0x${string}`>;
|
|
3790
|
+
}
|
|
3791
|
+
|
|
3792
|
+
/**
|
|
3793
|
+
* withdrawPendingBalance
|
|
3794
|
+
* nonpayable
|
|
3795
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3796
|
+
*/
|
|
3797
|
+
async withdrawPendingBalance(_owner: `0x${string}`, _assetIndex: bigint, _baseAmount: bigint, options?: {
|
|
3798
|
+
accessList?: import('viem').AccessList;
|
|
3799
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3800
|
+
chain?: import('viem').Chain | null;
|
|
3801
|
+
dataSuffix?: `0x${string}`;
|
|
3802
|
+
gas?: bigint;
|
|
3803
|
+
gasPrice?: bigint;
|
|
3804
|
+
maxFeePerGas?: bigint;
|
|
3805
|
+
maxPriorityFeePerGas?: bigint;
|
|
3806
|
+
nonce?: number;
|
|
3807
|
+
value?: bigint;
|
|
3808
|
+
}): Promise<`0x${string}`> {
|
|
3809
|
+
if (!this.contract.write) {
|
|
3810
|
+
throw new Error('Wallet client is required for write operations');
|
|
3811
|
+
}
|
|
3812
|
+
return this.contract.write.withdrawPendingBalance([_owner, _assetIndex, _baseAmount] as const, options) as Promise<`0x${string}`>;
|
|
3813
|
+
}
|
|
3814
|
+
|
|
3815
|
+
/**
|
|
3816
|
+
* withdrawPendingBalanceLegacy
|
|
3817
|
+
* nonpayable
|
|
3818
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3819
|
+
*/
|
|
3820
|
+
async withdrawPendingBalanceLegacy(_owner: `0x${string}`, _baseAmount: bigint, options?: {
|
|
3821
|
+
accessList?: import('viem').AccessList;
|
|
3822
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3823
|
+
chain?: import('viem').Chain | null;
|
|
3824
|
+
dataSuffix?: `0x${string}`;
|
|
3825
|
+
gas?: bigint;
|
|
3826
|
+
gasPrice?: bigint;
|
|
3827
|
+
maxFeePerGas?: bigint;
|
|
3828
|
+
maxPriorityFeePerGas?: bigint;
|
|
3829
|
+
nonce?: number;
|
|
3830
|
+
value?: bigint;
|
|
3831
|
+
}): Promise<`0x${string}`> {
|
|
3832
|
+
if (!this.contract.write) {
|
|
3833
|
+
throw new Error('Wallet client is required for write operations');
|
|
3834
|
+
}
|
|
3835
|
+
return this.contract.write.withdrawPendingBalanceLegacy([_owner, _baseAmount] as const, options) as Promise<`0x${string}`>;
|
|
3836
|
+
}
|
|
3837
|
+
|
|
3838
|
+
|
|
3839
|
+
|
|
3840
|
+
/**
|
|
3841
|
+
* Simulate contract write operations (dry-run without sending transaction)
|
|
3842
|
+
*
|
|
3843
|
+
* @example
|
|
3844
|
+
* const result = await contract.simulate.transfer('0x...', 1000n);
|
|
3845
|
+
* console.log('Gas estimate:', result.request.gas);
|
|
3846
|
+
* console.log('Would succeed:', result.result);
|
|
3847
|
+
*/
|
|
3848
|
+
get simulate() {
|
|
3849
|
+
const contract = this.contract;
|
|
3850
|
+
if (!contract.simulate) {
|
|
3851
|
+
throw new Error('Public client is required for simulation');
|
|
3852
|
+
}
|
|
3853
|
+
return {
|
|
3854
|
+
/**
|
|
3855
|
+
* Simulate activateDesertMode
|
|
3856
|
+
* Returns gas estimate and result without sending transaction
|
|
3857
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3858
|
+
*/
|
|
3859
|
+
async activateDesertMode(options?: {
|
|
3860
|
+
accessList?: import('viem').AccessList;
|
|
3861
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3862
|
+
chain?: import('viem').Chain | null;
|
|
3863
|
+
dataSuffix?: `0x${string}`;
|
|
3864
|
+
gas?: bigint;
|
|
3865
|
+
gasPrice?: bigint;
|
|
3866
|
+
maxFeePerGas?: bigint;
|
|
3867
|
+
maxPriorityFeePerGas?: bigint;
|
|
3868
|
+
nonce?: number;
|
|
3869
|
+
value?: bigint;
|
|
3870
|
+
}): Promise<boolean> {
|
|
3871
|
+
return contract.simulate.activateDesertMode(options) as Promise<boolean>;
|
|
3872
|
+
},
|
|
3873
|
+
/**
|
|
3874
|
+
* Simulate burnShares
|
|
3875
|
+
* Returns gas estimate and result without sending transaction
|
|
3876
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3877
|
+
*/
|
|
3878
|
+
async burnShares(_accountIndex: bigint, _publicPoolIndex: bigint, _shareAmount: bigint, options?: {
|
|
3879
|
+
accessList?: import('viem').AccessList;
|
|
3880
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3881
|
+
chain?: import('viem').Chain | null;
|
|
3882
|
+
dataSuffix?: `0x${string}`;
|
|
3883
|
+
gas?: bigint;
|
|
3884
|
+
gasPrice?: bigint;
|
|
3885
|
+
maxFeePerGas?: bigint;
|
|
3886
|
+
maxPriorityFeePerGas?: bigint;
|
|
3887
|
+
nonce?: number;
|
|
3888
|
+
value?: bigint;
|
|
3889
|
+
}): Promise<void> {
|
|
3890
|
+
return contract.simulate.burnShares([_accountIndex, _publicPoolIndex, _shareAmount] as const, options) as Promise<void>;
|
|
3891
|
+
},
|
|
3892
|
+
/**
|
|
3893
|
+
* Simulate cancelAllOrders
|
|
3894
|
+
* Returns gas estimate and result without sending transaction
|
|
3895
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3896
|
+
*/
|
|
3897
|
+
async cancelAllOrders(_accountIndex: bigint, options?: {
|
|
3898
|
+
accessList?: import('viem').AccessList;
|
|
3899
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3900
|
+
chain?: import('viem').Chain | null;
|
|
3901
|
+
dataSuffix?: `0x${string}`;
|
|
3902
|
+
gas?: bigint;
|
|
3903
|
+
gasPrice?: bigint;
|
|
3904
|
+
maxFeePerGas?: bigint;
|
|
3905
|
+
maxPriorityFeePerGas?: bigint;
|
|
3906
|
+
nonce?: number;
|
|
3907
|
+
value?: bigint;
|
|
3908
|
+
}): Promise<void> {
|
|
3909
|
+
return contract.simulate.cancelAllOrders([_accountIndex] as const, options) as Promise<void>;
|
|
3910
|
+
},
|
|
3911
|
+
/**
|
|
3912
|
+
* Simulate cancelOutstandingDepositsForDesertMode
|
|
3913
|
+
* Returns gas estimate and result without sending transaction
|
|
3914
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3915
|
+
*/
|
|
3916
|
+
async cancelOutstandingDepositsForDesertMode(_n: bigint, _priorityPubData: `0x${string}`[], options?: {
|
|
3917
|
+
accessList?: import('viem').AccessList;
|
|
3918
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3919
|
+
chain?: import('viem').Chain | null;
|
|
3920
|
+
dataSuffix?: `0x${string}`;
|
|
3921
|
+
gas?: bigint;
|
|
3922
|
+
gasPrice?: bigint;
|
|
3923
|
+
maxFeePerGas?: bigint;
|
|
3924
|
+
maxPriorityFeePerGas?: bigint;
|
|
3925
|
+
nonce?: number;
|
|
3926
|
+
value?: bigint;
|
|
3927
|
+
}): Promise<void> {
|
|
3928
|
+
return contract.simulate.cancelOutstandingDepositsForDesertMode([_n, _priorityPubData] as const, options) as Promise<void>;
|
|
3929
|
+
},
|
|
3930
|
+
/**
|
|
3931
|
+
* Simulate changePubKey
|
|
3932
|
+
* Returns gas estimate and result without sending transaction
|
|
3933
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3934
|
+
*/
|
|
3935
|
+
async changePubKey(_accountIndex: bigint, _apiKeyIndex: bigint, _pubKey: `0x${string}`, options?: {
|
|
3936
|
+
accessList?: import('viem').AccessList;
|
|
3937
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3938
|
+
chain?: import('viem').Chain | null;
|
|
3939
|
+
dataSuffix?: `0x${string}`;
|
|
3940
|
+
gas?: bigint;
|
|
3941
|
+
gasPrice?: bigint;
|
|
3942
|
+
maxFeePerGas?: bigint;
|
|
3943
|
+
maxPriorityFeePerGas?: bigint;
|
|
3944
|
+
nonce?: number;
|
|
3945
|
+
value?: bigint;
|
|
3946
|
+
}): Promise<void> {
|
|
3947
|
+
return contract.simulate.changePubKey([_accountIndex, _apiKeyIndex, _pubKey] as const, options) as Promise<void>;
|
|
3948
|
+
},
|
|
3949
|
+
/**
|
|
3950
|
+
* Simulate commitBatch
|
|
3951
|
+
* Returns gas estimate and result without sending transaction
|
|
3952
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3953
|
+
*/
|
|
3954
|
+
async commitBatch(newBatchData: IZkLighter_CommitBatchInfo, lastStoredBatch: Storage_StoredBatchInfo, options?: {
|
|
3955
|
+
accessList?: import('viem').AccessList;
|
|
3956
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3957
|
+
chain?: import('viem').Chain | null;
|
|
3958
|
+
dataSuffix?: `0x${string}`;
|
|
3959
|
+
gas?: bigint;
|
|
3960
|
+
gasPrice?: bigint;
|
|
3961
|
+
maxFeePerGas?: bigint;
|
|
3962
|
+
maxPriorityFeePerGas?: bigint;
|
|
3963
|
+
nonce?: number;
|
|
3964
|
+
value?: bigint;
|
|
3965
|
+
}): Promise<void> {
|
|
3966
|
+
return contract.simulate.commitBatch([newBatchData, lastStoredBatch] as const, options) as Promise<void>;
|
|
3967
|
+
},
|
|
3968
|
+
/**
|
|
3969
|
+
* Simulate createMarket
|
|
3970
|
+
* Returns gas estimate and result without sending transaction
|
|
3971
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3972
|
+
*/
|
|
3973
|
+
async createMarket(_size_decimals: bigint, _price_decimals: bigint, _symbol: `0x${string}`, _params: TxTypes_CreateMarket, options?: {
|
|
3974
|
+
accessList?: import('viem').AccessList;
|
|
3975
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3976
|
+
chain?: import('viem').Chain | null;
|
|
3977
|
+
dataSuffix?: `0x${string}`;
|
|
3978
|
+
gas?: bigint;
|
|
3979
|
+
gasPrice?: bigint;
|
|
3980
|
+
maxFeePerGas?: bigint;
|
|
3981
|
+
maxPriorityFeePerGas?: bigint;
|
|
3982
|
+
nonce?: number;
|
|
3983
|
+
value?: bigint;
|
|
3984
|
+
}): Promise<void> {
|
|
3985
|
+
return contract.simulate.createMarket([_size_decimals, _price_decimals, _symbol, _params] as const, options) as Promise<void>;
|
|
3986
|
+
},
|
|
3987
|
+
/**
|
|
3988
|
+
* Simulate createOrder
|
|
3989
|
+
* Returns gas estimate and result without sending transaction
|
|
3990
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
3991
|
+
*/
|
|
3992
|
+
async createOrder(_accountIndex: bigint, _marketIndex: bigint, _baseAmount: bigint, _price: bigint, _isAsk: bigint, _orderType: bigint, options?: {
|
|
3993
|
+
accessList?: import('viem').AccessList;
|
|
3994
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
3995
|
+
chain?: import('viem').Chain | null;
|
|
3996
|
+
dataSuffix?: `0x${string}`;
|
|
3997
|
+
gas?: bigint;
|
|
3998
|
+
gasPrice?: bigint;
|
|
3999
|
+
maxFeePerGas?: bigint;
|
|
4000
|
+
maxPriorityFeePerGas?: bigint;
|
|
4001
|
+
nonce?: number;
|
|
4002
|
+
value?: bigint;
|
|
4003
|
+
}): Promise<void> {
|
|
4004
|
+
return contract.simulate.createOrder([_accountIndex, _marketIndex, _baseAmount, _price, _isAsk, _orderType] as const, options) as Promise<void>;
|
|
4005
|
+
},
|
|
4006
|
+
/**
|
|
4007
|
+
* Simulate deposit
|
|
4008
|
+
* Returns gas estimate and result without sending transaction
|
|
4009
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
4010
|
+
*/
|
|
4011
|
+
async deposit(_to: `0x${string}`, _assetIndex: bigint, _routeType: bigint, _amount: bigint, options?: {
|
|
4012
|
+
accessList?: import('viem').AccessList;
|
|
4013
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
4014
|
+
chain?: import('viem').Chain | null;
|
|
4015
|
+
dataSuffix?: `0x${string}`;
|
|
4016
|
+
gas?: bigint;
|
|
4017
|
+
gasPrice?: bigint;
|
|
4018
|
+
maxFeePerGas?: bigint;
|
|
4019
|
+
maxPriorityFeePerGas?: bigint;
|
|
4020
|
+
nonce?: number;
|
|
4021
|
+
value?: bigint;
|
|
4022
|
+
}): Promise<void> {
|
|
4023
|
+
return contract.simulate.deposit([_to, _assetIndex, _routeType, _amount] as const, options) as Promise<void>;
|
|
4024
|
+
},
|
|
4025
|
+
/**
|
|
4026
|
+
* Simulate depositBatch
|
|
4027
|
+
* Returns gas estimate and result without sending transaction
|
|
4028
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
4029
|
+
*/
|
|
4030
|
+
async depositBatch(_amount: bigint[], _to: `0x${string}`[], _accountIndex: bigint[], options?: {
|
|
4031
|
+
accessList?: import('viem').AccessList;
|
|
4032
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
4033
|
+
chain?: import('viem').Chain | null;
|
|
4034
|
+
dataSuffix?: `0x${string}`;
|
|
4035
|
+
gas?: bigint;
|
|
4036
|
+
gasPrice?: bigint;
|
|
4037
|
+
maxFeePerGas?: bigint;
|
|
4038
|
+
maxPriorityFeePerGas?: bigint;
|
|
4039
|
+
nonce?: number;
|
|
4040
|
+
value?: bigint;
|
|
4041
|
+
}): Promise<void> {
|
|
4042
|
+
return contract.simulate.depositBatch([_amount, _to, _accountIndex] as const, options) as Promise<void>;
|
|
4043
|
+
},
|
|
4044
|
+
/**
|
|
4045
|
+
* Simulate executeBatches
|
|
4046
|
+
* Returns gas estimate and result without sending transaction
|
|
4047
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
4048
|
+
*/
|
|
4049
|
+
async executeBatches(batches: Storage_StoredBatchInfo[], onChainOperationsPubData: `0x${string}`[], options?: {
|
|
4050
|
+
accessList?: import('viem').AccessList;
|
|
4051
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
4052
|
+
chain?: import('viem').Chain | null;
|
|
4053
|
+
dataSuffix?: `0x${string}`;
|
|
4054
|
+
gas?: bigint;
|
|
4055
|
+
gasPrice?: bigint;
|
|
4056
|
+
maxFeePerGas?: bigint;
|
|
4057
|
+
maxPriorityFeePerGas?: bigint;
|
|
4058
|
+
nonce?: number;
|
|
4059
|
+
value?: bigint;
|
|
4060
|
+
}): Promise<void> {
|
|
4061
|
+
return contract.simulate.executeBatches([batches, onChainOperationsPubData] as const, options) as Promise<void>;
|
|
4062
|
+
},
|
|
4063
|
+
/**
|
|
4064
|
+
* Simulate initialize
|
|
4065
|
+
* Returns gas estimate and result without sending transaction
|
|
4066
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
4067
|
+
*/
|
|
4068
|
+
async initialize(initializationParameters: `0x${string}`, options?: {
|
|
4069
|
+
accessList?: import('viem').AccessList;
|
|
4070
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
4071
|
+
chain?: import('viem').Chain | null;
|
|
4072
|
+
dataSuffix?: `0x${string}`;
|
|
4073
|
+
gas?: bigint;
|
|
4074
|
+
gasPrice?: bigint;
|
|
4075
|
+
maxFeePerGas?: bigint;
|
|
4076
|
+
maxPriorityFeePerGas?: bigint;
|
|
4077
|
+
nonce?: number;
|
|
4078
|
+
value?: bigint;
|
|
4079
|
+
}): Promise<void> {
|
|
4080
|
+
return contract.simulate.initialize([initializationParameters] as const, options) as Promise<void>;
|
|
4081
|
+
},
|
|
4082
|
+
/**
|
|
4083
|
+
* Simulate performDesert
|
|
4084
|
+
* Returns gas estimate and result without sending transaction
|
|
4085
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
4086
|
+
*/
|
|
4087
|
+
async performDesert(_accountIndex: bigint, _l1Address: `0x${string}`, _assetIndex: bigint, _totalBaseAmount: bigint, proof: `0x${string}`, options?: {
|
|
4088
|
+
accessList?: import('viem').AccessList;
|
|
4089
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
4090
|
+
chain?: import('viem').Chain | null;
|
|
4091
|
+
dataSuffix?: `0x${string}`;
|
|
4092
|
+
gas?: bigint;
|
|
4093
|
+
gasPrice?: bigint;
|
|
4094
|
+
maxFeePerGas?: bigint;
|
|
4095
|
+
maxPriorityFeePerGas?: bigint;
|
|
4096
|
+
nonce?: number;
|
|
4097
|
+
value?: bigint;
|
|
4098
|
+
}): Promise<void> {
|
|
4099
|
+
return contract.simulate.performDesert([_accountIndex, _l1Address, _assetIndex, _totalBaseAmount, proof] as const, options) as Promise<void>;
|
|
4100
|
+
},
|
|
4101
|
+
/**
|
|
4102
|
+
* Simulate registerAsset
|
|
4103
|
+
* Returns gas estimate and result without sending transaction
|
|
4104
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
4105
|
+
*/
|
|
4106
|
+
async registerAsset(_l1Decimals: bigint, _l2Decimals: bigint, _priceDecimals: bigint, _symbol: `0x${string}`, _params: TxTypes_RegisterAsset, options?: {
|
|
4107
|
+
accessList?: import('viem').AccessList;
|
|
4108
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
4109
|
+
chain?: import('viem').Chain | null;
|
|
4110
|
+
dataSuffix?: `0x${string}`;
|
|
4111
|
+
gas?: bigint;
|
|
4112
|
+
gasPrice?: bigint;
|
|
4113
|
+
maxFeePerGas?: bigint;
|
|
4114
|
+
maxPriorityFeePerGas?: bigint;
|
|
4115
|
+
nonce?: number;
|
|
4116
|
+
value?: bigint;
|
|
4117
|
+
}): Promise<void> {
|
|
4118
|
+
return contract.simulate.registerAsset([_l1Decimals, _l2Decimals, _priceDecimals, _symbol, _params] as const, options) as Promise<void>;
|
|
4119
|
+
},
|
|
4120
|
+
/**
|
|
4121
|
+
* Simulate registerAssetConfig
|
|
4122
|
+
* Returns gas estimate and result without sending transaction
|
|
4123
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
4124
|
+
*/
|
|
4125
|
+
async registerAssetConfig(assetIndex: bigint, tokenAddress: `0x${string}`, withdrawalsEnabled: bigint, extensionMultiplier: bigint, tickSize: bigint, depositCapTicks: bigint, minDepositTicks: bigint, options?: {
|
|
4126
|
+
accessList?: import('viem').AccessList;
|
|
4127
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
4128
|
+
chain?: import('viem').Chain | null;
|
|
4129
|
+
dataSuffix?: `0x${string}`;
|
|
4130
|
+
gas?: bigint;
|
|
4131
|
+
gasPrice?: bigint;
|
|
4132
|
+
maxFeePerGas?: bigint;
|
|
4133
|
+
maxPriorityFeePerGas?: bigint;
|
|
4134
|
+
nonce?: number;
|
|
4135
|
+
value?: bigint;
|
|
4136
|
+
}): Promise<void> {
|
|
4137
|
+
return contract.simulate.registerAssetConfig([assetIndex, tokenAddress, withdrawalsEnabled, extensionMultiplier, tickSize, depositCapTicks, minDepositTicks] as const, options) as Promise<void>;
|
|
4138
|
+
},
|
|
4139
|
+
/**
|
|
4140
|
+
* Simulate revertBatches
|
|
4141
|
+
* Returns gas estimate and result without sending transaction
|
|
4142
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
4143
|
+
*/
|
|
4144
|
+
async revertBatches(_batchesToRevert: Storage_StoredBatchInfo[], _remainingBatch: Storage_StoredBatchInfo, options?: {
|
|
4145
|
+
accessList?: import('viem').AccessList;
|
|
4146
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
4147
|
+
chain?: import('viem').Chain | null;
|
|
4148
|
+
dataSuffix?: `0x${string}`;
|
|
4149
|
+
gas?: bigint;
|
|
4150
|
+
gasPrice?: bigint;
|
|
4151
|
+
maxFeePerGas?: bigint;
|
|
4152
|
+
maxPriorityFeePerGas?: bigint;
|
|
4153
|
+
nonce?: number;
|
|
4154
|
+
value?: bigint;
|
|
4155
|
+
}): Promise<void> {
|
|
4156
|
+
return contract.simulate.revertBatches([_batchesToRevert, _remainingBatch] as const, options) as Promise<void>;
|
|
4157
|
+
},
|
|
4158
|
+
/**
|
|
4159
|
+
* Simulate setInsuranceFundOperator
|
|
4160
|
+
* Returns gas estimate and result without sending transaction
|
|
4161
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
4162
|
+
*/
|
|
4163
|
+
async setInsuranceFundOperator(_newInsuranceFundOperator: `0x${string}`, options?: {
|
|
4164
|
+
accessList?: import('viem').AccessList;
|
|
4165
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
4166
|
+
chain?: import('viem').Chain | null;
|
|
4167
|
+
dataSuffix?: `0x${string}`;
|
|
4168
|
+
gas?: bigint;
|
|
4169
|
+
gasPrice?: bigint;
|
|
4170
|
+
maxFeePerGas?: bigint;
|
|
4171
|
+
maxPriorityFeePerGas?: bigint;
|
|
4172
|
+
nonce?: number;
|
|
4173
|
+
value?: bigint;
|
|
4174
|
+
}): Promise<void> {
|
|
4175
|
+
return contract.simulate.setInsuranceFundOperator([_newInsuranceFundOperator] as const, options) as Promise<void>;
|
|
4176
|
+
},
|
|
4177
|
+
/**
|
|
4178
|
+
* Simulate setSystemConfig
|
|
4179
|
+
* Returns gas estimate and result without sending transaction
|
|
4180
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
4181
|
+
*/
|
|
4182
|
+
async setSystemConfig(_params: TxTypes_SetSystemConfig, options?: {
|
|
4183
|
+
accessList?: import('viem').AccessList;
|
|
4184
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
4185
|
+
chain?: import('viem').Chain | null;
|
|
4186
|
+
dataSuffix?: `0x${string}`;
|
|
4187
|
+
gas?: bigint;
|
|
4188
|
+
gasPrice?: bigint;
|
|
4189
|
+
maxFeePerGas?: bigint;
|
|
4190
|
+
maxPriorityFeePerGas?: bigint;
|
|
4191
|
+
nonce?: number;
|
|
4192
|
+
value?: bigint;
|
|
4193
|
+
}): Promise<void> {
|
|
4194
|
+
return contract.simulate.setSystemConfig([_params] as const, options) as Promise<void>;
|
|
4195
|
+
},
|
|
4196
|
+
/**
|
|
4197
|
+
* Simulate setTreasury
|
|
4198
|
+
* Returns gas estimate and result without sending transaction
|
|
4199
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
4200
|
+
*/
|
|
4201
|
+
async setTreasury(_newTreasury: `0x${string}`, options?: {
|
|
4202
|
+
accessList?: import('viem').AccessList;
|
|
4203
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
4204
|
+
chain?: import('viem').Chain | null;
|
|
4205
|
+
dataSuffix?: `0x${string}`;
|
|
4206
|
+
gas?: bigint;
|
|
4207
|
+
gasPrice?: bigint;
|
|
4208
|
+
maxFeePerGas?: bigint;
|
|
4209
|
+
maxPriorityFeePerGas?: bigint;
|
|
4210
|
+
nonce?: number;
|
|
4211
|
+
value?: bigint;
|
|
4212
|
+
}): Promise<void> {
|
|
4213
|
+
return contract.simulate.setTreasury([_newTreasury] as const, options) as Promise<void>;
|
|
4214
|
+
},
|
|
4215
|
+
/**
|
|
4216
|
+
* Simulate transferERC20
|
|
4217
|
+
* Returns gas estimate and result without sending transaction
|
|
4218
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
4219
|
+
*/
|
|
4220
|
+
async transferERC20(_token: `0x${string}`, _to: `0x${string}`, _amount: bigint, _maxAmount: bigint, options?: {
|
|
4221
|
+
accessList?: import('viem').AccessList;
|
|
4222
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
4223
|
+
chain?: import('viem').Chain | null;
|
|
4224
|
+
dataSuffix?: `0x${string}`;
|
|
4225
|
+
gas?: bigint;
|
|
4226
|
+
gasPrice?: bigint;
|
|
4227
|
+
maxFeePerGas?: bigint;
|
|
4228
|
+
maxPriorityFeePerGas?: bigint;
|
|
4229
|
+
nonce?: number;
|
|
4230
|
+
value?: bigint;
|
|
4231
|
+
}): Promise<bigint> {
|
|
4232
|
+
return contract.simulate.transferERC20([_token, _to, _amount, _maxAmount] as const, options) as Promise<bigint>;
|
|
4233
|
+
},
|
|
4234
|
+
/**
|
|
4235
|
+
* Simulate transferETH
|
|
4236
|
+
* Returns gas estimate and result without sending transaction
|
|
4237
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
4238
|
+
*/
|
|
4239
|
+
async transferETH(_to: `0x${string}`, _amount: bigint, options?: {
|
|
4240
|
+
accessList?: import('viem').AccessList;
|
|
4241
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
4242
|
+
chain?: import('viem').Chain | null;
|
|
4243
|
+
dataSuffix?: `0x${string}`;
|
|
4244
|
+
gas?: bigint;
|
|
4245
|
+
gasPrice?: bigint;
|
|
4246
|
+
maxFeePerGas?: bigint;
|
|
4247
|
+
maxPriorityFeePerGas?: bigint;
|
|
4248
|
+
nonce?: number;
|
|
4249
|
+
value?: bigint;
|
|
4250
|
+
}): Promise<bigint> {
|
|
4251
|
+
return contract.simulate.transferETH([_to, _amount] as const, options) as Promise<bigint>;
|
|
4252
|
+
},
|
|
4253
|
+
/**
|
|
4254
|
+
* Simulate updateAsset
|
|
4255
|
+
* Returns gas estimate and result without sending transaction
|
|
4256
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
4257
|
+
*/
|
|
4258
|
+
async updateAsset(_params: TxTypes_UpdateAsset, options?: {
|
|
4259
|
+
accessList?: import('viem').AccessList;
|
|
4260
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
4261
|
+
chain?: import('viem').Chain | null;
|
|
4262
|
+
dataSuffix?: `0x${string}`;
|
|
4263
|
+
gas?: bigint;
|
|
4264
|
+
gasPrice?: bigint;
|
|
4265
|
+
maxFeePerGas?: bigint;
|
|
4266
|
+
maxPriorityFeePerGas?: bigint;
|
|
4267
|
+
nonce?: number;
|
|
4268
|
+
value?: bigint;
|
|
4269
|
+
}): Promise<void> {
|
|
4270
|
+
return contract.simulate.updateAsset([_params] as const, options) as Promise<void>;
|
|
4271
|
+
},
|
|
4272
|
+
/**
|
|
4273
|
+
* Simulate updateAssetConfig
|
|
4274
|
+
* Returns gas estimate and result without sending transaction
|
|
4275
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
4276
|
+
*/
|
|
4277
|
+
async updateAssetConfig(assetIndex: bigint, withdrawalsEnabled: bigint, depositCapTicks: bigint, minDepositTicks: bigint, options?: {
|
|
4278
|
+
accessList?: import('viem').AccessList;
|
|
4279
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
4280
|
+
chain?: import('viem').Chain | null;
|
|
4281
|
+
dataSuffix?: `0x${string}`;
|
|
4282
|
+
gas?: bigint;
|
|
4283
|
+
gasPrice?: bigint;
|
|
4284
|
+
maxFeePerGas?: bigint;
|
|
4285
|
+
maxPriorityFeePerGas?: bigint;
|
|
4286
|
+
nonce?: number;
|
|
4287
|
+
value?: bigint;
|
|
4288
|
+
}): Promise<void> {
|
|
4289
|
+
return contract.simulate.updateAssetConfig([assetIndex, withdrawalsEnabled, depositCapTicks, minDepositTicks] as const, options) as Promise<void>;
|
|
4290
|
+
},
|
|
4291
|
+
/**
|
|
4292
|
+
* Simulate updateMarket
|
|
4293
|
+
* Returns gas estimate and result without sending transaction
|
|
4294
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
4295
|
+
*/
|
|
4296
|
+
async updateMarket(_params: TxTypes_UpdateMarket, options?: {
|
|
4297
|
+
accessList?: import('viem').AccessList;
|
|
4298
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
4299
|
+
chain?: import('viem').Chain | null;
|
|
4300
|
+
dataSuffix?: `0x${string}`;
|
|
4301
|
+
gas?: bigint;
|
|
4302
|
+
gasPrice?: bigint;
|
|
4303
|
+
maxFeePerGas?: bigint;
|
|
4304
|
+
maxPriorityFeePerGas?: bigint;
|
|
4305
|
+
nonce?: number;
|
|
4306
|
+
value?: bigint;
|
|
4307
|
+
}): Promise<void> {
|
|
4308
|
+
return contract.simulate.updateMarket([_params] as const, options) as Promise<void>;
|
|
4309
|
+
},
|
|
4310
|
+
/**
|
|
4311
|
+
* Simulate updateStateRoot
|
|
4312
|
+
* Returns gas estimate and result without sending transaction
|
|
4313
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
4314
|
+
*/
|
|
4315
|
+
async updateStateRoot(_lastStoredBatch: Storage_StoredBatchInfo, _stateRoot: `0x${string}`, _validiumRoot: `0x${string}`, proof: `0x${string}`, options?: {
|
|
4316
|
+
accessList?: import('viem').AccessList;
|
|
4317
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
4318
|
+
chain?: import('viem').Chain | null;
|
|
4319
|
+
dataSuffix?: `0x${string}`;
|
|
4320
|
+
gas?: bigint;
|
|
4321
|
+
gasPrice?: bigint;
|
|
4322
|
+
maxFeePerGas?: bigint;
|
|
4323
|
+
maxPriorityFeePerGas?: bigint;
|
|
4324
|
+
nonce?: number;
|
|
4325
|
+
value?: bigint;
|
|
4326
|
+
}): Promise<void> {
|
|
4327
|
+
return contract.simulate.updateStateRoot([_lastStoredBatch, _stateRoot, _validiumRoot, proof] as const, options) as Promise<void>;
|
|
4328
|
+
},
|
|
4329
|
+
/**
|
|
4330
|
+
* Simulate upgrade
|
|
4331
|
+
* Returns gas estimate and result without sending transaction
|
|
4332
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
4333
|
+
*/
|
|
4334
|
+
async upgrade(upgradeParameters: `0x${string}`, options?: {
|
|
4335
|
+
accessList?: import('viem').AccessList;
|
|
4336
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
4337
|
+
chain?: import('viem').Chain | null;
|
|
4338
|
+
dataSuffix?: `0x${string}`;
|
|
4339
|
+
gas?: bigint;
|
|
4340
|
+
gasPrice?: bigint;
|
|
4341
|
+
maxFeePerGas?: bigint;
|
|
4342
|
+
maxPriorityFeePerGas?: bigint;
|
|
4343
|
+
nonce?: number;
|
|
4344
|
+
value?: bigint;
|
|
4345
|
+
}): Promise<void> {
|
|
4346
|
+
return contract.simulate.upgrade([upgradeParameters] as const, options) as Promise<void>;
|
|
4347
|
+
},
|
|
4348
|
+
/**
|
|
4349
|
+
* Simulate verifyBatch
|
|
4350
|
+
* Returns gas estimate and result without sending transaction
|
|
4351
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
4352
|
+
*/
|
|
4353
|
+
async verifyBatch(batch: Storage_StoredBatchInfo, proof: `0x${string}`, options?: {
|
|
4354
|
+
accessList?: import('viem').AccessList;
|
|
4355
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
4356
|
+
chain?: import('viem').Chain | null;
|
|
4357
|
+
dataSuffix?: `0x${string}`;
|
|
4358
|
+
gas?: bigint;
|
|
4359
|
+
gasPrice?: bigint;
|
|
4360
|
+
maxFeePerGas?: bigint;
|
|
4361
|
+
maxPriorityFeePerGas?: bigint;
|
|
4362
|
+
nonce?: number;
|
|
4363
|
+
value?: bigint;
|
|
4364
|
+
}): Promise<void> {
|
|
4365
|
+
return contract.simulate.verifyBatch([batch, proof] as const, options) as Promise<void>;
|
|
4366
|
+
},
|
|
4367
|
+
/**
|
|
4368
|
+
* Simulate withdraw
|
|
4369
|
+
* Returns gas estimate and result without sending transaction
|
|
4370
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
4371
|
+
*/
|
|
4372
|
+
async withdraw(_accountIndex: bigint, _assetIndex: bigint, _routeType: bigint, _baseAmount: bigint, options?: {
|
|
4373
|
+
accessList?: import('viem').AccessList;
|
|
4374
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
4375
|
+
chain?: import('viem').Chain | null;
|
|
4376
|
+
dataSuffix?: `0x${string}`;
|
|
4377
|
+
gas?: bigint;
|
|
4378
|
+
gasPrice?: bigint;
|
|
4379
|
+
maxFeePerGas?: bigint;
|
|
4380
|
+
maxPriorityFeePerGas?: bigint;
|
|
4381
|
+
nonce?: number;
|
|
4382
|
+
value?: bigint;
|
|
4383
|
+
}): Promise<void> {
|
|
4384
|
+
return contract.simulate.withdraw([_accountIndex, _assetIndex, _routeType, _baseAmount] as const, options) as Promise<void>;
|
|
4385
|
+
},
|
|
4386
|
+
/**
|
|
4387
|
+
* Simulate withdrawPendingBalance
|
|
4388
|
+
* Returns gas estimate and result without sending transaction
|
|
4389
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
4390
|
+
*/
|
|
4391
|
+
async withdrawPendingBalance(_owner: `0x${string}`, _assetIndex: bigint, _baseAmount: bigint, options?: {
|
|
4392
|
+
accessList?: import('viem').AccessList;
|
|
4393
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
4394
|
+
chain?: import('viem').Chain | null;
|
|
4395
|
+
dataSuffix?: `0x${string}`;
|
|
4396
|
+
gas?: bigint;
|
|
4397
|
+
gasPrice?: bigint;
|
|
4398
|
+
maxFeePerGas?: bigint;
|
|
4399
|
+
maxPriorityFeePerGas?: bigint;
|
|
4400
|
+
nonce?: number;
|
|
4401
|
+
value?: bigint;
|
|
4402
|
+
}): Promise<void> {
|
|
4403
|
+
return contract.simulate.withdrawPendingBalance([_owner, _assetIndex, _baseAmount] as const, options) as Promise<void>;
|
|
4404
|
+
},
|
|
4405
|
+
/**
|
|
4406
|
+
* Simulate withdrawPendingBalanceLegacy
|
|
4407
|
+
* Returns gas estimate and result without sending transaction
|
|
4408
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
4409
|
+
*/
|
|
4410
|
+
async withdrawPendingBalanceLegacy(_owner: `0x${string}`, _baseAmount: bigint, options?: {
|
|
4411
|
+
accessList?: import('viem').AccessList;
|
|
4412
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
4413
|
+
chain?: import('viem').Chain | null;
|
|
4414
|
+
dataSuffix?: `0x${string}`;
|
|
4415
|
+
gas?: bigint;
|
|
4416
|
+
gasPrice?: bigint;
|
|
4417
|
+
maxFeePerGas?: bigint;
|
|
4418
|
+
maxPriorityFeePerGas?: bigint;
|
|
4419
|
+
nonce?: number;
|
|
4420
|
+
value?: bigint;
|
|
4421
|
+
}): Promise<void> {
|
|
4422
|
+
return contract.simulate.withdrawPendingBalanceLegacy([_owner, _baseAmount] as const, options) as Promise<void>;
|
|
4423
|
+
}
|
|
4424
|
+
};
|
|
4425
|
+
}
|
|
4426
|
+
|
|
4427
|
+
/**
|
|
4428
|
+
* Watch contract events
|
|
4429
|
+
*
|
|
4430
|
+
* @example
|
|
4431
|
+
* // Watch all Transfer events
|
|
4432
|
+
* const unwatch = contract.watch.Transfer((event) => {
|
|
4433
|
+
* console.log('Transfer:', event);
|
|
4434
|
+
* });
|
|
4435
|
+
*
|
|
4436
|
+
* // Stop watching
|
|
4437
|
+
* unwatch();
|
|
4438
|
+
*/
|
|
4439
|
+
get watch() {
|
|
4440
|
+
return {
|
|
4441
|
+
/**
|
|
4442
|
+
* Watch BatchCommit events
|
|
4443
|
+
* @param callback Function to call when event is emitted
|
|
4444
|
+
* @param filter Optional filter for indexed parameters
|
|
4445
|
+
* @returns Unwatch function to stop listening
|
|
4446
|
+
*/
|
|
4447
|
+
BatchCommit: (callback: (event: { batchNumber: bigint; batchSize: bigint; endBlockNumber: bigint }) => void) => {
|
|
4448
|
+
return this.publicClient.watchContractEvent({
|
|
4449
|
+
address: this.contractAddress,
|
|
4450
|
+
abi: ZkLighter_jsonAbi,
|
|
4451
|
+
eventName: 'BatchCommit',
|
|
4452
|
+
|
|
4453
|
+
onLogs: (logs: any[]) => {
|
|
4454
|
+
logs.forEach((log: any) => {
|
|
4455
|
+
callback(log.args as any);
|
|
4456
|
+
});
|
|
4457
|
+
},
|
|
4458
|
+
}) as () => void;
|
|
4459
|
+
},
|
|
4460
|
+
/**
|
|
4461
|
+
* Watch BatchVerification events
|
|
4462
|
+
* @param callback Function to call when event is emitted
|
|
4463
|
+
* @param filter Optional filter for indexed parameters
|
|
4464
|
+
* @returns Unwatch function to stop listening
|
|
4465
|
+
*/
|
|
4466
|
+
BatchVerification: (callback: (event: { batchNumber: bigint; batchSize: bigint; endBlockNumber: bigint }) => void) => {
|
|
4467
|
+
return this.publicClient.watchContractEvent({
|
|
4468
|
+
address: this.contractAddress,
|
|
4469
|
+
abi: ZkLighter_jsonAbi,
|
|
4470
|
+
eventName: 'BatchVerification',
|
|
4471
|
+
|
|
4472
|
+
onLogs: (logs: any[]) => {
|
|
4473
|
+
logs.forEach((log: any) => {
|
|
4474
|
+
callback(log.args as any);
|
|
4475
|
+
});
|
|
4476
|
+
},
|
|
4477
|
+
}) as () => void;
|
|
4478
|
+
},
|
|
4479
|
+
/**
|
|
4480
|
+
* Watch BatchesExecuted events
|
|
4481
|
+
* @param callback Function to call when event is emitted
|
|
4482
|
+
* @param filter Optional filter for indexed parameters
|
|
4483
|
+
* @returns Unwatch function to stop listening
|
|
4484
|
+
*/
|
|
4485
|
+
BatchesExecuted: (callback: (event: { batchNumber: bigint; endBlockNumber: bigint }) => void) => {
|
|
4486
|
+
return this.publicClient.watchContractEvent({
|
|
4487
|
+
address: this.contractAddress,
|
|
4488
|
+
abi: ZkLighter_jsonAbi,
|
|
4489
|
+
eventName: 'BatchesExecuted',
|
|
4490
|
+
|
|
4491
|
+
onLogs: (logs: any[]) => {
|
|
4492
|
+
logs.forEach((log: any) => {
|
|
4493
|
+
callback(log.args as any);
|
|
4494
|
+
});
|
|
4495
|
+
},
|
|
4496
|
+
}) as () => void;
|
|
4497
|
+
},
|
|
4498
|
+
/**
|
|
4499
|
+
* Watch BatchesRevert events
|
|
4500
|
+
* @param callback Function to call when event is emitted
|
|
4501
|
+
* @param filter Optional filter for indexed parameters
|
|
4502
|
+
* @returns Unwatch function to stop listening
|
|
4503
|
+
*/
|
|
4504
|
+
BatchesRevert: (callback: (event: { newTotalBlocksCommitted: bigint }) => void) => {
|
|
4505
|
+
return this.publicClient.watchContractEvent({
|
|
4506
|
+
address: this.contractAddress,
|
|
4507
|
+
abi: ZkLighter_jsonAbi,
|
|
4508
|
+
eventName: 'BatchesRevert',
|
|
4509
|
+
|
|
4510
|
+
onLogs: (logs: any[]) => {
|
|
4511
|
+
logs.forEach((log: any) => {
|
|
4512
|
+
callback(log.args as any);
|
|
4513
|
+
});
|
|
4514
|
+
},
|
|
4515
|
+
}) as () => void;
|
|
4516
|
+
},
|
|
4517
|
+
/**
|
|
4518
|
+
* Watch CreateMarket events
|
|
4519
|
+
* @param callback Function to call when event is emitted
|
|
4520
|
+
* @param filter Optional filter for indexed parameters
|
|
4521
|
+
* @returns Unwatch function to stop listening
|
|
4522
|
+
*/
|
|
4523
|
+
CreateMarket: (callback: (event: { params: TxTypes_CreateMarket; sizeDecimals: bigint; priceDecimals: bigint; symbol: `0x${string}` }) => void) => {
|
|
4524
|
+
return this.publicClient.watchContractEvent({
|
|
4525
|
+
address: this.contractAddress,
|
|
4526
|
+
abi: ZkLighter_jsonAbi,
|
|
4527
|
+
eventName: 'CreateMarket',
|
|
4528
|
+
|
|
4529
|
+
onLogs: (logs: any[]) => {
|
|
4530
|
+
logs.forEach((log: any) => {
|
|
4531
|
+
callback(log.args as any);
|
|
4532
|
+
});
|
|
4533
|
+
},
|
|
4534
|
+
}) as () => void;
|
|
4535
|
+
},
|
|
4536
|
+
/**
|
|
4537
|
+
* Watch Deposit events
|
|
4538
|
+
* @param callback Function to call when event is emitted
|
|
4539
|
+
* @param filter Optional filter for indexed parameters
|
|
4540
|
+
* @returns Unwatch function to stop listening
|
|
4541
|
+
*/
|
|
4542
|
+
Deposit: (callback: (event: { toAccountIndex: bigint; toAddress: `0x${string}`; assetIndex: bigint; routeType: bigint; baseAmount: bigint }) => void) => {
|
|
4543
|
+
return this.publicClient.watchContractEvent({
|
|
4544
|
+
address: this.contractAddress,
|
|
4545
|
+
abi: ZkLighter_jsonAbi,
|
|
4546
|
+
eventName: 'Deposit',
|
|
4547
|
+
|
|
4548
|
+
onLogs: (logs: any[]) => {
|
|
4549
|
+
logs.forEach((log: any) => {
|
|
4550
|
+
callback(log.args as any);
|
|
4551
|
+
});
|
|
4552
|
+
},
|
|
4553
|
+
}) as () => void;
|
|
4554
|
+
},
|
|
4555
|
+
/**
|
|
4556
|
+
* Watch DesertMode events
|
|
4557
|
+
* @param callback Function to call when event is emitted
|
|
4558
|
+
* @param filter Optional filter for indexed parameters
|
|
4559
|
+
* @returns Unwatch function to stop listening
|
|
4560
|
+
*/
|
|
4561
|
+
DesertMode: (callback: (event: { }) => void) => {
|
|
4562
|
+
return this.publicClient.watchContractEvent({
|
|
4563
|
+
address: this.contractAddress,
|
|
4564
|
+
abi: ZkLighter_jsonAbi,
|
|
4565
|
+
eventName: 'DesertMode',
|
|
4566
|
+
|
|
4567
|
+
onLogs: (logs: any[]) => {
|
|
4568
|
+
logs.forEach((log: any) => {
|
|
4569
|
+
callback(log.args as any);
|
|
4570
|
+
});
|
|
4571
|
+
},
|
|
4572
|
+
}) as () => void;
|
|
4573
|
+
},
|
|
4574
|
+
/**
|
|
4575
|
+
* Watch Initialized events
|
|
4576
|
+
* @param callback Function to call when event is emitted
|
|
4577
|
+
* @param filter Optional filter for indexed parameters
|
|
4578
|
+
* @returns Unwatch function to stop listening
|
|
4579
|
+
*/
|
|
4580
|
+
Initialized: (callback: (event: { version: bigint }) => void) => {
|
|
4581
|
+
return this.publicClient.watchContractEvent({
|
|
4582
|
+
address: this.contractAddress,
|
|
4583
|
+
abi: ZkLighter_jsonAbi,
|
|
4584
|
+
eventName: 'Initialized',
|
|
4585
|
+
|
|
4586
|
+
onLogs: (logs: any[]) => {
|
|
4587
|
+
logs.forEach((log: any) => {
|
|
4588
|
+
callback(log.args as any);
|
|
4589
|
+
});
|
|
4590
|
+
},
|
|
4591
|
+
}) as () => void;
|
|
4592
|
+
},
|
|
4593
|
+
/**
|
|
4594
|
+
* Watch InsuranceFundOperatorUpdate events
|
|
4595
|
+
* @param callback Function to call when event is emitted
|
|
4596
|
+
* @param filter Optional filter for indexed parameters
|
|
4597
|
+
* @returns Unwatch function to stop listening
|
|
4598
|
+
*/
|
|
4599
|
+
InsuranceFundOperatorUpdate: (callback: (event: { newInsuranceFundOperator: `0x${string}` }) => void) => {
|
|
4600
|
+
return this.publicClient.watchContractEvent({
|
|
4601
|
+
address: this.contractAddress,
|
|
4602
|
+
abi: ZkLighter_jsonAbi,
|
|
4603
|
+
eventName: 'InsuranceFundOperatorUpdate',
|
|
4604
|
+
|
|
4605
|
+
onLogs: (logs: any[]) => {
|
|
4606
|
+
logs.forEach((log: any) => {
|
|
4607
|
+
callback(log.args as any);
|
|
4608
|
+
});
|
|
4609
|
+
},
|
|
4610
|
+
}) as () => void;
|
|
4611
|
+
},
|
|
4612
|
+
/**
|
|
4613
|
+
* Watch NewPriorityRequest events
|
|
4614
|
+
* @param callback Function to call when event is emitted
|
|
4615
|
+
* @param filter Optional filter for indexed parameters
|
|
4616
|
+
* @returns Unwatch function to stop listening
|
|
4617
|
+
*/
|
|
4618
|
+
NewPriorityRequest: (callback: (event: { sender: `0x${string}`; serialId: bigint; pubdataType: bigint; pubData: `0x${string}`; expirationTimestamp: bigint }) => void) => {
|
|
4619
|
+
return this.publicClient.watchContractEvent({
|
|
4620
|
+
address: this.contractAddress,
|
|
4621
|
+
abi: ZkLighter_jsonAbi,
|
|
4622
|
+
eventName: 'NewPriorityRequest',
|
|
4623
|
+
|
|
4624
|
+
onLogs: (logs: any[]) => {
|
|
4625
|
+
logs.forEach((log: any) => {
|
|
4626
|
+
callback(log.args as any);
|
|
4627
|
+
});
|
|
4628
|
+
},
|
|
4629
|
+
}) as () => void;
|
|
4630
|
+
},
|
|
4631
|
+
/**
|
|
4632
|
+
* Watch RegisterAssetConfig events
|
|
4633
|
+
* @param callback Function to call when event is emitted
|
|
4634
|
+
* @param filter Optional filter for indexed parameters
|
|
4635
|
+
* @returns Unwatch function to stop listening
|
|
4636
|
+
*/
|
|
4637
|
+
RegisterAssetConfig: (callback: (event: { assetIndex: bigint; tokenAddress: `0x${string}`; withdrawalsEnabled: bigint; extensionMultiplier: bigint; tickSize: bigint; depositCapTicks: bigint; minDepositTicks: bigint }) => void) => {
|
|
4638
|
+
return this.publicClient.watchContractEvent({
|
|
4639
|
+
address: this.contractAddress,
|
|
4640
|
+
abi: ZkLighter_jsonAbi,
|
|
4641
|
+
eventName: 'RegisterAssetConfig',
|
|
4642
|
+
|
|
4643
|
+
onLogs: (logs: any[]) => {
|
|
4644
|
+
logs.forEach((log: any) => {
|
|
4645
|
+
callback(log.args as any);
|
|
4646
|
+
});
|
|
4647
|
+
},
|
|
4648
|
+
}) as () => void;
|
|
4649
|
+
},
|
|
4650
|
+
/**
|
|
4651
|
+
* Watch StateRootUpdate events
|
|
4652
|
+
* @param callback Function to call when event is emitted
|
|
4653
|
+
* @param filter Optional filter for indexed parameters
|
|
4654
|
+
* @returns Unwatch function to stop listening
|
|
4655
|
+
*/
|
|
4656
|
+
StateRootUpdate: (callback: (event: { batchNumber: bigint; oldStateRoot: `0x${string}`; newStateRoot: `0x${string}` }) => void) => {
|
|
4657
|
+
return this.publicClient.watchContractEvent({
|
|
4658
|
+
address: this.contractAddress,
|
|
4659
|
+
abi: ZkLighter_jsonAbi,
|
|
4660
|
+
eventName: 'StateRootUpdate',
|
|
4661
|
+
|
|
4662
|
+
onLogs: (logs: any[]) => {
|
|
4663
|
+
logs.forEach((log: any) => {
|
|
4664
|
+
callback(log.args as any);
|
|
4665
|
+
});
|
|
4666
|
+
},
|
|
4667
|
+
}) as () => void;
|
|
4668
|
+
},
|
|
4669
|
+
/**
|
|
4670
|
+
* Watch TreasuryUpdate events
|
|
4671
|
+
* @param callback Function to call when event is emitted
|
|
4672
|
+
* @param filter Optional filter for indexed parameters
|
|
4673
|
+
* @returns Unwatch function to stop listening
|
|
4674
|
+
*/
|
|
4675
|
+
TreasuryUpdate: (callback: (event: { newTreasury: `0x${string}` }) => void) => {
|
|
4676
|
+
return this.publicClient.watchContractEvent({
|
|
4677
|
+
address: this.contractAddress,
|
|
4678
|
+
abi: ZkLighter_jsonAbi,
|
|
4679
|
+
eventName: 'TreasuryUpdate',
|
|
4680
|
+
|
|
4681
|
+
onLogs: (logs: any[]) => {
|
|
4682
|
+
logs.forEach((log: any) => {
|
|
4683
|
+
callback(log.args as any);
|
|
4684
|
+
});
|
|
4685
|
+
},
|
|
4686
|
+
}) as () => void;
|
|
4687
|
+
},
|
|
4688
|
+
/**
|
|
4689
|
+
* Watch UpdateAssetConfig events
|
|
4690
|
+
* @param callback Function to call when event is emitted
|
|
4691
|
+
* @param filter Optional filter for indexed parameters
|
|
4692
|
+
* @returns Unwatch function to stop listening
|
|
4693
|
+
*/
|
|
4694
|
+
UpdateAssetConfig: (callback: (event: { assetIndex: bigint; withdrawalsEnabled: bigint; depositCapTicks: bigint; minDepositTicks: bigint }) => void) => {
|
|
4695
|
+
return this.publicClient.watchContractEvent({
|
|
4696
|
+
address: this.contractAddress,
|
|
4697
|
+
abi: ZkLighter_jsonAbi,
|
|
4698
|
+
eventName: 'UpdateAssetConfig',
|
|
4699
|
+
|
|
4700
|
+
onLogs: (logs: any[]) => {
|
|
4701
|
+
logs.forEach((log: any) => {
|
|
4702
|
+
callback(log.args as any);
|
|
4703
|
+
});
|
|
4704
|
+
},
|
|
4705
|
+
}) as () => void;
|
|
4706
|
+
},
|
|
4707
|
+
/**
|
|
4708
|
+
* Watch UpdateMarket events
|
|
4709
|
+
* @param callback Function to call when event is emitted
|
|
4710
|
+
* @param filter Optional filter for indexed parameters
|
|
4711
|
+
* @returns Unwatch function to stop listening
|
|
4712
|
+
*/
|
|
4713
|
+
UpdateMarket: (callback: (event: { params: TxTypes_UpdateMarket }) => void) => {
|
|
4714
|
+
return this.publicClient.watchContractEvent({
|
|
4715
|
+
address: this.contractAddress,
|
|
4716
|
+
abi: ZkLighter_jsonAbi,
|
|
4717
|
+
eventName: 'UpdateMarket',
|
|
4718
|
+
|
|
4719
|
+
onLogs: (logs: any[]) => {
|
|
4720
|
+
logs.forEach((log: any) => {
|
|
4721
|
+
callback(log.args as any);
|
|
4722
|
+
});
|
|
4723
|
+
},
|
|
4724
|
+
}) as () => void;
|
|
4725
|
+
},
|
|
4726
|
+
/**
|
|
4727
|
+
* Watch WithdrawPending events
|
|
4728
|
+
* @param callback Function to call when event is emitted
|
|
4729
|
+
* @param filter Optional filter for indexed parameters
|
|
4730
|
+
* @returns Unwatch function to stop listening
|
|
4731
|
+
*/
|
|
4732
|
+
WithdrawPending: (callback: (event: { owner: `0x${string}`; assetIndex: bigint; baseAmount: bigint }) => void, filter?: { owner: `0x${string}` }) => {
|
|
4733
|
+
return this.publicClient.watchContractEvent({
|
|
4734
|
+
address: this.contractAddress,
|
|
4735
|
+
abi: ZkLighter_jsonAbi,
|
|
4736
|
+
eventName: 'WithdrawPending',
|
|
4737
|
+
args: filter,
|
|
4738
|
+
onLogs: (logs: any[]) => {
|
|
4739
|
+
logs.forEach((log: any) => {
|
|
4740
|
+
callback(log.args as any);
|
|
4741
|
+
});
|
|
4742
|
+
},
|
|
4743
|
+
}) as () => void;
|
|
4744
|
+
}
|
|
4745
|
+
};
|
|
4746
|
+
}
|
|
4747
|
+
}
|