@gitmyabi/usdt 1.0.28 → 1.0.30

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,34 +1,29 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ERC20Token_json = exports.ERC20Token_jsonAbi = void 0;
3
+ exports.MyNewToken_json = exports.MyNewToken_jsonAbi = void 0;
4
4
  const viem_1 = require("viem");
5
5
  /**
6
- * ERC20Token_json ABI
6
+ * MyNewToken_json ABI
7
7
  *
8
8
  * This ABI is typed using viem's type system for full type safety.
9
9
  */
10
- exports.ERC20Token_jsonAbi = [
10
+ exports.MyNewToken_jsonAbi = [
11
11
  {
12
12
  "inputs": [
13
13
  {
14
14
  "internalType": "string",
15
- "name": "initialName",
15
+ "name": "name",
16
16
  "type": "string"
17
17
  },
18
18
  {
19
19
  "internalType": "string",
20
- "name": "initialSymbol",
20
+ "name": "symbol",
21
21
  "type": "string"
22
22
  },
23
23
  {
24
24
  "internalType": "uint256",
25
- "name": "initSupply",
25
+ "name": "initialSupply",
26
26
  "type": "uint256"
27
- },
28
- {
29
- "internalType": "uint8",
30
- "name": "initialDecimals",
31
- "type": "uint8"
32
27
  }
33
28
  ],
34
29
  "stateMutability": "nonpayable",
@@ -186,45 +181,6 @@ exports.ERC20Token_jsonAbi = [
186
181
  "name": "OwnershipTransferred",
187
182
  "type": "event"
188
183
  },
189
- {
190
- "anonymous": false,
191
- "inputs": [
192
- {
193
- "indexed": false,
194
- "internalType": "uint8",
195
- "name": "precision",
196
- "type": "uint8"
197
- }
198
- ],
199
- "name": "SetDecimals",
200
- "type": "event"
201
- },
202
- {
203
- "anonymous": false,
204
- "inputs": [
205
- {
206
- "indexed": false,
207
- "internalType": "string",
208
- "name": "name",
209
- "type": "string"
210
- }
211
- ],
212
- "name": "SetName",
213
- "type": "event"
214
- },
215
- {
216
- "anonymous": false,
217
- "inputs": [
218
- {
219
- "indexed": false,
220
- "internalType": "string",
221
- "name": "symbol",
222
- "type": "string"
223
- }
224
- ],
225
- "name": "SetSymbol",
226
- "type": "event"
227
- },
228
184
  {
229
185
  "anonymous": false,
230
186
  "inputs": [
@@ -317,24 +273,6 @@ exports.ERC20Token_jsonAbi = [
317
273
  "stateMutability": "view",
318
274
  "type": "function"
319
275
  },
320
- {
321
- "inputs": [
322
- {
323
- "internalType": "address",
324
- "name": "account",
325
- "type": "address"
326
- },
327
- {
328
- "internalType": "uint256",
329
- "name": "amount",
330
- "type": "uint256"
331
- }
332
- ],
333
- "name": "burn",
334
- "outputs": [],
335
- "stateMutability": "nonpayable",
336
- "type": "function"
337
- },
338
276
  {
339
277
  "inputs": [],
340
278
  "name": "decimals",
@@ -352,7 +290,7 @@ exports.ERC20Token_jsonAbi = [
352
290
  "inputs": [
353
291
  {
354
292
  "internalType": "address",
355
- "name": "account",
293
+ "name": "to",
356
294
  "type": "address"
357
295
  },
358
296
  {
@@ -399,45 +337,6 @@ exports.ERC20Token_jsonAbi = [
399
337
  "stateMutability": "nonpayable",
400
338
  "type": "function"
401
339
  },
402
- {
403
- "inputs": [
404
- {
405
- "internalType": "uint8",
406
- "name": "newDecimals",
407
- "type": "uint8"
408
- }
409
- ],
410
- "name": "setDecimals",
411
- "outputs": [],
412
- "stateMutability": "nonpayable",
413
- "type": "function"
414
- },
415
- {
416
- "inputs": [
417
- {
418
- "internalType": "string",
419
- "name": "newName",
420
- "type": "string"
421
- }
422
- ],
423
- "name": "setName",
424
- "outputs": [],
425
- "stateMutability": "nonpayable",
426
- "type": "function"
427
- },
428
- {
429
- "inputs": [
430
- {
431
- "internalType": "string",
432
- "name": "newSymbol",
433
- "type": "string"
434
- }
435
- ],
436
- "name": "setSymbol",
437
- "outputs": [],
438
- "stateMutability": "nonpayable",
439
- "type": "function"
440
- },
441
340
  {
442
341
  "inputs": [],
443
342
  "name": "symbol",
@@ -532,7 +431,7 @@ exports.ERC20Token_jsonAbi = [
532
431
  }
533
432
  ];
534
433
  /**
535
- * ERC20Token_json Contract Class
434
+ * MyNewToken_json Contract Class
536
435
  *
537
436
  * Provides a class-based API similar to TypeChain for interacting with the contract.
538
437
  *
@@ -540,12 +439,12 @@ exports.ERC20Token_jsonAbi = [
540
439
  * ```typescript
541
440
  * import { createPublicClient, createWalletClient, http } from 'viem';
542
441
  * import { mainnet } from 'viem/chains';
543
- * import { ERC20Token_json } from 'ERC20Token_json';
442
+ * import { MyNewToken_json } from 'MyNewToken_json';
544
443
  *
545
444
  * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
546
445
  * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
547
446
  *
548
- * const contract = new ERC20Token_json('0x...', { publicClient, walletClient });
447
+ * const contract = new MyNewToken_json('0x...', { publicClient, walletClient });
549
448
  *
550
449
  * // Read functions
551
450
  * const result = await contract.balanceOf('0x...');
@@ -563,13 +462,13 @@ exports.ERC20Token_jsonAbi = [
563
462
  * });
564
463
  * ```
565
464
  */
566
- class ERC20Token_json {
465
+ class MyNewToken_json {
567
466
  constructor(address, clients) {
568
467
  this.contractAddress = address;
569
468
  this.publicClient = clients.publicClient;
570
469
  this.contract = (0, viem_1.getContract)({
571
470
  address,
572
- abi: exports.ERC20Token_jsonAbi,
471
+ abi: exports.MyNewToken_jsonAbi,
573
472
  client: {
574
473
  public: clients.publicClient,
575
474
  wallet: clients.walletClient,
@@ -648,27 +547,16 @@ class ERC20Token_json {
648
547
  }
649
548
  return this.contract.write.approve([spender, value], options);
650
549
  }
651
- /**
652
- * burn
653
- * nonpayable
654
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
655
- */
656
- async burn(account, amount, options) {
657
- if (!this.contract.write) {
658
- throw new Error('Wallet client is required for write operations');
659
- }
660
- return this.contract.write.burn([account, amount], options);
661
- }
662
550
  /**
663
551
  * mint
664
552
  * nonpayable
665
553
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
666
554
  */
667
- async mint(account, amount, options) {
555
+ async mint(to, amount, options) {
668
556
  if (!this.contract.write) {
669
557
  throw new Error('Wallet client is required for write operations');
670
558
  }
671
- return this.contract.write.mint([account, amount], options);
559
+ return this.contract.write.mint([to, amount], options);
672
560
  }
673
561
  /**
674
562
  * renounceOwnership
@@ -681,39 +569,6 @@ class ERC20Token_json {
681
569
  }
682
570
  return this.contract.write.renounceOwnership(options);
683
571
  }
684
- /**
685
- * setDecimals
686
- * nonpayable
687
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
688
- */
689
- async setDecimals(newDecimals, options) {
690
- if (!this.contract.write) {
691
- throw new Error('Wallet client is required for write operations');
692
- }
693
- return this.contract.write.setDecimals([newDecimals], options);
694
- }
695
- /**
696
- * setName
697
- * nonpayable
698
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
699
- */
700
- async setName(newName, options) {
701
- if (!this.contract.write) {
702
- throw new Error('Wallet client is required for write operations');
703
- }
704
- return this.contract.write.setName([newName], options);
705
- }
706
- /**
707
- * setSymbol
708
- * nonpayable
709
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
710
- */
711
- async setSymbol(newSymbol, options) {
712
- if (!this.contract.write) {
713
- throw new Error('Wallet client is required for write operations');
714
- }
715
- return this.contract.write.setSymbol([newSymbol], options);
716
- }
717
572
  /**
718
573
  * transfer
719
574
  * nonpayable
@@ -769,21 +624,13 @@ class ERC20Token_json {
769
624
  async approve(spender, value, options) {
770
625
  return contract.simulate.approve([spender, value], options);
771
626
  },
772
- /**
773
- * Simulate burn
774
- * Returns gas estimate and result without sending transaction
775
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
776
- */
777
- async burn(account, amount, options) {
778
- return contract.simulate.burn([account, amount], options);
779
- },
780
627
  /**
781
628
  * Simulate mint
782
629
  * Returns gas estimate and result without sending transaction
783
630
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
784
631
  */
785
- async mint(account, amount, options) {
786
- return contract.simulate.mint([account, amount], options);
632
+ async mint(to, amount, options) {
633
+ return contract.simulate.mint([to, amount], options);
787
634
  },
788
635
  /**
789
636
  * Simulate renounceOwnership
@@ -793,30 +640,6 @@ class ERC20Token_json {
793
640
  async renounceOwnership(options) {
794
641
  return contract.simulate.renounceOwnership(options);
795
642
  },
796
- /**
797
- * Simulate setDecimals
798
- * Returns gas estimate and result without sending transaction
799
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
800
- */
801
- async setDecimals(newDecimals, options) {
802
- return contract.simulate.setDecimals([newDecimals], options);
803
- },
804
- /**
805
- * Simulate setName
806
- * Returns gas estimate and result without sending transaction
807
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
808
- */
809
- async setName(newName, options) {
810
- return contract.simulate.setName([newName], options);
811
- },
812
- /**
813
- * Simulate setSymbol
814
- * Returns gas estimate and result without sending transaction
815
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
816
- */
817
- async setSymbol(newSymbol, options) {
818
- return contract.simulate.setSymbol([newSymbol], options);
819
- },
820
643
  /**
821
644
  * Simulate transfer
822
645
  * Returns gas estimate and result without sending transaction
@@ -866,7 +689,7 @@ class ERC20Token_json {
866
689
  Approval: (callback, filter) => {
867
690
  return this.publicClient.watchContractEvent({
868
691
  address: this.contractAddress,
869
- abi: exports.ERC20Token_jsonAbi,
692
+ abi: exports.MyNewToken_jsonAbi,
870
693
  eventName: 'Approval',
871
694
  args: filter,
872
695
  onLogs: (logs) => {
@@ -885,7 +708,7 @@ class ERC20Token_json {
885
708
  OwnershipTransferred: (callback, filter) => {
886
709
  return this.publicClient.watchContractEvent({
887
710
  address: this.contractAddress,
888
- abi: exports.ERC20Token_jsonAbi,
711
+ abi: exports.MyNewToken_jsonAbi,
889
712
  eventName: 'OwnershipTransferred',
890
713
  args: filter,
891
714
  onLogs: (logs) => {
@@ -895,60 +718,6 @@ class ERC20Token_json {
895
718
  },
896
719
  });
897
720
  },
898
- /**
899
- * Watch SetDecimals events
900
- * @param callback Function to call when event is emitted
901
- * @param filter Optional filter for indexed parameters
902
- * @returns Unwatch function to stop listening
903
- */
904
- SetDecimals: (callback) => {
905
- return this.publicClient.watchContractEvent({
906
- address: this.contractAddress,
907
- abi: exports.ERC20Token_jsonAbi,
908
- eventName: 'SetDecimals',
909
- onLogs: (logs) => {
910
- logs.forEach((log) => {
911
- callback(log.args);
912
- });
913
- },
914
- });
915
- },
916
- /**
917
- * Watch SetName events
918
- * @param callback Function to call when event is emitted
919
- * @param filter Optional filter for indexed parameters
920
- * @returns Unwatch function to stop listening
921
- */
922
- SetName: (callback) => {
923
- return this.publicClient.watchContractEvent({
924
- address: this.contractAddress,
925
- abi: exports.ERC20Token_jsonAbi,
926
- eventName: 'SetName',
927
- onLogs: (logs) => {
928
- logs.forEach((log) => {
929
- callback(log.args);
930
- });
931
- },
932
- });
933
- },
934
- /**
935
- * Watch SetSymbol events
936
- * @param callback Function to call when event is emitted
937
- * @param filter Optional filter for indexed parameters
938
- * @returns Unwatch function to stop listening
939
- */
940
- SetSymbol: (callback) => {
941
- return this.publicClient.watchContractEvent({
942
- address: this.contractAddress,
943
- abi: exports.ERC20Token_jsonAbi,
944
- eventName: 'SetSymbol',
945
- onLogs: (logs) => {
946
- logs.forEach((log) => {
947
- callback(log.args);
948
- });
949
- },
950
- });
951
- },
952
721
  /**
953
722
  * Watch Transfer events
954
723
  * @param callback Function to call when event is emitted
@@ -958,7 +727,7 @@ class ERC20Token_json {
958
727
  Transfer: (callback, filter) => {
959
728
  return this.publicClient.watchContractEvent({
960
729
  address: this.contractAddress,
961
- abi: exports.ERC20Token_jsonAbi,
730
+ abi: exports.MyNewToken_jsonAbi,
962
731
  eventName: 'Transfer',
963
732
  args: filter,
964
733
  onLogs: (logs) => {
@@ -971,4 +740,4 @@ class ERC20Token_json {
971
740
  };
972
741
  }
973
742
  }
974
- exports.ERC20Token_json = ERC20Token_json;
743
+ exports.MyNewToken_json = MyNewToken_json;