@gitmyabi/usdt 1.0.17 → 1.0.18

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