@gitmyabi/usdt 1.0.18 → 1.0.19

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