@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.
@@ -2,32 +2,27 @@ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType }
2
2
  import { getContract } from 'viem';
3
3
 
4
4
  /**
5
- * ERC20Token_json ABI
5
+ * MyNewToken_json ABI
6
6
  *
7
7
  * This ABI is typed using viem's type system for full type safety.
8
8
  */
9
- export const ERC20Token_jsonAbi = [
9
+ export const MyNewToken_jsonAbi = [
10
10
  {
11
11
  "inputs": [
12
12
  {
13
13
  "internalType": "string",
14
- "name": "initialName",
14
+ "name": "name",
15
15
  "type": "string"
16
16
  },
17
17
  {
18
18
  "internalType": "string",
19
- "name": "initialSymbol",
19
+ "name": "symbol",
20
20
  "type": "string"
21
21
  },
22
22
  {
23
23
  "internalType": "uint256",
24
- "name": "initSupply",
24
+ "name": "initialSupply",
25
25
  "type": "uint256"
26
- },
27
- {
28
- "internalType": "uint8",
29
- "name": "initialDecimals",
30
- "type": "uint8"
31
26
  }
32
27
  ],
33
28
  "stateMutability": "nonpayable",
@@ -185,45 +180,6 @@ export const ERC20Token_jsonAbi = [
185
180
  "name": "OwnershipTransferred",
186
181
  "type": "event"
187
182
  },
188
- {
189
- "anonymous": false,
190
- "inputs": [
191
- {
192
- "indexed": false,
193
- "internalType": "uint8",
194
- "name": "precision",
195
- "type": "uint8"
196
- }
197
- ],
198
- "name": "SetDecimals",
199
- "type": "event"
200
- },
201
- {
202
- "anonymous": false,
203
- "inputs": [
204
- {
205
- "indexed": false,
206
- "internalType": "string",
207
- "name": "name",
208
- "type": "string"
209
- }
210
- ],
211
- "name": "SetName",
212
- "type": "event"
213
- },
214
- {
215
- "anonymous": false,
216
- "inputs": [
217
- {
218
- "indexed": false,
219
- "internalType": "string",
220
- "name": "symbol",
221
- "type": "string"
222
- }
223
- ],
224
- "name": "SetSymbol",
225
- "type": "event"
226
- },
227
183
  {
228
184
  "anonymous": false,
229
185
  "inputs": [
@@ -316,24 +272,6 @@ export const ERC20Token_jsonAbi = [
316
272
  "stateMutability": "view",
317
273
  "type": "function"
318
274
  },
319
- {
320
- "inputs": [
321
- {
322
- "internalType": "address",
323
- "name": "account",
324
- "type": "address"
325
- },
326
- {
327
- "internalType": "uint256",
328
- "name": "amount",
329
- "type": "uint256"
330
- }
331
- ],
332
- "name": "burn",
333
- "outputs": [],
334
- "stateMutability": "nonpayable",
335
- "type": "function"
336
- },
337
275
  {
338
276
  "inputs": [],
339
277
  "name": "decimals",
@@ -351,7 +289,7 @@ export const ERC20Token_jsonAbi = [
351
289
  "inputs": [
352
290
  {
353
291
  "internalType": "address",
354
- "name": "account",
292
+ "name": "to",
355
293
  "type": "address"
356
294
  },
357
295
  {
@@ -398,45 +336,6 @@ export const ERC20Token_jsonAbi = [
398
336
  "stateMutability": "nonpayable",
399
337
  "type": "function"
400
338
  },
401
- {
402
- "inputs": [
403
- {
404
- "internalType": "uint8",
405
- "name": "newDecimals",
406
- "type": "uint8"
407
- }
408
- ],
409
- "name": "setDecimals",
410
- "outputs": [],
411
- "stateMutability": "nonpayable",
412
- "type": "function"
413
- },
414
- {
415
- "inputs": [
416
- {
417
- "internalType": "string",
418
- "name": "newName",
419
- "type": "string"
420
- }
421
- ],
422
- "name": "setName",
423
- "outputs": [],
424
- "stateMutability": "nonpayable",
425
- "type": "function"
426
- },
427
- {
428
- "inputs": [
429
- {
430
- "internalType": "string",
431
- "name": "newSymbol",
432
- "type": "string"
433
- }
434
- ],
435
- "name": "setSymbol",
436
- "outputs": [],
437
- "stateMutability": "nonpayable",
438
- "type": "function"
439
- },
440
339
  {
441
340
  "inputs": [],
442
341
  "name": "symbol",
@@ -532,19 +431,19 @@ export const ERC20Token_jsonAbi = [
532
431
  ] as const satisfies Abi;
533
432
 
534
433
  /**
535
- * Type-safe ABI for ERC20Token_json
434
+ * Type-safe ABI for MyNewToken_json
536
435
  */
537
- export type ERC20Token_jsonAbi = typeof ERC20Token_jsonAbi;
436
+ export type MyNewToken_jsonAbi = typeof MyNewToken_jsonAbi;
538
437
 
539
438
  /**
540
- * Contract instance type for ERC20Token_json
439
+ * Contract instance type for MyNewToken_json
541
440
  */
542
441
  // Use any for contract type to avoid complex viem type issues
543
442
  // The runtime behavior is type-safe through viem's ABI typing
544
- export type ERC20Token_jsonContract = any;
443
+ export type MyNewToken_jsonContract = any;
545
444
 
546
445
  /**
547
- * ERC20Token_json Contract Class
446
+ * MyNewToken_json Contract Class
548
447
  *
549
448
  * Provides a class-based API similar to TypeChain for interacting with the contract.
550
449
  *
@@ -552,12 +451,12 @@ export type ERC20Token_jsonContract = any;
552
451
  * ```typescript
553
452
  * import { createPublicClient, createWalletClient, http } from 'viem';
554
453
  * import { mainnet } from 'viem/chains';
555
- * import { ERC20Token_json } from 'ERC20Token_json';
454
+ * import { MyNewToken_json } from 'MyNewToken_json';
556
455
  *
557
456
  * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
558
457
  * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
559
458
  *
560
- * const contract = new ERC20Token_json('0x...', { publicClient, walletClient });
459
+ * const contract = new MyNewToken_json('0x...', { publicClient, walletClient });
561
460
  *
562
461
  * // Read functions
563
462
  * const result = await contract.balanceOf('0x...');
@@ -575,8 +474,8 @@ export type ERC20Token_jsonContract = any;
575
474
  * });
576
475
  * ```
577
476
  */
578
- export class ERC20Token_json {
579
- private contract: ERC20Token_jsonContract;
477
+ export class MyNewToken_json {
478
+ private contract: MyNewToken_jsonContract;
580
479
  private contractAddress: Address;
581
480
  private publicClient: PublicClient;
582
481
 
@@ -591,7 +490,7 @@ export class ERC20Token_json {
591
490
  this.publicClient = clients.publicClient;
592
491
  this.contract = getContract({
593
492
  address,
594
- abi: ERC20Token_jsonAbi,
493
+ abi: MyNewToken_jsonAbi,
595
494
  client: {
596
495
  public: clients.publicClient,
597
496
  wallet: clients.walletClient,
@@ -609,7 +508,7 @@ export class ERC20Token_json {
609
508
  /**
610
509
  * Get the underlying viem contract instance
611
510
  */
612
- getContract(): ERC20Token_jsonContract {
511
+ getContract(): MyNewToken_jsonContract {
613
512
  return this.contract;
614
513
  }
615
514
 
@@ -692,35 +591,12 @@ export class ERC20Token_json {
692
591
  return this.contract.write.approve([spender, value] as const, options) as Promise<`0x${string}`>;
693
592
  }
694
593
 
695
- /**
696
- * burn
697
- * nonpayable
698
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
699
- */
700
- async burn(account: `0x${string}`, amount: bigint, options?: {
701
- accessList?: import('viem').AccessList;
702
- authorizationList?: import('viem').AuthorizationList;
703
- chain?: import('viem').Chain | null;
704
- dataSuffix?: `0x${string}`;
705
- gas?: bigint;
706
- gasPrice?: bigint;
707
- maxFeePerGas?: bigint;
708
- maxPriorityFeePerGas?: bigint;
709
- nonce?: number;
710
- value?: bigint;
711
- }): Promise<`0x${string}`> {
712
- if (!this.contract.write) {
713
- throw new Error('Wallet client is required for write operations');
714
- }
715
- return this.contract.write.burn([account, amount] as const, options) as Promise<`0x${string}`>;
716
- }
717
-
718
594
  /**
719
595
  * mint
720
596
  * nonpayable
721
597
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
722
598
  */
723
- async mint(account: `0x${string}`, amount: bigint, options?: {
599
+ async mint(to: `0x${string}`, amount: bigint, options?: {
724
600
  accessList?: import('viem').AccessList;
725
601
  authorizationList?: import('viem').AuthorizationList;
726
602
  chain?: import('viem').Chain | null;
@@ -735,7 +611,7 @@ export class ERC20Token_json {
735
611
  if (!this.contract.write) {
736
612
  throw new Error('Wallet client is required for write operations');
737
613
  }
738
- return this.contract.write.mint([account, amount] as const, options) as Promise<`0x${string}`>;
614
+ return this.contract.write.mint([to, amount] as const, options) as Promise<`0x${string}`>;
739
615
  }
740
616
 
741
617
  /**
@@ -761,75 +637,6 @@ export class ERC20Token_json {
761
637
  return this.contract.write.renounceOwnership(options) as Promise<`0x${string}`>;
762
638
  }
763
639
 
764
- /**
765
- * setDecimals
766
- * nonpayable
767
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
768
- */
769
- async setDecimals(newDecimals: bigint, options?: {
770
- accessList?: import('viem').AccessList;
771
- authorizationList?: import('viem').AuthorizationList;
772
- chain?: import('viem').Chain | null;
773
- dataSuffix?: `0x${string}`;
774
- gas?: bigint;
775
- gasPrice?: bigint;
776
- maxFeePerGas?: bigint;
777
- maxPriorityFeePerGas?: bigint;
778
- nonce?: number;
779
- value?: bigint;
780
- }): Promise<`0x${string}`> {
781
- if (!this.contract.write) {
782
- throw new Error('Wallet client is required for write operations');
783
- }
784
- return this.contract.write.setDecimals([newDecimals] as const, options) as Promise<`0x${string}`>;
785
- }
786
-
787
- /**
788
- * setName
789
- * nonpayable
790
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
791
- */
792
- async setName(newName: string, options?: {
793
- accessList?: import('viem').AccessList;
794
- authorizationList?: import('viem').AuthorizationList;
795
- chain?: import('viem').Chain | null;
796
- dataSuffix?: `0x${string}`;
797
- gas?: bigint;
798
- gasPrice?: bigint;
799
- maxFeePerGas?: bigint;
800
- maxPriorityFeePerGas?: bigint;
801
- nonce?: number;
802
- value?: bigint;
803
- }): Promise<`0x${string}`> {
804
- if (!this.contract.write) {
805
- throw new Error('Wallet client is required for write operations');
806
- }
807
- return this.contract.write.setName([newName] as const, options) as Promise<`0x${string}`>;
808
- }
809
-
810
- /**
811
- * setSymbol
812
- * nonpayable
813
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
814
- */
815
- async setSymbol(newSymbol: string, options?: {
816
- accessList?: import('viem').AccessList;
817
- authorizationList?: import('viem').AuthorizationList;
818
- chain?: import('viem').Chain | null;
819
- dataSuffix?: `0x${string}`;
820
- gas?: bigint;
821
- gasPrice?: bigint;
822
- maxFeePerGas?: bigint;
823
- maxPriorityFeePerGas?: bigint;
824
- nonce?: number;
825
- value?: bigint;
826
- }): Promise<`0x${string}`> {
827
- if (!this.contract.write) {
828
- throw new Error('Wallet client is required for write operations');
829
- }
830
- return this.contract.write.setSymbol([newSymbol] as const, options) as Promise<`0x${string}`>;
831
- }
832
-
833
640
  /**
834
641
  * transfer
835
642
  * nonpayable
@@ -934,31 +741,12 @@ export class ERC20Token_json {
934
741
  }): Promise<boolean> {
935
742
  return contract.simulate.approve([spender, value] as const, options) as Promise<boolean>;
936
743
  },
937
- /**
938
- * Simulate burn
939
- * Returns gas estimate and result without sending transaction
940
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
941
- */
942
- async burn(account: `0x${string}`, amount: bigint, options?: {
943
- accessList?: import('viem').AccessList;
944
- authorizationList?: import('viem').AuthorizationList;
945
- chain?: import('viem').Chain | null;
946
- dataSuffix?: `0x${string}`;
947
- gas?: bigint;
948
- gasPrice?: bigint;
949
- maxFeePerGas?: bigint;
950
- maxPriorityFeePerGas?: bigint;
951
- nonce?: number;
952
- value?: bigint;
953
- }): Promise<void> {
954
- return contract.simulate.burn([account, amount] as const, options) as Promise<void>;
955
- },
956
744
  /**
957
745
  * Simulate mint
958
746
  * Returns gas estimate and result without sending transaction
959
747
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
960
748
  */
961
- async mint(account: `0x${string}`, amount: bigint, options?: {
749
+ async mint(to: `0x${string}`, amount: bigint, options?: {
962
750
  accessList?: import('viem').AccessList;
963
751
  authorizationList?: import('viem').AuthorizationList;
964
752
  chain?: import('viem').Chain | null;
@@ -970,7 +758,7 @@ export class ERC20Token_json {
970
758
  nonce?: number;
971
759
  value?: bigint;
972
760
  }): Promise<void> {
973
- return contract.simulate.mint([account, amount] as const, options) as Promise<void>;
761
+ return contract.simulate.mint([to, amount] as const, options) as Promise<void>;
974
762
  },
975
763
  /**
976
764
  * Simulate renounceOwnership
@@ -991,63 +779,6 @@ export class ERC20Token_json {
991
779
  }): Promise<void> {
992
780
  return contract.simulate.renounceOwnership(options) as Promise<void>;
993
781
  },
994
- /**
995
- * Simulate setDecimals
996
- * Returns gas estimate and result without sending transaction
997
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
998
- */
999
- async setDecimals(newDecimals: bigint, options?: {
1000
- accessList?: import('viem').AccessList;
1001
- authorizationList?: import('viem').AuthorizationList;
1002
- chain?: import('viem').Chain | null;
1003
- dataSuffix?: `0x${string}`;
1004
- gas?: bigint;
1005
- gasPrice?: bigint;
1006
- maxFeePerGas?: bigint;
1007
- maxPriorityFeePerGas?: bigint;
1008
- nonce?: number;
1009
- value?: bigint;
1010
- }): Promise<void> {
1011
- return contract.simulate.setDecimals([newDecimals] as const, options) as Promise<void>;
1012
- },
1013
- /**
1014
- * Simulate setName
1015
- * Returns gas estimate and result without sending transaction
1016
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1017
- */
1018
- async setName(newName: string, options?: {
1019
- accessList?: import('viem').AccessList;
1020
- authorizationList?: import('viem').AuthorizationList;
1021
- chain?: import('viem').Chain | null;
1022
- dataSuffix?: `0x${string}`;
1023
- gas?: bigint;
1024
- gasPrice?: bigint;
1025
- maxFeePerGas?: bigint;
1026
- maxPriorityFeePerGas?: bigint;
1027
- nonce?: number;
1028
- value?: bigint;
1029
- }): Promise<void> {
1030
- return contract.simulate.setName([newName] as const, options) as Promise<void>;
1031
- },
1032
- /**
1033
- * Simulate setSymbol
1034
- * Returns gas estimate and result without sending transaction
1035
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1036
- */
1037
- async setSymbol(newSymbol: string, options?: {
1038
- accessList?: import('viem').AccessList;
1039
- authorizationList?: import('viem').AuthorizationList;
1040
- chain?: import('viem').Chain | null;
1041
- dataSuffix?: `0x${string}`;
1042
- gas?: bigint;
1043
- gasPrice?: bigint;
1044
- maxFeePerGas?: bigint;
1045
- maxPriorityFeePerGas?: bigint;
1046
- nonce?: number;
1047
- value?: bigint;
1048
- }): Promise<void> {
1049
- return contract.simulate.setSymbol([newSymbol] as const, options) as Promise<void>;
1050
- },
1051
782
  /**
1052
783
  * Simulate transfer
1053
784
  * Returns gas estimate and result without sending transaction
@@ -1131,7 +862,7 @@ export class ERC20Token_json {
1131
862
  Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner: `0x${string}`; spender: `0x${string}` }) => {
1132
863
  return this.publicClient.watchContractEvent({
1133
864
  address: this.contractAddress,
1134
- abi: ERC20Token_jsonAbi,
865
+ abi: MyNewToken_jsonAbi,
1135
866
  eventName: 'Approval',
1136
867
  args: filter,
1137
868
  onLogs: (logs: any[]) => {
@@ -1150,7 +881,7 @@ export class ERC20Token_json {
1150
881
  OwnershipTransferred: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => {
1151
882
  return this.publicClient.watchContractEvent({
1152
883
  address: this.contractAddress,
1153
- abi: ERC20Token_jsonAbi,
884
+ abi: MyNewToken_jsonAbi,
1154
885
  eventName: 'OwnershipTransferred',
1155
886
  args: filter,
1156
887
  onLogs: (logs: any[]) => {
@@ -1160,63 +891,6 @@ export class ERC20Token_json {
1160
891
  },
1161
892
  }) as () => void;
1162
893
  },
1163
- /**
1164
- * Watch SetDecimals events
1165
- * @param callback Function to call when event is emitted
1166
- * @param filter Optional filter for indexed parameters
1167
- * @returns Unwatch function to stop listening
1168
- */
1169
- SetDecimals: (callback: (event: { precision: bigint }) => void) => {
1170
- return this.publicClient.watchContractEvent({
1171
- address: this.contractAddress,
1172
- abi: ERC20Token_jsonAbi,
1173
- eventName: 'SetDecimals',
1174
-
1175
- onLogs: (logs: any[]) => {
1176
- logs.forEach((log: any) => {
1177
- callback(log.args as any);
1178
- });
1179
- },
1180
- }) as () => void;
1181
- },
1182
- /**
1183
- * Watch SetName events
1184
- * @param callback Function to call when event is emitted
1185
- * @param filter Optional filter for indexed parameters
1186
- * @returns Unwatch function to stop listening
1187
- */
1188
- SetName: (callback: (event: { name: string }) => void) => {
1189
- return this.publicClient.watchContractEvent({
1190
- address: this.contractAddress,
1191
- abi: ERC20Token_jsonAbi,
1192
- eventName: 'SetName',
1193
-
1194
- onLogs: (logs: any[]) => {
1195
- logs.forEach((log: any) => {
1196
- callback(log.args as any);
1197
- });
1198
- },
1199
- }) as () => void;
1200
- },
1201
- /**
1202
- * Watch SetSymbol events
1203
- * @param callback Function to call when event is emitted
1204
- * @param filter Optional filter for indexed parameters
1205
- * @returns Unwatch function to stop listening
1206
- */
1207
- SetSymbol: (callback: (event: { symbol: string }) => void) => {
1208
- return this.publicClient.watchContractEvent({
1209
- address: this.contractAddress,
1210
- abi: ERC20Token_jsonAbi,
1211
- eventName: 'SetSymbol',
1212
-
1213
- onLogs: (logs: any[]) => {
1214
- logs.forEach((log: any) => {
1215
- callback(log.args as any);
1216
- });
1217
- },
1218
- }) as () => void;
1219
- },
1220
894
  /**
1221
895
  * Watch Transfer events
1222
896
  * @param callback Function to call when event is emitted
@@ -1226,7 +900,7 @@ export class ERC20Token_json {
1226
900
  Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from: `0x${string}`; to: `0x${string}` }) => {
1227
901
  return this.publicClient.watchContractEvent({
1228
902
  address: this.contractAddress,
1229
- abi: ERC20Token_jsonAbi,
903
+ abi: MyNewToken_jsonAbi,
1230
904
  eventName: 'Transfer',
1231
905
  args: filter,
1232
906
  onLogs: (logs: any[]) => {
@@ -1,2 +1,2 @@
1
- export { ERC20Token_jsonAbi, ERC20Token_json } from './ERC20Token_json';
2
- export type { ERC20Token_jsonAbi as ERC20Token_jsonAbiType, ERC20Token_jsonContract } from './ERC20Token_json';
1
+ export { MyNewToken_jsonAbi, MyNewToken_json } from './MyNewToken_json';
2
+ export type { MyNewToken_jsonAbi as MyNewToken_jsonAbiType, MyNewToken_jsonContract } from './MyNewToken_json';
@@ -1,7 +1,7 @@
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
  // Auto-generated exports for all contracts
5
- var ERC20Token_json_1 = require("./ERC20Token_json");
6
- Object.defineProperty(exports, "ERC20Token_jsonAbi", { enumerable: true, get: function () { return ERC20Token_json_1.ERC20Token_jsonAbi; } });
7
- Object.defineProperty(exports, "ERC20Token_json", { enumerable: true, get: function () { return ERC20Token_json_1.ERC20Token_json; } });
5
+ var MyNewToken_json_1 = require("./MyNewToken_json");
6
+ Object.defineProperty(exports, "MyNewToken_jsonAbi", { enumerable: true, get: function () { return MyNewToken_json_1.MyNewToken_jsonAbi; } });
7
+ Object.defineProperty(exports, "MyNewToken_json", { enumerable: true, get: function () { return MyNewToken_json_1.MyNewToken_json; } });
@@ -1,3 +1,3 @@
1
1
  // Auto-generated exports for all contracts
2
- export { ERC20Token_jsonAbi, ERC20Token_json } from './ERC20Token_json';
3
- export type { ERC20Token_jsonAbi as ERC20Token_jsonAbiType, ERC20Token_jsonContract } from './ERC20Token_json';
2
+ export { MyNewToken_jsonAbi, MyNewToken_json } from './MyNewToken_json';
3
+ export type { MyNewToken_jsonAbi as MyNewToken_jsonAbiType, MyNewToken_jsonContract } from './MyNewToken_json';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gitmyabi/usdt",
3
- "version": "1.0.28",
4
- "description": "Auto-generated TypeScript type bindings for USDT (build etherscan-usdt-58efe15c-1788966209088, commit 36bc508, branch etherscan)",
3
+ "version": "1.0.30",
4
+ "description": "Auto-generated TypeScript type bindings for USDT (build etherscan-usdt-83f3eaa5-1789024380631, commit 193e573, 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": "36bc508"
42
+ "shortHash": "193e573"
43
43
  }