@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
|
@@ -38,6 +38,19 @@ exports.USDToken_jsonAbi = [
|
|
|
38
38
|
"name": "Approval",
|
|
39
39
|
"type": "event"
|
|
40
40
|
},
|
|
41
|
+
{
|
|
42
|
+
"anonymous": false,
|
|
43
|
+
"inputs": [
|
|
44
|
+
{
|
|
45
|
+
"indexed": false,
|
|
46
|
+
"internalType": "string",
|
|
47
|
+
"name": "newName",
|
|
48
|
+
"type": "string"
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
"name": "NameChanged",
|
|
52
|
+
"type": "event"
|
|
53
|
+
},
|
|
41
54
|
{
|
|
42
55
|
"anonymous": false,
|
|
43
56
|
"inputs": [
|
|
@@ -46,15 +59,22 @@ exports.USDToken_jsonAbi = [
|
|
|
46
59
|
"internalType": "address",
|
|
47
60
|
"name": "previousOwner",
|
|
48
61
|
"type": "address"
|
|
49
|
-
}
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"name": "OwnershipRenounced",
|
|
65
|
+
"type": "event"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"anonymous": false,
|
|
69
|
+
"inputs": [
|
|
50
70
|
{
|
|
51
|
-
"indexed":
|
|
52
|
-
"internalType": "
|
|
53
|
-
"name": "
|
|
54
|
-
"type": "
|
|
71
|
+
"indexed": false,
|
|
72
|
+
"internalType": "string",
|
|
73
|
+
"name": "newSymbol",
|
|
74
|
+
"type": "string"
|
|
55
75
|
}
|
|
56
76
|
],
|
|
57
|
-
"name": "
|
|
77
|
+
"name": "SymbolChanged",
|
|
58
78
|
"type": "event"
|
|
59
79
|
},
|
|
60
80
|
{
|
|
@@ -162,6 +182,67 @@ exports.USDToken_jsonAbi = [
|
|
|
162
182
|
"stateMutability": "view",
|
|
163
183
|
"type": "function"
|
|
164
184
|
},
|
|
185
|
+
{
|
|
186
|
+
"inputs": [
|
|
187
|
+
{
|
|
188
|
+
"internalType": "address",
|
|
189
|
+
"name": "spender",
|
|
190
|
+
"type": "address"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"internalType": "uint256",
|
|
194
|
+
"name": "subtractedValue",
|
|
195
|
+
"type": "uint256"
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
"name": "decreaseAllowance",
|
|
199
|
+
"outputs": [
|
|
200
|
+
{
|
|
201
|
+
"internalType": "bool",
|
|
202
|
+
"name": "",
|
|
203
|
+
"type": "bool"
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
"stateMutability": "nonpayable",
|
|
207
|
+
"type": "function"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"inputs": [
|
|
211
|
+
{
|
|
212
|
+
"internalType": "address",
|
|
213
|
+
"name": "spender",
|
|
214
|
+
"type": "address"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"internalType": "uint256",
|
|
218
|
+
"name": "addedValue",
|
|
219
|
+
"type": "uint256"
|
|
220
|
+
}
|
|
221
|
+
],
|
|
222
|
+
"name": "increaseAllowance",
|
|
223
|
+
"outputs": [
|
|
224
|
+
{
|
|
225
|
+
"internalType": "bool",
|
|
226
|
+
"name": "",
|
|
227
|
+
"type": "bool"
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
"stateMutability": "nonpayable",
|
|
231
|
+
"type": "function"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"inputs": [],
|
|
235
|
+
"name": "isRenounced",
|
|
236
|
+
"outputs": [
|
|
237
|
+
{
|
|
238
|
+
"internalType": "bool",
|
|
239
|
+
"name": "",
|
|
240
|
+
"type": "bool"
|
|
241
|
+
}
|
|
242
|
+
],
|
|
243
|
+
"stateMutability": "view",
|
|
244
|
+
"type": "function"
|
|
245
|
+
},
|
|
165
246
|
{
|
|
166
247
|
"inputs": [],
|
|
167
248
|
"name": "name",
|
|
@@ -195,6 +276,45 @@ exports.USDToken_jsonAbi = [
|
|
|
195
276
|
"stateMutability": "nonpayable",
|
|
196
277
|
"type": "function"
|
|
197
278
|
},
|
|
279
|
+
{
|
|
280
|
+
"inputs": [],
|
|
281
|
+
"name": "renounced",
|
|
282
|
+
"outputs": [
|
|
283
|
+
{
|
|
284
|
+
"internalType": "bool",
|
|
285
|
+
"name": "",
|
|
286
|
+
"type": "bool"
|
|
287
|
+
}
|
|
288
|
+
],
|
|
289
|
+
"stateMutability": "view",
|
|
290
|
+
"type": "function"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"inputs": [
|
|
294
|
+
{
|
|
295
|
+
"internalType": "string",
|
|
296
|
+
"name": "newName",
|
|
297
|
+
"type": "string"
|
|
298
|
+
}
|
|
299
|
+
],
|
|
300
|
+
"name": "setName",
|
|
301
|
+
"outputs": [],
|
|
302
|
+
"stateMutability": "nonpayable",
|
|
303
|
+
"type": "function"
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"inputs": [
|
|
307
|
+
{
|
|
308
|
+
"internalType": "string",
|
|
309
|
+
"name": "newSymbol",
|
|
310
|
+
"type": "string"
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
"name": "setSymbol",
|
|
314
|
+
"outputs": [],
|
|
315
|
+
"stateMutability": "nonpayable",
|
|
316
|
+
"type": "function"
|
|
317
|
+
},
|
|
198
318
|
{
|
|
199
319
|
"inputs": [],
|
|
200
320
|
"name": "symbol",
|
|
@@ -286,19 +406,6 @@ exports.USDToken_jsonAbi = [
|
|
|
286
406
|
],
|
|
287
407
|
"stateMutability": "nonpayable",
|
|
288
408
|
"type": "function"
|
|
289
|
-
},
|
|
290
|
-
{
|
|
291
|
-
"inputs": [
|
|
292
|
-
{
|
|
293
|
-
"internalType": "address",
|
|
294
|
-
"name": "newOwner",
|
|
295
|
-
"type": "address"
|
|
296
|
-
}
|
|
297
|
-
],
|
|
298
|
-
"name": "transferOwnership",
|
|
299
|
-
"outputs": [],
|
|
300
|
-
"stateMutability": "nonpayable",
|
|
301
|
-
"type": "function"
|
|
302
409
|
}
|
|
303
410
|
];
|
|
304
411
|
/**
|
|
@@ -379,6 +486,13 @@ class USDToken_json {
|
|
|
379
486
|
async decimals() {
|
|
380
487
|
return this.contract.read.decimals();
|
|
381
488
|
}
|
|
489
|
+
/**
|
|
490
|
+
* isRenounced
|
|
491
|
+
* view
|
|
492
|
+
*/
|
|
493
|
+
async isRenounced() {
|
|
494
|
+
return this.contract.read.isRenounced();
|
|
495
|
+
}
|
|
382
496
|
/**
|
|
383
497
|
* name
|
|
384
498
|
* view
|
|
@@ -393,6 +507,13 @@ class USDToken_json {
|
|
|
393
507
|
async owner() {
|
|
394
508
|
return this.contract.read.owner();
|
|
395
509
|
}
|
|
510
|
+
/**
|
|
511
|
+
* renounced
|
|
512
|
+
* view
|
|
513
|
+
*/
|
|
514
|
+
async renounced() {
|
|
515
|
+
return this.contract.read.renounced();
|
|
516
|
+
}
|
|
396
517
|
/**
|
|
397
518
|
* symbol
|
|
398
519
|
* view
|
|
@@ -425,6 +546,28 @@ class USDToken_json {
|
|
|
425
546
|
}
|
|
426
547
|
return this.contract.write.approve([spender, amount], options);
|
|
427
548
|
}
|
|
549
|
+
/**
|
|
550
|
+
* decreaseAllowance
|
|
551
|
+
* nonpayable
|
|
552
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
553
|
+
*/
|
|
554
|
+
async decreaseAllowance(spender, subtractedValue, options) {
|
|
555
|
+
if (!this.contract.write) {
|
|
556
|
+
throw new Error('Wallet client is required for write operations');
|
|
557
|
+
}
|
|
558
|
+
return this.contract.write.decreaseAllowance([spender, subtractedValue], options);
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* increaseAllowance
|
|
562
|
+
* nonpayable
|
|
563
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
564
|
+
*/
|
|
565
|
+
async increaseAllowance(spender, addedValue, options) {
|
|
566
|
+
if (!this.contract.write) {
|
|
567
|
+
throw new Error('Wallet client is required for write operations');
|
|
568
|
+
}
|
|
569
|
+
return this.contract.write.increaseAllowance([spender, addedValue], options);
|
|
570
|
+
}
|
|
428
571
|
/**
|
|
429
572
|
* renounceOwnership
|
|
430
573
|
* nonpayable
|
|
@@ -437,37 +580,48 @@ class USDToken_json {
|
|
|
437
580
|
return this.contract.write.renounceOwnership(options);
|
|
438
581
|
}
|
|
439
582
|
/**
|
|
440
|
-
*
|
|
583
|
+
* setName
|
|
441
584
|
* nonpayable
|
|
442
585
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
443
586
|
*/
|
|
444
|
-
async
|
|
587
|
+
async setName(newName, options) {
|
|
445
588
|
if (!this.contract.write) {
|
|
446
589
|
throw new Error('Wallet client is required for write operations');
|
|
447
590
|
}
|
|
448
|
-
return this.contract.write.
|
|
591
|
+
return this.contract.write.setName([newName], options);
|
|
449
592
|
}
|
|
450
593
|
/**
|
|
451
|
-
*
|
|
594
|
+
* setSymbol
|
|
452
595
|
* nonpayable
|
|
453
596
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
454
597
|
*/
|
|
455
|
-
async
|
|
598
|
+
async setSymbol(newSymbol, options) {
|
|
456
599
|
if (!this.contract.write) {
|
|
457
600
|
throw new Error('Wallet client is required for write operations');
|
|
458
601
|
}
|
|
459
|
-
return this.contract.write.
|
|
602
|
+
return this.contract.write.setSymbol([newSymbol], options);
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* transfer
|
|
606
|
+
* nonpayable
|
|
607
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
608
|
+
*/
|
|
609
|
+
async transfer(to, amount, options) {
|
|
610
|
+
if (!this.contract.write) {
|
|
611
|
+
throw new Error('Wallet client is required for write operations');
|
|
612
|
+
}
|
|
613
|
+
return this.contract.write.transfer([to, amount], options);
|
|
460
614
|
}
|
|
461
615
|
/**
|
|
462
|
-
*
|
|
616
|
+
* transferFrom
|
|
463
617
|
* nonpayable
|
|
464
618
|
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
465
619
|
*/
|
|
466
|
-
async
|
|
620
|
+
async transferFrom(from, to, amount, options) {
|
|
467
621
|
if (!this.contract.write) {
|
|
468
622
|
throw new Error('Wallet client is required for write operations');
|
|
469
623
|
}
|
|
470
|
-
return this.contract.write.
|
|
624
|
+
return this.contract.write.transferFrom([from, to, amount], options);
|
|
471
625
|
}
|
|
472
626
|
/**
|
|
473
627
|
* Simulate contract write operations (dry-run without sending transaction)
|
|
@@ -491,6 +645,22 @@ class USDToken_json {
|
|
|
491
645
|
async approve(spender, amount, options) {
|
|
492
646
|
return contract.simulate.approve([spender, amount], options);
|
|
493
647
|
},
|
|
648
|
+
/**
|
|
649
|
+
* Simulate decreaseAllowance
|
|
650
|
+
* Returns gas estimate and result without sending transaction
|
|
651
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
652
|
+
*/
|
|
653
|
+
async decreaseAllowance(spender, subtractedValue, options) {
|
|
654
|
+
return contract.simulate.decreaseAllowance([spender, subtractedValue], options);
|
|
655
|
+
},
|
|
656
|
+
/**
|
|
657
|
+
* Simulate increaseAllowance
|
|
658
|
+
* Returns gas estimate and result without sending transaction
|
|
659
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
660
|
+
*/
|
|
661
|
+
async increaseAllowance(spender, addedValue, options) {
|
|
662
|
+
return contract.simulate.increaseAllowance([spender, addedValue], options);
|
|
663
|
+
},
|
|
494
664
|
/**
|
|
495
665
|
* Simulate renounceOwnership
|
|
496
666
|
* Returns gas estimate and result without sending transaction
|
|
@@ -499,6 +669,22 @@ class USDToken_json {
|
|
|
499
669
|
async renounceOwnership(options) {
|
|
500
670
|
return contract.simulate.renounceOwnership(options);
|
|
501
671
|
},
|
|
672
|
+
/**
|
|
673
|
+
* Simulate setName
|
|
674
|
+
* Returns gas estimate and result without sending transaction
|
|
675
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
676
|
+
*/
|
|
677
|
+
async setName(newName, options) {
|
|
678
|
+
return contract.simulate.setName([newName], options);
|
|
679
|
+
},
|
|
680
|
+
/**
|
|
681
|
+
* Simulate setSymbol
|
|
682
|
+
* Returns gas estimate and result without sending transaction
|
|
683
|
+
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
684
|
+
*/
|
|
685
|
+
async setSymbol(newSymbol, options) {
|
|
686
|
+
return contract.simulate.setSymbol([newSymbol], options);
|
|
687
|
+
},
|
|
502
688
|
/**
|
|
503
689
|
* Simulate transfer
|
|
504
690
|
* Returns gas estimate and result without sending transaction
|
|
@@ -514,14 +700,6 @@ class USDToken_json {
|
|
|
514
700
|
*/
|
|
515
701
|
async transferFrom(from, to, amount, options) {
|
|
516
702
|
return contract.simulate.transferFrom([from, to, amount], options);
|
|
517
|
-
},
|
|
518
|
-
/**
|
|
519
|
-
* Simulate transferOwnership
|
|
520
|
-
* Returns gas estimate and result without sending transaction
|
|
521
|
-
* @param options Optional transaction parameters (value, gas, nonce, etc.)
|
|
522
|
-
*/
|
|
523
|
-
async transferOwnership(newOwner, options) {
|
|
524
|
-
return contract.simulate.transferOwnership([newOwner], options);
|
|
525
703
|
}
|
|
526
704
|
};
|
|
527
705
|
}
|
|
@@ -559,16 +737,34 @@ class USDToken_json {
|
|
|
559
737
|
});
|
|
560
738
|
},
|
|
561
739
|
/**
|
|
562
|
-
* Watch
|
|
740
|
+
* Watch NameChanged events
|
|
741
|
+
* @param callback Function to call when event is emitted
|
|
742
|
+
* @param filter Optional filter for indexed parameters
|
|
743
|
+
* @returns Unwatch function to stop listening
|
|
744
|
+
*/
|
|
745
|
+
NameChanged: (callback) => {
|
|
746
|
+
return this.publicClient.watchContractEvent({
|
|
747
|
+
address: this.contractAddress,
|
|
748
|
+
abi: exports.USDToken_jsonAbi,
|
|
749
|
+
eventName: 'NameChanged',
|
|
750
|
+
onLogs: (logs) => {
|
|
751
|
+
logs.forEach((log) => {
|
|
752
|
+
callback(log.args);
|
|
753
|
+
});
|
|
754
|
+
},
|
|
755
|
+
});
|
|
756
|
+
},
|
|
757
|
+
/**
|
|
758
|
+
* Watch OwnershipRenounced events
|
|
563
759
|
* @param callback Function to call when event is emitted
|
|
564
760
|
* @param filter Optional filter for indexed parameters
|
|
565
761
|
* @returns Unwatch function to stop listening
|
|
566
762
|
*/
|
|
567
|
-
|
|
763
|
+
OwnershipRenounced: (callback, filter) => {
|
|
568
764
|
return this.publicClient.watchContractEvent({
|
|
569
765
|
address: this.contractAddress,
|
|
570
766
|
abi: exports.USDToken_jsonAbi,
|
|
571
|
-
eventName: '
|
|
767
|
+
eventName: 'OwnershipRenounced',
|
|
572
768
|
args: filter,
|
|
573
769
|
onLogs: (logs) => {
|
|
574
770
|
logs.forEach((log) => {
|
|
@@ -577,6 +773,24 @@ class USDToken_json {
|
|
|
577
773
|
},
|
|
578
774
|
});
|
|
579
775
|
},
|
|
776
|
+
/**
|
|
777
|
+
* Watch SymbolChanged events
|
|
778
|
+
* @param callback Function to call when event is emitted
|
|
779
|
+
* @param filter Optional filter for indexed parameters
|
|
780
|
+
* @returns Unwatch function to stop listening
|
|
781
|
+
*/
|
|
782
|
+
SymbolChanged: (callback) => {
|
|
783
|
+
return this.publicClient.watchContractEvent({
|
|
784
|
+
address: this.contractAddress,
|
|
785
|
+
abi: exports.USDToken_jsonAbi,
|
|
786
|
+
eventName: 'SymbolChanged',
|
|
787
|
+
onLogs: (logs) => {
|
|
788
|
+
logs.forEach((log) => {
|
|
789
|
+
callback(log.args);
|
|
790
|
+
});
|
|
791
|
+
},
|
|
792
|
+
});
|
|
793
|
+
},
|
|
580
794
|
/**
|
|
581
795
|
* Watch Transfer events
|
|
582
796
|
* @param callback Function to call when event is emitted
|