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