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