@gitmyabi/elpeth 0.0.0-stage → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2648 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+
5
+ /**
6
+ * PoolExitDetails struct type
7
+ */
8
+ export type PoolExitDetails = {
9
+ poolId: bigint;
10
+ exitedPoolShares: bigint;
11
+ };
12
+
13
+ /**
14
+ * PoolStakeDetails struct type
15
+ */
16
+ export type PoolStakeDetails = {
17
+ poolId: bigint;
18
+ ethToPool: bigint;
19
+ ethToIntegrator: bigint;
20
+ pSharesFromPool: bigint;
21
+ pSharesFromIntegrator: bigint;
22
+ };
23
+
24
+ /**
25
+ * Native20Configuration struct type
26
+ */
27
+ export type Native20Configuration = {
28
+ name: string;
29
+ symbol: string;
30
+ admin: `0x${string}`;
31
+ pools: `0x${string}`[];
32
+ poolFees: bigint[];
33
+ commissionRecipients: `0x${string}`[];
34
+ commissionDistribution: bigint[];
35
+ poolPercentages: bigint[];
36
+ maxCommissionBps: bigint;
37
+ monoTicketThreshold: bigint;
38
+ };
39
+ /**
40
+ * Native20_json ABI
41
+ *
42
+ * This ABI is typed using viem's type system for full type safety.
43
+ */
44
+ export const Native20_jsonAbi = [
45
+ {
46
+ "inputs": [
47
+ {
48
+ "internalType": "uint256",
49
+ "name": "version",
50
+ "type": "uint256"
51
+ },
52
+ {
53
+ "internalType": "uint256",
54
+ "name": "currentVersion",
55
+ "type": "uint256"
56
+ }
57
+ ],
58
+ "name": "AlreadyInitialized",
59
+ "type": "error"
60
+ },
61
+ {
62
+ "inputs": [],
63
+ "name": "CallbackNotFromMinting",
64
+ "type": "error"
65
+ },
66
+ {
67
+ "inputs": [],
68
+ "name": "CommissionPaidUnderflow",
69
+ "type": "error"
70
+ },
71
+ {
72
+ "inputs": [],
73
+ "name": "DepositsPaused",
74
+ "type": "error"
75
+ },
76
+ {
77
+ "inputs": [],
78
+ "name": "EmptyPoolList",
79
+ "type": "error"
80
+ },
81
+ {
82
+ "inputs": [
83
+ {
84
+ "internalType": "uint256",
85
+ "name": "maxFeeBps",
86
+ "type": "uint256"
87
+ }
88
+ ],
89
+ "name": "FeeOverMax",
90
+ "type": "error"
91
+ },
92
+ {
93
+ "inputs": [
94
+ {
95
+ "internalType": "uint256",
96
+ "name": "amount",
97
+ "type": "uint256"
98
+ },
99
+ {
100
+ "internalType": "uint256",
101
+ "name": "allowance",
102
+ "type": "uint256"
103
+ }
104
+ ],
105
+ "name": "InsufficientAllowance",
106
+ "type": "error"
107
+ },
108
+ {
109
+ "inputs": [
110
+ {
111
+ "internalType": "uint256",
112
+ "name": "amount",
113
+ "type": "uint256"
114
+ },
115
+ {
116
+ "internalType": "uint256",
117
+ "name": "balance",
118
+ "type": "uint256"
119
+ }
120
+ ],
121
+ "name": "InsufficientBalance",
122
+ "type": "error"
123
+ },
124
+ {
125
+ "inputs": [
126
+ {
127
+ "internalType": "uint256",
128
+ "name": "sum",
129
+ "type": "uint256"
130
+ },
131
+ {
132
+ "internalType": "uint256",
133
+ "name": "msgValue",
134
+ "type": "uint256"
135
+ }
136
+ ],
137
+ "name": "InvalidAmounts",
138
+ "type": "error"
139
+ },
140
+ {
141
+ "inputs": [],
142
+ "name": "InvalidBPSValue",
143
+ "type": "error"
144
+ },
145
+ {
146
+ "inputs": [],
147
+ "name": "InvalidNullValue",
148
+ "type": "error"
149
+ },
150
+ {
151
+ "inputs": [
152
+ {
153
+ "internalType": "uint256",
154
+ "name": "poolId",
155
+ "type": "uint256"
156
+ }
157
+ ],
158
+ "name": "InvalidPoolId",
159
+ "type": "error"
160
+ },
161
+ {
162
+ "inputs": [],
163
+ "name": "InvalidZeroAddress",
164
+ "type": "error"
165
+ },
166
+ {
167
+ "inputs": [
168
+ {
169
+ "internalType": "uint256",
170
+ "name": "poolId",
171
+ "type": "uint256"
172
+ }
173
+ ],
174
+ "name": "NoSharesToExit",
175
+ "type": "error"
176
+ },
177
+ {
178
+ "inputs": [
179
+ {
180
+ "internalType": "uint256",
181
+ "name": "id",
182
+ "type": "uint256"
183
+ }
184
+ ],
185
+ "name": "NonZeroPercentageOnDeactivatedPool",
186
+ "type": "error"
187
+ },
188
+ {
189
+ "inputs": [
190
+ {
191
+ "internalType": "address",
192
+ "name": "poolAddress",
193
+ "type": "address"
194
+ }
195
+ ],
196
+ "name": "NotARegisteredPool",
197
+ "type": "error"
198
+ },
199
+ {
200
+ "inputs": [
201
+ {
202
+ "internalType": "uint256",
203
+ "name": "ethLeft",
204
+ "type": "uint256"
205
+ },
206
+ {
207
+ "internalType": "uint256",
208
+ "name": "id",
209
+ "type": "uint256"
210
+ }
211
+ ],
212
+ "name": "OutstandingCommission",
213
+ "type": "error"
214
+ },
215
+ {
216
+ "inputs": [
217
+ {
218
+ "internalType": "uint256",
219
+ "name": "prod1",
220
+ "type": "uint256"
221
+ },
222
+ {
223
+ "internalType": "uint256",
224
+ "name": "denominator",
225
+ "type": "uint256"
226
+ }
227
+ ],
228
+ "name": "PRBMath__MulDivOverflow",
229
+ "type": "error"
230
+ },
231
+ {
232
+ "inputs": [
233
+ {
234
+ "internalType": "address",
235
+ "name": "newPool",
236
+ "type": "address"
237
+ }
238
+ ],
239
+ "name": "PoolAlreadyRegistered",
240
+ "type": "error"
241
+ },
242
+ {
243
+ "inputs": [
244
+ {
245
+ "internalType": "uint256",
246
+ "name": "poolId",
247
+ "type": "uint256"
248
+ }
249
+ ],
250
+ "name": "PoolDisabled",
251
+ "type": "error"
252
+ },
253
+ {
254
+ "inputs": [
255
+ {
256
+ "internalType": "uint256",
257
+ "name": "id",
258
+ "type": "uint256"
259
+ }
260
+ ],
261
+ "name": "PoolTransferFailed",
262
+ "type": "error"
263
+ },
264
+ {
265
+ "inputs": [],
266
+ "name": "Reentrancy",
267
+ "type": "error"
268
+ },
269
+ {
270
+ "inputs": [
271
+ {
272
+ "internalType": "address",
273
+ "name": "account",
274
+ "type": "address"
275
+ },
276
+ {
277
+ "internalType": "address",
278
+ "name": "expected",
279
+ "type": "address"
280
+ }
281
+ ],
282
+ "name": "Unauthorized",
283
+ "type": "error"
284
+ },
285
+ {
286
+ "inputs": [
287
+ {
288
+ "internalType": "uint256",
289
+ "name": "lengthA",
290
+ "type": "uint256"
291
+ },
292
+ {
293
+ "internalType": "uint256",
294
+ "name": "lengthB",
295
+ "type": "uint256"
296
+ }
297
+ ],
298
+ "name": "UnequalLengths",
299
+ "type": "error"
300
+ },
301
+ {
302
+ "inputs": [],
303
+ "name": "ZeroSharesMint",
304
+ "type": "error"
305
+ },
306
+ {
307
+ "anonymous": false,
308
+ "inputs": [
309
+ {
310
+ "indexed": true,
311
+ "internalType": "address",
312
+ "name": "owner",
313
+ "type": "address"
314
+ },
315
+ {
316
+ "indexed": true,
317
+ "internalType": "address",
318
+ "name": "spender",
319
+ "type": "address"
320
+ },
321
+ {
322
+ "indexed": false,
323
+ "internalType": "uint256",
324
+ "name": "value",
325
+ "type": "uint256"
326
+ }
327
+ ],
328
+ "name": "Approval",
329
+ "type": "event"
330
+ },
331
+ {
332
+ "anonymous": false,
333
+ "inputs": [
334
+ {
335
+ "indexed": false,
336
+ "internalType": "uint256",
337
+ "name": "pSharesSold",
338
+ "type": "uint256"
339
+ },
340
+ {
341
+ "indexed": false,
342
+ "internalType": "uint256",
343
+ "name": "id",
344
+ "type": "uint256"
345
+ },
346
+ {
347
+ "indexed": false,
348
+ "internalType": "uint256",
349
+ "name": "amountSold",
350
+ "type": "uint256"
351
+ }
352
+ ],
353
+ "name": "CommissionSharesSold",
354
+ "type": "event"
355
+ },
356
+ {
357
+ "anonymous": false,
358
+ "inputs": [
359
+ {
360
+ "indexed": true,
361
+ "internalType": "address",
362
+ "name": "withdrawer",
363
+ "type": "address"
364
+ },
365
+ {
366
+ "indexed": false,
367
+ "internalType": "uint256",
368
+ "name": "amountWithdrawn",
369
+ "type": "uint256"
370
+ }
371
+ ],
372
+ "name": "CommissionWithdrawn",
373
+ "type": "event"
374
+ },
375
+ {
376
+ "anonymous": false,
377
+ "inputs": [
378
+ {
379
+ "indexed": true,
380
+ "internalType": "address",
381
+ "name": "staker",
382
+ "type": "address"
383
+ },
384
+ {
385
+ "indexed": false,
386
+ "internalType": "uint128",
387
+ "name": "exitedTokens",
388
+ "type": "uint128"
389
+ },
390
+ {
391
+ "components": [
392
+ {
393
+ "internalType": "uint128",
394
+ "name": "poolId",
395
+ "type": "uint128"
396
+ },
397
+ {
398
+ "internalType": "uint128",
399
+ "name": "exitedPoolShares",
400
+ "type": "uint128"
401
+ }
402
+ ],
403
+ "indexed": false,
404
+ "internalType": "struct PoolExitDetails[]",
405
+ "name": "exitDetails",
406
+ "type": "tuple[]"
407
+ }
408
+ ],
409
+ "name": "Exit",
410
+ "type": "event"
411
+ },
412
+ {
413
+ "anonymous": false,
414
+ "inputs": [
415
+ {
416
+ "indexed": true,
417
+ "internalType": "uint256",
418
+ "name": "poolId",
419
+ "type": "uint256"
420
+ },
421
+ {
422
+ "indexed": false,
423
+ "internalType": "uint256",
424
+ "name": "shares",
425
+ "type": "uint256"
426
+ },
427
+ {
428
+ "indexed": false,
429
+ "internalType": "uint256[]",
430
+ "name": "weights",
431
+ "type": "uint256[]"
432
+ },
433
+ {
434
+ "indexed": false,
435
+ "internalType": "address[]",
436
+ "name": "recipients",
437
+ "type": "address[]"
438
+ }
439
+ ],
440
+ "name": "ExitedCommissionShares",
441
+ "type": "event"
442
+ },
443
+ {
444
+ "anonymous": false,
445
+ "inputs": [
446
+ {
447
+ "indexed": false,
448
+ "internalType": "uint256",
449
+ "name": "version",
450
+ "type": "uint256"
451
+ },
452
+ {
453
+ "indexed": false,
454
+ "internalType": "bytes",
455
+ "name": "cdata",
456
+ "type": "bytes"
457
+ }
458
+ ],
459
+ "name": "Initialized",
460
+ "type": "event"
461
+ },
462
+ {
463
+ "anonymous": false,
464
+ "inputs": [
465
+ {
466
+ "indexed": false,
467
+ "internalType": "address[]",
468
+ "name": "recipients",
469
+ "type": "address[]"
470
+ },
471
+ {
472
+ "indexed": false,
473
+ "internalType": "uint256[]",
474
+ "name": "splits",
475
+ "type": "uint256[]"
476
+ }
477
+ ],
478
+ "name": "NewCommissionSplit",
479
+ "type": "event"
480
+ },
481
+ {
482
+ "anonymous": false,
483
+ "inputs": [
484
+ {
485
+ "indexed": false,
486
+ "internalType": "address",
487
+ "name": "poolAddress",
488
+ "type": "address"
489
+ },
490
+ {
491
+ "indexed": false,
492
+ "internalType": "uint256",
493
+ "name": "id",
494
+ "type": "uint256"
495
+ },
496
+ {
497
+ "indexed": false,
498
+ "internalType": "bool",
499
+ "name": "isActive",
500
+ "type": "bool"
501
+ }
502
+ ],
503
+ "name": "PoolActivation",
504
+ "type": "event"
505
+ },
506
+ {
507
+ "anonymous": false,
508
+ "inputs": [
509
+ {
510
+ "indexed": false,
511
+ "internalType": "address",
512
+ "name": "poolAddress",
513
+ "type": "address"
514
+ },
515
+ {
516
+ "indexed": false,
517
+ "internalType": "uint256",
518
+ "name": "id",
519
+ "type": "uint256"
520
+ }
521
+ ],
522
+ "name": "PoolAdded",
523
+ "type": "event"
524
+ },
525
+ {
526
+ "anonymous": false,
527
+ "inputs": [
528
+ {
529
+ "indexed": false,
530
+ "internalType": "address",
531
+ "name": "admin",
532
+ "type": "address"
533
+ }
534
+ ],
535
+ "name": "SetAdmin",
536
+ "type": "event"
537
+ },
538
+ {
539
+ "anonymous": false,
540
+ "inputs": [
541
+ {
542
+ "indexed": false,
543
+ "internalType": "bool",
544
+ "name": "isPaused",
545
+ "type": "bool"
546
+ }
547
+ ],
548
+ "name": "SetDepositsPaused",
549
+ "type": "event"
550
+ },
551
+ {
552
+ "anonymous": false,
553
+ "inputs": [
554
+ {
555
+ "indexed": false,
556
+ "internalType": "uint256",
557
+ "name": "poolId",
558
+ "type": "uint256"
559
+ },
560
+ {
561
+ "indexed": false,
562
+ "internalType": "uint256",
563
+ "name": "operatorFeeBps",
564
+ "type": "uint256"
565
+ }
566
+ ],
567
+ "name": "SetFee",
568
+ "type": "event"
569
+ },
570
+ {
571
+ "anonymous": false,
572
+ "inputs": [
573
+ {
574
+ "indexed": false,
575
+ "internalType": "uint256",
576
+ "name": "maxCommission",
577
+ "type": "uint256"
578
+ }
579
+ ],
580
+ "name": "SetMaxCommission",
581
+ "type": "event"
582
+ },
583
+ {
584
+ "anonymous": false,
585
+ "inputs": [
586
+ {
587
+ "indexed": false,
588
+ "internalType": "string",
589
+ "name": "name",
590
+ "type": "string"
591
+ }
592
+ ],
593
+ "name": "SetName",
594
+ "type": "event"
595
+ },
596
+ {
597
+ "anonymous": false,
598
+ "inputs": [
599
+ {
600
+ "indexed": false,
601
+ "internalType": "address",
602
+ "name": "pendingAdmin",
603
+ "type": "address"
604
+ }
605
+ ],
606
+ "name": "SetPendingAdmin",
607
+ "type": "event"
608
+ },
609
+ {
610
+ "anonymous": false,
611
+ "inputs": [
612
+ {
613
+ "indexed": false,
614
+ "internalType": "uint256[]",
615
+ "name": "split",
616
+ "type": "uint256[]"
617
+ }
618
+ ],
619
+ "name": "SetPoolPercentages",
620
+ "type": "event"
621
+ },
622
+ {
623
+ "anonymous": false,
624
+ "inputs": [
625
+ {
626
+ "indexed": false,
627
+ "internalType": "string",
628
+ "name": "symbol",
629
+ "type": "string"
630
+ }
631
+ ],
632
+ "name": "SetSymbol",
633
+ "type": "event"
634
+ },
635
+ {
636
+ "anonymous": false,
637
+ "inputs": [
638
+ {
639
+ "indexed": true,
640
+ "internalType": "address",
641
+ "name": "staker",
642
+ "type": "address"
643
+ },
644
+ {
645
+ "indexed": false,
646
+ "internalType": "uint128",
647
+ "name": "depositedEth",
648
+ "type": "uint128"
649
+ },
650
+ {
651
+ "indexed": false,
652
+ "internalType": "uint128",
653
+ "name": "mintedTokens",
654
+ "type": "uint128"
655
+ },
656
+ {
657
+ "components": [
658
+ {
659
+ "internalType": "uint128",
660
+ "name": "poolId",
661
+ "type": "uint128"
662
+ },
663
+ {
664
+ "internalType": "uint128",
665
+ "name": "ethToPool",
666
+ "type": "uint128"
667
+ },
668
+ {
669
+ "internalType": "uint128",
670
+ "name": "ethToIntegrator",
671
+ "type": "uint128"
672
+ },
673
+ {
674
+ "internalType": "uint128",
675
+ "name": "pSharesFromPool",
676
+ "type": "uint128"
677
+ },
678
+ {
679
+ "internalType": "uint128",
680
+ "name": "pSharesFromIntegrator",
681
+ "type": "uint128"
682
+ }
683
+ ],
684
+ "indexed": false,
685
+ "internalType": "struct PoolStakeDetails[]",
686
+ "name": "stakeDetails",
687
+ "type": "tuple[]"
688
+ }
689
+ ],
690
+ "name": "Stake",
691
+ "type": "event"
692
+ },
693
+ {
694
+ "anonymous": false,
695
+ "inputs": [
696
+ {
697
+ "indexed": true,
698
+ "internalType": "address",
699
+ "name": "from",
700
+ "type": "address"
701
+ },
702
+ {
703
+ "indexed": true,
704
+ "internalType": "address",
705
+ "name": "to",
706
+ "type": "address"
707
+ },
708
+ {
709
+ "indexed": false,
710
+ "internalType": "uint256",
711
+ "name": "value",
712
+ "type": "uint256"
713
+ }
714
+ ],
715
+ "name": "Transfer",
716
+ "type": "event"
717
+ },
718
+ {
719
+ "anonymous": false,
720
+ "inputs": [
721
+ {
722
+ "indexed": false,
723
+ "internalType": "address",
724
+ "name": "vPool",
725
+ "type": "address"
726
+ },
727
+ {
728
+ "indexed": false,
729
+ "internalType": "uint256",
730
+ "name": "poolId",
731
+ "type": "uint256"
732
+ },
733
+ {
734
+ "indexed": false,
735
+ "internalType": "uint256",
736
+ "name": "amount",
737
+ "type": "uint256"
738
+ }
739
+ ],
740
+ "name": "VPoolSharesReceived",
741
+ "type": "event"
742
+ },
743
+ {
744
+ "inputs": [
745
+ {
746
+ "internalType": "uint256",
747
+ "name": "poolId",
748
+ "type": "uint256"
749
+ }
750
+ ],
751
+ "name": "_getPool",
752
+ "outputs": [
753
+ {
754
+ "internalType": "contract IvPool",
755
+ "name": "",
756
+ "type": "address"
757
+ }
758
+ ],
759
+ "stateMutability": "view",
760
+ "type": "function"
761
+ },
762
+ {
763
+ "inputs": [],
764
+ "name": "acceptAdmin",
765
+ "outputs": [],
766
+ "stateMutability": "nonpayable",
767
+ "type": "function"
768
+ },
769
+ {
770
+ "inputs": [
771
+ {
772
+ "internalType": "address",
773
+ "name": "pool",
774
+ "type": "address"
775
+ },
776
+ {
777
+ "internalType": "uint256",
778
+ "name": "feeBps",
779
+ "type": "uint256"
780
+ }
781
+ ],
782
+ "name": "addPool",
783
+ "outputs": [],
784
+ "stateMutability": "nonpayable",
785
+ "type": "function"
786
+ },
787
+ {
788
+ "inputs": [],
789
+ "name": "admin",
790
+ "outputs": [
791
+ {
792
+ "internalType": "address",
793
+ "name": "",
794
+ "type": "address"
795
+ }
796
+ ],
797
+ "stateMutability": "view",
798
+ "type": "function"
799
+ },
800
+ {
801
+ "inputs": [
802
+ {
803
+ "internalType": "address",
804
+ "name": "account",
805
+ "type": "address"
806
+ }
807
+ ],
808
+ "name": "balanceOf",
809
+ "outputs": [
810
+ {
811
+ "internalType": "uint256",
812
+ "name": "",
813
+ "type": "uint256"
814
+ }
815
+ ],
816
+ "stateMutability": "view",
817
+ "type": "function"
818
+ },
819
+ {
820
+ "inputs": [
821
+ {
822
+ "internalType": "address",
823
+ "name": "account",
824
+ "type": "address"
825
+ }
826
+ ],
827
+ "name": "balanceOfUnderlying",
828
+ "outputs": [
829
+ {
830
+ "internalType": "uint256",
831
+ "name": "",
832
+ "type": "uint256"
833
+ }
834
+ ],
835
+ "stateMutability": "view",
836
+ "type": "function"
837
+ },
838
+ {
839
+ "inputs": [
840
+ {
841
+ "internalType": "uint256",
842
+ "name": "poolId",
843
+ "type": "uint256"
844
+ },
845
+ {
846
+ "internalType": "uint256",
847
+ "name": "newFeeBps",
848
+ "type": "uint256"
849
+ }
850
+ ],
851
+ "name": "changeFee",
852
+ "outputs": [],
853
+ "stateMutability": "nonpayable",
854
+ "type": "function"
855
+ },
856
+ {
857
+ "inputs": [
858
+ {
859
+ "internalType": "address[]",
860
+ "name": "recipients",
861
+ "type": "address[]"
862
+ },
863
+ {
864
+ "internalType": "uint256[]",
865
+ "name": "splits",
866
+ "type": "uint256[]"
867
+ }
868
+ ],
869
+ "name": "changeSplit",
870
+ "outputs": [],
871
+ "stateMutability": "nonpayable",
872
+ "type": "function"
873
+ },
874
+ {
875
+ "inputs": [],
876
+ "name": "decimals",
877
+ "outputs": [
878
+ {
879
+ "internalType": "uint8",
880
+ "name": "",
881
+ "type": "uint8"
882
+ }
883
+ ],
884
+ "stateMutability": "view",
885
+ "type": "function"
886
+ },
887
+ {
888
+ "inputs": [],
889
+ "name": "depositsPaused",
890
+ "outputs": [
891
+ {
892
+ "internalType": "bool",
893
+ "name": "",
894
+ "type": "bool"
895
+ }
896
+ ],
897
+ "stateMutability": "view",
898
+ "type": "function"
899
+ },
900
+ {
901
+ "inputs": [
902
+ {
903
+ "internalType": "uint256",
904
+ "name": "poolId",
905
+ "type": "uint256"
906
+ }
907
+ ],
908
+ "name": "exitCommissionShares",
909
+ "outputs": [],
910
+ "stateMutability": "nonpayable",
911
+ "type": "function"
912
+ },
913
+ {
914
+ "inputs": [],
915
+ "name": "getCurrentSplit",
916
+ "outputs": [
917
+ {
918
+ "internalType": "address[]",
919
+ "name": "",
920
+ "type": "address[]"
921
+ },
922
+ {
923
+ "internalType": "uint256[]",
924
+ "name": "",
925
+ "type": "uint256[]"
926
+ }
927
+ ],
928
+ "stateMutability": "pure",
929
+ "type": "function"
930
+ },
931
+ {
932
+ "inputs": [
933
+ {
934
+ "internalType": "uint256",
935
+ "name": "poolId",
936
+ "type": "uint256"
937
+ }
938
+ ],
939
+ "name": "getFee",
940
+ "outputs": [
941
+ {
942
+ "internalType": "uint256",
943
+ "name": "",
944
+ "type": "uint256"
945
+ }
946
+ ],
947
+ "stateMutability": "view",
948
+ "type": "function"
949
+ },
950
+ {
951
+ "inputs": [
952
+ {
953
+ "internalType": "uint256",
954
+ "name": "poolId",
955
+ "type": "uint256"
956
+ }
957
+ ],
958
+ "name": "getPoolActivation",
959
+ "outputs": [
960
+ {
961
+ "internalType": "bool",
962
+ "name": "",
963
+ "type": "bool"
964
+ }
965
+ ],
966
+ "stateMutability": "view",
967
+ "type": "function"
968
+ },
969
+ {
970
+ "inputs": [
971
+ {
972
+ "components": [
973
+ {
974
+ "internalType": "string",
975
+ "name": "name",
976
+ "type": "string"
977
+ },
978
+ {
979
+ "internalType": "string",
980
+ "name": "symbol",
981
+ "type": "string"
982
+ },
983
+ {
984
+ "internalType": "address",
985
+ "name": "admin",
986
+ "type": "address"
987
+ },
988
+ {
989
+ "internalType": "address[]",
990
+ "name": "pools",
991
+ "type": "address[]"
992
+ },
993
+ {
994
+ "internalType": "uint256[]",
995
+ "name": "poolFees",
996
+ "type": "uint256[]"
997
+ },
998
+ {
999
+ "internalType": "address[]",
1000
+ "name": "commissionRecipients",
1001
+ "type": "address[]"
1002
+ },
1003
+ {
1004
+ "internalType": "uint256[]",
1005
+ "name": "commissionDistribution",
1006
+ "type": "uint256[]"
1007
+ },
1008
+ {
1009
+ "internalType": "uint256[]",
1010
+ "name": "poolPercentages",
1011
+ "type": "uint256[]"
1012
+ },
1013
+ {
1014
+ "internalType": "uint256",
1015
+ "name": "maxCommissionBps",
1016
+ "type": "uint256"
1017
+ },
1018
+ {
1019
+ "internalType": "uint256",
1020
+ "name": "monoTicketThreshold",
1021
+ "type": "uint256"
1022
+ }
1023
+ ],
1024
+ "internalType": "struct Native20Configuration",
1025
+ "name": "args",
1026
+ "type": "tuple"
1027
+ }
1028
+ ],
1029
+ "name": "initialize",
1030
+ "outputs": [],
1031
+ "stateMutability": "nonpayable",
1032
+ "type": "function"
1033
+ },
1034
+ {
1035
+ "inputs": [
1036
+ {
1037
+ "internalType": "uint256",
1038
+ "name": "poolId",
1039
+ "type": "uint256"
1040
+ }
1041
+ ],
1042
+ "name": "integratorCommissionOwed",
1043
+ "outputs": [
1044
+ {
1045
+ "internalType": "uint256",
1046
+ "name": "",
1047
+ "type": "uint256"
1048
+ }
1049
+ ],
1050
+ "stateMutability": "view",
1051
+ "type": "function"
1052
+ },
1053
+ {
1054
+ "inputs": [
1055
+ {
1056
+ "internalType": "address[]",
1057
+ "name": "exitQueues",
1058
+ "type": "address[]"
1059
+ },
1060
+ {
1061
+ "internalType": "uint256[][]",
1062
+ "name": "ticketIds",
1063
+ "type": "uint256[][]"
1064
+ },
1065
+ {
1066
+ "internalType": "uint32[][]",
1067
+ "name": "casksIds",
1068
+ "type": "uint32[][]"
1069
+ }
1070
+ ],
1071
+ "name": "multiClaim",
1072
+ "outputs": [
1073
+ {
1074
+ "internalType": "enum IvExitQueue.ClaimStatus[][]",
1075
+ "name": "statuses",
1076
+ "type": "uint8[][]"
1077
+ }
1078
+ ],
1079
+ "stateMutability": "nonpayable",
1080
+ "type": "function"
1081
+ },
1082
+ {
1083
+ "inputs": [
1084
+ {
1085
+ "internalType": "address[]",
1086
+ "name": "exitQueues",
1087
+ "type": "address[]"
1088
+ },
1089
+ {
1090
+ "internalType": "uint256[][]",
1091
+ "name": "ticketIds",
1092
+ "type": "uint256[][]"
1093
+ }
1094
+ ],
1095
+ "name": "multiResolve",
1096
+ "outputs": [
1097
+ {
1098
+ "internalType": "int64[][]",
1099
+ "name": "caskIdsOrErrors",
1100
+ "type": "int64[][]"
1101
+ }
1102
+ ],
1103
+ "stateMutability": "view",
1104
+ "type": "function"
1105
+ },
1106
+ {
1107
+ "inputs": [],
1108
+ "name": "name",
1109
+ "outputs": [
1110
+ {
1111
+ "internalType": "string",
1112
+ "name": "",
1113
+ "type": "string"
1114
+ }
1115
+ ],
1116
+ "stateMutability": "view",
1117
+ "type": "function"
1118
+ },
1119
+ {
1120
+ "inputs": [
1121
+ {
1122
+ "internalType": "address",
1123
+ "name": "operator",
1124
+ "type": "address"
1125
+ },
1126
+ {
1127
+ "internalType": "address",
1128
+ "name": "from",
1129
+ "type": "address"
1130
+ },
1131
+ {
1132
+ "internalType": "uint256",
1133
+ "name": "amount",
1134
+ "type": "uint256"
1135
+ },
1136
+ {
1137
+ "internalType": "bytes",
1138
+ "name": "",
1139
+ "type": "bytes"
1140
+ }
1141
+ ],
1142
+ "name": "onvPoolSharesReceived",
1143
+ "outputs": [
1144
+ {
1145
+ "internalType": "bytes4",
1146
+ "name": "",
1147
+ "type": "bytes4"
1148
+ }
1149
+ ],
1150
+ "stateMutability": "nonpayable",
1151
+ "type": "function"
1152
+ },
1153
+ {
1154
+ "inputs": [
1155
+ {
1156
+ "internalType": "bool",
1157
+ "name": "isPaused",
1158
+ "type": "bool"
1159
+ }
1160
+ ],
1161
+ "name": "pauseDeposits",
1162
+ "outputs": [],
1163
+ "stateMutability": "nonpayable",
1164
+ "type": "function"
1165
+ },
1166
+ {
1167
+ "inputs": [],
1168
+ "name": "pendingAdmin",
1169
+ "outputs": [
1170
+ {
1171
+ "internalType": "address",
1172
+ "name": "",
1173
+ "type": "address"
1174
+ }
1175
+ ],
1176
+ "stateMutability": "view",
1177
+ "type": "function"
1178
+ },
1179
+ {
1180
+ "inputs": [],
1181
+ "name": "pools",
1182
+ "outputs": [
1183
+ {
1184
+ "internalType": "address[]",
1185
+ "name": "",
1186
+ "type": "address[]"
1187
+ }
1188
+ ],
1189
+ "stateMutability": "view",
1190
+ "type": "function"
1191
+ },
1192
+ {
1193
+ "inputs": [],
1194
+ "name": "rate",
1195
+ "outputs": [
1196
+ {
1197
+ "internalType": "uint256",
1198
+ "name": "",
1199
+ "type": "uint256"
1200
+ }
1201
+ ],
1202
+ "stateMutability": "view",
1203
+ "type": "function"
1204
+ },
1205
+ {
1206
+ "inputs": [
1207
+ {
1208
+ "internalType": "uint256",
1209
+ "name": "amount",
1210
+ "type": "uint256"
1211
+ }
1212
+ ],
1213
+ "name": "requestExit",
1214
+ "outputs": [],
1215
+ "stateMutability": "nonpayable",
1216
+ "type": "function"
1217
+ },
1218
+ {
1219
+ "inputs": [
1220
+ {
1221
+ "internalType": "uint256",
1222
+ "name": "minTicketEthValue",
1223
+ "type": "uint256"
1224
+ }
1225
+ ],
1226
+ "name": "setMonoTicketThreshold",
1227
+ "outputs": [],
1228
+ "stateMutability": "nonpayable",
1229
+ "type": "function"
1230
+ },
1231
+ {
1232
+ "inputs": [
1233
+ {
1234
+ "internalType": "uint256",
1235
+ "name": "poolId",
1236
+ "type": "uint256"
1237
+ },
1238
+ {
1239
+ "internalType": "bool",
1240
+ "name": "status",
1241
+ "type": "bool"
1242
+ },
1243
+ {
1244
+ "internalType": "uint256[]",
1245
+ "name": "newPoolPercentages",
1246
+ "type": "uint256[]"
1247
+ }
1248
+ ],
1249
+ "name": "setPoolActivation",
1250
+ "outputs": [],
1251
+ "stateMutability": "nonpayable",
1252
+ "type": "function"
1253
+ },
1254
+ {
1255
+ "inputs": [
1256
+ {
1257
+ "internalType": "uint256[]",
1258
+ "name": "split",
1259
+ "type": "uint256[]"
1260
+ }
1261
+ ],
1262
+ "name": "setPoolPercentages",
1263
+ "outputs": [],
1264
+ "stateMutability": "nonpayable",
1265
+ "type": "function"
1266
+ },
1267
+ {
1268
+ "inputs": [],
1269
+ "name": "stake",
1270
+ "outputs": [],
1271
+ "stateMutability": "payable",
1272
+ "type": "function"
1273
+ },
1274
+ {
1275
+ "inputs": [],
1276
+ "name": "symbol",
1277
+ "outputs": [
1278
+ {
1279
+ "internalType": "string",
1280
+ "name": "",
1281
+ "type": "string"
1282
+ }
1283
+ ],
1284
+ "stateMutability": "view",
1285
+ "type": "function"
1286
+ },
1287
+ {
1288
+ "inputs": [],
1289
+ "name": "totalSupply",
1290
+ "outputs": [
1291
+ {
1292
+ "internalType": "uint256",
1293
+ "name": "",
1294
+ "type": "uint256"
1295
+ }
1296
+ ],
1297
+ "stateMutability": "view",
1298
+ "type": "function"
1299
+ },
1300
+ {
1301
+ "inputs": [],
1302
+ "name": "totalUnderlyingSupply",
1303
+ "outputs": [
1304
+ {
1305
+ "internalType": "uint256",
1306
+ "name": "",
1307
+ "type": "uint256"
1308
+ }
1309
+ ],
1310
+ "stateMutability": "view",
1311
+ "type": "function"
1312
+ },
1313
+ {
1314
+ "inputs": [
1315
+ {
1316
+ "internalType": "address",
1317
+ "name": "newAdmin",
1318
+ "type": "address"
1319
+ }
1320
+ ],
1321
+ "name": "transferAdmin",
1322
+ "outputs": [],
1323
+ "stateMutability": "nonpayable",
1324
+ "type": "function"
1325
+ },
1326
+ {
1327
+ "inputs": [],
1328
+ "name": "withdrawCommission",
1329
+ "outputs": [],
1330
+ "stateMutability": "nonpayable",
1331
+ "type": "function"
1332
+ }
1333
+ ] as const satisfies Abi;
1334
+
1335
+ /**
1336
+ * Type-safe ABI for Native20_json
1337
+ */
1338
+ export type Native20_jsonAbi = typeof Native20_jsonAbi;
1339
+
1340
+ /**
1341
+ * Contract instance type for Native20_json
1342
+ */
1343
+ // Use any for contract type to avoid complex viem type issues
1344
+ // The runtime behavior is type-safe through viem's ABI typing
1345
+ export type Native20_jsonContract = any;
1346
+
1347
+ /**
1348
+ * Native20_json Contract Class
1349
+ *
1350
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
1351
+ *
1352
+ * @example
1353
+ * ```typescript
1354
+ * import { createPublicClient, createWalletClient, http } from 'viem';
1355
+ * import { mainnet } from 'viem/chains';
1356
+ * import { Native20_json } from 'Native20_json';
1357
+ *
1358
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
1359
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
1360
+ *
1361
+ * const contract = new Native20_json('0x...', { publicClient, walletClient });
1362
+ *
1363
+ * // Read functions
1364
+ * const result = await contract.balanceOf('0x...');
1365
+ *
1366
+ * // Write functions
1367
+ * const hash = await contract.transfer('0x...', 1000n);
1368
+ *
1369
+ * // Simulate transactions (dry-run)
1370
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
1371
+ * console.log('Gas estimate:', simulation.request.gas);
1372
+ *
1373
+ * // Watch events
1374
+ * const unwatch = contract.watch.Transfer((event) => {
1375
+ * console.log('Transfer event:', event);
1376
+ * });
1377
+ * ```
1378
+ */
1379
+ export class Native20_json {
1380
+ private contract: Native20_jsonContract;
1381
+ private contractAddress: Address;
1382
+ private publicClient: PublicClient;
1383
+
1384
+ constructor(
1385
+ address: Address,
1386
+ clients: {
1387
+ publicClient: PublicClient;
1388
+ walletClient?: WalletClient;
1389
+ }
1390
+ ) {
1391
+ this.contractAddress = address;
1392
+ this.publicClient = clients.publicClient;
1393
+ this.contract = getContract({
1394
+ address,
1395
+ abi: Native20_jsonAbi,
1396
+ client: {
1397
+ public: clients.publicClient,
1398
+ wallet: clients.walletClient,
1399
+ },
1400
+ });
1401
+ }
1402
+
1403
+ /**
1404
+ * Get the contract address
1405
+ */
1406
+ get address(): Address {
1407
+ return this.contractAddress;
1408
+ }
1409
+
1410
+ /**
1411
+ * Get the underlying viem contract instance
1412
+ */
1413
+ getContract(): Native20_jsonContract {
1414
+ return this.contract;
1415
+ }
1416
+
1417
+ /**
1418
+ * _getPool
1419
+ * view
1420
+ */
1421
+ async _getPool(poolId: bigint): Promise<`0x${string}`> {
1422
+ return this.contract.read._getPool([poolId] as const) as Promise<`0x${string}`>;
1423
+ }
1424
+
1425
+ /**
1426
+ * admin
1427
+ * view
1428
+ */
1429
+ async admin(): Promise<`0x${string}`> {
1430
+ return this.contract.read.admin() as Promise<`0x${string}`>;
1431
+ }
1432
+
1433
+ /**
1434
+ * balanceOf
1435
+ * view
1436
+ */
1437
+ async balanceOf(account: `0x${string}`): Promise<bigint> {
1438
+ return this.contract.read.balanceOf([account] as const) as Promise<bigint>;
1439
+ }
1440
+
1441
+ /**
1442
+ * balanceOfUnderlying
1443
+ * view
1444
+ */
1445
+ async balanceOfUnderlying(account: `0x${string}`): Promise<bigint> {
1446
+ return this.contract.read.balanceOfUnderlying([account] as const) as Promise<bigint>;
1447
+ }
1448
+
1449
+ /**
1450
+ * decimals
1451
+ * view
1452
+ */
1453
+ async decimals(): Promise<bigint> {
1454
+ return this.contract.read.decimals() as Promise<bigint>;
1455
+ }
1456
+
1457
+ /**
1458
+ * depositsPaused
1459
+ * view
1460
+ */
1461
+ async depositsPaused(): Promise<boolean> {
1462
+ return this.contract.read.depositsPaused() as Promise<boolean>;
1463
+ }
1464
+
1465
+ /**
1466
+ * getCurrentSplit
1467
+ * pure
1468
+ */
1469
+ async getCurrentSplit(): Promise<[`0x${string}`[], bigint[]]> {
1470
+ return this.contract.read.getCurrentSplit() as Promise<[`0x${string}`[], bigint[]]>;
1471
+ }
1472
+
1473
+ /**
1474
+ * getFee
1475
+ * view
1476
+ */
1477
+ async getFee(poolId: bigint): Promise<bigint> {
1478
+ return this.contract.read.getFee([poolId] as const) as Promise<bigint>;
1479
+ }
1480
+
1481
+ /**
1482
+ * getPoolActivation
1483
+ * view
1484
+ */
1485
+ async getPoolActivation(poolId: bigint): Promise<boolean> {
1486
+ return this.contract.read.getPoolActivation([poolId] as const) as Promise<boolean>;
1487
+ }
1488
+
1489
+ /**
1490
+ * integratorCommissionOwed
1491
+ * view
1492
+ */
1493
+ async integratorCommissionOwed(poolId: bigint): Promise<bigint> {
1494
+ return this.contract.read.integratorCommissionOwed([poolId] as const) as Promise<bigint>;
1495
+ }
1496
+
1497
+ /**
1498
+ * multiResolve
1499
+ * view
1500
+ */
1501
+ async multiResolve(exitQueues: `0x${string}`[], ticketIds: bigint[][]): Promise<bigint[][]> {
1502
+ return this.contract.read.multiResolve([exitQueues, ticketIds] as const) as Promise<bigint[][]>;
1503
+ }
1504
+
1505
+ /**
1506
+ * name
1507
+ * view
1508
+ */
1509
+ async name(): Promise<string> {
1510
+ return this.contract.read.name() as Promise<string>;
1511
+ }
1512
+
1513
+ /**
1514
+ * pendingAdmin
1515
+ * view
1516
+ */
1517
+ async pendingAdmin(): Promise<`0x${string}`> {
1518
+ return this.contract.read.pendingAdmin() as Promise<`0x${string}`>;
1519
+ }
1520
+
1521
+ /**
1522
+ * pools
1523
+ * view
1524
+ */
1525
+ async pools(): Promise<`0x${string}`[]> {
1526
+ return this.contract.read.pools() as Promise<`0x${string}`[]>;
1527
+ }
1528
+
1529
+ /**
1530
+ * rate
1531
+ * view
1532
+ */
1533
+ async rate(): Promise<bigint> {
1534
+ return this.contract.read.rate() as Promise<bigint>;
1535
+ }
1536
+
1537
+ /**
1538
+ * symbol
1539
+ * view
1540
+ */
1541
+ async symbol(): Promise<string> {
1542
+ return this.contract.read.symbol() as Promise<string>;
1543
+ }
1544
+
1545
+ /**
1546
+ * totalSupply
1547
+ * view
1548
+ */
1549
+ async totalSupply(): Promise<bigint> {
1550
+ return this.contract.read.totalSupply() as Promise<bigint>;
1551
+ }
1552
+
1553
+ /**
1554
+ * totalUnderlyingSupply
1555
+ * view
1556
+ */
1557
+ async totalUnderlyingSupply(): Promise<bigint> {
1558
+ return this.contract.read.totalUnderlyingSupply() as Promise<bigint>;
1559
+ }
1560
+
1561
+ /**
1562
+ * acceptAdmin
1563
+ * nonpayable
1564
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1565
+ */
1566
+ async acceptAdmin(options?: {
1567
+ accessList?: import('viem').AccessList;
1568
+ authorizationList?: import('viem').AuthorizationList;
1569
+ chain?: import('viem').Chain | null;
1570
+ dataSuffix?: `0x${string}`;
1571
+ gas?: bigint;
1572
+ gasPrice?: bigint;
1573
+ maxFeePerGas?: bigint;
1574
+ maxPriorityFeePerGas?: bigint;
1575
+ nonce?: number;
1576
+ value?: bigint;
1577
+ }): Promise<`0x${string}`> {
1578
+ if (!this.contract.write) {
1579
+ throw new Error('Wallet client is required for write operations');
1580
+ }
1581
+ return this.contract.write.acceptAdmin(options) as Promise<`0x${string}`>;
1582
+ }
1583
+
1584
+ /**
1585
+ * addPool
1586
+ * nonpayable
1587
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1588
+ */
1589
+ async addPool(pool: `0x${string}`, feeBps: bigint, options?: {
1590
+ accessList?: import('viem').AccessList;
1591
+ authorizationList?: import('viem').AuthorizationList;
1592
+ chain?: import('viem').Chain | null;
1593
+ dataSuffix?: `0x${string}`;
1594
+ gas?: bigint;
1595
+ gasPrice?: bigint;
1596
+ maxFeePerGas?: bigint;
1597
+ maxPriorityFeePerGas?: bigint;
1598
+ nonce?: number;
1599
+ value?: bigint;
1600
+ }): Promise<`0x${string}`> {
1601
+ if (!this.contract.write) {
1602
+ throw new Error('Wallet client is required for write operations');
1603
+ }
1604
+ return this.contract.write.addPool([pool, feeBps] as const, options) as Promise<`0x${string}`>;
1605
+ }
1606
+
1607
+ /**
1608
+ * changeFee
1609
+ * nonpayable
1610
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1611
+ */
1612
+ async changeFee(poolId: bigint, newFeeBps: bigint, options?: {
1613
+ accessList?: import('viem').AccessList;
1614
+ authorizationList?: import('viem').AuthorizationList;
1615
+ chain?: import('viem').Chain | null;
1616
+ dataSuffix?: `0x${string}`;
1617
+ gas?: bigint;
1618
+ gasPrice?: bigint;
1619
+ maxFeePerGas?: bigint;
1620
+ maxPriorityFeePerGas?: bigint;
1621
+ nonce?: number;
1622
+ value?: bigint;
1623
+ }): Promise<`0x${string}`> {
1624
+ if (!this.contract.write) {
1625
+ throw new Error('Wallet client is required for write operations');
1626
+ }
1627
+ return this.contract.write.changeFee([poolId, newFeeBps] as const, options) as Promise<`0x${string}`>;
1628
+ }
1629
+
1630
+ /**
1631
+ * changeSplit
1632
+ * nonpayable
1633
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1634
+ */
1635
+ async changeSplit(recipients: `0x${string}`[], splits: bigint[], options?: {
1636
+ accessList?: import('viem').AccessList;
1637
+ authorizationList?: import('viem').AuthorizationList;
1638
+ chain?: import('viem').Chain | null;
1639
+ dataSuffix?: `0x${string}`;
1640
+ gas?: bigint;
1641
+ gasPrice?: bigint;
1642
+ maxFeePerGas?: bigint;
1643
+ maxPriorityFeePerGas?: bigint;
1644
+ nonce?: number;
1645
+ value?: bigint;
1646
+ }): Promise<`0x${string}`> {
1647
+ if (!this.contract.write) {
1648
+ throw new Error('Wallet client is required for write operations');
1649
+ }
1650
+ return this.contract.write.changeSplit([recipients, splits] as const, options) as Promise<`0x${string}`>;
1651
+ }
1652
+
1653
+ /**
1654
+ * exitCommissionShares
1655
+ * nonpayable
1656
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1657
+ */
1658
+ async exitCommissionShares(poolId: bigint, options?: {
1659
+ accessList?: import('viem').AccessList;
1660
+ authorizationList?: import('viem').AuthorizationList;
1661
+ chain?: import('viem').Chain | null;
1662
+ dataSuffix?: `0x${string}`;
1663
+ gas?: bigint;
1664
+ gasPrice?: bigint;
1665
+ maxFeePerGas?: bigint;
1666
+ maxPriorityFeePerGas?: bigint;
1667
+ nonce?: number;
1668
+ value?: bigint;
1669
+ }): Promise<`0x${string}`> {
1670
+ if (!this.contract.write) {
1671
+ throw new Error('Wallet client is required for write operations');
1672
+ }
1673
+ return this.contract.write.exitCommissionShares([poolId] as const, options) as Promise<`0x${string}`>;
1674
+ }
1675
+
1676
+ /**
1677
+ * initialize
1678
+ * nonpayable
1679
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1680
+ */
1681
+ async initialize(args: Native20Configuration, options?: {
1682
+ accessList?: import('viem').AccessList;
1683
+ authorizationList?: import('viem').AuthorizationList;
1684
+ chain?: import('viem').Chain | null;
1685
+ dataSuffix?: `0x${string}`;
1686
+ gas?: bigint;
1687
+ gasPrice?: bigint;
1688
+ maxFeePerGas?: bigint;
1689
+ maxPriorityFeePerGas?: bigint;
1690
+ nonce?: number;
1691
+ value?: bigint;
1692
+ }): Promise<`0x${string}`> {
1693
+ if (!this.contract.write) {
1694
+ throw new Error('Wallet client is required for write operations');
1695
+ }
1696
+ return this.contract.write.initialize([args] as const, options) as Promise<`0x${string}`>;
1697
+ }
1698
+
1699
+ /**
1700
+ * multiClaim
1701
+ * nonpayable
1702
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1703
+ */
1704
+ async multiClaim(exitQueues: `0x${string}`[], ticketIds: bigint[][], casksIds: bigint[][], options?: {
1705
+ accessList?: import('viem').AccessList;
1706
+ authorizationList?: import('viem').AuthorizationList;
1707
+ chain?: import('viem').Chain | null;
1708
+ dataSuffix?: `0x${string}`;
1709
+ gas?: bigint;
1710
+ gasPrice?: bigint;
1711
+ maxFeePerGas?: bigint;
1712
+ maxPriorityFeePerGas?: bigint;
1713
+ nonce?: number;
1714
+ value?: bigint;
1715
+ }): Promise<`0x${string}`> {
1716
+ if (!this.contract.write) {
1717
+ throw new Error('Wallet client is required for write operations');
1718
+ }
1719
+ return this.contract.write.multiClaim([exitQueues, ticketIds, casksIds] as const, options) as Promise<`0x${string}`>;
1720
+ }
1721
+
1722
+ /**
1723
+ * onvPoolSharesReceived
1724
+ * nonpayable
1725
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1726
+ */
1727
+ async onvPoolSharesReceived(operator: `0x${string}`, from: `0x${string}`, amount: bigint, arg3: `0x${string}`, options?: {
1728
+ accessList?: import('viem').AccessList;
1729
+ authorizationList?: import('viem').AuthorizationList;
1730
+ chain?: import('viem').Chain | null;
1731
+ dataSuffix?: `0x${string}`;
1732
+ gas?: bigint;
1733
+ gasPrice?: bigint;
1734
+ maxFeePerGas?: bigint;
1735
+ maxPriorityFeePerGas?: bigint;
1736
+ nonce?: number;
1737
+ value?: bigint;
1738
+ }): Promise<`0x${string}`> {
1739
+ if (!this.contract.write) {
1740
+ throw new Error('Wallet client is required for write operations');
1741
+ }
1742
+ return this.contract.write.onvPoolSharesReceived([operator, from, amount, arg3] as const, options) as Promise<`0x${string}`>;
1743
+ }
1744
+
1745
+ /**
1746
+ * pauseDeposits
1747
+ * nonpayable
1748
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1749
+ */
1750
+ async pauseDeposits(isPaused: boolean, options?: {
1751
+ accessList?: import('viem').AccessList;
1752
+ authorizationList?: import('viem').AuthorizationList;
1753
+ chain?: import('viem').Chain | null;
1754
+ dataSuffix?: `0x${string}`;
1755
+ gas?: bigint;
1756
+ gasPrice?: bigint;
1757
+ maxFeePerGas?: bigint;
1758
+ maxPriorityFeePerGas?: bigint;
1759
+ nonce?: number;
1760
+ value?: bigint;
1761
+ }): Promise<`0x${string}`> {
1762
+ if (!this.contract.write) {
1763
+ throw new Error('Wallet client is required for write operations');
1764
+ }
1765
+ return this.contract.write.pauseDeposits([isPaused] as const, options) as Promise<`0x${string}`>;
1766
+ }
1767
+
1768
+ /**
1769
+ * requestExit
1770
+ * nonpayable
1771
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1772
+ */
1773
+ async requestExit(amount: bigint, options?: {
1774
+ accessList?: import('viem').AccessList;
1775
+ authorizationList?: import('viem').AuthorizationList;
1776
+ chain?: import('viem').Chain | null;
1777
+ dataSuffix?: `0x${string}`;
1778
+ gas?: bigint;
1779
+ gasPrice?: bigint;
1780
+ maxFeePerGas?: bigint;
1781
+ maxPriorityFeePerGas?: bigint;
1782
+ nonce?: number;
1783
+ value?: bigint;
1784
+ }): Promise<`0x${string}`> {
1785
+ if (!this.contract.write) {
1786
+ throw new Error('Wallet client is required for write operations');
1787
+ }
1788
+ return this.contract.write.requestExit([amount] as const, options) as Promise<`0x${string}`>;
1789
+ }
1790
+
1791
+ /**
1792
+ * setMonoTicketThreshold
1793
+ * nonpayable
1794
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1795
+ */
1796
+ async setMonoTicketThreshold(minTicketEthValue: bigint, options?: {
1797
+ accessList?: import('viem').AccessList;
1798
+ authorizationList?: import('viem').AuthorizationList;
1799
+ chain?: import('viem').Chain | null;
1800
+ dataSuffix?: `0x${string}`;
1801
+ gas?: bigint;
1802
+ gasPrice?: bigint;
1803
+ maxFeePerGas?: bigint;
1804
+ maxPriorityFeePerGas?: bigint;
1805
+ nonce?: number;
1806
+ value?: bigint;
1807
+ }): Promise<`0x${string}`> {
1808
+ if (!this.contract.write) {
1809
+ throw new Error('Wallet client is required for write operations');
1810
+ }
1811
+ return this.contract.write.setMonoTicketThreshold([minTicketEthValue] as const, options) as Promise<`0x${string}`>;
1812
+ }
1813
+
1814
+ /**
1815
+ * setPoolActivation
1816
+ * nonpayable
1817
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1818
+ */
1819
+ async setPoolActivation(poolId: bigint, status: boolean, newPoolPercentages: bigint[], options?: {
1820
+ accessList?: import('viem').AccessList;
1821
+ authorizationList?: import('viem').AuthorizationList;
1822
+ chain?: import('viem').Chain | null;
1823
+ dataSuffix?: `0x${string}`;
1824
+ gas?: bigint;
1825
+ gasPrice?: bigint;
1826
+ maxFeePerGas?: bigint;
1827
+ maxPriorityFeePerGas?: bigint;
1828
+ nonce?: number;
1829
+ value?: bigint;
1830
+ }): Promise<`0x${string}`> {
1831
+ if (!this.contract.write) {
1832
+ throw new Error('Wallet client is required for write operations');
1833
+ }
1834
+ return this.contract.write.setPoolActivation([poolId, status, newPoolPercentages] as const, options) as Promise<`0x${string}`>;
1835
+ }
1836
+
1837
+ /**
1838
+ * setPoolPercentages
1839
+ * nonpayable
1840
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1841
+ */
1842
+ async setPoolPercentages(split: bigint[], options?: {
1843
+ accessList?: import('viem').AccessList;
1844
+ authorizationList?: import('viem').AuthorizationList;
1845
+ chain?: import('viem').Chain | null;
1846
+ dataSuffix?: `0x${string}`;
1847
+ gas?: bigint;
1848
+ gasPrice?: bigint;
1849
+ maxFeePerGas?: bigint;
1850
+ maxPriorityFeePerGas?: bigint;
1851
+ nonce?: number;
1852
+ value?: bigint;
1853
+ }): Promise<`0x${string}`> {
1854
+ if (!this.contract.write) {
1855
+ throw new Error('Wallet client is required for write operations');
1856
+ }
1857
+ return this.contract.write.setPoolPercentages([split] as const, options) as Promise<`0x${string}`>;
1858
+ }
1859
+
1860
+ /**
1861
+ * stake
1862
+ * payable
1863
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1864
+ */
1865
+ async stake(options?: {
1866
+ accessList?: import('viem').AccessList;
1867
+ authorizationList?: import('viem').AuthorizationList;
1868
+ chain?: import('viem').Chain | null;
1869
+ dataSuffix?: `0x${string}`;
1870
+ gas?: bigint;
1871
+ gasPrice?: bigint;
1872
+ maxFeePerGas?: bigint;
1873
+ maxPriorityFeePerGas?: bigint;
1874
+ nonce?: number;
1875
+ value?: bigint;
1876
+ }): Promise<`0x${string}`> {
1877
+ if (!this.contract.write) {
1878
+ throw new Error('Wallet client is required for write operations');
1879
+ }
1880
+ return this.contract.write.stake(options) as Promise<`0x${string}`>;
1881
+ }
1882
+
1883
+ /**
1884
+ * transferAdmin
1885
+ * nonpayable
1886
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1887
+ */
1888
+ async transferAdmin(newAdmin: `0x${string}`, options?: {
1889
+ accessList?: import('viem').AccessList;
1890
+ authorizationList?: import('viem').AuthorizationList;
1891
+ chain?: import('viem').Chain | null;
1892
+ dataSuffix?: `0x${string}`;
1893
+ gas?: bigint;
1894
+ gasPrice?: bigint;
1895
+ maxFeePerGas?: bigint;
1896
+ maxPriorityFeePerGas?: bigint;
1897
+ nonce?: number;
1898
+ value?: bigint;
1899
+ }): Promise<`0x${string}`> {
1900
+ if (!this.contract.write) {
1901
+ throw new Error('Wallet client is required for write operations');
1902
+ }
1903
+ return this.contract.write.transferAdmin([newAdmin] as const, options) as Promise<`0x${string}`>;
1904
+ }
1905
+
1906
+ /**
1907
+ * withdrawCommission
1908
+ * nonpayable
1909
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1910
+ */
1911
+ async withdrawCommission(options?: {
1912
+ accessList?: import('viem').AccessList;
1913
+ authorizationList?: import('viem').AuthorizationList;
1914
+ chain?: import('viem').Chain | null;
1915
+ dataSuffix?: `0x${string}`;
1916
+ gas?: bigint;
1917
+ gasPrice?: bigint;
1918
+ maxFeePerGas?: bigint;
1919
+ maxPriorityFeePerGas?: bigint;
1920
+ nonce?: number;
1921
+ value?: bigint;
1922
+ }): Promise<`0x${string}`> {
1923
+ if (!this.contract.write) {
1924
+ throw new Error('Wallet client is required for write operations');
1925
+ }
1926
+ return this.contract.write.withdrawCommission(options) as Promise<`0x${string}`>;
1927
+ }
1928
+
1929
+
1930
+
1931
+ /**
1932
+ * Simulate contract write operations (dry-run without sending transaction)
1933
+ *
1934
+ * @example
1935
+ * const result = await contract.simulate.transfer('0x...', 1000n);
1936
+ * console.log('Gas estimate:', result.request.gas);
1937
+ * console.log('Would succeed:', result.result);
1938
+ */
1939
+ get simulate() {
1940
+ const contract = this.contract;
1941
+ if (!contract.simulate) {
1942
+ throw new Error('Public client is required for simulation');
1943
+ }
1944
+ return {
1945
+ /**
1946
+ * Simulate acceptAdmin
1947
+ * Returns gas estimate and result without sending transaction
1948
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1949
+ */
1950
+ async acceptAdmin(options?: {
1951
+ accessList?: import('viem').AccessList;
1952
+ authorizationList?: import('viem').AuthorizationList;
1953
+ chain?: import('viem').Chain | null;
1954
+ dataSuffix?: `0x${string}`;
1955
+ gas?: bigint;
1956
+ gasPrice?: bigint;
1957
+ maxFeePerGas?: bigint;
1958
+ maxPriorityFeePerGas?: bigint;
1959
+ nonce?: number;
1960
+ value?: bigint;
1961
+ }): Promise<void> {
1962
+ return contract.simulate.acceptAdmin(options) as Promise<void>;
1963
+ },
1964
+ /**
1965
+ * Simulate addPool
1966
+ * Returns gas estimate and result without sending transaction
1967
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1968
+ */
1969
+ async addPool(pool: `0x${string}`, feeBps: bigint, options?: {
1970
+ accessList?: import('viem').AccessList;
1971
+ authorizationList?: import('viem').AuthorizationList;
1972
+ chain?: import('viem').Chain | null;
1973
+ dataSuffix?: `0x${string}`;
1974
+ gas?: bigint;
1975
+ gasPrice?: bigint;
1976
+ maxFeePerGas?: bigint;
1977
+ maxPriorityFeePerGas?: bigint;
1978
+ nonce?: number;
1979
+ value?: bigint;
1980
+ }): Promise<void> {
1981
+ return contract.simulate.addPool([pool, feeBps] as const, options) as Promise<void>;
1982
+ },
1983
+ /**
1984
+ * Simulate changeFee
1985
+ * Returns gas estimate and result without sending transaction
1986
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1987
+ */
1988
+ async changeFee(poolId: bigint, newFeeBps: bigint, options?: {
1989
+ accessList?: import('viem').AccessList;
1990
+ authorizationList?: import('viem').AuthorizationList;
1991
+ chain?: import('viem').Chain | null;
1992
+ dataSuffix?: `0x${string}`;
1993
+ gas?: bigint;
1994
+ gasPrice?: bigint;
1995
+ maxFeePerGas?: bigint;
1996
+ maxPriorityFeePerGas?: bigint;
1997
+ nonce?: number;
1998
+ value?: bigint;
1999
+ }): Promise<void> {
2000
+ return contract.simulate.changeFee([poolId, newFeeBps] as const, options) as Promise<void>;
2001
+ },
2002
+ /**
2003
+ * Simulate changeSplit
2004
+ * Returns gas estimate and result without sending transaction
2005
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2006
+ */
2007
+ async changeSplit(recipients: `0x${string}`[], splits: bigint[], options?: {
2008
+ accessList?: import('viem').AccessList;
2009
+ authorizationList?: import('viem').AuthorizationList;
2010
+ chain?: import('viem').Chain | null;
2011
+ dataSuffix?: `0x${string}`;
2012
+ gas?: bigint;
2013
+ gasPrice?: bigint;
2014
+ maxFeePerGas?: bigint;
2015
+ maxPriorityFeePerGas?: bigint;
2016
+ nonce?: number;
2017
+ value?: bigint;
2018
+ }): Promise<void> {
2019
+ return contract.simulate.changeSplit([recipients, splits] as const, options) as Promise<void>;
2020
+ },
2021
+ /**
2022
+ * Simulate exitCommissionShares
2023
+ * Returns gas estimate and result without sending transaction
2024
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2025
+ */
2026
+ async exitCommissionShares(poolId: bigint, options?: {
2027
+ accessList?: import('viem').AccessList;
2028
+ authorizationList?: import('viem').AuthorizationList;
2029
+ chain?: import('viem').Chain | null;
2030
+ dataSuffix?: `0x${string}`;
2031
+ gas?: bigint;
2032
+ gasPrice?: bigint;
2033
+ maxFeePerGas?: bigint;
2034
+ maxPriorityFeePerGas?: bigint;
2035
+ nonce?: number;
2036
+ value?: bigint;
2037
+ }): Promise<void> {
2038
+ return contract.simulate.exitCommissionShares([poolId] as const, options) as Promise<void>;
2039
+ },
2040
+ /**
2041
+ * Simulate initialize
2042
+ * Returns gas estimate and result without sending transaction
2043
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2044
+ */
2045
+ async initialize(args: Native20Configuration, options?: {
2046
+ accessList?: import('viem').AccessList;
2047
+ authorizationList?: import('viem').AuthorizationList;
2048
+ chain?: import('viem').Chain | null;
2049
+ dataSuffix?: `0x${string}`;
2050
+ gas?: bigint;
2051
+ gasPrice?: bigint;
2052
+ maxFeePerGas?: bigint;
2053
+ maxPriorityFeePerGas?: bigint;
2054
+ nonce?: number;
2055
+ value?: bigint;
2056
+ }): Promise<void> {
2057
+ return contract.simulate.initialize([args] as const, options) as Promise<void>;
2058
+ },
2059
+ /**
2060
+ * Simulate multiClaim
2061
+ * Returns gas estimate and result without sending transaction
2062
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2063
+ */
2064
+ async multiClaim(exitQueues: `0x${string}`[], ticketIds: bigint[][], casksIds: bigint[][], options?: {
2065
+ accessList?: import('viem').AccessList;
2066
+ authorizationList?: import('viem').AuthorizationList;
2067
+ chain?: import('viem').Chain | null;
2068
+ dataSuffix?: `0x${string}`;
2069
+ gas?: bigint;
2070
+ gasPrice?: bigint;
2071
+ maxFeePerGas?: bigint;
2072
+ maxPriorityFeePerGas?: bigint;
2073
+ nonce?: number;
2074
+ value?: bigint;
2075
+ }): Promise<bigint[][]> {
2076
+ return contract.simulate.multiClaim([exitQueues, ticketIds, casksIds] as const, options) as Promise<bigint[][]>;
2077
+ },
2078
+ /**
2079
+ * Simulate onvPoolSharesReceived
2080
+ * Returns gas estimate and result without sending transaction
2081
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2082
+ */
2083
+ async onvPoolSharesReceived(operator: `0x${string}`, from: `0x${string}`, amount: bigint, arg3: `0x${string}`, options?: {
2084
+ accessList?: import('viem').AccessList;
2085
+ authorizationList?: import('viem').AuthorizationList;
2086
+ chain?: import('viem').Chain | null;
2087
+ dataSuffix?: `0x${string}`;
2088
+ gas?: bigint;
2089
+ gasPrice?: bigint;
2090
+ maxFeePerGas?: bigint;
2091
+ maxPriorityFeePerGas?: bigint;
2092
+ nonce?: number;
2093
+ value?: bigint;
2094
+ }): Promise<`0x${string}`> {
2095
+ return contract.simulate.onvPoolSharesReceived([operator, from, amount, arg3] as const, options) as Promise<`0x${string}`>;
2096
+ },
2097
+ /**
2098
+ * Simulate pauseDeposits
2099
+ * Returns gas estimate and result without sending transaction
2100
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2101
+ */
2102
+ async pauseDeposits(isPaused: boolean, options?: {
2103
+ accessList?: import('viem').AccessList;
2104
+ authorizationList?: import('viem').AuthorizationList;
2105
+ chain?: import('viem').Chain | null;
2106
+ dataSuffix?: `0x${string}`;
2107
+ gas?: bigint;
2108
+ gasPrice?: bigint;
2109
+ maxFeePerGas?: bigint;
2110
+ maxPriorityFeePerGas?: bigint;
2111
+ nonce?: number;
2112
+ value?: bigint;
2113
+ }): Promise<void> {
2114
+ return contract.simulate.pauseDeposits([isPaused] as const, options) as Promise<void>;
2115
+ },
2116
+ /**
2117
+ * Simulate requestExit
2118
+ * Returns gas estimate and result without sending transaction
2119
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2120
+ */
2121
+ async requestExit(amount: bigint, options?: {
2122
+ accessList?: import('viem').AccessList;
2123
+ authorizationList?: import('viem').AuthorizationList;
2124
+ chain?: import('viem').Chain | null;
2125
+ dataSuffix?: `0x${string}`;
2126
+ gas?: bigint;
2127
+ gasPrice?: bigint;
2128
+ maxFeePerGas?: bigint;
2129
+ maxPriorityFeePerGas?: bigint;
2130
+ nonce?: number;
2131
+ value?: bigint;
2132
+ }): Promise<void> {
2133
+ return contract.simulate.requestExit([amount] as const, options) as Promise<void>;
2134
+ },
2135
+ /**
2136
+ * Simulate setMonoTicketThreshold
2137
+ * Returns gas estimate and result without sending transaction
2138
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2139
+ */
2140
+ async setMonoTicketThreshold(minTicketEthValue: bigint, options?: {
2141
+ accessList?: import('viem').AccessList;
2142
+ authorizationList?: import('viem').AuthorizationList;
2143
+ chain?: import('viem').Chain | null;
2144
+ dataSuffix?: `0x${string}`;
2145
+ gas?: bigint;
2146
+ gasPrice?: bigint;
2147
+ maxFeePerGas?: bigint;
2148
+ maxPriorityFeePerGas?: bigint;
2149
+ nonce?: number;
2150
+ value?: bigint;
2151
+ }): Promise<void> {
2152
+ return contract.simulate.setMonoTicketThreshold([minTicketEthValue] as const, options) as Promise<void>;
2153
+ },
2154
+ /**
2155
+ * Simulate setPoolActivation
2156
+ * Returns gas estimate and result without sending transaction
2157
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2158
+ */
2159
+ async setPoolActivation(poolId: bigint, status: boolean, newPoolPercentages: bigint[], options?: {
2160
+ accessList?: import('viem').AccessList;
2161
+ authorizationList?: import('viem').AuthorizationList;
2162
+ chain?: import('viem').Chain | null;
2163
+ dataSuffix?: `0x${string}`;
2164
+ gas?: bigint;
2165
+ gasPrice?: bigint;
2166
+ maxFeePerGas?: bigint;
2167
+ maxPriorityFeePerGas?: bigint;
2168
+ nonce?: number;
2169
+ value?: bigint;
2170
+ }): Promise<void> {
2171
+ return contract.simulate.setPoolActivation([poolId, status, newPoolPercentages] as const, options) as Promise<void>;
2172
+ },
2173
+ /**
2174
+ * Simulate setPoolPercentages
2175
+ * Returns gas estimate and result without sending transaction
2176
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2177
+ */
2178
+ async setPoolPercentages(split: bigint[], options?: {
2179
+ accessList?: import('viem').AccessList;
2180
+ authorizationList?: import('viem').AuthorizationList;
2181
+ chain?: import('viem').Chain | null;
2182
+ dataSuffix?: `0x${string}`;
2183
+ gas?: bigint;
2184
+ gasPrice?: bigint;
2185
+ maxFeePerGas?: bigint;
2186
+ maxPriorityFeePerGas?: bigint;
2187
+ nonce?: number;
2188
+ value?: bigint;
2189
+ }): Promise<void> {
2190
+ return contract.simulate.setPoolPercentages([split] as const, options) as Promise<void>;
2191
+ },
2192
+ /**
2193
+ * Simulate stake
2194
+ * Returns gas estimate and result without sending transaction
2195
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2196
+ */
2197
+ async stake(options?: {
2198
+ accessList?: import('viem').AccessList;
2199
+ authorizationList?: import('viem').AuthorizationList;
2200
+ chain?: import('viem').Chain | null;
2201
+ dataSuffix?: `0x${string}`;
2202
+ gas?: bigint;
2203
+ gasPrice?: bigint;
2204
+ maxFeePerGas?: bigint;
2205
+ maxPriorityFeePerGas?: bigint;
2206
+ nonce?: number;
2207
+ value?: bigint;
2208
+ }): Promise<void> {
2209
+ return contract.simulate.stake(options) as Promise<void>;
2210
+ },
2211
+ /**
2212
+ * Simulate transferAdmin
2213
+ * Returns gas estimate and result without sending transaction
2214
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2215
+ */
2216
+ async transferAdmin(newAdmin: `0x${string}`, options?: {
2217
+ accessList?: import('viem').AccessList;
2218
+ authorizationList?: import('viem').AuthorizationList;
2219
+ chain?: import('viem').Chain | null;
2220
+ dataSuffix?: `0x${string}`;
2221
+ gas?: bigint;
2222
+ gasPrice?: bigint;
2223
+ maxFeePerGas?: bigint;
2224
+ maxPriorityFeePerGas?: bigint;
2225
+ nonce?: number;
2226
+ value?: bigint;
2227
+ }): Promise<void> {
2228
+ return contract.simulate.transferAdmin([newAdmin] as const, options) as Promise<void>;
2229
+ },
2230
+ /**
2231
+ * Simulate withdrawCommission
2232
+ * Returns gas estimate and result without sending transaction
2233
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2234
+ */
2235
+ async withdrawCommission(options?: {
2236
+ accessList?: import('viem').AccessList;
2237
+ authorizationList?: import('viem').AuthorizationList;
2238
+ chain?: import('viem').Chain | null;
2239
+ dataSuffix?: `0x${string}`;
2240
+ gas?: bigint;
2241
+ gasPrice?: bigint;
2242
+ maxFeePerGas?: bigint;
2243
+ maxPriorityFeePerGas?: bigint;
2244
+ nonce?: number;
2245
+ value?: bigint;
2246
+ }): Promise<void> {
2247
+ return contract.simulate.withdrawCommission(options) as Promise<void>;
2248
+ }
2249
+ };
2250
+ }
2251
+
2252
+ /**
2253
+ * Watch contract events
2254
+ *
2255
+ * @example
2256
+ * // Watch all Transfer events
2257
+ * const unwatch = contract.watch.Transfer((event) => {
2258
+ * console.log('Transfer:', event);
2259
+ * });
2260
+ *
2261
+ * // Stop watching
2262
+ * unwatch();
2263
+ */
2264
+ get watch() {
2265
+ return {
2266
+ /**
2267
+ * Watch Approval events
2268
+ * @param callback Function to call when event is emitted
2269
+ * @param filter Optional filter for indexed parameters
2270
+ * @returns Unwatch function to stop listening
2271
+ */
2272
+ Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner: `0x${string}`; spender: `0x${string}` }) => {
2273
+ return this.publicClient.watchContractEvent({
2274
+ address: this.contractAddress,
2275
+ abi: Native20_jsonAbi,
2276
+ eventName: 'Approval',
2277
+ args: filter,
2278
+ onLogs: (logs: any[]) => {
2279
+ logs.forEach((log: any) => {
2280
+ callback(log.args as any);
2281
+ });
2282
+ },
2283
+ }) as () => void;
2284
+ },
2285
+ /**
2286
+ * Watch CommissionSharesSold events
2287
+ * @param callback Function to call when event is emitted
2288
+ * @param filter Optional filter for indexed parameters
2289
+ * @returns Unwatch function to stop listening
2290
+ */
2291
+ CommissionSharesSold: (callback: (event: { pSharesSold: bigint; id: bigint; amountSold: bigint }) => void) => {
2292
+ return this.publicClient.watchContractEvent({
2293
+ address: this.contractAddress,
2294
+ abi: Native20_jsonAbi,
2295
+ eventName: 'CommissionSharesSold',
2296
+
2297
+ onLogs: (logs: any[]) => {
2298
+ logs.forEach((log: any) => {
2299
+ callback(log.args as any);
2300
+ });
2301
+ },
2302
+ }) as () => void;
2303
+ },
2304
+ /**
2305
+ * Watch CommissionWithdrawn events
2306
+ * @param callback Function to call when event is emitted
2307
+ * @param filter Optional filter for indexed parameters
2308
+ * @returns Unwatch function to stop listening
2309
+ */
2310
+ CommissionWithdrawn: (callback: (event: { withdrawer: `0x${string}`; amountWithdrawn: bigint }) => void, filter?: { withdrawer: `0x${string}` }) => {
2311
+ return this.publicClient.watchContractEvent({
2312
+ address: this.contractAddress,
2313
+ abi: Native20_jsonAbi,
2314
+ eventName: 'CommissionWithdrawn',
2315
+ args: filter,
2316
+ onLogs: (logs: any[]) => {
2317
+ logs.forEach((log: any) => {
2318
+ callback(log.args as any);
2319
+ });
2320
+ },
2321
+ }) as () => void;
2322
+ },
2323
+ /**
2324
+ * Watch Exit events
2325
+ * @param callback Function to call when event is emitted
2326
+ * @param filter Optional filter for indexed parameters
2327
+ * @returns Unwatch function to stop listening
2328
+ */
2329
+ Exit: (callback: (event: { staker: `0x${string}`; exitedTokens: bigint; exitDetails: PoolExitDetails[] }) => void, filter?: { staker: `0x${string}` }) => {
2330
+ return this.publicClient.watchContractEvent({
2331
+ address: this.contractAddress,
2332
+ abi: Native20_jsonAbi,
2333
+ eventName: 'Exit',
2334
+ args: filter,
2335
+ onLogs: (logs: any[]) => {
2336
+ logs.forEach((log: any) => {
2337
+ callback(log.args as any);
2338
+ });
2339
+ },
2340
+ }) as () => void;
2341
+ },
2342
+ /**
2343
+ * Watch ExitedCommissionShares events
2344
+ * @param callback Function to call when event is emitted
2345
+ * @param filter Optional filter for indexed parameters
2346
+ * @returns Unwatch function to stop listening
2347
+ */
2348
+ ExitedCommissionShares: (callback: (event: { poolId: bigint; shares: bigint; weights: bigint[]; recipients: `0x${string}`[] }) => void, filter?: { poolId: bigint }) => {
2349
+ return this.publicClient.watchContractEvent({
2350
+ address: this.contractAddress,
2351
+ abi: Native20_jsonAbi,
2352
+ eventName: 'ExitedCommissionShares',
2353
+ args: filter,
2354
+ onLogs: (logs: any[]) => {
2355
+ logs.forEach((log: any) => {
2356
+ callback(log.args as any);
2357
+ });
2358
+ },
2359
+ }) as () => void;
2360
+ },
2361
+ /**
2362
+ * Watch Initialized events
2363
+ * @param callback Function to call when event is emitted
2364
+ * @param filter Optional filter for indexed parameters
2365
+ * @returns Unwatch function to stop listening
2366
+ */
2367
+ Initialized: (callback: (event: { version: bigint; cdata: `0x${string}` }) => void) => {
2368
+ return this.publicClient.watchContractEvent({
2369
+ address: this.contractAddress,
2370
+ abi: Native20_jsonAbi,
2371
+ eventName: 'Initialized',
2372
+
2373
+ onLogs: (logs: any[]) => {
2374
+ logs.forEach((log: any) => {
2375
+ callback(log.args as any);
2376
+ });
2377
+ },
2378
+ }) as () => void;
2379
+ },
2380
+ /**
2381
+ * Watch NewCommissionSplit events
2382
+ * @param callback Function to call when event is emitted
2383
+ * @param filter Optional filter for indexed parameters
2384
+ * @returns Unwatch function to stop listening
2385
+ */
2386
+ NewCommissionSplit: (callback: (event: { recipients: `0x${string}`[]; splits: bigint[] }) => void) => {
2387
+ return this.publicClient.watchContractEvent({
2388
+ address: this.contractAddress,
2389
+ abi: Native20_jsonAbi,
2390
+ eventName: 'NewCommissionSplit',
2391
+
2392
+ onLogs: (logs: any[]) => {
2393
+ logs.forEach((log: any) => {
2394
+ callback(log.args as any);
2395
+ });
2396
+ },
2397
+ }) as () => void;
2398
+ },
2399
+ /**
2400
+ * Watch PoolActivation events
2401
+ * @param callback Function to call when event is emitted
2402
+ * @param filter Optional filter for indexed parameters
2403
+ * @returns Unwatch function to stop listening
2404
+ */
2405
+ PoolActivation: (callback: (event: { poolAddress: `0x${string}`; id: bigint; isActive: boolean }) => void) => {
2406
+ return this.publicClient.watchContractEvent({
2407
+ address: this.contractAddress,
2408
+ abi: Native20_jsonAbi,
2409
+ eventName: 'PoolActivation',
2410
+
2411
+ onLogs: (logs: any[]) => {
2412
+ logs.forEach((log: any) => {
2413
+ callback(log.args as any);
2414
+ });
2415
+ },
2416
+ }) as () => void;
2417
+ },
2418
+ /**
2419
+ * Watch PoolAdded events
2420
+ * @param callback Function to call when event is emitted
2421
+ * @param filter Optional filter for indexed parameters
2422
+ * @returns Unwatch function to stop listening
2423
+ */
2424
+ PoolAdded: (callback: (event: { poolAddress: `0x${string}`; id: bigint }) => void) => {
2425
+ return this.publicClient.watchContractEvent({
2426
+ address: this.contractAddress,
2427
+ abi: Native20_jsonAbi,
2428
+ eventName: 'PoolAdded',
2429
+
2430
+ onLogs: (logs: any[]) => {
2431
+ logs.forEach((log: any) => {
2432
+ callback(log.args as any);
2433
+ });
2434
+ },
2435
+ }) as () => void;
2436
+ },
2437
+ /**
2438
+ * Watch SetAdmin events
2439
+ * @param callback Function to call when event is emitted
2440
+ * @param filter Optional filter for indexed parameters
2441
+ * @returns Unwatch function to stop listening
2442
+ */
2443
+ SetAdmin: (callback: (event: { admin: `0x${string}` }) => void) => {
2444
+ return this.publicClient.watchContractEvent({
2445
+ address: this.contractAddress,
2446
+ abi: Native20_jsonAbi,
2447
+ eventName: 'SetAdmin',
2448
+
2449
+ onLogs: (logs: any[]) => {
2450
+ logs.forEach((log: any) => {
2451
+ callback(log.args as any);
2452
+ });
2453
+ },
2454
+ }) as () => void;
2455
+ },
2456
+ /**
2457
+ * Watch SetDepositsPaused events
2458
+ * @param callback Function to call when event is emitted
2459
+ * @param filter Optional filter for indexed parameters
2460
+ * @returns Unwatch function to stop listening
2461
+ */
2462
+ SetDepositsPaused: (callback: (event: { isPaused: boolean }) => void) => {
2463
+ return this.publicClient.watchContractEvent({
2464
+ address: this.contractAddress,
2465
+ abi: Native20_jsonAbi,
2466
+ eventName: 'SetDepositsPaused',
2467
+
2468
+ onLogs: (logs: any[]) => {
2469
+ logs.forEach((log: any) => {
2470
+ callback(log.args as any);
2471
+ });
2472
+ },
2473
+ }) as () => void;
2474
+ },
2475
+ /**
2476
+ * Watch SetFee events
2477
+ * @param callback Function to call when event is emitted
2478
+ * @param filter Optional filter for indexed parameters
2479
+ * @returns Unwatch function to stop listening
2480
+ */
2481
+ SetFee: (callback: (event: { poolId: bigint; operatorFeeBps: bigint }) => void) => {
2482
+ return this.publicClient.watchContractEvent({
2483
+ address: this.contractAddress,
2484
+ abi: Native20_jsonAbi,
2485
+ eventName: 'SetFee',
2486
+
2487
+ onLogs: (logs: any[]) => {
2488
+ logs.forEach((log: any) => {
2489
+ callback(log.args as any);
2490
+ });
2491
+ },
2492
+ }) as () => void;
2493
+ },
2494
+ /**
2495
+ * Watch SetMaxCommission events
2496
+ * @param callback Function to call when event is emitted
2497
+ * @param filter Optional filter for indexed parameters
2498
+ * @returns Unwatch function to stop listening
2499
+ */
2500
+ SetMaxCommission: (callback: (event: { maxCommission: bigint }) => void) => {
2501
+ return this.publicClient.watchContractEvent({
2502
+ address: this.contractAddress,
2503
+ abi: Native20_jsonAbi,
2504
+ eventName: 'SetMaxCommission',
2505
+
2506
+ onLogs: (logs: any[]) => {
2507
+ logs.forEach((log: any) => {
2508
+ callback(log.args as any);
2509
+ });
2510
+ },
2511
+ }) as () => void;
2512
+ },
2513
+ /**
2514
+ * Watch SetName events
2515
+ * @param callback Function to call when event is emitted
2516
+ * @param filter Optional filter for indexed parameters
2517
+ * @returns Unwatch function to stop listening
2518
+ */
2519
+ SetName: (callback: (event: { name: string }) => void) => {
2520
+ return this.publicClient.watchContractEvent({
2521
+ address: this.contractAddress,
2522
+ abi: Native20_jsonAbi,
2523
+ eventName: 'SetName',
2524
+
2525
+ onLogs: (logs: any[]) => {
2526
+ logs.forEach((log: any) => {
2527
+ callback(log.args as any);
2528
+ });
2529
+ },
2530
+ }) as () => void;
2531
+ },
2532
+ /**
2533
+ * Watch SetPendingAdmin events
2534
+ * @param callback Function to call when event is emitted
2535
+ * @param filter Optional filter for indexed parameters
2536
+ * @returns Unwatch function to stop listening
2537
+ */
2538
+ SetPendingAdmin: (callback: (event: { pendingAdmin: `0x${string}` }) => void) => {
2539
+ return this.publicClient.watchContractEvent({
2540
+ address: this.contractAddress,
2541
+ abi: Native20_jsonAbi,
2542
+ eventName: 'SetPendingAdmin',
2543
+
2544
+ onLogs: (logs: any[]) => {
2545
+ logs.forEach((log: any) => {
2546
+ callback(log.args as any);
2547
+ });
2548
+ },
2549
+ }) as () => void;
2550
+ },
2551
+ /**
2552
+ * Watch SetPoolPercentages events
2553
+ * @param callback Function to call when event is emitted
2554
+ * @param filter Optional filter for indexed parameters
2555
+ * @returns Unwatch function to stop listening
2556
+ */
2557
+ SetPoolPercentages: (callback: (event: { split: bigint[] }) => void) => {
2558
+ return this.publicClient.watchContractEvent({
2559
+ address: this.contractAddress,
2560
+ abi: Native20_jsonAbi,
2561
+ eventName: 'SetPoolPercentages',
2562
+
2563
+ onLogs: (logs: any[]) => {
2564
+ logs.forEach((log: any) => {
2565
+ callback(log.args as any);
2566
+ });
2567
+ },
2568
+ }) as () => void;
2569
+ },
2570
+ /**
2571
+ * Watch SetSymbol events
2572
+ * @param callback Function to call when event is emitted
2573
+ * @param filter Optional filter for indexed parameters
2574
+ * @returns Unwatch function to stop listening
2575
+ */
2576
+ SetSymbol: (callback: (event: { symbol: string }) => void) => {
2577
+ return this.publicClient.watchContractEvent({
2578
+ address: this.contractAddress,
2579
+ abi: Native20_jsonAbi,
2580
+ eventName: 'SetSymbol',
2581
+
2582
+ onLogs: (logs: any[]) => {
2583
+ logs.forEach((log: any) => {
2584
+ callback(log.args as any);
2585
+ });
2586
+ },
2587
+ }) as () => void;
2588
+ },
2589
+ /**
2590
+ * Watch Stake events
2591
+ * @param callback Function to call when event is emitted
2592
+ * @param filter Optional filter for indexed parameters
2593
+ * @returns Unwatch function to stop listening
2594
+ */
2595
+ Stake: (callback: (event: { staker: `0x${string}`; depositedEth: bigint; mintedTokens: bigint; stakeDetails: PoolStakeDetails[] }) => void, filter?: { staker: `0x${string}` }) => {
2596
+ return this.publicClient.watchContractEvent({
2597
+ address: this.contractAddress,
2598
+ abi: Native20_jsonAbi,
2599
+ eventName: 'Stake',
2600
+ args: filter,
2601
+ onLogs: (logs: any[]) => {
2602
+ logs.forEach((log: any) => {
2603
+ callback(log.args as any);
2604
+ });
2605
+ },
2606
+ }) as () => void;
2607
+ },
2608
+ /**
2609
+ * Watch Transfer events
2610
+ * @param callback Function to call when event is emitted
2611
+ * @param filter Optional filter for indexed parameters
2612
+ * @returns Unwatch function to stop listening
2613
+ */
2614
+ Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from: `0x${string}`; to: `0x${string}` }) => {
2615
+ return this.publicClient.watchContractEvent({
2616
+ address: this.contractAddress,
2617
+ abi: Native20_jsonAbi,
2618
+ eventName: 'Transfer',
2619
+ args: filter,
2620
+ onLogs: (logs: any[]) => {
2621
+ logs.forEach((log: any) => {
2622
+ callback(log.args as any);
2623
+ });
2624
+ },
2625
+ }) as () => void;
2626
+ },
2627
+ /**
2628
+ * Watch VPoolSharesReceived events
2629
+ * @param callback Function to call when event is emitted
2630
+ * @param filter Optional filter for indexed parameters
2631
+ * @returns Unwatch function to stop listening
2632
+ */
2633
+ VPoolSharesReceived: (callback: (event: { vPool: `0x${string}`; poolId: bigint; amount: bigint }) => void) => {
2634
+ return this.publicClient.watchContractEvent({
2635
+ address: this.contractAddress,
2636
+ abi: Native20_jsonAbi,
2637
+ eventName: 'VPoolSharesReceived',
2638
+
2639
+ onLogs: (logs: any[]) => {
2640
+ logs.forEach((log: any) => {
2641
+ callback(log.args as any);
2642
+ });
2643
+ },
2644
+ }) as () => void;
2645
+ }
2646
+ };
2647
+ }
2648
+ }