@gitmyabi/usdt 1.0.14 → 1.0.16

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