@gitmyabi/yee 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,915 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.YEE_json = exports.YEE_jsonAbi = void 0;
4
- const viem_1 = require("viem");
5
- /**
6
- * YEE_json ABI
7
- *
8
- * This ABI is typed using viem's type system for full type safety.
9
- */
10
- exports.YEE_jsonAbi = [
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": "decimals",
155
- "outputs": [
156
- {
157
- "internalType": "uint8",
158
- "name": "",
159
- "type": "uint8"
160
- }
161
- ],
162
- "stateMutability": "pure",
163
- "type": "function"
164
- },
165
- {
166
- "inputs": [],
167
- "name": "initialize",
168
- "outputs": [],
169
- "stateMutability": "nonpayable",
170
- "type": "function"
171
- },
172
- {
173
- "inputs": [
174
- {
175
- "internalType": "uint256",
176
- "name": "percent",
177
- "type": "uint256"
178
- }
179
- ],
180
- "name": "manualSwapback",
181
- "outputs": [],
182
- "stateMutability": "nonpayable",
183
- "type": "function"
184
- },
185
- {
186
- "inputs": [],
187
- "name": "maxWalletAmount",
188
- "outputs": [
189
- {
190
- "internalType": "uint256",
191
- "name": "",
192
- "type": "uint256"
193
- }
194
- ],
195
- "stateMutability": "view",
196
- "type": "function"
197
- },
198
- {
199
- "inputs": [
200
- {
201
- "internalType": "bool[]",
202
- "name": "param",
203
- "type": "bool[]"
204
- },
205
- {
206
- "internalType": "uint256",
207
- "name": "nrBlocks",
208
- "type": "uint256"
209
- }
210
- ],
211
- "name": "modifyParameters",
212
- "outputs": [],
213
- "stateMutability": "nonpayable",
214
- "type": "function"
215
- },
216
- {
217
- "inputs": [],
218
- "name": "name",
219
- "outputs": [
220
- {
221
- "internalType": "string",
222
- "name": "",
223
- "type": "string"
224
- }
225
- ],
226
- "stateMutability": "pure",
227
- "type": "function"
228
- },
229
- {
230
- "inputs": [],
231
- "name": "openTrading",
232
- "outputs": [],
233
- "stateMutability": "nonpayable",
234
- "type": "function"
235
- },
236
- {
237
- "inputs": [],
238
- "name": "owner",
239
- "outputs": [
240
- {
241
- "internalType": "address",
242
- "name": "",
243
- "type": "address"
244
- }
245
- ],
246
- "stateMutability": "view",
247
- "type": "function"
248
- },
249
- {
250
- "inputs": [],
251
- "name": "renounceOwnership",
252
- "outputs": [],
253
- "stateMutability": "nonpayable",
254
- "type": "function"
255
- },
256
- {
257
- "inputs": [
258
- {
259
- "internalType": "address[]",
260
- "name": "bots",
261
- "type": "address[]"
262
- },
263
- {
264
- "internalType": "bool",
265
- "name": "shouldBlock",
266
- "type": "bool"
267
- }
268
- ],
269
- "name": "setBots",
270
- "outputs": [],
271
- "stateMutability": "nonpayable",
272
- "type": "function"
273
- },
274
- {
275
- "inputs": [
276
- {
277
- "internalType": "address",
278
- "name": "account",
279
- "type": "address"
280
- },
281
- {
282
- "internalType": "bool",
283
- "name": "value",
284
- "type": "bool"
285
- }
286
- ],
287
- "name": "setContractExempt",
288
- "outputs": [],
289
- "stateMutability": "nonpayable",
290
- "type": "function"
291
- },
292
- {
293
- "inputs": [
294
- {
295
- "internalType": "uint256",
296
- "name": "newBuyTax",
297
- "type": "uint256"
298
- },
299
- {
300
- "internalType": "uint256",
301
- "name": "newSellTax",
302
- "type": "uint256"
303
- }
304
- ],
305
- "name": "setFees",
306
- "outputs": [],
307
- "stateMutability": "nonpayable",
308
- "type": "function"
309
- },
310
- {
311
- "inputs": [
312
- {
313
- "internalType": "uint256",
314
- "name": "newTradeCooldown",
315
- "type": "uint256"
316
- }
317
- ],
318
- "name": "setTradeCooldown",
319
- "outputs": [],
320
- "stateMutability": "nonpayable",
321
- "type": "function"
322
- },
323
- {
324
- "inputs": [],
325
- "name": "sniperTax",
326
- "outputs": [
327
- {
328
- "internalType": "uint256",
329
- "name": "",
330
- "type": "uint256"
331
- }
332
- ],
333
- "stateMutability": "view",
334
- "type": "function"
335
- },
336
- {
337
- "inputs": [],
338
- "name": "symbol",
339
- "outputs": [
340
- {
341
- "internalType": "string",
342
- "name": "",
343
- "type": "string"
344
- }
345
- ],
346
- "stateMutability": "pure",
347
- "type": "function"
348
- },
349
- {
350
- "inputs": [
351
- {
352
- "internalType": "bool",
353
- "name": "toggle",
354
- "type": "bool"
355
- }
356
- ],
357
- "name": "toggleAntiMEV",
358
- "outputs": [],
359
- "stateMutability": "nonpayable",
360
- "type": "function"
361
- },
362
- {
363
- "inputs": [],
364
- "name": "totalSupply",
365
- "outputs": [
366
- {
367
- "internalType": "uint256",
368
- "name": "",
369
- "type": "uint256"
370
- }
371
- ],
372
- "stateMutability": "pure",
373
- "type": "function"
374
- },
375
- {
376
- "inputs": [],
377
- "name": "tradingFees",
378
- "outputs": [
379
- {
380
- "internalType": "uint256",
381
- "name": "buyTax",
382
- "type": "uint256"
383
- },
384
- {
385
- "internalType": "uint256",
386
- "name": "sellTax",
387
- "type": "uint256"
388
- }
389
- ],
390
- "stateMutability": "view",
391
- "type": "function"
392
- },
393
- {
394
- "inputs": [
395
- {
396
- "internalType": "address",
397
- "name": "recipient",
398
- "type": "address"
399
- },
400
- {
401
- "internalType": "uint256",
402
- "name": "amount",
403
- "type": "uint256"
404
- }
405
- ],
406
- "name": "transfer",
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": "sender",
422
- "type": "address"
423
- },
424
- {
425
- "internalType": "address",
426
- "name": "recipient",
427
- "type": "address"
428
- },
429
- {
430
- "internalType": "uint256",
431
- "name": "amount",
432
- "type": "uint256"
433
- }
434
- ],
435
- "name": "transferFrom",
436
- "outputs": [
437
- {
438
- "internalType": "bool",
439
- "name": "",
440
- "type": "bool"
441
- }
442
- ],
443
- "stateMutability": "nonpayable",
444
- "type": "function"
445
- },
446
- {
447
- "stateMutability": "payable",
448
- "type": "receive"
449
- }
450
- ];
451
- /**
452
- * YEE_json Contract Class
453
- *
454
- * Provides a class-based API similar to TypeChain for interacting with the contract.
455
- *
456
- * @example
457
- * ```typescript
458
- * import { createPublicClient, createWalletClient, http } from 'viem';
459
- * import { mainnet } from 'viem/chains';
460
- * import { YEE_json } from 'YEE_json';
461
- *
462
- * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
463
- * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
464
- *
465
- * const contract = new YEE_json('0x...', { publicClient, walletClient });
466
- *
467
- * // Read functions
468
- * const result = await contract.balanceOf('0x...');
469
- *
470
- * // Write functions
471
- * const hash = await contract.transfer('0x...', 1000n);
472
- *
473
- * // Simulate transactions (dry-run)
474
- * const simulation = await contract.simulate.transfer('0x...', 1000n);
475
- * console.log('Gas estimate:', simulation.request.gas);
476
- *
477
- * // Watch events
478
- * const unwatch = contract.watch.Transfer((event) => {
479
- * console.log('Transfer event:', event);
480
- * });
481
- * ```
482
- */
483
- class YEE_json {
484
- constructor(address, clients) {
485
- this.contractAddress = address;
486
- this.publicClient = clients.publicClient;
487
- this.contract = (0, viem_1.getContract)({
488
- address,
489
- abi: exports.YEE_jsonAbi,
490
- client: {
491
- public: clients.publicClient,
492
- wallet: clients.walletClient,
493
- },
494
- });
495
- }
496
- /**
497
- * Get the contract address
498
- */
499
- get address() {
500
- return this.contractAddress;
501
- }
502
- /**
503
- * Get the underlying viem contract instance
504
- */
505
- getContract() {
506
- return this.contract;
507
- }
508
- /**
509
- * allowance
510
- * view
511
- */
512
- async allowance(owner, spender) {
513
- return this.contract.read.allowance([owner, spender]);
514
- }
515
- /**
516
- * balanceOf
517
- * view
518
- */
519
- async balanceOf(account) {
520
- return this.contract.read.balanceOf([account]);
521
- }
522
- /**
523
- * decimals
524
- * pure
525
- */
526
- async decimals() {
527
- return this.contract.read.decimals();
528
- }
529
- /**
530
- * maxWalletAmount
531
- * view
532
- */
533
- async maxWalletAmount() {
534
- return this.contract.read.maxWalletAmount();
535
- }
536
- /**
537
- * name
538
- * pure
539
- */
540
- async name() {
541
- return this.contract.read.name();
542
- }
543
- /**
544
- * owner
545
- * view
546
- */
547
- async owner() {
548
- return this.contract.read.owner();
549
- }
550
- /**
551
- * sniperTax
552
- * view
553
- */
554
- async sniperTax() {
555
- return this.contract.read.sniperTax();
556
- }
557
- /**
558
- * symbol
559
- * pure
560
- */
561
- async symbol() {
562
- return this.contract.read.symbol();
563
- }
564
- /**
565
- * totalSupply
566
- * pure
567
- */
568
- async totalSupply() {
569
- return this.contract.read.totalSupply();
570
- }
571
- /**
572
- * tradingFees
573
- * view
574
- */
575
- async tradingFees() {
576
- return this.contract.read.tradingFees();
577
- }
578
- /**
579
- * approve
580
- * nonpayable
581
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
582
- */
583
- async approve(spender, amount, options) {
584
- if (!this.contract.write) {
585
- throw new Error('Wallet client is required for write operations');
586
- }
587
- return this.contract.write.approve([spender, amount], options);
588
- }
589
- /**
590
- * initialize
591
- * nonpayable
592
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
593
- */
594
- async initialize(options) {
595
- if (!this.contract.write) {
596
- throw new Error('Wallet client is required for write operations');
597
- }
598
- return this.contract.write.initialize(options);
599
- }
600
- /**
601
- * manualSwapback
602
- * nonpayable
603
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
604
- */
605
- async manualSwapback(percent, options) {
606
- if (!this.contract.write) {
607
- throw new Error('Wallet client is required for write operations');
608
- }
609
- return this.contract.write.manualSwapback([percent], options);
610
- }
611
- /**
612
- * modifyParameters
613
- * nonpayable
614
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
615
- */
616
- async modifyParameters(param, nrBlocks, options) {
617
- if (!this.contract.write) {
618
- throw new Error('Wallet client is required for write operations');
619
- }
620
- return this.contract.write.modifyParameters([param, nrBlocks], options);
621
- }
622
- /**
623
- * openTrading
624
- * nonpayable
625
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
626
- */
627
- async openTrading(options) {
628
- if (!this.contract.write) {
629
- throw new Error('Wallet client is required for write operations');
630
- }
631
- return this.contract.write.openTrading(options);
632
- }
633
- /**
634
- * renounceOwnership
635
- * nonpayable
636
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
637
- */
638
- async renounceOwnership(options) {
639
- if (!this.contract.write) {
640
- throw new Error('Wallet client is required for write operations');
641
- }
642
- return this.contract.write.renounceOwnership(options);
643
- }
644
- /**
645
- * setBots
646
- * nonpayable
647
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
648
- */
649
- async setBots(bots, shouldBlock, options) {
650
- if (!this.contract.write) {
651
- throw new Error('Wallet client is required for write operations');
652
- }
653
- return this.contract.write.setBots([bots, shouldBlock], options);
654
- }
655
- /**
656
- * setContractExempt
657
- * nonpayable
658
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
659
- */
660
- async setContractExempt(account, value, options) {
661
- if (!this.contract.write) {
662
- throw new Error('Wallet client is required for write operations');
663
- }
664
- return this.contract.write.setContractExempt([account, value], options);
665
- }
666
- /**
667
- * setFees
668
- * nonpayable
669
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
670
- */
671
- async setFees(newBuyTax, newSellTax, options) {
672
- if (!this.contract.write) {
673
- throw new Error('Wallet client is required for write operations');
674
- }
675
- return this.contract.write.setFees([newBuyTax, newSellTax], options);
676
- }
677
- /**
678
- * setTradeCooldown
679
- * nonpayable
680
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
681
- */
682
- async setTradeCooldown(newTradeCooldown, options) {
683
- if (!this.contract.write) {
684
- throw new Error('Wallet client is required for write operations');
685
- }
686
- return this.contract.write.setTradeCooldown([newTradeCooldown], options);
687
- }
688
- /**
689
- * toggleAntiMEV
690
- * nonpayable
691
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
692
- */
693
- async toggleAntiMEV(toggle, options) {
694
- if (!this.contract.write) {
695
- throw new Error('Wallet client is required for write operations');
696
- }
697
- return this.contract.write.toggleAntiMEV([toggle], options);
698
- }
699
- /**
700
- * transfer
701
- * nonpayable
702
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
703
- */
704
- async transfer(recipient, amount, options) {
705
- if (!this.contract.write) {
706
- throw new Error('Wallet client is required for write operations');
707
- }
708
- return this.contract.write.transfer([recipient, amount], options);
709
- }
710
- /**
711
- * transferFrom
712
- * nonpayable
713
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
714
- */
715
- async transferFrom(sender, recipient, amount, options) {
716
- if (!this.contract.write) {
717
- throw new Error('Wallet client is required for write operations');
718
- }
719
- return this.contract.write.transferFrom([sender, recipient, amount], options);
720
- }
721
- /**
722
- * Simulate contract write operations (dry-run without sending transaction)
723
- *
724
- * @example
725
- * const result = await contract.simulate.transfer('0x...', 1000n);
726
- * console.log('Gas estimate:', result.request.gas);
727
- * console.log('Would succeed:', result.result);
728
- */
729
- get simulate() {
730
- const contract = this.contract;
731
- if (!contract.simulate) {
732
- throw new Error('Public client is required for simulation');
733
- }
734
- return {
735
- /**
736
- * Simulate approve
737
- * Returns gas estimate and result without sending transaction
738
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
739
- */
740
- async approve(spender, amount, options) {
741
- return contract.simulate.approve([spender, amount], options);
742
- },
743
- /**
744
- * Simulate initialize
745
- * Returns gas estimate and result without sending transaction
746
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
747
- */
748
- async initialize(options) {
749
- return contract.simulate.initialize(options);
750
- },
751
- /**
752
- * Simulate manualSwapback
753
- * Returns gas estimate and result without sending transaction
754
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
755
- */
756
- async manualSwapback(percent, options) {
757
- return contract.simulate.manualSwapback([percent], options);
758
- },
759
- /**
760
- * Simulate modifyParameters
761
- * Returns gas estimate and result without sending transaction
762
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
763
- */
764
- async modifyParameters(param, nrBlocks, options) {
765
- return contract.simulate.modifyParameters([param, nrBlocks], options);
766
- },
767
- /**
768
- * Simulate openTrading
769
- * Returns gas estimate and result without sending transaction
770
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
771
- */
772
- async openTrading(options) {
773
- return contract.simulate.openTrading(options);
774
- },
775
- /**
776
- * Simulate renounceOwnership
777
- * Returns gas estimate and result without sending transaction
778
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
779
- */
780
- async renounceOwnership(options) {
781
- return contract.simulate.renounceOwnership(options);
782
- },
783
- /**
784
- * Simulate setBots
785
- * Returns gas estimate and result without sending transaction
786
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
787
- */
788
- async setBots(bots, shouldBlock, options) {
789
- return contract.simulate.setBots([bots, shouldBlock], options);
790
- },
791
- /**
792
- * Simulate setContractExempt
793
- * Returns gas estimate and result without sending transaction
794
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
795
- */
796
- async setContractExempt(account, value, options) {
797
- return contract.simulate.setContractExempt([account, value], options);
798
- },
799
- /**
800
- * Simulate setFees
801
- * Returns gas estimate and result without sending transaction
802
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
803
- */
804
- async setFees(newBuyTax, newSellTax, options) {
805
- return contract.simulate.setFees([newBuyTax, newSellTax], options);
806
- },
807
- /**
808
- * Simulate setTradeCooldown
809
- * Returns gas estimate and result without sending transaction
810
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
811
- */
812
- async setTradeCooldown(newTradeCooldown, options) {
813
- return contract.simulate.setTradeCooldown([newTradeCooldown], options);
814
- },
815
- /**
816
- * Simulate toggleAntiMEV
817
- * Returns gas estimate and result without sending transaction
818
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
819
- */
820
- async toggleAntiMEV(toggle, options) {
821
- return contract.simulate.toggleAntiMEV([toggle], options);
822
- },
823
- /**
824
- * Simulate transfer
825
- * Returns gas estimate and result without sending transaction
826
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
827
- */
828
- async transfer(recipient, amount, options) {
829
- return contract.simulate.transfer([recipient, amount], options);
830
- },
831
- /**
832
- * Simulate transferFrom
833
- * Returns gas estimate and result without sending transaction
834
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
835
- */
836
- async transferFrom(sender, recipient, amount, options) {
837
- return contract.simulate.transferFrom([sender, recipient, amount], options);
838
- }
839
- };
840
- }
841
- /**
842
- * Watch contract events
843
- *
844
- * @example
845
- * // Watch all Transfer events
846
- * const unwatch = contract.watch.Transfer((event) => {
847
- * console.log('Transfer:', event);
848
- * });
849
- *
850
- * // Stop watching
851
- * unwatch();
852
- */
853
- get watch() {
854
- return {
855
- /**
856
- * Watch Approval events
857
- * @param callback Function to call when event is emitted
858
- * @param filter Optional filter for indexed parameters
859
- * @returns Unwatch function to stop listening
860
- */
861
- Approval: (callback, filter) => {
862
- return this.publicClient.watchContractEvent({
863
- address: this.contractAddress,
864
- abi: exports.YEE_jsonAbi,
865
- eventName: 'Approval',
866
- args: filter,
867
- onLogs: (logs) => {
868
- logs.forEach((log) => {
869
- callback(log.args);
870
- });
871
- },
872
- });
873
- },
874
- /**
875
- * Watch OwnershipTransferred events
876
- * @param callback Function to call when event is emitted
877
- * @param filter Optional filter for indexed parameters
878
- * @returns Unwatch function to stop listening
879
- */
880
- OwnershipTransferred: (callback, filter) => {
881
- return this.publicClient.watchContractEvent({
882
- address: this.contractAddress,
883
- abi: exports.YEE_jsonAbi,
884
- eventName: 'OwnershipTransferred',
885
- args: filter,
886
- onLogs: (logs) => {
887
- logs.forEach((log) => {
888
- callback(log.args);
889
- });
890
- },
891
- });
892
- },
893
- /**
894
- * Watch Transfer events
895
- * @param callback Function to call when event is emitted
896
- * @param filter Optional filter for indexed parameters
897
- * @returns Unwatch function to stop listening
898
- */
899
- Transfer: (callback, filter) => {
900
- return this.publicClient.watchContractEvent({
901
- address: this.contractAddress,
902
- abi: exports.YEE_jsonAbi,
903
- eventName: 'Transfer',
904
- args: filter,
905
- onLogs: (logs) => {
906
- logs.forEach((log) => {
907
- callback(log.args);
908
- });
909
- },
910
- });
911
- }
912
- };
913
- }
914
- }
915
- exports.YEE_json = YEE_json;