@gitmyabi/zc 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,1677 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+ /**
5
+ * LaunchToken_json ABI
6
+ *
7
+ * This ABI is typed using viem's type system for full type safety.
8
+ */
9
+ export const LaunchToken_jsonAbi = [
10
+ {
11
+ "inputs": [],
12
+ "stateMutability": "nonpayable",
13
+ "type": "constructor"
14
+ },
15
+ {
16
+ "inputs": [],
17
+ "name": "AlreadyInitialised",
18
+ "type": "error"
19
+ },
20
+ {
21
+ "inputs": [],
22
+ "name": "BuyCapExceeded",
23
+ "type": "error"
24
+ },
25
+ {
26
+ "inputs": [],
27
+ "name": "CreatorOnlyBlock",
28
+ "type": "error"
29
+ },
30
+ {
31
+ "inputs": [
32
+ {
33
+ "internalType": "address",
34
+ "name": "spender",
35
+ "type": "address"
36
+ },
37
+ {
38
+ "internalType": "uint256",
39
+ "name": "allowance",
40
+ "type": "uint256"
41
+ },
42
+ {
43
+ "internalType": "uint256",
44
+ "name": "needed",
45
+ "type": "uint256"
46
+ }
47
+ ],
48
+ "name": "ERC20InsufficientAllowance",
49
+ "type": "error"
50
+ },
51
+ {
52
+ "inputs": [
53
+ {
54
+ "internalType": "address",
55
+ "name": "sender",
56
+ "type": "address"
57
+ },
58
+ {
59
+ "internalType": "uint256",
60
+ "name": "balance",
61
+ "type": "uint256"
62
+ },
63
+ {
64
+ "internalType": "uint256",
65
+ "name": "needed",
66
+ "type": "uint256"
67
+ }
68
+ ],
69
+ "name": "ERC20InsufficientBalance",
70
+ "type": "error"
71
+ },
72
+ {
73
+ "inputs": [
74
+ {
75
+ "internalType": "address",
76
+ "name": "approver",
77
+ "type": "address"
78
+ }
79
+ ],
80
+ "name": "ERC20InvalidApprover",
81
+ "type": "error"
82
+ },
83
+ {
84
+ "inputs": [
85
+ {
86
+ "internalType": "address",
87
+ "name": "receiver",
88
+ "type": "address"
89
+ }
90
+ ],
91
+ "name": "ERC20InvalidReceiver",
92
+ "type": "error"
93
+ },
94
+ {
95
+ "inputs": [
96
+ {
97
+ "internalType": "address",
98
+ "name": "sender",
99
+ "type": "address"
100
+ }
101
+ ],
102
+ "name": "ERC20InvalidSender",
103
+ "type": "error"
104
+ },
105
+ {
106
+ "inputs": [
107
+ {
108
+ "internalType": "address",
109
+ "name": "spender",
110
+ "type": "address"
111
+ }
112
+ ],
113
+ "name": "ERC20InvalidSpender",
114
+ "type": "error"
115
+ },
116
+ {
117
+ "inputs": [],
118
+ "name": "HoldCapExceeded",
119
+ "type": "error"
120
+ },
121
+ {
122
+ "inputs": [],
123
+ "name": "MarketAlreadySet",
124
+ "type": "error"
125
+ },
126
+ {
127
+ "inputs": [],
128
+ "name": "NoEligibleSupply",
129
+ "type": "error"
130
+ },
131
+ {
132
+ "inputs": [],
133
+ "name": "NothingToClaim",
134
+ "type": "error"
135
+ },
136
+ {
137
+ "inputs": [],
138
+ "name": "OnlyFactory",
139
+ "type": "error"
140
+ },
141
+ {
142
+ "inputs": [],
143
+ "name": "RewardTransferFailed",
144
+ "type": "error"
145
+ },
146
+ {
147
+ "inputs": [
148
+ {
149
+ "internalType": "address",
150
+ "name": "token",
151
+ "type": "address"
152
+ }
153
+ ],
154
+ "name": "SafeERC20FailedOperation",
155
+ "type": "error"
156
+ },
157
+ {
158
+ "anonymous": false,
159
+ "inputs": [
160
+ {
161
+ "indexed": true,
162
+ "internalType": "address",
163
+ "name": "owner",
164
+ "type": "address"
165
+ },
166
+ {
167
+ "indexed": true,
168
+ "internalType": "address",
169
+ "name": "spender",
170
+ "type": "address"
171
+ },
172
+ {
173
+ "indexed": false,
174
+ "internalType": "uint256",
175
+ "name": "value",
176
+ "type": "uint256"
177
+ }
178
+ ],
179
+ "name": "Approval",
180
+ "type": "event"
181
+ },
182
+ {
183
+ "anonymous": false,
184
+ "inputs": [
185
+ {
186
+ "indexed": true,
187
+ "internalType": "address",
188
+ "name": "rewardToken",
189
+ "type": "address"
190
+ }
191
+ ],
192
+ "name": "HolderFeesEnabled",
193
+ "type": "event"
194
+ },
195
+ {
196
+ "anonymous": false,
197
+ "inputs": [
198
+ {
199
+ "indexed": false,
200
+ "internalType": "uint256",
201
+ "name": "amount",
202
+ "type": "uint256"
203
+ },
204
+ {
205
+ "indexed": false,
206
+ "internalType": "uint256",
207
+ "name": "accRewardPerToken",
208
+ "type": "uint256"
209
+ }
210
+ ],
211
+ "name": "RewardAdded",
212
+ "type": "event"
213
+ },
214
+ {
215
+ "anonymous": false,
216
+ "inputs": [
217
+ {
218
+ "indexed": false,
219
+ "internalType": "uint256",
220
+ "name": "amount",
221
+ "type": "uint256"
222
+ },
223
+ {
224
+ "indexed": false,
225
+ "internalType": "uint256",
226
+ "name": "totalCarried",
227
+ "type": "uint256"
228
+ }
229
+ ],
230
+ "name": "RewardCarried",
231
+ "type": "event"
232
+ },
233
+ {
234
+ "anonymous": false,
235
+ "inputs": [
236
+ {
237
+ "indexed": true,
238
+ "internalType": "address",
239
+ "name": "holder",
240
+ "type": "address"
241
+ },
242
+ {
243
+ "indexed": false,
244
+ "internalType": "uint256",
245
+ "name": "amount",
246
+ "type": "uint256"
247
+ }
248
+ ],
249
+ "name": "RewardClaimed",
250
+ "type": "event"
251
+ },
252
+ {
253
+ "anonymous": false,
254
+ "inputs": [
255
+ {
256
+ "indexed": true,
257
+ "internalType": "address",
258
+ "name": "from",
259
+ "type": "address"
260
+ },
261
+ {
262
+ "indexed": true,
263
+ "internalType": "address",
264
+ "name": "to",
265
+ "type": "address"
266
+ },
267
+ {
268
+ "indexed": false,
269
+ "internalType": "uint256",
270
+ "name": "value",
271
+ "type": "uint256"
272
+ }
273
+ ],
274
+ "name": "Transfer",
275
+ "type": "event"
276
+ },
277
+ {
278
+ "inputs": [],
279
+ "name": "GUARD_BLOCKS",
280
+ "outputs": [
281
+ {
282
+ "internalType": "uint256",
283
+ "name": "",
284
+ "type": "uint256"
285
+ }
286
+ ],
287
+ "stateMutability": "view",
288
+ "type": "function"
289
+ },
290
+ {
291
+ "inputs": [],
292
+ "name": "MAX_BUY",
293
+ "outputs": [
294
+ {
295
+ "internalType": "uint256",
296
+ "name": "",
297
+ "type": "uint256"
298
+ }
299
+ ],
300
+ "stateMutability": "view",
301
+ "type": "function"
302
+ },
303
+ {
304
+ "inputs": [],
305
+ "name": "MAX_HOLD",
306
+ "outputs": [
307
+ {
308
+ "internalType": "uint256",
309
+ "name": "",
310
+ "type": "uint256"
311
+ }
312
+ ],
313
+ "stateMutability": "view",
314
+ "type": "function"
315
+ },
316
+ {
317
+ "inputs": [],
318
+ "name": "RAMP_BLOCKS",
319
+ "outputs": [
320
+ {
321
+ "internalType": "uint256",
322
+ "name": "",
323
+ "type": "uint256"
324
+ }
325
+ ],
326
+ "stateMutability": "view",
327
+ "type": "function"
328
+ },
329
+ {
330
+ "inputs": [],
331
+ "name": "RAMP_START",
332
+ "outputs": [
333
+ {
334
+ "internalType": "uint256",
335
+ "name": "",
336
+ "type": "uint256"
337
+ }
338
+ ],
339
+ "stateMutability": "view",
340
+ "type": "function"
341
+ },
342
+ {
343
+ "inputs": [],
344
+ "name": "TOTAL_SUPPLY",
345
+ "outputs": [
346
+ {
347
+ "internalType": "uint256",
348
+ "name": "",
349
+ "type": "uint256"
350
+ }
351
+ ],
352
+ "stateMutability": "view",
353
+ "type": "function"
354
+ },
355
+ {
356
+ "inputs": [],
357
+ "name": "accRewardPerToken",
358
+ "outputs": [
359
+ {
360
+ "internalType": "uint256",
361
+ "name": "",
362
+ "type": "uint256"
363
+ }
364
+ ],
365
+ "stateMutability": "view",
366
+ "type": "function"
367
+ },
368
+ {
369
+ "inputs": [
370
+ {
371
+ "internalType": "address",
372
+ "name": "owner",
373
+ "type": "address"
374
+ },
375
+ {
376
+ "internalType": "address",
377
+ "name": "spender",
378
+ "type": "address"
379
+ }
380
+ ],
381
+ "name": "allowance",
382
+ "outputs": [
383
+ {
384
+ "internalType": "uint256",
385
+ "name": "",
386
+ "type": "uint256"
387
+ }
388
+ ],
389
+ "stateMutability": "view",
390
+ "type": "function"
391
+ },
392
+ {
393
+ "inputs": [
394
+ {
395
+ "internalType": "address",
396
+ "name": "spender",
397
+ "type": "address"
398
+ },
399
+ {
400
+ "internalType": "uint256",
401
+ "name": "value",
402
+ "type": "uint256"
403
+ }
404
+ ],
405
+ "name": "approve",
406
+ "outputs": [
407
+ {
408
+ "internalType": "bool",
409
+ "name": "",
410
+ "type": "bool"
411
+ }
412
+ ],
413
+ "stateMutability": "nonpayable",
414
+ "type": "function"
415
+ },
416
+ {
417
+ "inputs": [
418
+ {
419
+ "internalType": "address",
420
+ "name": "account",
421
+ "type": "address"
422
+ }
423
+ ],
424
+ "name": "balanceOf",
425
+ "outputs": [
426
+ {
427
+ "internalType": "uint256",
428
+ "name": "",
429
+ "type": "uint256"
430
+ }
431
+ ],
432
+ "stateMutability": "view",
433
+ "type": "function"
434
+ },
435
+ {
436
+ "inputs": [],
437
+ "name": "carriedReward",
438
+ "outputs": [
439
+ {
440
+ "internalType": "uint256",
441
+ "name": "",
442
+ "type": "uint256"
443
+ }
444
+ ],
445
+ "stateMutability": "view",
446
+ "type": "function"
447
+ },
448
+ {
449
+ "inputs": [],
450
+ "name": "claim",
451
+ "outputs": [
452
+ {
453
+ "internalType": "uint256",
454
+ "name": "amount",
455
+ "type": "uint256"
456
+ }
457
+ ],
458
+ "stateMutability": "nonpayable",
459
+ "type": "function"
460
+ },
461
+ {
462
+ "inputs": [],
463
+ "name": "creator",
464
+ "outputs": [
465
+ {
466
+ "internalType": "address",
467
+ "name": "",
468
+ "type": "address"
469
+ }
470
+ ],
471
+ "stateMutability": "view",
472
+ "type": "function"
473
+ },
474
+ {
475
+ "inputs": [],
476
+ "name": "currentBuyCap",
477
+ "outputs": [
478
+ {
479
+ "internalType": "uint256",
480
+ "name": "",
481
+ "type": "uint256"
482
+ }
483
+ ],
484
+ "stateMutability": "view",
485
+ "type": "function"
486
+ },
487
+ {
488
+ "inputs": [],
489
+ "name": "decimals",
490
+ "outputs": [
491
+ {
492
+ "internalType": "uint8",
493
+ "name": "",
494
+ "type": "uint8"
495
+ }
496
+ ],
497
+ "stateMutability": "view",
498
+ "type": "function"
499
+ },
500
+ {
501
+ "inputs": [],
502
+ "name": "eligibleSupply",
503
+ "outputs": [
504
+ {
505
+ "internalType": "uint256",
506
+ "name": "",
507
+ "type": "uint256"
508
+ }
509
+ ],
510
+ "stateMutability": "view",
511
+ "type": "function"
512
+ },
513
+ {
514
+ "inputs": [
515
+ {
516
+ "internalType": "address",
517
+ "name": "rewardToken_",
518
+ "type": "address"
519
+ },
520
+ {
521
+ "internalType": "address",
522
+ "name": "rewardSource_",
523
+ "type": "address"
524
+ }
525
+ ],
526
+ "name": "enableHolderFees",
527
+ "outputs": [],
528
+ "stateMutability": "nonpayable",
529
+ "type": "function"
530
+ },
531
+ {
532
+ "inputs": [],
533
+ "name": "factory",
534
+ "outputs": [
535
+ {
536
+ "internalType": "address",
537
+ "name": "",
538
+ "type": "address"
539
+ }
540
+ ],
541
+ "stateMutability": "view",
542
+ "type": "function"
543
+ },
544
+ {
545
+ "inputs": [],
546
+ "name": "guardActive",
547
+ "outputs": [
548
+ {
549
+ "internalType": "bool",
550
+ "name": "",
551
+ "type": "bool"
552
+ }
553
+ ],
554
+ "stateMutability": "view",
555
+ "type": "function"
556
+ },
557
+ {
558
+ "inputs": [],
559
+ "name": "guardEndsAtBlock",
560
+ "outputs": [
561
+ {
562
+ "internalType": "uint256",
563
+ "name": "",
564
+ "type": "uint256"
565
+ }
566
+ ],
567
+ "stateMutability": "view",
568
+ "type": "function"
569
+ },
570
+ {
571
+ "inputs": [],
572
+ "name": "holderFeesEnabled",
573
+ "outputs": [
574
+ {
575
+ "internalType": "bool",
576
+ "name": "",
577
+ "type": "bool"
578
+ }
579
+ ],
580
+ "stateMutability": "view",
581
+ "type": "function"
582
+ },
583
+ {
584
+ "inputs": [
585
+ {
586
+ "internalType": "string",
587
+ "name": "name_",
588
+ "type": "string"
589
+ },
590
+ {
591
+ "internalType": "string",
592
+ "name": "symbol_",
593
+ "type": "string"
594
+ },
595
+ {
596
+ "internalType": "string",
597
+ "name": "metadataURI_",
598
+ "type": "string"
599
+ },
600
+ {
601
+ "internalType": "address",
602
+ "name": "creator_",
603
+ "type": "address"
604
+ }
605
+ ],
606
+ "name": "initialize",
607
+ "outputs": [],
608
+ "stateMutability": "nonpayable",
609
+ "type": "function"
610
+ },
611
+ {
612
+ "inputs": [],
613
+ "name": "launchBlock",
614
+ "outputs": [
615
+ {
616
+ "internalType": "uint256",
617
+ "name": "",
618
+ "type": "uint256"
619
+ }
620
+ ],
621
+ "stateMutability": "view",
622
+ "type": "function"
623
+ },
624
+ {
625
+ "inputs": [],
626
+ "name": "market",
627
+ "outputs": [
628
+ {
629
+ "internalType": "address",
630
+ "name": "",
631
+ "type": "address"
632
+ }
633
+ ],
634
+ "stateMutability": "view",
635
+ "type": "function"
636
+ },
637
+ {
638
+ "inputs": [],
639
+ "name": "metadataURI",
640
+ "outputs": [
641
+ {
642
+ "internalType": "string",
643
+ "name": "",
644
+ "type": "string"
645
+ }
646
+ ],
647
+ "stateMutability": "view",
648
+ "type": "function"
649
+ },
650
+ {
651
+ "inputs": [],
652
+ "name": "name",
653
+ "outputs": [
654
+ {
655
+ "internalType": "string",
656
+ "name": "",
657
+ "type": "string"
658
+ }
659
+ ],
660
+ "stateMutability": "view",
661
+ "type": "function"
662
+ },
663
+ {
664
+ "inputs": [
665
+ {
666
+ "internalType": "uint256",
667
+ "name": "amount",
668
+ "type": "uint256"
669
+ }
670
+ ],
671
+ "name": "notifyReward",
672
+ "outputs": [],
673
+ "stateMutability": "payable",
674
+ "type": "function"
675
+ },
676
+ {
677
+ "inputs": [
678
+ {
679
+ "internalType": "address",
680
+ "name": "holder",
681
+ "type": "address"
682
+ }
683
+ ],
684
+ "name": "pendingReward",
685
+ "outputs": [
686
+ {
687
+ "internalType": "uint256",
688
+ "name": "",
689
+ "type": "uint256"
690
+ }
691
+ ],
692
+ "stateMutability": "view",
693
+ "type": "function"
694
+ },
695
+ {
696
+ "inputs": [],
697
+ "name": "rampEndsAtBlock",
698
+ "outputs": [
699
+ {
700
+ "internalType": "uint256",
701
+ "name": "",
702
+ "type": "uint256"
703
+ }
704
+ ],
705
+ "stateMutability": "view",
706
+ "type": "function"
707
+ },
708
+ {
709
+ "inputs": [
710
+ {
711
+ "internalType": "address",
712
+ "name": "",
713
+ "type": "address"
714
+ }
715
+ ],
716
+ "name": "rewardExcluded",
717
+ "outputs": [
718
+ {
719
+ "internalType": "bool",
720
+ "name": "",
721
+ "type": "bool"
722
+ }
723
+ ],
724
+ "stateMutability": "view",
725
+ "type": "function"
726
+ },
727
+ {
728
+ "inputs": [],
729
+ "name": "rewardSource",
730
+ "outputs": [
731
+ {
732
+ "internalType": "address",
733
+ "name": "",
734
+ "type": "address"
735
+ }
736
+ ],
737
+ "stateMutability": "view",
738
+ "type": "function"
739
+ },
740
+ {
741
+ "inputs": [],
742
+ "name": "rewardToken",
743
+ "outputs": [
744
+ {
745
+ "internalType": "address",
746
+ "name": "",
747
+ "type": "address"
748
+ }
749
+ ],
750
+ "stateMutability": "view",
751
+ "type": "function"
752
+ },
753
+ {
754
+ "inputs": [
755
+ {
756
+ "internalType": "address",
757
+ "name": "market_",
758
+ "type": "address"
759
+ }
760
+ ],
761
+ "name": "setMarket",
762
+ "outputs": [],
763
+ "stateMutability": "nonpayable",
764
+ "type": "function"
765
+ },
766
+ {
767
+ "inputs": [],
768
+ "name": "symbol",
769
+ "outputs": [
770
+ {
771
+ "internalType": "string",
772
+ "name": "",
773
+ "type": "string"
774
+ }
775
+ ],
776
+ "stateMutability": "view",
777
+ "type": "function"
778
+ },
779
+ {
780
+ "inputs": [],
781
+ "name": "totalSupply",
782
+ "outputs": [
783
+ {
784
+ "internalType": "uint256",
785
+ "name": "",
786
+ "type": "uint256"
787
+ }
788
+ ],
789
+ "stateMutability": "view",
790
+ "type": "function"
791
+ },
792
+ {
793
+ "inputs": [
794
+ {
795
+ "internalType": "address",
796
+ "name": "to",
797
+ "type": "address"
798
+ },
799
+ {
800
+ "internalType": "uint256",
801
+ "name": "value",
802
+ "type": "uint256"
803
+ }
804
+ ],
805
+ "name": "transfer",
806
+ "outputs": [
807
+ {
808
+ "internalType": "bool",
809
+ "name": "",
810
+ "type": "bool"
811
+ }
812
+ ],
813
+ "stateMutability": "nonpayable",
814
+ "type": "function"
815
+ },
816
+ {
817
+ "inputs": [
818
+ {
819
+ "internalType": "address",
820
+ "name": "from",
821
+ "type": "address"
822
+ },
823
+ {
824
+ "internalType": "address",
825
+ "name": "to",
826
+ "type": "address"
827
+ },
828
+ {
829
+ "internalType": "uint256",
830
+ "name": "value",
831
+ "type": "uint256"
832
+ }
833
+ ],
834
+ "name": "transferFrom",
835
+ "outputs": [
836
+ {
837
+ "internalType": "bool",
838
+ "name": "",
839
+ "type": "bool"
840
+ }
841
+ ],
842
+ "stateMutability": "nonpayable",
843
+ "type": "function"
844
+ },
845
+ {
846
+ "inputs": [
847
+ {
848
+ "internalType": "address",
849
+ "name": "",
850
+ "type": "address"
851
+ }
852
+ ],
853
+ "name": "unclaimed",
854
+ "outputs": [
855
+ {
856
+ "internalType": "uint256",
857
+ "name": "",
858
+ "type": "uint256"
859
+ }
860
+ ],
861
+ "stateMutability": "view",
862
+ "type": "function"
863
+ },
864
+ {
865
+ "stateMutability": "payable",
866
+ "type": "receive"
867
+ }
868
+ ] as const satisfies Abi;
869
+
870
+ /**
871
+ * Type-safe ABI for LaunchToken_json
872
+ */
873
+ export type LaunchToken_jsonAbi = typeof LaunchToken_jsonAbi;
874
+
875
+ /**
876
+ * Contract instance type for LaunchToken_json
877
+ */
878
+ // Use any for contract type to avoid complex viem type issues
879
+ // The runtime behavior is type-safe through viem's ABI typing
880
+ export type LaunchToken_jsonContract = any;
881
+
882
+ /**
883
+ * LaunchToken_json Contract Class
884
+ *
885
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
886
+ *
887
+ * @example
888
+ * ```typescript
889
+ * import { createPublicClient, createWalletClient, http } from 'viem';
890
+ * import { mainnet } from 'viem/chains';
891
+ * import { LaunchToken_json } from 'LaunchToken_json';
892
+ *
893
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
894
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
895
+ *
896
+ * const contract = new LaunchToken_json('0x...', { publicClient, walletClient });
897
+ *
898
+ * // Read functions
899
+ * const result = await contract.balanceOf('0x...');
900
+ *
901
+ * // Write functions
902
+ * const hash = await contract.transfer('0x...', 1000n);
903
+ *
904
+ * // Simulate transactions (dry-run)
905
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
906
+ * console.log('Gas estimate:', simulation.request.gas);
907
+ *
908
+ * // Watch events
909
+ * const unwatch = contract.watch.Transfer((event) => {
910
+ * console.log('Transfer event:', event);
911
+ * });
912
+ * ```
913
+ */
914
+ export class LaunchToken_json {
915
+ private contract: LaunchToken_jsonContract;
916
+ private contractAddress: Address;
917
+ private publicClient: PublicClient;
918
+
919
+ constructor(
920
+ address: Address,
921
+ clients: {
922
+ publicClient: PublicClient;
923
+ walletClient?: WalletClient;
924
+ }
925
+ ) {
926
+ this.contractAddress = address;
927
+ this.publicClient = clients.publicClient;
928
+ this.contract = getContract({
929
+ address,
930
+ abi: LaunchToken_jsonAbi,
931
+ client: {
932
+ public: clients.publicClient,
933
+ wallet: clients.walletClient,
934
+ },
935
+ });
936
+ }
937
+
938
+ /**
939
+ * Get the contract address
940
+ */
941
+ get address(): Address {
942
+ return this.contractAddress;
943
+ }
944
+
945
+ /**
946
+ * Get the underlying viem contract instance
947
+ */
948
+ getContract(): LaunchToken_jsonContract {
949
+ return this.contract;
950
+ }
951
+
952
+ /**
953
+ * GUARD_BLOCKS
954
+ * view
955
+ */
956
+ async GUARD_BLOCKS(): Promise<bigint> {
957
+ return this.contract.read.GUARD_BLOCKS() as Promise<bigint>;
958
+ }
959
+
960
+ /**
961
+ * MAX_BUY
962
+ * view
963
+ */
964
+ async MAX_BUY(): Promise<bigint> {
965
+ return this.contract.read.MAX_BUY() as Promise<bigint>;
966
+ }
967
+
968
+ /**
969
+ * MAX_HOLD
970
+ * view
971
+ */
972
+ async MAX_HOLD(): Promise<bigint> {
973
+ return this.contract.read.MAX_HOLD() as Promise<bigint>;
974
+ }
975
+
976
+ /**
977
+ * RAMP_BLOCKS
978
+ * view
979
+ */
980
+ async RAMP_BLOCKS(): Promise<bigint> {
981
+ return this.contract.read.RAMP_BLOCKS() as Promise<bigint>;
982
+ }
983
+
984
+ /**
985
+ * RAMP_START
986
+ * view
987
+ */
988
+ async RAMP_START(): Promise<bigint> {
989
+ return this.contract.read.RAMP_START() as Promise<bigint>;
990
+ }
991
+
992
+ /**
993
+ * TOTAL_SUPPLY
994
+ * view
995
+ */
996
+ async TOTAL_SUPPLY(): Promise<bigint> {
997
+ return this.contract.read.TOTAL_SUPPLY() as Promise<bigint>;
998
+ }
999
+
1000
+ /**
1001
+ * accRewardPerToken
1002
+ * view
1003
+ */
1004
+ async accRewardPerToken(): Promise<bigint> {
1005
+ return this.contract.read.accRewardPerToken() as Promise<bigint>;
1006
+ }
1007
+
1008
+ /**
1009
+ * allowance
1010
+ * view
1011
+ */
1012
+ async allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint> {
1013
+ return this.contract.read.allowance([owner, spender] as const) as Promise<bigint>;
1014
+ }
1015
+
1016
+ /**
1017
+ * balanceOf
1018
+ * view
1019
+ */
1020
+ async balanceOf(account: `0x${string}`): Promise<bigint> {
1021
+ return this.contract.read.balanceOf([account] as const) as Promise<bigint>;
1022
+ }
1023
+
1024
+ /**
1025
+ * carriedReward
1026
+ * view
1027
+ */
1028
+ async carriedReward(): Promise<bigint> {
1029
+ return this.contract.read.carriedReward() as Promise<bigint>;
1030
+ }
1031
+
1032
+ /**
1033
+ * creator
1034
+ * view
1035
+ */
1036
+ async creator(): Promise<`0x${string}`> {
1037
+ return this.contract.read.creator() as Promise<`0x${string}`>;
1038
+ }
1039
+
1040
+ /**
1041
+ * currentBuyCap
1042
+ * view
1043
+ */
1044
+ async currentBuyCap(): Promise<bigint> {
1045
+ return this.contract.read.currentBuyCap() as Promise<bigint>;
1046
+ }
1047
+
1048
+ /**
1049
+ * decimals
1050
+ * view
1051
+ */
1052
+ async decimals(): Promise<bigint> {
1053
+ return this.contract.read.decimals() as Promise<bigint>;
1054
+ }
1055
+
1056
+ /**
1057
+ * eligibleSupply
1058
+ * view
1059
+ */
1060
+ async eligibleSupply(): Promise<bigint> {
1061
+ return this.contract.read.eligibleSupply() as Promise<bigint>;
1062
+ }
1063
+
1064
+ /**
1065
+ * factory
1066
+ * view
1067
+ */
1068
+ async factory(): Promise<`0x${string}`> {
1069
+ return this.contract.read.factory() as Promise<`0x${string}`>;
1070
+ }
1071
+
1072
+ /**
1073
+ * guardActive
1074
+ * view
1075
+ */
1076
+ async guardActive(): Promise<boolean> {
1077
+ return this.contract.read.guardActive() as Promise<boolean>;
1078
+ }
1079
+
1080
+ /**
1081
+ * guardEndsAtBlock
1082
+ * view
1083
+ */
1084
+ async guardEndsAtBlock(): Promise<bigint> {
1085
+ return this.contract.read.guardEndsAtBlock() as Promise<bigint>;
1086
+ }
1087
+
1088
+ /**
1089
+ * holderFeesEnabled
1090
+ * view
1091
+ */
1092
+ async holderFeesEnabled(): Promise<boolean> {
1093
+ return this.contract.read.holderFeesEnabled() as Promise<boolean>;
1094
+ }
1095
+
1096
+ /**
1097
+ * launchBlock
1098
+ * view
1099
+ */
1100
+ async launchBlock(): Promise<bigint> {
1101
+ return this.contract.read.launchBlock() as Promise<bigint>;
1102
+ }
1103
+
1104
+ /**
1105
+ * market
1106
+ * view
1107
+ */
1108
+ async market(): Promise<`0x${string}`> {
1109
+ return this.contract.read.market() as Promise<`0x${string}`>;
1110
+ }
1111
+
1112
+ /**
1113
+ * metadataURI
1114
+ * view
1115
+ */
1116
+ async metadataURI(): Promise<string> {
1117
+ return this.contract.read.metadataURI() as Promise<string>;
1118
+ }
1119
+
1120
+ /**
1121
+ * name
1122
+ * view
1123
+ */
1124
+ async name(): Promise<string> {
1125
+ return this.contract.read.name() as Promise<string>;
1126
+ }
1127
+
1128
+ /**
1129
+ * pendingReward
1130
+ * view
1131
+ */
1132
+ async pendingReward(holder: `0x${string}`): Promise<bigint> {
1133
+ return this.contract.read.pendingReward([holder] as const) as Promise<bigint>;
1134
+ }
1135
+
1136
+ /**
1137
+ * rampEndsAtBlock
1138
+ * view
1139
+ */
1140
+ async rampEndsAtBlock(): Promise<bigint> {
1141
+ return this.contract.read.rampEndsAtBlock() as Promise<bigint>;
1142
+ }
1143
+
1144
+ /**
1145
+ * rewardExcluded
1146
+ * view
1147
+ */
1148
+ async rewardExcluded(arg0: `0x${string}`): Promise<boolean> {
1149
+ return this.contract.read.rewardExcluded([arg0] as const) as Promise<boolean>;
1150
+ }
1151
+
1152
+ /**
1153
+ * rewardSource
1154
+ * view
1155
+ */
1156
+ async rewardSource(): Promise<`0x${string}`> {
1157
+ return this.contract.read.rewardSource() as Promise<`0x${string}`>;
1158
+ }
1159
+
1160
+ /**
1161
+ * rewardToken
1162
+ * view
1163
+ */
1164
+ async rewardToken(): Promise<`0x${string}`> {
1165
+ return this.contract.read.rewardToken() as Promise<`0x${string}`>;
1166
+ }
1167
+
1168
+ /**
1169
+ * symbol
1170
+ * view
1171
+ */
1172
+ async symbol(): Promise<string> {
1173
+ return this.contract.read.symbol() as Promise<string>;
1174
+ }
1175
+
1176
+ /**
1177
+ * totalSupply
1178
+ * view
1179
+ */
1180
+ async totalSupply(): Promise<bigint> {
1181
+ return this.contract.read.totalSupply() as Promise<bigint>;
1182
+ }
1183
+
1184
+ /**
1185
+ * unclaimed
1186
+ * view
1187
+ */
1188
+ async unclaimed(arg0: `0x${string}`): Promise<bigint> {
1189
+ return this.contract.read.unclaimed([arg0] as const) as Promise<bigint>;
1190
+ }
1191
+
1192
+ /**
1193
+ * approve
1194
+ * nonpayable
1195
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1196
+ */
1197
+ async approve(spender: `0x${string}`, value: bigint, options?: {
1198
+ accessList?: import('viem').AccessList;
1199
+ authorizationList?: import('viem').AuthorizationList;
1200
+ chain?: import('viem').Chain | null;
1201
+ dataSuffix?: `0x${string}`;
1202
+ gas?: bigint;
1203
+ gasPrice?: bigint;
1204
+ maxFeePerGas?: bigint;
1205
+ maxPriorityFeePerGas?: bigint;
1206
+ nonce?: number;
1207
+ value?: bigint;
1208
+ }): Promise<`0x${string}`> {
1209
+ if (!this.contract.write) {
1210
+ throw new Error('Wallet client is required for write operations');
1211
+ }
1212
+ return this.contract.write.approve([spender, value] as const, options) as Promise<`0x${string}`>;
1213
+ }
1214
+
1215
+ /**
1216
+ * claim
1217
+ * nonpayable
1218
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1219
+ */
1220
+ async claim(options?: {
1221
+ accessList?: import('viem').AccessList;
1222
+ authorizationList?: import('viem').AuthorizationList;
1223
+ chain?: import('viem').Chain | null;
1224
+ dataSuffix?: `0x${string}`;
1225
+ gas?: bigint;
1226
+ gasPrice?: bigint;
1227
+ maxFeePerGas?: bigint;
1228
+ maxPriorityFeePerGas?: bigint;
1229
+ nonce?: number;
1230
+ value?: bigint;
1231
+ }): Promise<`0x${string}`> {
1232
+ if (!this.contract.write) {
1233
+ throw new Error('Wallet client is required for write operations');
1234
+ }
1235
+ return this.contract.write.claim(options) as Promise<`0x${string}`>;
1236
+ }
1237
+
1238
+ /**
1239
+ * enableHolderFees
1240
+ * nonpayable
1241
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1242
+ */
1243
+ async enableHolderFees(rewardToken_: `0x${string}`, rewardSource_: `0x${string}`, options?: {
1244
+ accessList?: import('viem').AccessList;
1245
+ authorizationList?: import('viem').AuthorizationList;
1246
+ chain?: import('viem').Chain | null;
1247
+ dataSuffix?: `0x${string}`;
1248
+ gas?: bigint;
1249
+ gasPrice?: bigint;
1250
+ maxFeePerGas?: bigint;
1251
+ maxPriorityFeePerGas?: bigint;
1252
+ nonce?: number;
1253
+ value?: bigint;
1254
+ }): Promise<`0x${string}`> {
1255
+ if (!this.contract.write) {
1256
+ throw new Error('Wallet client is required for write operations');
1257
+ }
1258
+ return this.contract.write.enableHolderFees([rewardToken_, rewardSource_] as const, options) as Promise<`0x${string}`>;
1259
+ }
1260
+
1261
+ /**
1262
+ * initialize
1263
+ * nonpayable
1264
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1265
+ */
1266
+ async initialize(name_: string, symbol_: string, metadataURI_: string, creator_: `0x${string}`, options?: {
1267
+ accessList?: import('viem').AccessList;
1268
+ authorizationList?: import('viem').AuthorizationList;
1269
+ chain?: import('viem').Chain | null;
1270
+ dataSuffix?: `0x${string}`;
1271
+ gas?: bigint;
1272
+ gasPrice?: bigint;
1273
+ maxFeePerGas?: bigint;
1274
+ maxPriorityFeePerGas?: bigint;
1275
+ nonce?: number;
1276
+ value?: bigint;
1277
+ }): Promise<`0x${string}`> {
1278
+ if (!this.contract.write) {
1279
+ throw new Error('Wallet client is required for write operations');
1280
+ }
1281
+ return this.contract.write.initialize([name_, symbol_, metadataURI_, creator_] as const, options) as Promise<`0x${string}`>;
1282
+ }
1283
+
1284
+ /**
1285
+ * notifyReward
1286
+ * payable
1287
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1288
+ */
1289
+ async notifyReward(amount: bigint, options?: {
1290
+ accessList?: import('viem').AccessList;
1291
+ authorizationList?: import('viem').AuthorizationList;
1292
+ chain?: import('viem').Chain | null;
1293
+ dataSuffix?: `0x${string}`;
1294
+ gas?: bigint;
1295
+ gasPrice?: bigint;
1296
+ maxFeePerGas?: bigint;
1297
+ maxPriorityFeePerGas?: bigint;
1298
+ nonce?: number;
1299
+ value?: bigint;
1300
+ }): Promise<`0x${string}`> {
1301
+ if (!this.contract.write) {
1302
+ throw new Error('Wallet client is required for write operations');
1303
+ }
1304
+ return this.contract.write.notifyReward([amount] as const, options) as Promise<`0x${string}`>;
1305
+ }
1306
+
1307
+ /**
1308
+ * setMarket
1309
+ * nonpayable
1310
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1311
+ */
1312
+ async setMarket(market_: `0x${string}`, options?: {
1313
+ accessList?: import('viem').AccessList;
1314
+ authorizationList?: import('viem').AuthorizationList;
1315
+ chain?: import('viem').Chain | null;
1316
+ dataSuffix?: `0x${string}`;
1317
+ gas?: bigint;
1318
+ gasPrice?: bigint;
1319
+ maxFeePerGas?: bigint;
1320
+ maxPriorityFeePerGas?: bigint;
1321
+ nonce?: number;
1322
+ value?: bigint;
1323
+ }): Promise<`0x${string}`> {
1324
+ if (!this.contract.write) {
1325
+ throw new Error('Wallet client is required for write operations');
1326
+ }
1327
+ return this.contract.write.setMarket([market_] as const, options) as Promise<`0x${string}`>;
1328
+ }
1329
+
1330
+ /**
1331
+ * transfer
1332
+ * nonpayable
1333
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1334
+ */
1335
+ async transfer(to: `0x${string}`, value: bigint, options?: {
1336
+ accessList?: import('viem').AccessList;
1337
+ authorizationList?: import('viem').AuthorizationList;
1338
+ chain?: import('viem').Chain | null;
1339
+ dataSuffix?: `0x${string}`;
1340
+ gas?: bigint;
1341
+ gasPrice?: bigint;
1342
+ maxFeePerGas?: bigint;
1343
+ maxPriorityFeePerGas?: bigint;
1344
+ nonce?: number;
1345
+ value?: bigint;
1346
+ }): Promise<`0x${string}`> {
1347
+ if (!this.contract.write) {
1348
+ throw new Error('Wallet client is required for write operations');
1349
+ }
1350
+ return this.contract.write.transfer([to, value] as const, options) as Promise<`0x${string}`>;
1351
+ }
1352
+
1353
+ /**
1354
+ * transferFrom
1355
+ * nonpayable
1356
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1357
+ */
1358
+ async transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
1359
+ accessList?: import('viem').AccessList;
1360
+ authorizationList?: import('viem').AuthorizationList;
1361
+ chain?: import('viem').Chain | null;
1362
+ dataSuffix?: `0x${string}`;
1363
+ gas?: bigint;
1364
+ gasPrice?: bigint;
1365
+ maxFeePerGas?: bigint;
1366
+ maxPriorityFeePerGas?: bigint;
1367
+ nonce?: number;
1368
+ value?: bigint;
1369
+ }): Promise<`0x${string}`> {
1370
+ if (!this.contract.write) {
1371
+ throw new Error('Wallet client is required for write operations');
1372
+ }
1373
+ return this.contract.write.transferFrom([from, to, value] as const, options) as Promise<`0x${string}`>;
1374
+ }
1375
+
1376
+
1377
+
1378
+ /**
1379
+ * Simulate contract write operations (dry-run without sending transaction)
1380
+ *
1381
+ * @example
1382
+ * const result = await contract.simulate.transfer('0x...', 1000n);
1383
+ * console.log('Gas estimate:', result.request.gas);
1384
+ * console.log('Would succeed:', result.result);
1385
+ */
1386
+ get simulate() {
1387
+ const contract = this.contract;
1388
+ if (!contract.simulate) {
1389
+ throw new Error('Public client is required for simulation');
1390
+ }
1391
+ return {
1392
+ /**
1393
+ * Simulate approve
1394
+ * Returns gas estimate and result without sending transaction
1395
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1396
+ */
1397
+ async approve(spender: `0x${string}`, value: bigint, options?: {
1398
+ accessList?: import('viem').AccessList;
1399
+ authorizationList?: import('viem').AuthorizationList;
1400
+ chain?: import('viem').Chain | null;
1401
+ dataSuffix?: `0x${string}`;
1402
+ gas?: bigint;
1403
+ gasPrice?: bigint;
1404
+ maxFeePerGas?: bigint;
1405
+ maxPriorityFeePerGas?: bigint;
1406
+ nonce?: number;
1407
+ value?: bigint;
1408
+ }): Promise<boolean> {
1409
+ return contract.simulate.approve([spender, value] as const, options) as Promise<boolean>;
1410
+ },
1411
+ /**
1412
+ * Simulate claim
1413
+ * Returns gas estimate and result without sending transaction
1414
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1415
+ */
1416
+ async claim(options?: {
1417
+ accessList?: import('viem').AccessList;
1418
+ authorizationList?: import('viem').AuthorizationList;
1419
+ chain?: import('viem').Chain | null;
1420
+ dataSuffix?: `0x${string}`;
1421
+ gas?: bigint;
1422
+ gasPrice?: bigint;
1423
+ maxFeePerGas?: bigint;
1424
+ maxPriorityFeePerGas?: bigint;
1425
+ nonce?: number;
1426
+ value?: bigint;
1427
+ }): Promise<bigint> {
1428
+ return contract.simulate.claim(options) as Promise<bigint>;
1429
+ },
1430
+ /**
1431
+ * Simulate enableHolderFees
1432
+ * Returns gas estimate and result without sending transaction
1433
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1434
+ */
1435
+ async enableHolderFees(rewardToken_: `0x${string}`, rewardSource_: `0x${string}`, options?: {
1436
+ accessList?: import('viem').AccessList;
1437
+ authorizationList?: import('viem').AuthorizationList;
1438
+ chain?: import('viem').Chain | null;
1439
+ dataSuffix?: `0x${string}`;
1440
+ gas?: bigint;
1441
+ gasPrice?: bigint;
1442
+ maxFeePerGas?: bigint;
1443
+ maxPriorityFeePerGas?: bigint;
1444
+ nonce?: number;
1445
+ value?: bigint;
1446
+ }): Promise<void> {
1447
+ return contract.simulate.enableHolderFees([rewardToken_, rewardSource_] as const, options) as Promise<void>;
1448
+ },
1449
+ /**
1450
+ * Simulate initialize
1451
+ * Returns gas estimate and result without sending transaction
1452
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1453
+ */
1454
+ async initialize(name_: string, symbol_: string, metadataURI_: string, creator_: `0x${string}`, options?: {
1455
+ accessList?: import('viem').AccessList;
1456
+ authorizationList?: import('viem').AuthorizationList;
1457
+ chain?: import('viem').Chain | null;
1458
+ dataSuffix?: `0x${string}`;
1459
+ gas?: bigint;
1460
+ gasPrice?: bigint;
1461
+ maxFeePerGas?: bigint;
1462
+ maxPriorityFeePerGas?: bigint;
1463
+ nonce?: number;
1464
+ value?: bigint;
1465
+ }): Promise<void> {
1466
+ return contract.simulate.initialize([name_, symbol_, metadataURI_, creator_] as const, options) as Promise<void>;
1467
+ },
1468
+ /**
1469
+ * Simulate notifyReward
1470
+ * Returns gas estimate and result without sending transaction
1471
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1472
+ */
1473
+ async notifyReward(amount: bigint, options?: {
1474
+ accessList?: import('viem').AccessList;
1475
+ authorizationList?: import('viem').AuthorizationList;
1476
+ chain?: import('viem').Chain | null;
1477
+ dataSuffix?: `0x${string}`;
1478
+ gas?: bigint;
1479
+ gasPrice?: bigint;
1480
+ maxFeePerGas?: bigint;
1481
+ maxPriorityFeePerGas?: bigint;
1482
+ nonce?: number;
1483
+ value?: bigint;
1484
+ }): Promise<void> {
1485
+ return contract.simulate.notifyReward([amount] as const, options) as Promise<void>;
1486
+ },
1487
+ /**
1488
+ * Simulate setMarket
1489
+ * Returns gas estimate and result without sending transaction
1490
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1491
+ */
1492
+ async setMarket(market_: `0x${string}`, options?: {
1493
+ accessList?: import('viem').AccessList;
1494
+ authorizationList?: import('viem').AuthorizationList;
1495
+ chain?: import('viem').Chain | null;
1496
+ dataSuffix?: `0x${string}`;
1497
+ gas?: bigint;
1498
+ gasPrice?: bigint;
1499
+ maxFeePerGas?: bigint;
1500
+ maxPriorityFeePerGas?: bigint;
1501
+ nonce?: number;
1502
+ value?: bigint;
1503
+ }): Promise<void> {
1504
+ return contract.simulate.setMarket([market_] as const, options) as Promise<void>;
1505
+ },
1506
+ /**
1507
+ * Simulate transfer
1508
+ * Returns gas estimate and result without sending transaction
1509
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1510
+ */
1511
+ async transfer(to: `0x${string}`, value: bigint, options?: {
1512
+ accessList?: import('viem').AccessList;
1513
+ authorizationList?: import('viem').AuthorizationList;
1514
+ chain?: import('viem').Chain | null;
1515
+ dataSuffix?: `0x${string}`;
1516
+ gas?: bigint;
1517
+ gasPrice?: bigint;
1518
+ maxFeePerGas?: bigint;
1519
+ maxPriorityFeePerGas?: bigint;
1520
+ nonce?: number;
1521
+ value?: bigint;
1522
+ }): Promise<boolean> {
1523
+ return contract.simulate.transfer([to, value] as const, options) as Promise<boolean>;
1524
+ },
1525
+ /**
1526
+ * Simulate transferFrom
1527
+ * Returns gas estimate and result without sending transaction
1528
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1529
+ */
1530
+ async transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
1531
+ accessList?: import('viem').AccessList;
1532
+ authorizationList?: import('viem').AuthorizationList;
1533
+ chain?: import('viem').Chain | null;
1534
+ dataSuffix?: `0x${string}`;
1535
+ gas?: bigint;
1536
+ gasPrice?: bigint;
1537
+ maxFeePerGas?: bigint;
1538
+ maxPriorityFeePerGas?: bigint;
1539
+ nonce?: number;
1540
+ value?: bigint;
1541
+ }): Promise<boolean> {
1542
+ return contract.simulate.transferFrom([from, to, value] as const, options) as Promise<boolean>;
1543
+ }
1544
+ };
1545
+ }
1546
+
1547
+ /**
1548
+ * Watch contract events
1549
+ *
1550
+ * @example
1551
+ * // Watch all Transfer events
1552
+ * const unwatch = contract.watch.Transfer((event) => {
1553
+ * console.log('Transfer:', event);
1554
+ * });
1555
+ *
1556
+ * // Stop watching
1557
+ * unwatch();
1558
+ */
1559
+ get watch() {
1560
+ return {
1561
+ /**
1562
+ * Watch Approval events
1563
+ * @param callback Function to call when event is emitted
1564
+ * @param filter Optional filter for indexed parameters
1565
+ * @returns Unwatch function to stop listening
1566
+ */
1567
+ Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner: `0x${string}`; spender: `0x${string}` }) => {
1568
+ return this.publicClient.watchContractEvent({
1569
+ address: this.contractAddress,
1570
+ abi: LaunchToken_jsonAbi,
1571
+ eventName: 'Approval',
1572
+ args: filter,
1573
+ onLogs: (logs: any[]) => {
1574
+ logs.forEach((log: any) => {
1575
+ callback(log.args as any);
1576
+ });
1577
+ },
1578
+ }) as () => void;
1579
+ },
1580
+ /**
1581
+ * Watch HolderFeesEnabled events
1582
+ * @param callback Function to call when event is emitted
1583
+ * @param filter Optional filter for indexed parameters
1584
+ * @returns Unwatch function to stop listening
1585
+ */
1586
+ HolderFeesEnabled: (callback: (event: { rewardToken: `0x${string}` }) => void, filter?: { rewardToken: `0x${string}` }) => {
1587
+ return this.publicClient.watchContractEvent({
1588
+ address: this.contractAddress,
1589
+ abi: LaunchToken_jsonAbi,
1590
+ eventName: 'HolderFeesEnabled',
1591
+ args: filter,
1592
+ onLogs: (logs: any[]) => {
1593
+ logs.forEach((log: any) => {
1594
+ callback(log.args as any);
1595
+ });
1596
+ },
1597
+ }) as () => void;
1598
+ },
1599
+ /**
1600
+ * Watch RewardAdded events
1601
+ * @param callback Function to call when event is emitted
1602
+ * @param filter Optional filter for indexed parameters
1603
+ * @returns Unwatch function to stop listening
1604
+ */
1605
+ RewardAdded: (callback: (event: { amount: bigint; accRewardPerToken: bigint }) => void) => {
1606
+ return this.publicClient.watchContractEvent({
1607
+ address: this.contractAddress,
1608
+ abi: LaunchToken_jsonAbi,
1609
+ eventName: 'RewardAdded',
1610
+
1611
+ onLogs: (logs: any[]) => {
1612
+ logs.forEach((log: any) => {
1613
+ callback(log.args as any);
1614
+ });
1615
+ },
1616
+ }) as () => void;
1617
+ },
1618
+ /**
1619
+ * Watch RewardCarried events
1620
+ * @param callback Function to call when event is emitted
1621
+ * @param filter Optional filter for indexed parameters
1622
+ * @returns Unwatch function to stop listening
1623
+ */
1624
+ RewardCarried: (callback: (event: { amount: bigint; totalCarried: bigint }) => void) => {
1625
+ return this.publicClient.watchContractEvent({
1626
+ address: this.contractAddress,
1627
+ abi: LaunchToken_jsonAbi,
1628
+ eventName: 'RewardCarried',
1629
+
1630
+ onLogs: (logs: any[]) => {
1631
+ logs.forEach((log: any) => {
1632
+ callback(log.args as any);
1633
+ });
1634
+ },
1635
+ }) as () => void;
1636
+ },
1637
+ /**
1638
+ * Watch RewardClaimed events
1639
+ * @param callback Function to call when event is emitted
1640
+ * @param filter Optional filter for indexed parameters
1641
+ * @returns Unwatch function to stop listening
1642
+ */
1643
+ RewardClaimed: (callback: (event: { holder: `0x${string}`; amount: bigint }) => void, filter?: { holder: `0x${string}` }) => {
1644
+ return this.publicClient.watchContractEvent({
1645
+ address: this.contractAddress,
1646
+ abi: LaunchToken_jsonAbi,
1647
+ eventName: 'RewardClaimed',
1648
+ args: filter,
1649
+ onLogs: (logs: any[]) => {
1650
+ logs.forEach((log: any) => {
1651
+ callback(log.args as any);
1652
+ });
1653
+ },
1654
+ }) as () => void;
1655
+ },
1656
+ /**
1657
+ * Watch Transfer events
1658
+ * @param callback Function to call when event is emitted
1659
+ * @param filter Optional filter for indexed parameters
1660
+ * @returns Unwatch function to stop listening
1661
+ */
1662
+ Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from: `0x${string}`; to: `0x${string}` }) => {
1663
+ return this.publicClient.watchContractEvent({
1664
+ address: this.contractAddress,
1665
+ abi: LaunchToken_jsonAbi,
1666
+ eventName: 'Transfer',
1667
+ args: filter,
1668
+ onLogs: (logs: any[]) => {
1669
+ logs.forEach((log: any) => {
1670
+ callback(log.args as any);
1671
+ });
1672
+ },
1673
+ }) as () => void;
1674
+ }
1675
+ };
1676
+ }
1677
+ }