@gitmyabi/usdt 1.0.2 → 1.0.4
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.
- package/README.md +3 -3
- package/contracts/USDToken_json.d.ts +243 -34
- package/contracts/USDToken_json.js +253 -39
- package/contracts/USDToken_json.ts +329 -42
- package/package.json +3 -3
|
@@ -37,6 +37,19 @@ export const USDToken_jsonAbi = [
|
|
|
37
37
|
"name": "Approval",
|
|
38
38
|
"type": "event"
|
|
39
39
|
},
|
|
40
|
+
{
|
|
41
|
+
"anonymous": false,
|
|
42
|
+
"inputs": [
|
|
43
|
+
{
|
|
44
|
+
"indexed": false,
|
|
45
|
+
"internalType": "string",
|
|
46
|
+
"name": "newName",
|
|
47
|
+
"type": "string"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"name": "NameChanged",
|
|
51
|
+
"type": "event"
|
|
52
|
+
},
|
|
40
53
|
{
|
|
41
54
|
"anonymous": false,
|
|
42
55
|
"inputs": [
|
|
@@ -45,15 +58,22 @@ export const USDToken_jsonAbi = [
|
|
|
45
58
|
"internalType": "address",
|
|
46
59
|
"name": "previousOwner",
|
|
47
60
|
"type": "address"
|
|
48
|
-
}
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"name": "OwnershipRenounced",
|
|
64
|
+
"type": "event"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"anonymous": false,
|
|
68
|
+
"inputs": [
|
|
49
69
|
{
|
|
50
|
-
"indexed":
|
|
51
|
-
"internalType": "
|
|
52
|
-
"name": "
|
|
53
|
-
"type": "
|
|
70
|
+
"indexed": false,
|
|
71
|
+
"internalType": "string",
|
|
72
|
+
"name": "newSymbol",
|
|
73
|
+
"type": "string"
|
|
54
74
|
}
|
|
55
75
|
],
|
|
56
|
-
"name": "
|
|
76
|
+
"name": "SymbolChanged",
|
|
57
77
|
"type": "event"
|
|
58
78
|
},
|
|
59
79
|
{
|
|
@@ -161,6 +181,67 @@ export const USDToken_jsonAbi = [
|
|
|
161
181
|
"stateMutability": "view",
|
|
162
182
|
"type": "function"
|
|
163
183
|
},
|
|
184
|
+
{
|
|
185
|
+
"inputs": [
|
|
186
|
+
{
|
|
187
|
+
"internalType": "address",
|
|
188
|
+
"name": "spender",
|
|
189
|
+
"type": "address"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"internalType": "uint256",
|
|
193
|
+
"name": "subtractedValue",
|
|
194
|
+
"type": "uint256"
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
"name": "decreaseAllowance",
|
|
198
|
+
"outputs": [
|
|
199
|
+
{
|
|
200
|
+
"internalType": "bool",
|
|
201
|
+
"name": "",
|
|
202
|
+
"type": "bool"
|
|
203
|
+
}
|
|
204
|
+
],
|
|
205
|
+
"stateMutability": "nonpayable",
|
|
206
|
+
"type": "function"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"inputs": [
|
|
210
|
+
{
|
|
211
|
+
"internalType": "address",
|
|
212
|
+
"name": "spender",
|
|
213
|
+
"type": "address"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
"internalType": "uint256",
|
|
217
|
+
"name": "addedValue",
|
|
218
|
+
"type": "uint256"
|
|
219
|
+
}
|
|
220
|
+
],
|
|
221
|
+
"name": "increaseAllowance",
|
|
222
|
+
"outputs": [
|
|
223
|
+
{
|
|
224
|
+
"internalType": "bool",
|
|
225
|
+
"name": "",
|
|
226
|
+
"type": "bool"
|
|
227
|
+
}
|
|
228
|
+
],
|
|
229
|
+
"stateMutability": "nonpayable",
|
|
230
|
+
"type": "function"
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"inputs": [],
|
|
234
|
+
"name": "isRenounced",
|
|
235
|
+
"outputs": [
|
|
236
|
+
{
|
|
237
|
+
"internalType": "bool",
|
|
238
|
+
"name": "",
|
|
239
|
+
"type": "bool"
|
|
240
|
+
}
|
|
241
|
+
],
|
|
242
|
+
"stateMutability": "view",
|
|
243
|
+
"type": "function"
|
|
244
|
+
},
|
|
164
245
|
{
|
|
165
246
|
"inputs": [],
|
|
166
247
|
"name": "name",
|
|
@@ -194,6 +275,45 @@ export const USDToken_jsonAbi = [
|
|
|
194
275
|
"stateMutability": "nonpayable",
|
|
195
276
|
"type": "function"
|
|
196
277
|
},
|
|
278
|
+
{
|
|
279
|
+
"inputs": [],
|
|
280
|
+
"name": "renounced",
|
|
281
|
+
"outputs": [
|
|
282
|
+
{
|
|
283
|
+
"internalType": "bool",
|
|
284
|
+
"name": "",
|
|
285
|
+
"type": "bool"
|
|
286
|
+
}
|
|
287
|
+
],
|
|
288
|
+
"stateMutability": "view",
|
|
289
|
+
"type": "function"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"inputs": [
|
|
293
|
+
{
|
|
294
|
+
"internalType": "string",
|
|
295
|
+
"name": "newName",
|
|
296
|
+
"type": "string"
|
|
297
|
+
}
|
|
298
|
+
],
|
|
299
|
+
"name": "setName",
|
|
300
|
+
"outputs": [],
|
|
301
|
+
"stateMutability": "nonpayable",
|
|
302
|
+
"type": "function"
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"inputs": [
|
|
306
|
+
{
|
|
307
|
+
"internalType": "string",
|
|
308
|
+
"name": "newSymbol",
|
|
309
|
+
"type": "string"
|
|
310
|
+
}
|
|
311
|
+
],
|
|
312
|
+
"name": "setSymbol",
|
|
313
|
+
"outputs": [],
|
|
314
|
+
"stateMutability": "nonpayable",
|
|
315
|
+
"type": "function"
|
|
316
|
+
},
|
|
197
317
|
{
|
|
198
318
|
"inputs": [],
|
|
199
319
|
"name": "symbol",
|
|
@@ -285,19 +405,6 @@ export const USDToken_jsonAbi = [
|
|
|
285
405
|
],
|
|
286
406
|
"stateMutability": "nonpayable",
|
|
287
407
|
"type": "function"
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
"inputs": [
|
|
291
|
-
{
|
|
292
|
-
"internalType": "address",
|
|
293
|
-
"name": "newOwner",
|
|
294
|
-
"type": "address"
|
|
295
|
-
}
|
|
296
|
-
],
|
|
297
|
-
"name": "transferOwnership",
|
|
298
|
-
"outputs": [],
|
|
299
|
-
"stateMutability": "nonpayable",
|
|
300
|
-
"type": "function"
|
|
301
408
|
}
|
|
302
409
|
] as const satisfies Abi;
|
|
303
410
|
|
|
@@ -407,6 +514,14 @@ export class USDToken_json {
|
|
|
407
514
|
return this.contract.read.decimals() as Promise<bigint>;
|
|
408
515
|
}
|
|
409
516
|
|
|
517
|
+
/**
|
|
518
|
+
* isRenounced
|
|
519
|
+
* view
|
|
520
|
+
*/
|
|
521
|
+
async isRenounced(): Promise<boolean> {
|
|
522
|
+
return this.contract.read.isRenounced() as Promise<boolean>;
|
|
523
|
+
}
|
|
524
|
+
|
|
410
525
|
/**
|
|
411
526
|
* name
|
|
412
527
|
* view
|
|
@@ -423,6 +538,14 @@ export class USDToken_json {
|
|
|
423
538
|
return this.contract.read.owner() as Promise<`0x${string}`>;
|
|
424
539
|
}
|
|
425
540
|
|
|
541
|
+
/**
|
|
542
|
+
* renounced
|
|
543
|
+
* view
|
|
544
|
+
*/
|
|
545
|
+
async renounced(): Promise<boolean> {
|
|
546
|
+
return this.contract.read.renounced() as Promise<boolean>;
|
|
547
|
+
}
|
|
548
|
+
|
|
426
549
|
/**
|
|
427
550
|
* symbol
|
|
428
551
|
* view
|
|
@@ -470,6 +593,52 @@ export class USDToken_json {
|
|
|
470
593
|
return this.contract.write.approve([spender, amount] as const, options) as Promise<`0x${string}`>;
|
|
471
594
|
}
|
|
472
595
|
|
|
596
|
+
/**
|
|
597
|
+
* decreaseAllowance
|
|
598
|
+
* nonpayable
|
|
599
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
600
|
+
*/
|
|
601
|
+
async decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
|
|
602
|
+
accessList?: import('viem').AccessList;
|
|
603
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
604
|
+
chain?: import('viem').Chain | null;
|
|
605
|
+
dataSuffix?: `0x${string}`;
|
|
606
|
+
gas?: bigint;
|
|
607
|
+
gasPrice?: bigint;
|
|
608
|
+
maxFeePerGas?: bigint;
|
|
609
|
+
maxPriorityFeePerGas?: bigint;
|
|
610
|
+
nonce?: number;
|
|
611
|
+
value?: bigint;
|
|
612
|
+
}): Promise<`0x${string}`> {
|
|
613
|
+
if (!this.contract.write) {
|
|
614
|
+
throw new Error('Wallet client is required for write operations');
|
|
615
|
+
}
|
|
616
|
+
return this.contract.write.decreaseAllowance([spender, subtractedValue] as const, options) as Promise<`0x${string}`>;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
/**
|
|
620
|
+
* increaseAllowance
|
|
621
|
+
* nonpayable
|
|
622
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
623
|
+
*/
|
|
624
|
+
async increaseAllowance(spender: `0x${string}`, addedValue: bigint, options?: {
|
|
625
|
+
accessList?: import('viem').AccessList;
|
|
626
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
627
|
+
chain?: import('viem').Chain | null;
|
|
628
|
+
dataSuffix?: `0x${string}`;
|
|
629
|
+
gas?: bigint;
|
|
630
|
+
gasPrice?: bigint;
|
|
631
|
+
maxFeePerGas?: bigint;
|
|
632
|
+
maxPriorityFeePerGas?: bigint;
|
|
633
|
+
nonce?: number;
|
|
634
|
+
value?: bigint;
|
|
635
|
+
}): Promise<`0x${string}`> {
|
|
636
|
+
if (!this.contract.write) {
|
|
637
|
+
throw new Error('Wallet client is required for write operations');
|
|
638
|
+
}
|
|
639
|
+
return this.contract.write.increaseAllowance([spender, addedValue] as const, options) as Promise<`0x${string}`>;
|
|
640
|
+
}
|
|
641
|
+
|
|
473
642
|
/**
|
|
474
643
|
* renounceOwnership
|
|
475
644
|
* nonpayable
|
|
@@ -494,11 +663,11 @@ export class USDToken_json {
|
|
|
494
663
|
}
|
|
495
664
|
|
|
496
665
|
/**
|
|
497
|
-
*
|
|
666
|
+
* setName
|
|
498
667
|
* nonpayable
|
|
499
668
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
500
669
|
*/
|
|
501
|
-
async
|
|
670
|
+
async setName(newName: string, options?: {
|
|
502
671
|
accessList?: import('viem').AccessList;
|
|
503
672
|
authorizationList?: import('viem').AuthorizationList;
|
|
504
673
|
chain?: import('viem').Chain | null;
|
|
@@ -513,15 +682,15 @@ export class USDToken_json {
|
|
|
513
682
|
if (!this.contract.write) {
|
|
514
683
|
throw new Error('Wallet client is required for write operations');
|
|
515
684
|
}
|
|
516
|
-
return this.contract.write.
|
|
685
|
+
return this.contract.write.setName([newName] as const, options) as Promise<`0x${string}`>;
|
|
517
686
|
}
|
|
518
687
|
|
|
519
688
|
/**
|
|
520
|
-
*
|
|
689
|
+
* setSymbol
|
|
521
690
|
* nonpayable
|
|
522
691
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
523
692
|
*/
|
|
524
|
-
async
|
|
693
|
+
async setSymbol(newSymbol: string, options?: {
|
|
525
694
|
accessList?: import('viem').AccessList;
|
|
526
695
|
authorizationList?: import('viem').AuthorizationList;
|
|
527
696
|
chain?: import('viem').Chain | null;
|
|
@@ -536,15 +705,38 @@ export class USDToken_json {
|
|
|
536
705
|
if (!this.contract.write) {
|
|
537
706
|
throw new Error('Wallet client is required for write operations');
|
|
538
707
|
}
|
|
539
|
-
return this.contract.write.
|
|
708
|
+
return this.contract.write.setSymbol([newSymbol] as const, options) as Promise<`0x${string}`>;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
/**
|
|
712
|
+
* transfer
|
|
713
|
+
* nonpayable
|
|
714
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
715
|
+
*/
|
|
716
|
+
async transfer(to: `0x${string}`, amount: bigint, options?: {
|
|
717
|
+
accessList?: import('viem').AccessList;
|
|
718
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
719
|
+
chain?: import('viem').Chain | null;
|
|
720
|
+
dataSuffix?: `0x${string}`;
|
|
721
|
+
gas?: bigint;
|
|
722
|
+
gasPrice?: bigint;
|
|
723
|
+
maxFeePerGas?: bigint;
|
|
724
|
+
maxPriorityFeePerGas?: bigint;
|
|
725
|
+
nonce?: number;
|
|
726
|
+
value?: bigint;
|
|
727
|
+
}): Promise<`0x${string}`> {
|
|
728
|
+
if (!this.contract.write) {
|
|
729
|
+
throw new Error('Wallet client is required for write operations');
|
|
730
|
+
}
|
|
731
|
+
return this.contract.write.transfer([to, amount] as const, options) as Promise<`0x${string}`>;
|
|
540
732
|
}
|
|
541
733
|
|
|
542
734
|
/**
|
|
543
|
-
*
|
|
735
|
+
* transferFrom
|
|
544
736
|
* nonpayable
|
|
545
737
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
546
738
|
*/
|
|
547
|
-
async
|
|
739
|
+
async transferFrom(from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
|
|
548
740
|
accessList?: import('viem').AccessList;
|
|
549
741
|
authorizationList?: import('viem').AuthorizationList;
|
|
550
742
|
chain?: import('viem').Chain | null;
|
|
@@ -559,7 +751,7 @@ export class USDToken_json {
|
|
|
559
751
|
if (!this.contract.write) {
|
|
560
752
|
throw new Error('Wallet client is required for write operations');
|
|
561
753
|
}
|
|
562
|
-
return this.contract.write.
|
|
754
|
+
return this.contract.write.transferFrom([from, to, amount] as const, options) as Promise<`0x${string}`>;
|
|
563
755
|
}
|
|
564
756
|
|
|
565
757
|
|
|
@@ -597,6 +789,44 @@ export class USDToken_json {
|
|
|
597
789
|
}): Promise<boolean> {
|
|
598
790
|
return contract.simulate.approve([spender, amount] as const, options) as Promise<boolean>;
|
|
599
791
|
},
|
|
792
|
+
/**
|
|
793
|
+
* Simulate decreaseAllowance
|
|
794
|
+
* Returns gas estimate and result without sending transaction
|
|
795
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
796
|
+
*/
|
|
797
|
+
async decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
|
|
798
|
+
accessList?: import('viem').AccessList;
|
|
799
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
800
|
+
chain?: import('viem').Chain | null;
|
|
801
|
+
dataSuffix?: `0x${string}`;
|
|
802
|
+
gas?: bigint;
|
|
803
|
+
gasPrice?: bigint;
|
|
804
|
+
maxFeePerGas?: bigint;
|
|
805
|
+
maxPriorityFeePerGas?: bigint;
|
|
806
|
+
nonce?: number;
|
|
807
|
+
value?: bigint;
|
|
808
|
+
}): Promise<boolean> {
|
|
809
|
+
return contract.simulate.decreaseAllowance([spender, subtractedValue] as const, options) as Promise<boolean>;
|
|
810
|
+
},
|
|
811
|
+
/**
|
|
812
|
+
* Simulate increaseAllowance
|
|
813
|
+
* Returns gas estimate and result without sending transaction
|
|
814
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
815
|
+
*/
|
|
816
|
+
async increaseAllowance(spender: `0x${string}`, addedValue: bigint, options?: {
|
|
817
|
+
accessList?: import('viem').AccessList;
|
|
818
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
819
|
+
chain?: import('viem').Chain | null;
|
|
820
|
+
dataSuffix?: `0x${string}`;
|
|
821
|
+
gas?: bigint;
|
|
822
|
+
gasPrice?: bigint;
|
|
823
|
+
maxFeePerGas?: bigint;
|
|
824
|
+
maxPriorityFeePerGas?: bigint;
|
|
825
|
+
nonce?: number;
|
|
826
|
+
value?: bigint;
|
|
827
|
+
}): Promise<boolean> {
|
|
828
|
+
return contract.simulate.increaseAllowance([spender, addedValue] as const, options) as Promise<boolean>;
|
|
829
|
+
},
|
|
600
830
|
/**
|
|
601
831
|
* Simulate renounceOwnership
|
|
602
832
|
* Returns gas estimate and result without sending transaction
|
|
@@ -617,11 +847,11 @@ export class USDToken_json {
|
|
|
617
847
|
return contract.simulate.renounceOwnership(options) as Promise<void>;
|
|
618
848
|
},
|
|
619
849
|
/**
|
|
620
|
-
* Simulate
|
|
850
|
+
* Simulate setName
|
|
621
851
|
* Returns gas estimate and result without sending transaction
|
|
622
852
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
623
853
|
*/
|
|
624
|
-
async
|
|
854
|
+
async setName(newName: string, options?: {
|
|
625
855
|
accessList?: import('viem').AccessList;
|
|
626
856
|
authorizationList?: import('viem').AuthorizationList;
|
|
627
857
|
chain?: import('viem').Chain | null;
|
|
@@ -632,15 +862,34 @@ export class USDToken_json {
|
|
|
632
862
|
maxPriorityFeePerGas?: bigint;
|
|
633
863
|
nonce?: number;
|
|
634
864
|
value?: bigint;
|
|
635
|
-
}): Promise<
|
|
636
|
-
return contract.simulate.
|
|
865
|
+
}): Promise<void> {
|
|
866
|
+
return contract.simulate.setName([newName] as const, options) as Promise<void>;
|
|
637
867
|
},
|
|
638
868
|
/**
|
|
639
|
-
* Simulate
|
|
869
|
+
* Simulate setSymbol
|
|
640
870
|
* Returns gas estimate and result without sending transaction
|
|
641
871
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
642
872
|
*/
|
|
643
|
-
async
|
|
873
|
+
async setSymbol(newSymbol: string, options?: {
|
|
874
|
+
accessList?: import('viem').AccessList;
|
|
875
|
+
authorizationList?: import('viem').AuthorizationList;
|
|
876
|
+
chain?: import('viem').Chain | null;
|
|
877
|
+
dataSuffix?: `0x${string}`;
|
|
878
|
+
gas?: bigint;
|
|
879
|
+
gasPrice?: bigint;
|
|
880
|
+
maxFeePerGas?: bigint;
|
|
881
|
+
maxPriorityFeePerGas?: bigint;
|
|
882
|
+
nonce?: number;
|
|
883
|
+
value?: bigint;
|
|
884
|
+
}): Promise<void> {
|
|
885
|
+
return contract.simulate.setSymbol([newSymbol] as const, options) as Promise<void>;
|
|
886
|
+
},
|
|
887
|
+
/**
|
|
888
|
+
* Simulate transfer
|
|
889
|
+
* Returns gas estimate and result without sending transaction
|
|
890
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
891
|
+
*/
|
|
892
|
+
async transfer(to: `0x${string}`, amount: bigint, options?: {
|
|
644
893
|
accessList?: import('viem').AccessList;
|
|
645
894
|
authorizationList?: import('viem').AuthorizationList;
|
|
646
895
|
chain?: import('viem').Chain | null;
|
|
@@ -652,14 +901,14 @@ export class USDToken_json {
|
|
|
652
901
|
nonce?: number;
|
|
653
902
|
value?: bigint;
|
|
654
903
|
}): Promise<boolean> {
|
|
655
|
-
return contract.simulate.
|
|
904
|
+
return contract.simulate.transfer([to, amount] as const, options) as Promise<boolean>;
|
|
656
905
|
},
|
|
657
906
|
/**
|
|
658
|
-
* Simulate
|
|
907
|
+
* Simulate transferFrom
|
|
659
908
|
* Returns gas estimate and result without sending transaction
|
|
660
909
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
661
910
|
*/
|
|
662
|
-
async
|
|
911
|
+
async transferFrom(from: `0x${string}`, to: `0x${string}`, amount: bigint, options?: {
|
|
663
912
|
accessList?: import('viem').AccessList;
|
|
664
913
|
authorizationList?: import('viem').AuthorizationList;
|
|
665
914
|
chain?: import('viem').Chain | null;
|
|
@@ -670,8 +919,8 @@ export class USDToken_json {
|
|
|
670
919
|
maxPriorityFeePerGas?: bigint;
|
|
671
920
|
nonce?: number;
|
|
672
921
|
value?: bigint;
|
|
673
|
-
}): Promise<
|
|
674
|
-
return contract.simulate.
|
|
922
|
+
}): Promise<boolean> {
|
|
923
|
+
return contract.simulate.transferFrom([from, to, amount] as const, options) as Promise<boolean>;
|
|
675
924
|
}
|
|
676
925
|
};
|
|
677
926
|
}
|
|
@@ -710,16 +959,35 @@ export class USDToken_json {
|
|
|
710
959
|
}) as () => void;
|
|
711
960
|
},
|
|
712
961
|
/**
|
|
713
|
-
* Watch
|
|
962
|
+
* Watch NameChanged events
|
|
714
963
|
* @param callback Function to call when event is emitted
|
|
715
964
|
* @param filter Optional filter for indexed parameters
|
|
716
965
|
* @returns Unwatch function to stop listening
|
|
717
966
|
*/
|
|
718
|
-
|
|
967
|
+
NameChanged: (callback: (event: { newName: string }) => void) => {
|
|
719
968
|
return this.publicClient.watchContractEvent({
|
|
720
969
|
address: this.contractAddress,
|
|
721
970
|
abi: USDToken_jsonAbi,
|
|
722
|
-
eventName: '
|
|
971
|
+
eventName: 'NameChanged',
|
|
972
|
+
|
|
973
|
+
onLogs: (logs: any[]) => {
|
|
974
|
+
logs.forEach((log: any) => {
|
|
975
|
+
callback(log.args as any);
|
|
976
|
+
});
|
|
977
|
+
},
|
|
978
|
+
}) as () => void;
|
|
979
|
+
},
|
|
980
|
+
/**
|
|
981
|
+
* Watch OwnershipRenounced events
|
|
982
|
+
* @param callback Function to call when event is emitted
|
|
983
|
+
* @param filter Optional filter for indexed parameters
|
|
984
|
+
* @returns Unwatch function to stop listening
|
|
985
|
+
*/
|
|
986
|
+
OwnershipRenounced: (callback: (event: { previousOwner: `0x${string}` }) => void, filter?: { previousOwner: `0x${string}` }) => {
|
|
987
|
+
return this.publicClient.watchContractEvent({
|
|
988
|
+
address: this.contractAddress,
|
|
989
|
+
abi: USDToken_jsonAbi,
|
|
990
|
+
eventName: 'OwnershipRenounced',
|
|
723
991
|
args: filter,
|
|
724
992
|
onLogs: (logs: any[]) => {
|
|
725
993
|
logs.forEach((log: any) => {
|
|
@@ -728,6 +996,25 @@ export class USDToken_json {
|
|
|
728
996
|
},
|
|
729
997
|
}) as () => void;
|
|
730
998
|
},
|
|
999
|
+
/**
|
|
1000
|
+
* Watch SymbolChanged events
|
|
1001
|
+
* @param callback Function to call when event is emitted
|
|
1002
|
+
* @param filter Optional filter for indexed parameters
|
|
1003
|
+
* @returns Unwatch function to stop listening
|
|
1004
|
+
*/
|
|
1005
|
+
SymbolChanged: (callback: (event: { newSymbol: string }) => void) => {
|
|
1006
|
+
return this.publicClient.watchContractEvent({
|
|
1007
|
+
address: this.contractAddress,
|
|
1008
|
+
abi: USDToken_jsonAbi,
|
|
1009
|
+
eventName: 'SymbolChanged',
|
|
1010
|
+
|
|
1011
|
+
onLogs: (logs: any[]) => {
|
|
1012
|
+
logs.forEach((log: any) => {
|
|
1013
|
+
callback(log.args as any);
|
|
1014
|
+
});
|
|
1015
|
+
},
|
|
1016
|
+
}) as () => void;
|
|
1017
|
+
},
|
|
731
1018
|
/**
|
|
732
1019
|
* Watch Transfer events
|
|
733
1020
|
* @param callback Function to call when event is emitted
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gitmyabi/usdt",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Auto-generated TypeScript type bindings for USDT (build etherscan-usdt-
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"description": "Auto-generated TypeScript type bindings for USDT (build etherscan-usdt-abce0930-1785161377856, commit 312f559, branch etherscan)",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
7
7
|
"exports": {
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"url": "https://github.com/etherscan/usdt"
|
|
40
40
|
},
|
|
41
41
|
"branch": "etherscan",
|
|
42
|
-
"shortHash": "
|
|
42
|
+
"shortHash": "312f559"
|
|
43
43
|
}
|