@gitmyabi/usdt 1.0.12 → 1.0.14

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