@gitmyabi/zc 1.0.0 → 1.0.2

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