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