@gitmyabi-stg/dop 1.0.0 → 1.0.1

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