@gitmyabi-stg/ath 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1707 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+ /**
5
+ * AethirToken ABI
6
+ *
7
+ * This ABI is typed using viem's type system for full type safety.
8
+ */
9
+ export const AethirTokenAbi = [
10
+ {
11
+ "inputs": [
12
+ {
13
+ "internalType": "address",
14
+ "name": "_adminMultisigWallet",
15
+ "type": "address"
16
+ }
17
+ ],
18
+ "stateMutability": "nonpayable",
19
+ "type": "constructor"
20
+ },
21
+ {
22
+ "inputs": [],
23
+ "name": "InvalidShortString",
24
+ "type": "error"
25
+ },
26
+ {
27
+ "inputs": [
28
+ {
29
+ "internalType": "string",
30
+ "name": "str",
31
+ "type": "string"
32
+ }
33
+ ],
34
+ "name": "StringTooLong",
35
+ "type": "error"
36
+ },
37
+ {
38
+ "anonymous": false,
39
+ "inputs": [
40
+ {
41
+ "indexed": true,
42
+ "internalType": "address",
43
+ "name": "owner",
44
+ "type": "address"
45
+ },
46
+ {
47
+ "indexed": true,
48
+ "internalType": "address",
49
+ "name": "spender",
50
+ "type": "address"
51
+ },
52
+ {
53
+ "indexed": false,
54
+ "internalType": "uint256",
55
+ "name": "value",
56
+ "type": "uint256"
57
+ }
58
+ ],
59
+ "name": "Approval",
60
+ "type": "event"
61
+ },
62
+ {
63
+ "anonymous": false,
64
+ "inputs": [],
65
+ "name": "EIP712DomainChanged",
66
+ "type": "event"
67
+ },
68
+ {
69
+ "anonymous": false,
70
+ "inputs": [
71
+ {
72
+ "indexed": true,
73
+ "internalType": "address",
74
+ "name": "previousOwner",
75
+ "type": "address"
76
+ },
77
+ {
78
+ "indexed": true,
79
+ "internalType": "address",
80
+ "name": "newOwner",
81
+ "type": "address"
82
+ }
83
+ ],
84
+ "name": "OwnershipTransferred",
85
+ "type": "event"
86
+ },
87
+ {
88
+ "anonymous": false,
89
+ "inputs": [
90
+ {
91
+ "indexed": true,
92
+ "internalType": "address",
93
+ "name": "from",
94
+ "type": "address"
95
+ },
96
+ {
97
+ "indexed": true,
98
+ "internalType": "address",
99
+ "name": "to",
100
+ "type": "address"
101
+ },
102
+ {
103
+ "indexed": false,
104
+ "internalType": "uint256",
105
+ "name": "value",
106
+ "type": "uint256"
107
+ }
108
+ ],
109
+ "name": "Transfer",
110
+ "type": "event"
111
+ },
112
+ {
113
+ "anonymous": false,
114
+ "inputs": [
115
+ {
116
+ "indexed": false,
117
+ "internalType": "address",
118
+ "name": "account",
119
+ "type": "address"
120
+ },
121
+ {
122
+ "indexed": false,
123
+ "internalType": "uint256",
124
+ "name": "maxAmount",
125
+ "type": "uint256"
126
+ }
127
+ ],
128
+ "name": "WhitelistedAdded",
129
+ "type": "event"
130
+ },
131
+ {
132
+ "anonymous": false,
133
+ "inputs": [
134
+ {
135
+ "indexed": false,
136
+ "internalType": "address",
137
+ "name": "account",
138
+ "type": "address"
139
+ },
140
+ {
141
+ "indexed": false,
142
+ "internalType": "address",
143
+ "name": "newAddress",
144
+ "type": "address"
145
+ }
146
+ ],
147
+ "name": "WhitelistedAddressUpdated",
148
+ "type": "event"
149
+ },
150
+ {
151
+ "anonymous": false,
152
+ "inputs": [
153
+ {
154
+ "indexed": false,
155
+ "internalType": "address",
156
+ "name": "account",
157
+ "type": "address"
158
+ },
159
+ {
160
+ "indexed": false,
161
+ "internalType": "uint256",
162
+ "name": "newMaxAmount",
163
+ "type": "uint256"
164
+ }
165
+ ],
166
+ "name": "WhitelistedMaxAmountUpdated",
167
+ "type": "event"
168
+ },
169
+ {
170
+ "anonymous": false,
171
+ "inputs": [
172
+ {
173
+ "indexed": false,
174
+ "internalType": "address",
175
+ "name": "account",
176
+ "type": "address"
177
+ }
178
+ ],
179
+ "name": "WhitelistedRemoved",
180
+ "type": "event"
181
+ },
182
+ {
183
+ "inputs": [],
184
+ "name": "DOMAIN_SEPARATOR",
185
+ "outputs": [
186
+ {
187
+ "internalType": "bytes32",
188
+ "name": "",
189
+ "type": "bytes32"
190
+ }
191
+ ],
192
+ "stateMutability": "view",
193
+ "type": "function"
194
+ },
195
+ {
196
+ "inputs": [],
197
+ "name": "MAX_SUPPLY",
198
+ "outputs": [
199
+ {
200
+ "internalType": "uint256",
201
+ "name": "",
202
+ "type": "uint256"
203
+ }
204
+ ],
205
+ "stateMutability": "view",
206
+ "type": "function"
207
+ },
208
+ {
209
+ "inputs": [
210
+ {
211
+ "internalType": "address",
212
+ "name": "account",
213
+ "type": "address"
214
+ },
215
+ {
216
+ "internalType": "uint256",
217
+ "name": "maxAmount",
218
+ "type": "uint256"
219
+ }
220
+ ],
221
+ "name": "addWhitelisted",
222
+ "outputs": [],
223
+ "stateMutability": "nonpayable",
224
+ "type": "function"
225
+ },
226
+ {
227
+ "inputs": [
228
+ {
229
+ "internalType": "address",
230
+ "name": "owner",
231
+ "type": "address"
232
+ },
233
+ {
234
+ "internalType": "address",
235
+ "name": "spender",
236
+ "type": "address"
237
+ }
238
+ ],
239
+ "name": "allowance",
240
+ "outputs": [
241
+ {
242
+ "internalType": "uint256",
243
+ "name": "",
244
+ "type": "uint256"
245
+ }
246
+ ],
247
+ "stateMutability": "view",
248
+ "type": "function"
249
+ },
250
+ {
251
+ "inputs": [
252
+ {
253
+ "internalType": "address",
254
+ "name": "",
255
+ "type": "address"
256
+ }
257
+ ],
258
+ "name": "allowedAmount",
259
+ "outputs": [
260
+ {
261
+ "internalType": "uint256",
262
+ "name": "",
263
+ "type": "uint256"
264
+ }
265
+ ],
266
+ "stateMutability": "view",
267
+ "type": "function"
268
+ },
269
+ {
270
+ "inputs": [
271
+ {
272
+ "internalType": "address",
273
+ "name": "spender",
274
+ "type": "address"
275
+ },
276
+ {
277
+ "internalType": "uint256",
278
+ "name": "amount",
279
+ "type": "uint256"
280
+ }
281
+ ],
282
+ "name": "approve",
283
+ "outputs": [
284
+ {
285
+ "internalType": "bool",
286
+ "name": "",
287
+ "type": "bool"
288
+ }
289
+ ],
290
+ "stateMutability": "nonpayable",
291
+ "type": "function"
292
+ },
293
+ {
294
+ "inputs": [
295
+ {
296
+ "internalType": "address",
297
+ "name": "account",
298
+ "type": "address"
299
+ }
300
+ ],
301
+ "name": "balanceOf",
302
+ "outputs": [
303
+ {
304
+ "internalType": "uint256",
305
+ "name": "",
306
+ "type": "uint256"
307
+ }
308
+ ],
309
+ "stateMutability": "view",
310
+ "type": "function"
311
+ },
312
+ {
313
+ "inputs": [],
314
+ "name": "decimals",
315
+ "outputs": [
316
+ {
317
+ "internalType": "uint8",
318
+ "name": "",
319
+ "type": "uint8"
320
+ }
321
+ ],
322
+ "stateMutability": "view",
323
+ "type": "function"
324
+ },
325
+ {
326
+ "inputs": [
327
+ {
328
+ "internalType": "address",
329
+ "name": "spender",
330
+ "type": "address"
331
+ },
332
+ {
333
+ "internalType": "uint256",
334
+ "name": "subtractedValue",
335
+ "type": "uint256"
336
+ }
337
+ ],
338
+ "name": "decreaseAllowance",
339
+ "outputs": [
340
+ {
341
+ "internalType": "bool",
342
+ "name": "",
343
+ "type": "bool"
344
+ }
345
+ ],
346
+ "stateMutability": "nonpayable",
347
+ "type": "function"
348
+ },
349
+ {
350
+ "inputs": [],
351
+ "name": "eip712Domain",
352
+ "outputs": [
353
+ {
354
+ "internalType": "bytes1",
355
+ "name": "fields",
356
+ "type": "bytes1"
357
+ },
358
+ {
359
+ "internalType": "string",
360
+ "name": "name",
361
+ "type": "string"
362
+ },
363
+ {
364
+ "internalType": "string",
365
+ "name": "version",
366
+ "type": "string"
367
+ },
368
+ {
369
+ "internalType": "uint256",
370
+ "name": "chainId",
371
+ "type": "uint256"
372
+ },
373
+ {
374
+ "internalType": "address",
375
+ "name": "verifyingContract",
376
+ "type": "address"
377
+ },
378
+ {
379
+ "internalType": "bytes32",
380
+ "name": "salt",
381
+ "type": "bytes32"
382
+ },
383
+ {
384
+ "internalType": "uint256[]",
385
+ "name": "extensions",
386
+ "type": "uint256[]"
387
+ }
388
+ ],
389
+ "stateMutability": "view",
390
+ "type": "function"
391
+ },
392
+ {
393
+ "inputs": [
394
+ {
395
+ "internalType": "address",
396
+ "name": "spender",
397
+ "type": "address"
398
+ },
399
+ {
400
+ "internalType": "uint256",
401
+ "name": "addedValue",
402
+ "type": "uint256"
403
+ }
404
+ ],
405
+ "name": "increaseAllowance",
406
+ "outputs": [
407
+ {
408
+ "internalType": "bool",
409
+ "name": "",
410
+ "type": "bool"
411
+ }
412
+ ],
413
+ "stateMutability": "nonpayable",
414
+ "type": "function"
415
+ },
416
+ {
417
+ "inputs": [
418
+ {
419
+ "internalType": "uint256",
420
+ "name": "amount",
421
+ "type": "uint256"
422
+ }
423
+ ],
424
+ "name": "mint",
425
+ "outputs": [],
426
+ "stateMutability": "nonpayable",
427
+ "type": "function"
428
+ },
429
+ {
430
+ "inputs": [],
431
+ "name": "name",
432
+ "outputs": [
433
+ {
434
+ "internalType": "string",
435
+ "name": "",
436
+ "type": "string"
437
+ }
438
+ ],
439
+ "stateMutability": "view",
440
+ "type": "function"
441
+ },
442
+ {
443
+ "inputs": [
444
+ {
445
+ "internalType": "address",
446
+ "name": "owner",
447
+ "type": "address"
448
+ }
449
+ ],
450
+ "name": "nonces",
451
+ "outputs": [
452
+ {
453
+ "internalType": "uint256",
454
+ "name": "",
455
+ "type": "uint256"
456
+ }
457
+ ],
458
+ "stateMutability": "view",
459
+ "type": "function"
460
+ },
461
+ {
462
+ "inputs": [],
463
+ "name": "owner",
464
+ "outputs": [
465
+ {
466
+ "internalType": "address",
467
+ "name": "",
468
+ "type": "address"
469
+ }
470
+ ],
471
+ "stateMutability": "view",
472
+ "type": "function"
473
+ },
474
+ {
475
+ "inputs": [
476
+ {
477
+ "internalType": "address",
478
+ "name": "owner",
479
+ "type": "address"
480
+ },
481
+ {
482
+ "internalType": "address",
483
+ "name": "spender",
484
+ "type": "address"
485
+ },
486
+ {
487
+ "internalType": "uint256",
488
+ "name": "value",
489
+ "type": "uint256"
490
+ },
491
+ {
492
+ "internalType": "uint256",
493
+ "name": "deadline",
494
+ "type": "uint256"
495
+ },
496
+ {
497
+ "internalType": "uint8",
498
+ "name": "v",
499
+ "type": "uint8"
500
+ },
501
+ {
502
+ "internalType": "bytes32",
503
+ "name": "r",
504
+ "type": "bytes32"
505
+ },
506
+ {
507
+ "internalType": "bytes32",
508
+ "name": "s",
509
+ "type": "bytes32"
510
+ }
511
+ ],
512
+ "name": "permit",
513
+ "outputs": [],
514
+ "stateMutability": "nonpayable",
515
+ "type": "function"
516
+ },
517
+ {
518
+ "inputs": [],
519
+ "name": "remainWhitelisted",
520
+ "outputs": [
521
+ {
522
+ "internalType": "uint256",
523
+ "name": "",
524
+ "type": "uint256"
525
+ }
526
+ ],
527
+ "stateMutability": "view",
528
+ "type": "function"
529
+ },
530
+ {
531
+ "inputs": [
532
+ {
533
+ "internalType": "address",
534
+ "name": "account",
535
+ "type": "address"
536
+ }
537
+ ],
538
+ "name": "removeWhitelisted",
539
+ "outputs": [],
540
+ "stateMutability": "nonpayable",
541
+ "type": "function"
542
+ },
543
+ {
544
+ "inputs": [],
545
+ "name": "renounceOwnership",
546
+ "outputs": [],
547
+ "stateMutability": "nonpayable",
548
+ "type": "function"
549
+ },
550
+ {
551
+ "inputs": [],
552
+ "name": "symbol",
553
+ "outputs": [
554
+ {
555
+ "internalType": "string",
556
+ "name": "",
557
+ "type": "string"
558
+ }
559
+ ],
560
+ "stateMutability": "view",
561
+ "type": "function"
562
+ },
563
+ {
564
+ "inputs": [],
565
+ "name": "totalSupply",
566
+ "outputs": [
567
+ {
568
+ "internalType": "uint256",
569
+ "name": "",
570
+ "type": "uint256"
571
+ }
572
+ ],
573
+ "stateMutability": "view",
574
+ "type": "function"
575
+ },
576
+ {
577
+ "inputs": [],
578
+ "name": "totalTransferred",
579
+ "outputs": [
580
+ {
581
+ "internalType": "uint256",
582
+ "name": "",
583
+ "type": "uint256"
584
+ }
585
+ ],
586
+ "stateMutability": "view",
587
+ "type": "function"
588
+ },
589
+ {
590
+ "inputs": [
591
+ {
592
+ "internalType": "address",
593
+ "name": "to",
594
+ "type": "address"
595
+ },
596
+ {
597
+ "internalType": "uint256",
598
+ "name": "amount",
599
+ "type": "uint256"
600
+ }
601
+ ],
602
+ "name": "transfer",
603
+ "outputs": [
604
+ {
605
+ "internalType": "bool",
606
+ "name": "",
607
+ "type": "bool"
608
+ }
609
+ ],
610
+ "stateMutability": "nonpayable",
611
+ "type": "function"
612
+ },
613
+ {
614
+ "inputs": [
615
+ {
616
+ "internalType": "address",
617
+ "name": "from",
618
+ "type": "address"
619
+ },
620
+ {
621
+ "internalType": "address",
622
+ "name": "to",
623
+ "type": "address"
624
+ },
625
+ {
626
+ "internalType": "uint256",
627
+ "name": "amount",
628
+ "type": "uint256"
629
+ }
630
+ ],
631
+ "name": "transferFrom",
632
+ "outputs": [
633
+ {
634
+ "internalType": "bool",
635
+ "name": "",
636
+ "type": "bool"
637
+ }
638
+ ],
639
+ "stateMutability": "nonpayable",
640
+ "type": "function"
641
+ },
642
+ {
643
+ "inputs": [
644
+ {
645
+ "internalType": "address",
646
+ "name": "newOwner",
647
+ "type": "address"
648
+ }
649
+ ],
650
+ "name": "transferOwnership",
651
+ "outputs": [],
652
+ "stateMutability": "nonpayable",
653
+ "type": "function"
654
+ },
655
+ {
656
+ "inputs": [
657
+ {
658
+ "internalType": "address",
659
+ "name": "to",
660
+ "type": "address"
661
+ },
662
+ {
663
+ "internalType": "uint256",
664
+ "name": "amount",
665
+ "type": "uint256"
666
+ }
667
+ ],
668
+ "name": "transferToWhitelisted",
669
+ "outputs": [],
670
+ "stateMutability": "nonpayable",
671
+ "type": "function"
672
+ },
673
+ {
674
+ "inputs": [
675
+ {
676
+ "internalType": "address",
677
+ "name": "",
678
+ "type": "address"
679
+ }
680
+ ],
681
+ "name": "transferredAmount",
682
+ "outputs": [
683
+ {
684
+ "internalType": "uint256",
685
+ "name": "",
686
+ "type": "uint256"
687
+ }
688
+ ],
689
+ "stateMutability": "view",
690
+ "type": "function"
691
+ },
692
+ {
693
+ "inputs": [
694
+ {
695
+ "internalType": "address",
696
+ "name": "account",
697
+ "type": "address"
698
+ },
699
+ {
700
+ "internalType": "address",
701
+ "name": "newAddress",
702
+ "type": "address"
703
+ }
704
+ ],
705
+ "name": "updateWhitelistedAddress",
706
+ "outputs": [],
707
+ "stateMutability": "nonpayable",
708
+ "type": "function"
709
+ },
710
+ {
711
+ "inputs": [
712
+ {
713
+ "internalType": "address",
714
+ "name": "account",
715
+ "type": "address"
716
+ },
717
+ {
718
+ "internalType": "uint256",
719
+ "name": "newMaxAmount",
720
+ "type": "uint256"
721
+ }
722
+ ],
723
+ "name": "updateWhitelistedMaxAmount",
724
+ "outputs": [],
725
+ "stateMutability": "nonpayable",
726
+ "type": "function"
727
+ }
728
+ ] as const satisfies Abi;
729
+
730
+ /**
731
+ * Type-safe ABI for AethirToken
732
+ */
733
+ export type AethirTokenAbi = typeof AethirTokenAbi;
734
+
735
+ /**
736
+ * Contract instance type for AethirToken
737
+ */
738
+ // Use any for contract type to avoid complex viem type issues
739
+ // The runtime behavior is type-safe through viem's ABI typing
740
+ export type AethirTokenContract = any;
741
+
742
+ /**
743
+ * AethirToken Contract Class
744
+ *
745
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
746
+ *
747
+ * @example
748
+ * ```typescript
749
+ * import { createPublicClient, createWalletClient, http } from 'viem';
750
+ * import { mainnet } from 'viem/chains';
751
+ * import { AethirToken } from 'AethirToken';
752
+ *
753
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
754
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
755
+ *
756
+ * const contract = new AethirToken('0x...', { publicClient, walletClient });
757
+ *
758
+ * // Read functions
759
+ * const result = await contract.balanceOf('0x...');
760
+ *
761
+ * // Write functions
762
+ * const hash = await contract.transfer('0x...', 1000n);
763
+ *
764
+ * // Simulate transactions (dry-run)
765
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
766
+ * console.log('Gas estimate:', simulation.request.gas);
767
+ *
768
+ * // Watch events
769
+ * const unwatch = contract.watch.Transfer((event) => {
770
+ * console.log('Transfer event:', event);
771
+ * });
772
+ * ```
773
+ */
774
+ export class AethirToken {
775
+ private contract: AethirTokenContract;
776
+ private contractAddress: Address;
777
+ private publicClient: PublicClient;
778
+
779
+ constructor(
780
+ address: Address,
781
+ clients: {
782
+ publicClient: PublicClient;
783
+ walletClient?: WalletClient;
784
+ }
785
+ ) {
786
+ this.contractAddress = address;
787
+ this.publicClient = clients.publicClient;
788
+ this.contract = getContract({
789
+ address,
790
+ abi: AethirTokenAbi,
791
+ client: {
792
+ public: clients.publicClient,
793
+ wallet: clients.walletClient,
794
+ },
795
+ });
796
+ }
797
+
798
+ /**
799
+ * Get the contract address
800
+ */
801
+ get address(): Address {
802
+ return this.contractAddress;
803
+ }
804
+
805
+ /**
806
+ * Get the underlying viem contract instance.
807
+ */
808
+ getContract(): AethirTokenContract {
809
+ return this.contract;
810
+ }
811
+
812
+ /**
813
+ * DOMAIN_SEPARATOR
814
+ * view
815
+ */
816
+ async DOMAIN_SEPARATOR(): Promise<`0x${string}`> {
817
+ return this.contract.read.DOMAIN_SEPARATOR() as Promise<`0x${string}`>;
818
+ }
819
+
820
+ /**
821
+ * MAX_SUPPLY
822
+ * view
823
+ */
824
+ async MAX_SUPPLY(): Promise<bigint> {
825
+ return this.contract.read.MAX_SUPPLY() as Promise<bigint>;
826
+ }
827
+
828
+ /**
829
+ * allowance
830
+ * view
831
+ */
832
+ async allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint> {
833
+ return this.contract.read.allowance([owner, spender] as const) as Promise<bigint>;
834
+ }
835
+
836
+ /**
837
+ * allowedAmount
838
+ * view
839
+ */
840
+ async allowedAmount(arg0: `0x${string}`): Promise<bigint> {
841
+ return this.contract.read.allowedAmount([arg0] as const) as Promise<bigint>;
842
+ }
843
+
844
+ /**
845
+ * balanceOf
846
+ * view
847
+ */
848
+ async balanceOf(account: `0x${string}`): Promise<bigint> {
849
+ return this.contract.read.balanceOf([account] as const) as Promise<bigint>;
850
+ }
851
+
852
+ /**
853
+ * decimals
854
+ * view
855
+ */
856
+ async decimals(): Promise<bigint> {
857
+ return this.contract.read.decimals() as Promise<bigint>;
858
+ }
859
+
860
+ /**
861
+ * eip712Domain
862
+ * view
863
+ */
864
+ async eip712Domain(): Promise<[`0x${string}`, string, string, bigint, `0x${string}`, `0x${string}`, bigint[]]> {
865
+ return this.contract.read.eip712Domain() as Promise<[`0x${string}`, string, string, bigint, `0x${string}`, `0x${string}`, bigint[]]>;
866
+ }
867
+
868
+ /**
869
+ * name
870
+ * view
871
+ */
872
+ async name(): Promise<string> {
873
+ return this.contract.read.name() as Promise<string>;
874
+ }
875
+
876
+ /**
877
+ * nonces
878
+ * view
879
+ */
880
+ async nonces(owner: `0x${string}`): Promise<bigint> {
881
+ return this.contract.read.nonces([owner] as const) as Promise<bigint>;
882
+ }
883
+
884
+ /**
885
+ * owner
886
+ * view
887
+ */
888
+ async owner(): Promise<`0x${string}`> {
889
+ return this.contract.read.owner() as Promise<`0x${string}`>;
890
+ }
891
+
892
+ /**
893
+ * remainWhitelisted
894
+ * view
895
+ */
896
+ async remainWhitelisted(): Promise<bigint> {
897
+ return this.contract.read.remainWhitelisted() as Promise<bigint>;
898
+ }
899
+
900
+ /**
901
+ * symbol
902
+ * view
903
+ */
904
+ async symbol(): Promise<string> {
905
+ return this.contract.read.symbol() as Promise<string>;
906
+ }
907
+
908
+ /**
909
+ * totalSupply
910
+ * view
911
+ */
912
+ async totalSupply(): Promise<bigint> {
913
+ return this.contract.read.totalSupply() as Promise<bigint>;
914
+ }
915
+
916
+ /**
917
+ * totalTransferred
918
+ * view
919
+ */
920
+ async totalTransferred(): Promise<bigint> {
921
+ return this.contract.read.totalTransferred() as Promise<bigint>;
922
+ }
923
+
924
+ /**
925
+ * transferredAmount
926
+ * view
927
+ */
928
+ async transferredAmount(arg0: `0x${string}`): Promise<bigint> {
929
+ return this.contract.read.transferredAmount([arg0] as const) as Promise<bigint>;
930
+ }
931
+
932
+ /**
933
+ * addWhitelisted
934
+ * nonpayable
935
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
936
+ */
937
+ async addWhitelisted(account: `0x${string}`, maxAmount: bigint, options?: {
938
+ accessList?: import('viem').AccessList;
939
+ authorizationList?: import('viem').AuthorizationList;
940
+ chain?: import('viem').Chain | null;
941
+ dataSuffix?: `0x${string}`;
942
+ gas?: bigint;
943
+ gasPrice?: bigint;
944
+ maxFeePerGas?: bigint;
945
+ maxPriorityFeePerGas?: bigint;
946
+ nonce?: number;
947
+ value?: bigint;
948
+ }): Promise<`0x${string}`> {
949
+ if (!this.contract.write) {
950
+ throw new Error('Wallet client is required for write operations');
951
+ }
952
+ return this.contract.write.addWhitelisted([account, maxAmount] as const, options) as Promise<`0x${string}`>;
953
+ }
954
+
955
+ /**
956
+ * approve
957
+ * nonpayable
958
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
959
+ */
960
+ async approve(spender: `0x${string}`, amount: bigint, options?: {
961
+ accessList?: import('viem').AccessList;
962
+ authorizationList?: import('viem').AuthorizationList;
963
+ chain?: import('viem').Chain | null;
964
+ dataSuffix?: `0x${string}`;
965
+ gas?: bigint;
966
+ gasPrice?: bigint;
967
+ maxFeePerGas?: bigint;
968
+ maxPriorityFeePerGas?: bigint;
969
+ nonce?: number;
970
+ value?: bigint;
971
+ }): Promise<`0x${string}`> {
972
+ if (!this.contract.write) {
973
+ throw new Error('Wallet client is required for write operations');
974
+ }
975
+ return this.contract.write.approve([spender, amount] as const, options) as Promise<`0x${string}`>;
976
+ }
977
+
978
+ /**
979
+ * decreaseAllowance
980
+ * nonpayable
981
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
982
+ */
983
+ async decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
984
+ accessList?: import('viem').AccessList;
985
+ authorizationList?: import('viem').AuthorizationList;
986
+ chain?: import('viem').Chain | null;
987
+ dataSuffix?: `0x${string}`;
988
+ gas?: bigint;
989
+ gasPrice?: bigint;
990
+ maxFeePerGas?: bigint;
991
+ maxPriorityFeePerGas?: bigint;
992
+ nonce?: number;
993
+ value?: bigint;
994
+ }): Promise<`0x${string}`> {
995
+ if (!this.contract.write) {
996
+ throw new Error('Wallet client is required for write operations');
997
+ }
998
+ return this.contract.write.decreaseAllowance([spender, subtractedValue] as const, options) as Promise<`0x${string}`>;
999
+ }
1000
+
1001
+ /**
1002
+ * increaseAllowance
1003
+ * nonpayable
1004
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1005
+ */
1006
+ async increaseAllowance(spender: `0x${string}`, addedValue: bigint, options?: {
1007
+ accessList?: import('viem').AccessList;
1008
+ authorizationList?: import('viem').AuthorizationList;
1009
+ chain?: import('viem').Chain | null;
1010
+ dataSuffix?: `0x${string}`;
1011
+ gas?: bigint;
1012
+ gasPrice?: bigint;
1013
+ maxFeePerGas?: bigint;
1014
+ maxPriorityFeePerGas?: bigint;
1015
+ nonce?: number;
1016
+ value?: bigint;
1017
+ }): Promise<`0x${string}`> {
1018
+ if (!this.contract.write) {
1019
+ throw new Error('Wallet client is required for write operations');
1020
+ }
1021
+ return this.contract.write.increaseAllowance([spender, addedValue] as const, options) as Promise<`0x${string}`>;
1022
+ }
1023
+
1024
+ /**
1025
+ * mint
1026
+ * nonpayable
1027
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1028
+ */
1029
+ async mint(amount: bigint, options?: {
1030
+ accessList?: import('viem').AccessList;
1031
+ authorizationList?: import('viem').AuthorizationList;
1032
+ chain?: import('viem').Chain | null;
1033
+ dataSuffix?: `0x${string}`;
1034
+ gas?: bigint;
1035
+ gasPrice?: bigint;
1036
+ maxFeePerGas?: bigint;
1037
+ maxPriorityFeePerGas?: bigint;
1038
+ nonce?: number;
1039
+ value?: bigint;
1040
+ }): Promise<`0x${string}`> {
1041
+ if (!this.contract.write) {
1042
+ throw new Error('Wallet client is required for write operations');
1043
+ }
1044
+ return this.contract.write.mint([amount] as const, options) as Promise<`0x${string}`>;
1045
+ }
1046
+
1047
+ /**
1048
+ * permit
1049
+ * nonpayable
1050
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1051
+ */
1052
+ async permit(owner: `0x${string}`, spender: `0x${string}`, value: bigint, deadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
1053
+ accessList?: import('viem').AccessList;
1054
+ authorizationList?: import('viem').AuthorizationList;
1055
+ chain?: import('viem').Chain | null;
1056
+ dataSuffix?: `0x${string}`;
1057
+ gas?: bigint;
1058
+ gasPrice?: bigint;
1059
+ maxFeePerGas?: bigint;
1060
+ maxPriorityFeePerGas?: bigint;
1061
+ nonce?: number;
1062
+ value?: bigint;
1063
+ }): Promise<`0x${string}`> {
1064
+ if (!this.contract.write) {
1065
+ throw new Error('Wallet client is required for write operations');
1066
+ }
1067
+ return this.contract.write.permit([owner, spender, value, deadline, v, r, s] as const, options) as Promise<`0x${string}`>;
1068
+ }
1069
+
1070
+ /**
1071
+ * removeWhitelisted
1072
+ * nonpayable
1073
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1074
+ */
1075
+ async removeWhitelisted(account: `0x${string}`, options?: {
1076
+ accessList?: import('viem').AccessList;
1077
+ authorizationList?: import('viem').AuthorizationList;
1078
+ chain?: import('viem').Chain | null;
1079
+ dataSuffix?: `0x${string}`;
1080
+ gas?: bigint;
1081
+ gasPrice?: bigint;
1082
+ maxFeePerGas?: bigint;
1083
+ maxPriorityFeePerGas?: bigint;
1084
+ nonce?: number;
1085
+ value?: bigint;
1086
+ }): Promise<`0x${string}`> {
1087
+ if (!this.contract.write) {
1088
+ throw new Error('Wallet client is required for write operations');
1089
+ }
1090
+ return this.contract.write.removeWhitelisted([account] as const, options) as Promise<`0x${string}`>;
1091
+ }
1092
+
1093
+ /**
1094
+ * renounceOwnership
1095
+ * nonpayable
1096
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1097
+ */
1098
+ async renounceOwnership(options?: {
1099
+ accessList?: import('viem').AccessList;
1100
+ authorizationList?: import('viem').AuthorizationList;
1101
+ chain?: import('viem').Chain | null;
1102
+ dataSuffix?: `0x${string}`;
1103
+ gas?: bigint;
1104
+ gasPrice?: bigint;
1105
+ maxFeePerGas?: bigint;
1106
+ maxPriorityFeePerGas?: bigint;
1107
+ nonce?: number;
1108
+ value?: bigint;
1109
+ }): Promise<`0x${string}`> {
1110
+ if (!this.contract.write) {
1111
+ throw new Error('Wallet client is required for write operations');
1112
+ }
1113
+ return this.contract.write.renounceOwnership(options) as Promise<`0x${string}`>;
1114
+ }
1115
+
1116
+ /**
1117
+ * transfer
1118
+ * nonpayable
1119
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1120
+ */
1121
+ async transfer(to: `0x${string}`, amount: bigint, options?: {
1122
+ accessList?: import('viem').AccessList;
1123
+ authorizationList?: import('viem').AuthorizationList;
1124
+ chain?: import('viem').Chain | null;
1125
+ dataSuffix?: `0x${string}`;
1126
+ gas?: bigint;
1127
+ gasPrice?: bigint;
1128
+ maxFeePerGas?: bigint;
1129
+ maxPriorityFeePerGas?: bigint;
1130
+ nonce?: number;
1131
+ value?: bigint;
1132
+ }): Promise<`0x${string}`> {
1133
+ if (!this.contract.write) {
1134
+ throw new Error('Wallet client is required for write operations');
1135
+ }
1136
+ return this.contract.write.transfer([to, amount] as const, options) as Promise<`0x${string}`>;
1137
+ }
1138
+
1139
+ /**
1140
+ * transferFrom
1141
+ * nonpayable
1142
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1143
+ */
1144
+ async transferFrom(from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
1145
+ accessList?: import('viem').AccessList;
1146
+ authorizationList?: import('viem').AuthorizationList;
1147
+ chain?: import('viem').Chain | null;
1148
+ dataSuffix?: `0x${string}`;
1149
+ gas?: bigint;
1150
+ gasPrice?: bigint;
1151
+ maxFeePerGas?: bigint;
1152
+ maxPriorityFeePerGas?: bigint;
1153
+ nonce?: number;
1154
+ value?: bigint;
1155
+ }): Promise<`0x${string}`> {
1156
+ if (!this.contract.write) {
1157
+ throw new Error('Wallet client is required for write operations');
1158
+ }
1159
+ return this.contract.write.transferFrom([from, to, amount] as const, options) as Promise<`0x${string}`>;
1160
+ }
1161
+
1162
+ /**
1163
+ * transferOwnership
1164
+ * nonpayable
1165
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1166
+ */
1167
+ async transferOwnership(newOwner: `0x${string}`, options?: {
1168
+ accessList?: import('viem').AccessList;
1169
+ authorizationList?: import('viem').AuthorizationList;
1170
+ chain?: import('viem').Chain | null;
1171
+ dataSuffix?: `0x${string}`;
1172
+ gas?: bigint;
1173
+ gasPrice?: bigint;
1174
+ maxFeePerGas?: bigint;
1175
+ maxPriorityFeePerGas?: bigint;
1176
+ nonce?: number;
1177
+ value?: bigint;
1178
+ }): Promise<`0x${string}`> {
1179
+ if (!this.contract.write) {
1180
+ throw new Error('Wallet client is required for write operations');
1181
+ }
1182
+ return this.contract.write.transferOwnership([newOwner] as const, options) as Promise<`0x${string}`>;
1183
+ }
1184
+
1185
+ /**
1186
+ * transferToWhitelisted
1187
+ * nonpayable
1188
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1189
+ */
1190
+ async transferToWhitelisted(to: `0x${string}`, amount: bigint, options?: {
1191
+ accessList?: import('viem').AccessList;
1192
+ authorizationList?: import('viem').AuthorizationList;
1193
+ chain?: import('viem').Chain | null;
1194
+ dataSuffix?: `0x${string}`;
1195
+ gas?: bigint;
1196
+ gasPrice?: bigint;
1197
+ maxFeePerGas?: bigint;
1198
+ maxPriorityFeePerGas?: bigint;
1199
+ nonce?: number;
1200
+ value?: bigint;
1201
+ }): Promise<`0x${string}`> {
1202
+ if (!this.contract.write) {
1203
+ throw new Error('Wallet client is required for write operations');
1204
+ }
1205
+ return this.contract.write.transferToWhitelisted([to, amount] as const, options) as Promise<`0x${string}`>;
1206
+ }
1207
+
1208
+ /**
1209
+ * updateWhitelistedAddress
1210
+ * nonpayable
1211
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1212
+ */
1213
+ async updateWhitelistedAddress(account: `0x${string}`, newAddress: `0x${string}`, options?: {
1214
+ accessList?: import('viem').AccessList;
1215
+ authorizationList?: import('viem').AuthorizationList;
1216
+ chain?: import('viem').Chain | null;
1217
+ dataSuffix?: `0x${string}`;
1218
+ gas?: bigint;
1219
+ gasPrice?: bigint;
1220
+ maxFeePerGas?: bigint;
1221
+ maxPriorityFeePerGas?: bigint;
1222
+ nonce?: number;
1223
+ value?: bigint;
1224
+ }): Promise<`0x${string}`> {
1225
+ if (!this.contract.write) {
1226
+ throw new Error('Wallet client is required for write operations');
1227
+ }
1228
+ return this.contract.write.updateWhitelistedAddress([account, newAddress] as const, options) as Promise<`0x${string}`>;
1229
+ }
1230
+
1231
+ /**
1232
+ * updateWhitelistedMaxAmount
1233
+ * nonpayable
1234
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1235
+ */
1236
+ async updateWhitelistedMaxAmount(account: `0x${string}`, newMaxAmount: bigint, options?: {
1237
+ accessList?: import('viem').AccessList;
1238
+ authorizationList?: import('viem').AuthorizationList;
1239
+ chain?: import('viem').Chain | null;
1240
+ dataSuffix?: `0x${string}`;
1241
+ gas?: bigint;
1242
+ gasPrice?: bigint;
1243
+ maxFeePerGas?: bigint;
1244
+ maxPriorityFeePerGas?: bigint;
1245
+ nonce?: number;
1246
+ value?: bigint;
1247
+ }): Promise<`0x${string}`> {
1248
+ if (!this.contract.write) {
1249
+ throw new Error('Wallet client is required for write operations');
1250
+ }
1251
+ return this.contract.write.updateWhitelistedMaxAmount([account, newMaxAmount] as const, options) as Promise<`0x${string}`>;
1252
+ }
1253
+
1254
+
1255
+
1256
+ /**
1257
+ * Simulate contract write operations (dry-run without sending transaction)
1258
+ *
1259
+ * @example
1260
+ * const result = await contract.simulate.transfer('0x...', 1000n);
1261
+ * console.log('Gas estimate:', result.request.gas);
1262
+ * console.log('Would succeed:', result.result);
1263
+ */
1264
+ get simulate() {
1265
+ const contract = this.contract;
1266
+ if (!contract.simulate) {
1267
+ throw new Error('Public client is required for simulation');
1268
+ }
1269
+ return {
1270
+ /**
1271
+ * Simulate addWhitelisted
1272
+ * Returns gas estimate and result without sending transaction
1273
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1274
+ */
1275
+ async addWhitelisted(account: `0x${string}`, maxAmount: bigint, options?: {
1276
+ accessList?: import('viem').AccessList;
1277
+ authorizationList?: import('viem').AuthorizationList;
1278
+ chain?: import('viem').Chain | null;
1279
+ dataSuffix?: `0x${string}`;
1280
+ gas?: bigint;
1281
+ gasPrice?: bigint;
1282
+ maxFeePerGas?: bigint;
1283
+ maxPriorityFeePerGas?: bigint;
1284
+ nonce?: number;
1285
+ value?: bigint;
1286
+ }): Promise<void> {
1287
+ return contract.simulate.addWhitelisted([account, maxAmount] as const, options) as Promise<void>;
1288
+ },
1289
+ /**
1290
+ * Simulate approve
1291
+ * Returns gas estimate and result without sending transaction
1292
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1293
+ */
1294
+ async approve(spender: `0x${string}`, amount: bigint, options?: {
1295
+ accessList?: import('viem').AccessList;
1296
+ authorizationList?: import('viem').AuthorizationList;
1297
+ chain?: import('viem').Chain | null;
1298
+ dataSuffix?: `0x${string}`;
1299
+ gas?: bigint;
1300
+ gasPrice?: bigint;
1301
+ maxFeePerGas?: bigint;
1302
+ maxPriorityFeePerGas?: bigint;
1303
+ nonce?: number;
1304
+ value?: bigint;
1305
+ }): Promise<boolean> {
1306
+ return contract.simulate.approve([spender, amount] as const, options) as Promise<boolean>;
1307
+ },
1308
+ /**
1309
+ * Simulate decreaseAllowance
1310
+ * Returns gas estimate and result without sending transaction
1311
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1312
+ */
1313
+ async decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
1314
+ accessList?: import('viem').AccessList;
1315
+ authorizationList?: import('viem').AuthorizationList;
1316
+ chain?: import('viem').Chain | null;
1317
+ dataSuffix?: `0x${string}`;
1318
+ gas?: bigint;
1319
+ gasPrice?: bigint;
1320
+ maxFeePerGas?: bigint;
1321
+ maxPriorityFeePerGas?: bigint;
1322
+ nonce?: number;
1323
+ value?: bigint;
1324
+ }): Promise<boolean> {
1325
+ return contract.simulate.decreaseAllowance([spender, subtractedValue] as const, options) as Promise<boolean>;
1326
+ },
1327
+ /**
1328
+ * Simulate increaseAllowance
1329
+ * Returns gas estimate and result without sending transaction
1330
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1331
+ */
1332
+ async increaseAllowance(spender: `0x${string}`, addedValue: bigint, options?: {
1333
+ accessList?: import('viem').AccessList;
1334
+ authorizationList?: import('viem').AuthorizationList;
1335
+ chain?: import('viem').Chain | null;
1336
+ dataSuffix?: `0x${string}`;
1337
+ gas?: bigint;
1338
+ gasPrice?: bigint;
1339
+ maxFeePerGas?: bigint;
1340
+ maxPriorityFeePerGas?: bigint;
1341
+ nonce?: number;
1342
+ value?: bigint;
1343
+ }): Promise<boolean> {
1344
+ return contract.simulate.increaseAllowance([spender, addedValue] as const, options) as Promise<boolean>;
1345
+ },
1346
+ /**
1347
+ * Simulate mint
1348
+ * Returns gas estimate and result without sending transaction
1349
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1350
+ */
1351
+ async mint(amount: bigint, options?: {
1352
+ accessList?: import('viem').AccessList;
1353
+ authorizationList?: import('viem').AuthorizationList;
1354
+ chain?: import('viem').Chain | null;
1355
+ dataSuffix?: `0x${string}`;
1356
+ gas?: bigint;
1357
+ gasPrice?: bigint;
1358
+ maxFeePerGas?: bigint;
1359
+ maxPriorityFeePerGas?: bigint;
1360
+ nonce?: number;
1361
+ value?: bigint;
1362
+ }): Promise<void> {
1363
+ return contract.simulate.mint([amount] as const, options) as Promise<void>;
1364
+ },
1365
+ /**
1366
+ * Simulate permit
1367
+ * Returns gas estimate and result without sending transaction
1368
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1369
+ */
1370
+ async permit(owner: `0x${string}`, spender: `0x${string}`, value: bigint, deadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
1371
+ accessList?: import('viem').AccessList;
1372
+ authorizationList?: import('viem').AuthorizationList;
1373
+ chain?: import('viem').Chain | null;
1374
+ dataSuffix?: `0x${string}`;
1375
+ gas?: bigint;
1376
+ gasPrice?: bigint;
1377
+ maxFeePerGas?: bigint;
1378
+ maxPriorityFeePerGas?: bigint;
1379
+ nonce?: number;
1380
+ value?: bigint;
1381
+ }): Promise<void> {
1382
+ return contract.simulate.permit([owner, spender, value, deadline, v, r, s] as const, options) as Promise<void>;
1383
+ },
1384
+ /**
1385
+ * Simulate removeWhitelisted
1386
+ * Returns gas estimate and result without sending transaction
1387
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1388
+ */
1389
+ async removeWhitelisted(account: `0x${string}`, options?: {
1390
+ accessList?: import('viem').AccessList;
1391
+ authorizationList?: import('viem').AuthorizationList;
1392
+ chain?: import('viem').Chain | null;
1393
+ dataSuffix?: `0x${string}`;
1394
+ gas?: bigint;
1395
+ gasPrice?: bigint;
1396
+ maxFeePerGas?: bigint;
1397
+ maxPriorityFeePerGas?: bigint;
1398
+ nonce?: number;
1399
+ value?: bigint;
1400
+ }): Promise<void> {
1401
+ return contract.simulate.removeWhitelisted([account] as const, options) as Promise<void>;
1402
+ },
1403
+ /**
1404
+ * Simulate renounceOwnership
1405
+ * Returns gas estimate and result without sending transaction
1406
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1407
+ */
1408
+ async renounceOwnership(options?: {
1409
+ accessList?: import('viem').AccessList;
1410
+ authorizationList?: import('viem').AuthorizationList;
1411
+ chain?: import('viem').Chain | null;
1412
+ dataSuffix?: `0x${string}`;
1413
+ gas?: bigint;
1414
+ gasPrice?: bigint;
1415
+ maxFeePerGas?: bigint;
1416
+ maxPriorityFeePerGas?: bigint;
1417
+ nonce?: number;
1418
+ value?: bigint;
1419
+ }): Promise<void> {
1420
+ return contract.simulate.renounceOwnership(options) as Promise<void>;
1421
+ },
1422
+ /**
1423
+ * Simulate transfer
1424
+ * Returns gas estimate and result without sending transaction
1425
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1426
+ */
1427
+ async transfer(to: `0x${string}`, amount: bigint, options?: {
1428
+ accessList?: import('viem').AccessList;
1429
+ authorizationList?: import('viem').AuthorizationList;
1430
+ chain?: import('viem').Chain | null;
1431
+ dataSuffix?: `0x${string}`;
1432
+ gas?: bigint;
1433
+ gasPrice?: bigint;
1434
+ maxFeePerGas?: bigint;
1435
+ maxPriorityFeePerGas?: bigint;
1436
+ nonce?: number;
1437
+ value?: bigint;
1438
+ }): Promise<boolean> {
1439
+ return contract.simulate.transfer([to, amount] as const, options) as Promise<boolean>;
1440
+ },
1441
+ /**
1442
+ * Simulate transferFrom
1443
+ * Returns gas estimate and result without sending transaction
1444
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1445
+ */
1446
+ async transferFrom(from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
1447
+ accessList?: import('viem').AccessList;
1448
+ authorizationList?: import('viem').AuthorizationList;
1449
+ chain?: import('viem').Chain | null;
1450
+ dataSuffix?: `0x${string}`;
1451
+ gas?: bigint;
1452
+ gasPrice?: bigint;
1453
+ maxFeePerGas?: bigint;
1454
+ maxPriorityFeePerGas?: bigint;
1455
+ nonce?: number;
1456
+ value?: bigint;
1457
+ }): Promise<boolean> {
1458
+ return contract.simulate.transferFrom([from, to, amount] as const, options) as Promise<boolean>;
1459
+ },
1460
+ /**
1461
+ * Simulate transferOwnership
1462
+ * Returns gas estimate and result without sending transaction
1463
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1464
+ */
1465
+ async transferOwnership(newOwner: `0x${string}`, options?: {
1466
+ accessList?: import('viem').AccessList;
1467
+ authorizationList?: import('viem').AuthorizationList;
1468
+ chain?: import('viem').Chain | null;
1469
+ dataSuffix?: `0x${string}`;
1470
+ gas?: bigint;
1471
+ gasPrice?: bigint;
1472
+ maxFeePerGas?: bigint;
1473
+ maxPriorityFeePerGas?: bigint;
1474
+ nonce?: number;
1475
+ value?: bigint;
1476
+ }): Promise<void> {
1477
+ return contract.simulate.transferOwnership([newOwner] as const, options) as Promise<void>;
1478
+ },
1479
+ /**
1480
+ * Simulate transferToWhitelisted
1481
+ * Returns gas estimate and result without sending transaction
1482
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1483
+ */
1484
+ async transferToWhitelisted(to: `0x${string}`, amount: bigint, options?: {
1485
+ accessList?: import('viem').AccessList;
1486
+ authorizationList?: import('viem').AuthorizationList;
1487
+ chain?: import('viem').Chain | null;
1488
+ dataSuffix?: `0x${string}`;
1489
+ gas?: bigint;
1490
+ gasPrice?: bigint;
1491
+ maxFeePerGas?: bigint;
1492
+ maxPriorityFeePerGas?: bigint;
1493
+ nonce?: number;
1494
+ value?: bigint;
1495
+ }): Promise<void> {
1496
+ return contract.simulate.transferToWhitelisted([to, amount] as const, options) as Promise<void>;
1497
+ },
1498
+ /**
1499
+ * Simulate updateWhitelistedAddress
1500
+ * Returns gas estimate and result without sending transaction
1501
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1502
+ */
1503
+ async updateWhitelistedAddress(account: `0x${string}`, newAddress: `0x${string}`, options?: {
1504
+ accessList?: import('viem').AccessList;
1505
+ authorizationList?: import('viem').AuthorizationList;
1506
+ chain?: import('viem').Chain | null;
1507
+ dataSuffix?: `0x${string}`;
1508
+ gas?: bigint;
1509
+ gasPrice?: bigint;
1510
+ maxFeePerGas?: bigint;
1511
+ maxPriorityFeePerGas?: bigint;
1512
+ nonce?: number;
1513
+ value?: bigint;
1514
+ }): Promise<void> {
1515
+ return contract.simulate.updateWhitelistedAddress([account, newAddress] as const, options) as Promise<void>;
1516
+ },
1517
+ /**
1518
+ * Simulate updateWhitelistedMaxAmount
1519
+ * Returns gas estimate and result without sending transaction
1520
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1521
+ */
1522
+ async updateWhitelistedMaxAmount(account: `0x${string}`, newMaxAmount: bigint, options?: {
1523
+ accessList?: import('viem').AccessList;
1524
+ authorizationList?: import('viem').AuthorizationList;
1525
+ chain?: import('viem').Chain | null;
1526
+ dataSuffix?: `0x${string}`;
1527
+ gas?: bigint;
1528
+ gasPrice?: bigint;
1529
+ maxFeePerGas?: bigint;
1530
+ maxPriorityFeePerGas?: bigint;
1531
+ nonce?: number;
1532
+ value?: bigint;
1533
+ }): Promise<void> {
1534
+ return contract.simulate.updateWhitelistedMaxAmount([account, newMaxAmount] as const, options) as Promise<void>;
1535
+ }
1536
+ };
1537
+ }
1538
+
1539
+ /**
1540
+ * Watch contract events
1541
+ *
1542
+ * @example
1543
+ * // Watch all Transfer events
1544
+ * const unwatch = contract.watch.Transfer((event) => {
1545
+ * console.log('Transfer:', event);
1546
+ * });
1547
+ *
1548
+ * // Stop watching
1549
+ * unwatch();
1550
+ */
1551
+ get watch() {
1552
+ return {
1553
+ /**
1554
+ * Watch Approval events
1555
+ * @param callback Function to call when event is emitted
1556
+ * @param filter Optional filter for indexed parameters
1557
+ * @returns Unwatch function to stop listening
1558
+ */
1559
+ Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner?: `0x${string}` | `0x${string}`[] | null; spender?: `0x${string}` | `0x${string}`[] | null }) => {
1560
+ return this.publicClient.watchContractEvent({
1561
+ address: this.contractAddress,
1562
+ abi: AethirTokenAbi,
1563
+ eventName: 'Approval',
1564
+ args: filter as any,
1565
+ onLogs: (logs: any[]) => {
1566
+ logs.forEach((log: any) => {
1567
+ callback(log.args as any);
1568
+ });
1569
+ },
1570
+ }) as () => void;
1571
+ },
1572
+ /**
1573
+ * Watch EIP712DomainChanged events
1574
+ * @param callback Function to call when event is emitted
1575
+ * @param filter Optional filter for indexed parameters
1576
+ * @returns Unwatch function to stop listening
1577
+ */
1578
+ EIP712DomainChanged: (callback: (event: { }) => void) => {
1579
+ return this.publicClient.watchContractEvent({
1580
+ address: this.contractAddress,
1581
+ abi: AethirTokenAbi,
1582
+ eventName: 'EIP712DomainChanged',
1583
+
1584
+ onLogs: (logs: any[]) => {
1585
+ logs.forEach((log: any) => {
1586
+ callback(log.args as any);
1587
+ });
1588
+ },
1589
+ }) as () => void;
1590
+ },
1591
+ /**
1592
+ * Watch OwnershipTransferred events
1593
+ * @param callback Function to call when event is emitted
1594
+ * @param filter Optional filter for indexed parameters
1595
+ * @returns Unwatch function to stop listening
1596
+ */
1597
+ OwnershipTransferred: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner?: `0x${string}` | `0x${string}`[] | null; newOwner?: `0x${string}` | `0x${string}`[] | null }) => {
1598
+ return this.publicClient.watchContractEvent({
1599
+ address: this.contractAddress,
1600
+ abi: AethirTokenAbi,
1601
+ eventName: 'OwnershipTransferred',
1602
+ args: filter as any,
1603
+ onLogs: (logs: any[]) => {
1604
+ logs.forEach((log: any) => {
1605
+ callback(log.args as any);
1606
+ });
1607
+ },
1608
+ }) as () => void;
1609
+ },
1610
+ /**
1611
+ * Watch Transfer events
1612
+ * @param callback Function to call when event is emitted
1613
+ * @param filter Optional filter for indexed parameters
1614
+ * @returns Unwatch function to stop listening
1615
+ */
1616
+ Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from?: `0x${string}` | `0x${string}`[] | null; to?: `0x${string}` | `0x${string}`[] | null }) => {
1617
+ return this.publicClient.watchContractEvent({
1618
+ address: this.contractAddress,
1619
+ abi: AethirTokenAbi,
1620
+ eventName: 'Transfer',
1621
+ args: filter as any,
1622
+ onLogs: (logs: any[]) => {
1623
+ logs.forEach((log: any) => {
1624
+ callback(log.args as any);
1625
+ });
1626
+ },
1627
+ }) as () => void;
1628
+ },
1629
+ /**
1630
+ * Watch WhitelistedAdded events
1631
+ * @param callback Function to call when event is emitted
1632
+ * @param filter Optional filter for indexed parameters
1633
+ * @returns Unwatch function to stop listening
1634
+ */
1635
+ WhitelistedAdded: (callback: (event: { account: `0x${string}`; maxAmount: bigint }) => void) => {
1636
+ return this.publicClient.watchContractEvent({
1637
+ address: this.contractAddress,
1638
+ abi: AethirTokenAbi,
1639
+ eventName: 'WhitelistedAdded',
1640
+
1641
+ onLogs: (logs: any[]) => {
1642
+ logs.forEach((log: any) => {
1643
+ callback(log.args as any);
1644
+ });
1645
+ },
1646
+ }) as () => void;
1647
+ },
1648
+ /**
1649
+ * Watch WhitelistedAddressUpdated events
1650
+ * @param callback Function to call when event is emitted
1651
+ * @param filter Optional filter for indexed parameters
1652
+ * @returns Unwatch function to stop listening
1653
+ */
1654
+ WhitelistedAddressUpdated: (callback: (event: { account: `0x${string}`; newAddress: `0x${string}` }) => void) => {
1655
+ return this.publicClient.watchContractEvent({
1656
+ address: this.contractAddress,
1657
+ abi: AethirTokenAbi,
1658
+ eventName: 'WhitelistedAddressUpdated',
1659
+
1660
+ onLogs: (logs: any[]) => {
1661
+ logs.forEach((log: any) => {
1662
+ callback(log.args as any);
1663
+ });
1664
+ },
1665
+ }) as () => void;
1666
+ },
1667
+ /**
1668
+ * Watch WhitelistedMaxAmountUpdated events
1669
+ * @param callback Function to call when event is emitted
1670
+ * @param filter Optional filter for indexed parameters
1671
+ * @returns Unwatch function to stop listening
1672
+ */
1673
+ WhitelistedMaxAmountUpdated: (callback: (event: { account: `0x${string}`; newMaxAmount: bigint }) => void) => {
1674
+ return this.publicClient.watchContractEvent({
1675
+ address: this.contractAddress,
1676
+ abi: AethirTokenAbi,
1677
+ eventName: 'WhitelistedMaxAmountUpdated',
1678
+
1679
+ onLogs: (logs: any[]) => {
1680
+ logs.forEach((log: any) => {
1681
+ callback(log.args as any);
1682
+ });
1683
+ },
1684
+ }) as () => void;
1685
+ },
1686
+ /**
1687
+ * Watch WhitelistedRemoved events
1688
+ * @param callback Function to call when event is emitted
1689
+ * @param filter Optional filter for indexed parameters
1690
+ * @returns Unwatch function to stop listening
1691
+ */
1692
+ WhitelistedRemoved: (callback: (event: { account: `0x${string}` }) => void) => {
1693
+ return this.publicClient.watchContractEvent({
1694
+ address: this.contractAddress,
1695
+ abi: AethirTokenAbi,
1696
+ eventName: 'WhitelistedRemoved',
1697
+
1698
+ onLogs: (logs: any[]) => {
1699
+ logs.forEach((log: any) => {
1700
+ callback(log.args as any);
1701
+ });
1702
+ },
1703
+ }) as () => void;
1704
+ }
1705
+ };
1706
+ }
1707
+ }