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