@gitmyabi/usdt 1.0.20 → 1.0.21

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