@gitmyabi/xai 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,936 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SDSHD_json = exports.SDSHD_jsonAbi = void 0;
4
+ const viem_1 = require("viem");
5
+ /**
6
+ * SDSHD_json ABI
7
+ *
8
+ * This ABI is typed using viem's type system for full type safety.
9
+ */
10
+ exports.SDSHD_jsonAbi = [
11
+ {
12
+ "inputs": [
13
+ {
14
+ "internalType": "address",
15
+ "name": "swapRouter_",
16
+ "type": "address"
17
+ }
18
+ ],
19
+ "stateMutability": "nonpayable",
20
+ "type": "constructor"
21
+ },
22
+ {
23
+ "inputs": [
24
+ {
25
+ "internalType": "address",
26
+ "name": "spender",
27
+ "type": "address"
28
+ },
29
+ {
30
+ "internalType": "uint256",
31
+ "name": "allowance",
32
+ "type": "uint256"
33
+ },
34
+ {
35
+ "internalType": "uint256",
36
+ "name": "needed",
37
+ "type": "uint256"
38
+ }
39
+ ],
40
+ "name": "ERC20InsufficientAllowance",
41
+ "type": "error"
42
+ },
43
+ {
44
+ "inputs": [
45
+ {
46
+ "internalType": "address",
47
+ "name": "sender",
48
+ "type": "address"
49
+ },
50
+ {
51
+ "internalType": "uint256",
52
+ "name": "balance",
53
+ "type": "uint256"
54
+ },
55
+ {
56
+ "internalType": "uint256",
57
+ "name": "needed",
58
+ "type": "uint256"
59
+ }
60
+ ],
61
+ "name": "ERC20InsufficientBalance",
62
+ "type": "error"
63
+ },
64
+ {
65
+ "inputs": [
66
+ {
67
+ "internalType": "address",
68
+ "name": "approver",
69
+ "type": "address"
70
+ }
71
+ ],
72
+ "name": "ERC20InvalidApprover",
73
+ "type": "error"
74
+ },
75
+ {
76
+ "inputs": [
77
+ {
78
+ "internalType": "address",
79
+ "name": "receiver",
80
+ "type": "address"
81
+ }
82
+ ],
83
+ "name": "ERC20InvalidReceiver",
84
+ "type": "error"
85
+ },
86
+ {
87
+ "inputs": [
88
+ {
89
+ "internalType": "address",
90
+ "name": "sender",
91
+ "type": "address"
92
+ }
93
+ ],
94
+ "name": "ERC20InvalidSender",
95
+ "type": "error"
96
+ },
97
+ {
98
+ "inputs": [
99
+ {
100
+ "internalType": "address",
101
+ "name": "spender",
102
+ "type": "address"
103
+ }
104
+ ],
105
+ "name": "ERC20InvalidSpender",
106
+ "type": "error"
107
+ },
108
+ {
109
+ "inputs": [
110
+ {
111
+ "internalType": "address",
112
+ "name": "owner",
113
+ "type": "address"
114
+ }
115
+ ],
116
+ "name": "OwnableInvalidOwner",
117
+ "type": "error"
118
+ },
119
+ {
120
+ "inputs": [
121
+ {
122
+ "internalType": "address",
123
+ "name": "account",
124
+ "type": "address"
125
+ }
126
+ ],
127
+ "name": "OwnableUnauthorizedAccount",
128
+ "type": "error"
129
+ },
130
+ {
131
+ "anonymous": false,
132
+ "inputs": [
133
+ {
134
+ "indexed": true,
135
+ "internalType": "address",
136
+ "name": "owner",
137
+ "type": "address"
138
+ },
139
+ {
140
+ "indexed": true,
141
+ "internalType": "address",
142
+ "name": "spender",
143
+ "type": "address"
144
+ },
145
+ {
146
+ "indexed": false,
147
+ "internalType": "uint256",
148
+ "name": "value",
149
+ "type": "uint256"
150
+ }
151
+ ],
152
+ "name": "Approval",
153
+ "type": "event"
154
+ },
155
+ {
156
+ "anonymous": false,
157
+ "inputs": [
158
+ {
159
+ "indexed": true,
160
+ "internalType": "address",
161
+ "name": "previousOwner",
162
+ "type": "address"
163
+ },
164
+ {
165
+ "indexed": true,
166
+ "internalType": "address",
167
+ "name": "newOwner",
168
+ "type": "address"
169
+ }
170
+ ],
171
+ "name": "OwnershipTransferred",
172
+ "type": "event"
173
+ },
174
+ {
175
+ "anonymous": false,
176
+ "inputs": [
177
+ {
178
+ "indexed": true,
179
+ "internalType": "address",
180
+ "name": "from",
181
+ "type": "address"
182
+ },
183
+ {
184
+ "indexed": true,
185
+ "internalType": "address",
186
+ "name": "to",
187
+ "type": "address"
188
+ },
189
+ {
190
+ "indexed": false,
191
+ "internalType": "uint256",
192
+ "name": "value",
193
+ "type": "uint256"
194
+ }
195
+ ],
196
+ "name": "Transfer",
197
+ "type": "event"
198
+ },
199
+ {
200
+ "inputs": [
201
+ {
202
+ "internalType": "address[]",
203
+ "name": "to",
204
+ "type": "address[]"
205
+ }
206
+ ],
207
+ "name": "airdrop",
208
+ "outputs": [],
209
+ "stateMutability": "nonpayable",
210
+ "type": "function"
211
+ },
212
+ {
213
+ "inputs": [
214
+ {
215
+ "internalType": "address",
216
+ "name": "owner_",
217
+ "type": "address"
218
+ },
219
+ {
220
+ "internalType": "address",
221
+ "name": "spender_",
222
+ "type": "address"
223
+ }
224
+ ],
225
+ "name": "allowance",
226
+ "outputs": [
227
+ {
228
+ "internalType": "uint256",
229
+ "name": "",
230
+ "type": "uint256"
231
+ }
232
+ ],
233
+ "stateMutability": "view",
234
+ "type": "function"
235
+ },
236
+ {
237
+ "inputs": [
238
+ {
239
+ "internalType": "address",
240
+ "name": "spender",
241
+ "type": "address"
242
+ },
243
+ {
244
+ "internalType": "uint256",
245
+ "name": "value",
246
+ "type": "uint256"
247
+ }
248
+ ],
249
+ "name": "approve",
250
+ "outputs": [
251
+ {
252
+ "internalType": "bool",
253
+ "name": "",
254
+ "type": "bool"
255
+ }
256
+ ],
257
+ "stateMutability": "nonpayable",
258
+ "type": "function"
259
+ },
260
+ {
261
+ "inputs": [
262
+ {
263
+ "internalType": "address",
264
+ "name": "account",
265
+ "type": "address"
266
+ }
267
+ ],
268
+ "name": "balanceOf",
269
+ "outputs": [
270
+ {
271
+ "internalType": "uint256",
272
+ "name": "",
273
+ "type": "uint256"
274
+ }
275
+ ],
276
+ "stateMutability": "view",
277
+ "type": "function"
278
+ },
279
+ {
280
+ "inputs": [
281
+ {
282
+ "internalType": "address",
283
+ "name": "addr",
284
+ "type": "address"
285
+ },
286
+ {
287
+ "internalType": "uint256",
288
+ "name": "amount",
289
+ "type": "uint256"
290
+ }
291
+ ],
292
+ "name": "burn",
293
+ "outputs": [],
294
+ "stateMutability": "nonpayable",
295
+ "type": "function"
296
+ },
297
+ {
298
+ "inputs": [],
299
+ "name": "decimals",
300
+ "outputs": [
301
+ {
302
+ "internalType": "uint8",
303
+ "name": "",
304
+ "type": "uint8"
305
+ }
306
+ ],
307
+ "stateMutability": "view",
308
+ "type": "function"
309
+ },
310
+ {
311
+ "inputs": [
312
+ {
313
+ "internalType": "address",
314
+ "name": "addr",
315
+ "type": "address"
316
+ }
317
+ ],
318
+ "name": "isInBlackList",
319
+ "outputs": [
320
+ {
321
+ "internalType": "bool",
322
+ "name": "",
323
+ "type": "bool"
324
+ }
325
+ ],
326
+ "stateMutability": "view",
327
+ "type": "function"
328
+ },
329
+ {
330
+ "inputs": [],
331
+ "name": "name",
332
+ "outputs": [
333
+ {
334
+ "internalType": "string",
335
+ "name": "",
336
+ "type": "string"
337
+ }
338
+ ],
339
+ "stateMutability": "view",
340
+ "type": "function"
341
+ },
342
+ {
343
+ "inputs": [],
344
+ "name": "owner",
345
+ "outputs": [
346
+ {
347
+ "internalType": "address",
348
+ "name": "",
349
+ "type": "address"
350
+ }
351
+ ],
352
+ "stateMutability": "view",
353
+ "type": "function"
354
+ },
355
+ {
356
+ "inputs": [],
357
+ "name": "pairAddress",
358
+ "outputs": [
359
+ {
360
+ "internalType": "address",
361
+ "name": "",
362
+ "type": "address"
363
+ }
364
+ ],
365
+ "stateMutability": "view",
366
+ "type": "function"
367
+ },
368
+ {
369
+ "inputs": [
370
+ {
371
+ "internalType": "address[]",
372
+ "name": "addrs",
373
+ "type": "address[]"
374
+ }
375
+ ],
376
+ "name": "removeBlackList",
377
+ "outputs": [],
378
+ "stateMutability": "nonpayable",
379
+ "type": "function"
380
+ },
381
+ {
382
+ "inputs": [],
383
+ "name": "renounceOwnership",
384
+ "outputs": [],
385
+ "stateMutability": "nonpayable",
386
+ "type": "function"
387
+ },
388
+ {
389
+ "inputs": [],
390
+ "name": "symbol",
391
+ "outputs": [
392
+ {
393
+ "internalType": "string",
394
+ "name": "",
395
+ "type": "string"
396
+ }
397
+ ],
398
+ "stateMutability": "view",
399
+ "type": "function"
400
+ },
401
+ {
402
+ "inputs": [],
403
+ "name": "taxReceiver",
404
+ "outputs": [
405
+ {
406
+ "internalType": "address",
407
+ "name": "",
408
+ "type": "address"
409
+ }
410
+ ],
411
+ "stateMutability": "view",
412
+ "type": "function"
413
+ },
414
+ {
415
+ "inputs": [],
416
+ "name": "totalSupply",
417
+ "outputs": [
418
+ {
419
+ "internalType": "uint256",
420
+ "name": "",
421
+ "type": "uint256"
422
+ }
423
+ ],
424
+ "stateMutability": "view",
425
+ "type": "function"
426
+ },
427
+ {
428
+ "inputs": [
429
+ {
430
+ "internalType": "address",
431
+ "name": "to",
432
+ "type": "address"
433
+ },
434
+ {
435
+ "internalType": "uint256",
436
+ "name": "value",
437
+ "type": "uint256"
438
+ }
439
+ ],
440
+ "name": "transfer",
441
+ "outputs": [
442
+ {
443
+ "internalType": "bool",
444
+ "name": "",
445
+ "type": "bool"
446
+ }
447
+ ],
448
+ "stateMutability": "nonpayable",
449
+ "type": "function"
450
+ },
451
+ {
452
+ "inputs": [
453
+ {
454
+ "internalType": "address",
455
+ "name": "from",
456
+ "type": "address"
457
+ },
458
+ {
459
+ "internalType": "address",
460
+ "name": "to",
461
+ "type": "address"
462
+ },
463
+ {
464
+ "internalType": "uint256",
465
+ "name": "value",
466
+ "type": "uint256"
467
+ }
468
+ ],
469
+ "name": "transferFrom",
470
+ "outputs": [
471
+ {
472
+ "internalType": "bool",
473
+ "name": "",
474
+ "type": "bool"
475
+ }
476
+ ],
477
+ "stateMutability": "nonpayable",
478
+ "type": "function"
479
+ },
480
+ {
481
+ "inputs": [
482
+ {
483
+ "internalType": "address",
484
+ "name": "newOwner",
485
+ "type": "address"
486
+ }
487
+ ],
488
+ "name": "transferOwnership",
489
+ "outputs": [],
490
+ "stateMutability": "nonpayable",
491
+ "type": "function"
492
+ },
493
+ {
494
+ "inputs": [
495
+ {
496
+ "internalType": "address[]",
497
+ "name": "addrs",
498
+ "type": "address[]"
499
+ },
500
+ {
501
+ "internalType": "bool[]",
502
+ "name": "values",
503
+ "type": "bool[]"
504
+ }
505
+ ],
506
+ "name": "updateBlackList",
507
+ "outputs": [],
508
+ "stateMutability": "nonpayable",
509
+ "type": "function"
510
+ },
511
+ {
512
+ "inputs": [
513
+ {
514
+ "internalType": "address",
515
+ "name": "_token",
516
+ "type": "address"
517
+ }
518
+ ],
519
+ "name": "withdraw",
520
+ "outputs": [],
521
+ "stateMutability": "nonpayable",
522
+ "type": "function"
523
+ },
524
+ {
525
+ "stateMutability": "payable",
526
+ "type": "receive"
527
+ }
528
+ ];
529
+ /**
530
+ * SDSHD_json Contract Class
531
+ *
532
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
533
+ *
534
+ * @example
535
+ * ```typescript
536
+ * import { createPublicClient, createWalletClient, http } from 'viem';
537
+ * import { mainnet } from 'viem/chains';
538
+ * import { SDSHD_json } from 'SDSHD_json';
539
+ *
540
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
541
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
542
+ *
543
+ * const contract = new SDSHD_json('0x...', { publicClient, walletClient });
544
+ *
545
+ * // Read functions
546
+ * const result = await contract.balanceOf('0x...');
547
+ *
548
+ * // Write functions
549
+ * const hash = await contract.transfer('0x...', 1000n);
550
+ *
551
+ * // Simulate transactions (dry-run)
552
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
553
+ * console.log('Gas estimate:', simulation.request.gas);
554
+ *
555
+ * // Watch events
556
+ * const unwatch = contract.watch.Transfer((event) => {
557
+ * console.log('Transfer event:', event);
558
+ * });
559
+ * ```
560
+ */
561
+ class SDSHD_json {
562
+ constructor(address, clients) {
563
+ this.contractAddress = address;
564
+ this.publicClient = clients.publicClient;
565
+ this.contract = (0, viem_1.getContract)({
566
+ address,
567
+ abi: exports.SDSHD_jsonAbi,
568
+ client: {
569
+ public: clients.publicClient,
570
+ wallet: clients.walletClient,
571
+ },
572
+ });
573
+ }
574
+ /**
575
+ * Get the contract address
576
+ */
577
+ get address() {
578
+ return this.contractAddress;
579
+ }
580
+ /**
581
+ * Get the underlying viem contract instance
582
+ */
583
+ getContract() {
584
+ return this.contract;
585
+ }
586
+ /**
587
+ * allowance
588
+ * view
589
+ */
590
+ async allowance(owner_, spender_) {
591
+ return this.contract.read.allowance([owner_, spender_]);
592
+ }
593
+ /**
594
+ * balanceOf
595
+ * view
596
+ */
597
+ async balanceOf(account) {
598
+ return this.contract.read.balanceOf([account]);
599
+ }
600
+ /**
601
+ * decimals
602
+ * view
603
+ */
604
+ async decimals() {
605
+ return this.contract.read.decimals();
606
+ }
607
+ /**
608
+ * isInBlackList
609
+ * view
610
+ */
611
+ async isInBlackList(addr) {
612
+ return this.contract.read.isInBlackList([addr]);
613
+ }
614
+ /**
615
+ * name
616
+ * view
617
+ */
618
+ async name() {
619
+ return this.contract.read.name();
620
+ }
621
+ /**
622
+ * owner
623
+ * view
624
+ */
625
+ async owner() {
626
+ return this.contract.read.owner();
627
+ }
628
+ /**
629
+ * pairAddress
630
+ * view
631
+ */
632
+ async pairAddress() {
633
+ return this.contract.read.pairAddress();
634
+ }
635
+ /**
636
+ * symbol
637
+ * view
638
+ */
639
+ async symbol() {
640
+ return this.contract.read.symbol();
641
+ }
642
+ /**
643
+ * taxReceiver
644
+ * view
645
+ */
646
+ async taxReceiver() {
647
+ return this.contract.read.taxReceiver();
648
+ }
649
+ /**
650
+ * totalSupply
651
+ * view
652
+ */
653
+ async totalSupply() {
654
+ return this.contract.read.totalSupply();
655
+ }
656
+ /**
657
+ * airdrop
658
+ * nonpayable
659
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
660
+ */
661
+ async airdrop(to, options) {
662
+ if (!this.contract.write) {
663
+ throw new Error('Wallet client is required for write operations');
664
+ }
665
+ return this.contract.write.airdrop([to], options);
666
+ }
667
+ /**
668
+ * approve
669
+ * nonpayable
670
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
671
+ */
672
+ async approve(spender, value, options) {
673
+ if (!this.contract.write) {
674
+ throw new Error('Wallet client is required for write operations');
675
+ }
676
+ return this.contract.write.approve([spender, value], options);
677
+ }
678
+ /**
679
+ * burn
680
+ * nonpayable
681
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
682
+ */
683
+ async burn(addr, amount, options) {
684
+ if (!this.contract.write) {
685
+ throw new Error('Wallet client is required for write operations');
686
+ }
687
+ return this.contract.write.burn([addr, amount], options);
688
+ }
689
+ /**
690
+ * removeBlackList
691
+ * nonpayable
692
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
693
+ */
694
+ async removeBlackList(addrs, options) {
695
+ if (!this.contract.write) {
696
+ throw new Error('Wallet client is required for write operations');
697
+ }
698
+ return this.contract.write.removeBlackList([addrs], options);
699
+ }
700
+ /**
701
+ * renounceOwnership
702
+ * nonpayable
703
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
704
+ */
705
+ async renounceOwnership(options) {
706
+ if (!this.contract.write) {
707
+ throw new Error('Wallet client is required for write operations');
708
+ }
709
+ return this.contract.write.renounceOwnership(options);
710
+ }
711
+ /**
712
+ * transfer
713
+ * nonpayable
714
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
715
+ */
716
+ async transfer(to, value, options) {
717
+ if (!this.contract.write) {
718
+ throw new Error('Wallet client is required for write operations');
719
+ }
720
+ return this.contract.write.transfer([to, value], options);
721
+ }
722
+ /**
723
+ * transferFrom
724
+ * nonpayable
725
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
726
+ */
727
+ async transferFrom(from, to, value, options) {
728
+ if (!this.contract.write) {
729
+ throw new Error('Wallet client is required for write operations');
730
+ }
731
+ return this.contract.write.transferFrom([from, to, value], options);
732
+ }
733
+ /**
734
+ * transferOwnership
735
+ * nonpayable
736
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
737
+ */
738
+ async transferOwnership(newOwner, options) {
739
+ if (!this.contract.write) {
740
+ throw new Error('Wallet client is required for write operations');
741
+ }
742
+ return this.contract.write.transferOwnership([newOwner], options);
743
+ }
744
+ /**
745
+ * updateBlackList
746
+ * nonpayable
747
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
748
+ */
749
+ async updateBlackList(addrs, values, options) {
750
+ if (!this.contract.write) {
751
+ throw new Error('Wallet client is required for write operations');
752
+ }
753
+ return this.contract.write.updateBlackList([addrs, values], options);
754
+ }
755
+ /**
756
+ * withdraw
757
+ * nonpayable
758
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
759
+ */
760
+ async withdraw(_token, options) {
761
+ if (!this.contract.write) {
762
+ throw new Error('Wallet client is required for write operations');
763
+ }
764
+ return this.contract.write.withdraw([_token], options);
765
+ }
766
+ /**
767
+ * Simulate contract write operations (dry-run without sending transaction)
768
+ *
769
+ * @example
770
+ * const result = await contract.simulate.transfer('0x...', 1000n);
771
+ * console.log('Gas estimate:', result.request.gas);
772
+ * console.log('Would succeed:', result.result);
773
+ */
774
+ get simulate() {
775
+ const contract = this.contract;
776
+ if (!contract.simulate) {
777
+ throw new Error('Public client is required for simulation');
778
+ }
779
+ return {
780
+ /**
781
+ * Simulate airdrop
782
+ * Returns gas estimate and result without sending transaction
783
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
784
+ */
785
+ async airdrop(to, options) {
786
+ return contract.simulate.airdrop([to], options);
787
+ },
788
+ /**
789
+ * Simulate approve
790
+ * Returns gas estimate and result without sending transaction
791
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
792
+ */
793
+ async approve(spender, value, options) {
794
+ return contract.simulate.approve([spender, value], options);
795
+ },
796
+ /**
797
+ * Simulate burn
798
+ * Returns gas estimate and result without sending transaction
799
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
800
+ */
801
+ async burn(addr, amount, options) {
802
+ return contract.simulate.burn([addr, amount], options);
803
+ },
804
+ /**
805
+ * Simulate removeBlackList
806
+ * Returns gas estimate and result without sending transaction
807
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
808
+ */
809
+ async removeBlackList(addrs, options) {
810
+ return contract.simulate.removeBlackList([addrs], options);
811
+ },
812
+ /**
813
+ * Simulate renounceOwnership
814
+ * Returns gas estimate and result without sending transaction
815
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
816
+ */
817
+ async renounceOwnership(options) {
818
+ return contract.simulate.renounceOwnership(options);
819
+ },
820
+ /**
821
+ * Simulate transfer
822
+ * Returns gas estimate and result without sending transaction
823
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
824
+ */
825
+ async transfer(to, value, options) {
826
+ return contract.simulate.transfer([to, value], options);
827
+ },
828
+ /**
829
+ * Simulate transferFrom
830
+ * Returns gas estimate and result without sending transaction
831
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
832
+ */
833
+ async transferFrom(from, to, value, options) {
834
+ return contract.simulate.transferFrom([from, to, value], options);
835
+ },
836
+ /**
837
+ * Simulate transferOwnership
838
+ * Returns gas estimate and result without sending transaction
839
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
840
+ */
841
+ async transferOwnership(newOwner, options) {
842
+ return contract.simulate.transferOwnership([newOwner], options);
843
+ },
844
+ /**
845
+ * Simulate updateBlackList
846
+ * Returns gas estimate and result without sending transaction
847
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
848
+ */
849
+ async updateBlackList(addrs, values, options) {
850
+ return contract.simulate.updateBlackList([addrs, values], options);
851
+ },
852
+ /**
853
+ * Simulate withdraw
854
+ * Returns gas estimate and result without sending transaction
855
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
856
+ */
857
+ async withdraw(_token, options) {
858
+ return contract.simulate.withdraw([_token], options);
859
+ }
860
+ };
861
+ }
862
+ /**
863
+ * Watch contract events
864
+ *
865
+ * @example
866
+ * // Watch all Transfer events
867
+ * const unwatch = contract.watch.Transfer((event) => {
868
+ * console.log('Transfer:', event);
869
+ * });
870
+ *
871
+ * // Stop watching
872
+ * unwatch();
873
+ */
874
+ get watch() {
875
+ return {
876
+ /**
877
+ * Watch Approval events
878
+ * @param callback Function to call when event is emitted
879
+ * @param filter Optional filter for indexed parameters
880
+ * @returns Unwatch function to stop listening
881
+ */
882
+ Approval: (callback, filter) => {
883
+ return this.publicClient.watchContractEvent({
884
+ address: this.contractAddress,
885
+ abi: exports.SDSHD_jsonAbi,
886
+ eventName: 'Approval',
887
+ args: filter,
888
+ onLogs: (logs) => {
889
+ logs.forEach((log) => {
890
+ callback(log.args);
891
+ });
892
+ },
893
+ });
894
+ },
895
+ /**
896
+ * Watch OwnershipTransferred events
897
+ * @param callback Function to call when event is emitted
898
+ * @param filter Optional filter for indexed parameters
899
+ * @returns Unwatch function to stop listening
900
+ */
901
+ OwnershipTransferred: (callback, filter) => {
902
+ return this.publicClient.watchContractEvent({
903
+ address: this.contractAddress,
904
+ abi: exports.SDSHD_jsonAbi,
905
+ eventName: 'OwnershipTransferred',
906
+ args: filter,
907
+ onLogs: (logs) => {
908
+ logs.forEach((log) => {
909
+ callback(log.args);
910
+ });
911
+ },
912
+ });
913
+ },
914
+ /**
915
+ * Watch Transfer events
916
+ * @param callback Function to call when event is emitted
917
+ * @param filter Optional filter for indexed parameters
918
+ * @returns Unwatch function to stop listening
919
+ */
920
+ Transfer: (callback, filter) => {
921
+ return this.publicClient.watchContractEvent({
922
+ address: this.contractAddress,
923
+ abi: exports.SDSHD_jsonAbi,
924
+ eventName: 'Transfer',
925
+ args: filter,
926
+ onLogs: (logs) => {
927
+ logs.forEach((log) => {
928
+ callback(log.args);
929
+ });
930
+ },
931
+ });
932
+ }
933
+ };
934
+ }
935
+ }
936
+ exports.SDSHD_json = SDSHD_json;