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