@gitmyabi/usdt 1.0.21 → 1.0.23

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