@gitmyabi/dot 1.0.0 → 1.0.1

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,31 +2,26 @@ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType }
2
2
  import { getContract } from 'viem';
3
3
 
4
4
  /**
5
- * ERC20Token_json ABI
5
+ * Token_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 Token_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
- {
23
- "internalType": "uint256",
24
- "name": "initSupply",
25
- "type": "uint256"
26
- },
27
22
  {
28
23
  "internalType": "uint8",
29
- "name": "initialDecimals",
24
+ "name": "_decimals",
30
25
  "type": "uint8"
31
26
  }
32
27
  ],
@@ -51,7 +46,7 @@ export const ERC20Token_jsonAbi = [
51
46
  "type": "uint256"
52
47
  }
53
48
  ],
54
- "name": "ERC20InsufficientAllowance",
49
+ "name": "InsufficientAllowance",
55
50
  "type": "error"
56
51
  },
57
52
  {
@@ -72,73 +67,66 @@ export const ERC20Token_jsonAbi = [
72
67
  "type": "uint256"
73
68
  }
74
69
  ],
75
- "name": "ERC20InsufficientBalance",
70
+ "name": "InsufficientBalance",
76
71
  "type": "error"
77
72
  },
78
73
  {
79
74
  "inputs": [
80
75
  {
81
76
  "internalType": "address",
82
- "name": "approver",
77
+ "name": "",
83
78
  "type": "address"
84
79
  }
85
80
  ],
86
- "name": "ERC20InvalidApprover",
81
+ "name": "InvalidApprover",
87
82
  "type": "error"
88
83
  },
89
84
  {
90
85
  "inputs": [
91
86
  {
92
87
  "internalType": "address",
93
- "name": "receiver",
88
+ "name": "",
94
89
  "type": "address"
95
90
  }
96
91
  ],
97
- "name": "ERC20InvalidReceiver",
92
+ "name": "InvalidReceiver",
98
93
  "type": "error"
99
94
  },
100
95
  {
101
96
  "inputs": [
102
97
  {
103
98
  "internalType": "address",
104
- "name": "sender",
99
+ "name": "",
105
100
  "type": "address"
106
101
  }
107
102
  ],
108
- "name": "ERC20InvalidSender",
103
+ "name": "InvalidSender",
109
104
  "type": "error"
110
105
  },
111
106
  {
112
- "inputs": [
113
- {
114
- "internalType": "address",
115
- "name": "spender",
116
- "type": "address"
117
- }
118
- ],
119
- "name": "ERC20InvalidSpender",
107
+ "inputs": [],
108
+ "name": "InvalidSignature",
120
109
  "type": "error"
121
110
  },
122
111
  {
123
112
  "inputs": [
124
113
  {
125
114
  "internalType": "address",
126
- "name": "owner",
115
+ "name": "",
127
116
  "type": "address"
128
117
  }
129
118
  ],
130
- "name": "OwnableInvalidOwner",
119
+ "name": "InvalidSpender",
131
120
  "type": "error"
132
121
  },
133
122
  {
134
- "inputs": [
135
- {
136
- "internalType": "address",
137
- "name": "account",
138
- "type": "address"
139
- }
140
- ],
141
- "name": "OwnableUnauthorizedAccount",
123
+ "inputs": [],
124
+ "name": "PermitExpired",
125
+ "type": "error"
126
+ },
127
+ {
128
+ "inputs": [],
129
+ "name": "Unauthorized",
142
130
  "type": "error"
143
131
  },
144
132
  {
@@ -166,64 +154,6 @@ export const ERC20Token_jsonAbi = [
166
154
  "name": "Approval",
167
155
  "type": "event"
168
156
  },
169
- {
170
- "anonymous": false,
171
- "inputs": [
172
- {
173
- "indexed": true,
174
- "internalType": "address",
175
- "name": "previousOwner",
176
- "type": "address"
177
- },
178
- {
179
- "indexed": true,
180
- "internalType": "address",
181
- "name": "newOwner",
182
- "type": "address"
183
- }
184
- ],
185
- "name": "OwnershipTransferred",
186
- "type": "event"
187
- },
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
157
  {
228
158
  "anonymous": false,
229
159
  "inputs": [
@@ -249,11 +179,24 @@ export const ERC20Token_jsonAbi = [
249
179
  "name": "Transfer",
250
180
  "type": "event"
251
181
  },
182
+ {
183
+ "inputs": [],
184
+ "name": "DOMAIN_SEPARATOR",
185
+ "outputs": [
186
+ {
187
+ "internalType": "bytes32",
188
+ "name": "",
189
+ "type": "bytes32"
190
+ }
191
+ ],
192
+ "stateMutability": "view",
193
+ "type": "function"
194
+ },
252
195
  {
253
196
  "inputs": [
254
197
  {
255
198
  "internalType": "address",
256
- "name": "owner",
199
+ "name": "_owner",
257
200
  "type": "address"
258
201
  },
259
202
  {
@@ -282,7 +225,7 @@ export const ERC20Token_jsonAbi = [
282
225
  },
283
226
  {
284
227
  "internalType": "uint256",
285
- "name": "value",
228
+ "name": "amount",
286
229
  "type": "uint256"
287
230
  }
288
231
  ],
@@ -347,6 +290,19 @@ export const ERC20Token_jsonAbi = [
347
290
  "stateMutability": "view",
348
291
  "type": "function"
349
292
  },
293
+ {
294
+ "inputs": [],
295
+ "name": "gateway",
296
+ "outputs": [
297
+ {
298
+ "internalType": "address",
299
+ "name": "",
300
+ "type": "address"
301
+ }
302
+ ],
303
+ "stateMutability": "view",
304
+ "type": "function"
305
+ },
350
306
  {
351
307
  "inputs": [
352
308
  {
@@ -379,60 +335,63 @@ export const ERC20Token_jsonAbi = [
379
335
  "type": "function"
380
336
  },
381
337
  {
382
- "inputs": [],
383
- "name": "owner",
384
- "outputs": [
338
+ "inputs": [
385
339
  {
386
340
  "internalType": "address",
387
- "name": "",
341
+ "name": "account",
388
342
  "type": "address"
389
343
  }
390
344
  ],
345
+ "name": "nonces",
346
+ "outputs": [
347
+ {
348
+ "internalType": "uint256",
349
+ "name": "",
350
+ "type": "uint256"
351
+ }
352
+ ],
391
353
  "stateMutability": "view",
392
354
  "type": "function"
393
355
  },
394
- {
395
- "inputs": [],
396
- "name": "renounceOwnership",
397
- "outputs": [],
398
- "stateMutability": "nonpayable",
399
- "type": "function"
400
- },
401
356
  {
402
357
  "inputs": [
358
+ {
359
+ "internalType": "address",
360
+ "name": "issuer",
361
+ "type": "address"
362
+ },
363
+ {
364
+ "internalType": "address",
365
+ "name": "spender",
366
+ "type": "address"
367
+ },
368
+ {
369
+ "internalType": "uint256",
370
+ "name": "value",
371
+ "type": "uint256"
372
+ },
373
+ {
374
+ "internalType": "uint256",
375
+ "name": "deadline",
376
+ "type": "uint256"
377
+ },
403
378
  {
404
379
  "internalType": "uint8",
405
- "name": "newDecimals",
380
+ "name": "v",
406
381
  "type": "uint8"
407
- }
408
- ],
409
- "name": "setDecimals",
410
- "outputs": [],
411
- "stateMutability": "nonpayable",
412
- "type": "function"
413
- },
414
- {
415
- "inputs": [
382
+ },
416
383
  {
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": [
384
+ "internalType": "bytes32",
385
+ "name": "r",
386
+ "type": "bytes32"
387
+ },
429
388
  {
430
- "internalType": "string",
431
- "name": "newSymbol",
432
- "type": "string"
389
+ "internalType": "bytes32",
390
+ "name": "s",
391
+ "type": "bytes32"
433
392
  }
434
393
  ],
435
- "name": "setSymbol",
394
+ "name": "permit",
436
395
  "outputs": [],
437
396
  "stateMutability": "nonpayable",
438
397
  "type": "function"
@@ -467,12 +426,12 @@ export const ERC20Token_jsonAbi = [
467
426
  "inputs": [
468
427
  {
469
428
  "internalType": "address",
470
- "name": "to",
429
+ "name": "recipient",
471
430
  "type": "address"
472
431
  },
473
432
  {
474
433
  "internalType": "uint256",
475
- "name": "value",
434
+ "name": "amount",
476
435
  "type": "uint256"
477
436
  }
478
437
  ],
@@ -491,17 +450,17 @@ export const ERC20Token_jsonAbi = [
491
450
  "inputs": [
492
451
  {
493
452
  "internalType": "address",
494
- "name": "from",
453
+ "name": "sender",
495
454
  "type": "address"
496
455
  },
497
456
  {
498
457
  "internalType": "address",
499
- "name": "to",
458
+ "name": "recipient",
500
459
  "type": "address"
501
460
  },
502
461
  {
503
462
  "internalType": "uint256",
504
- "name": "value",
463
+ "name": "amount",
505
464
  "type": "uint256"
506
465
  }
507
466
  ],
@@ -515,36 +474,23 @@ export const ERC20Token_jsonAbi = [
515
474
  ],
516
475
  "stateMutability": "nonpayable",
517
476
  "type": "function"
518
- },
519
- {
520
- "inputs": [
521
- {
522
- "internalType": "address",
523
- "name": "newOwner",
524
- "type": "address"
525
- }
526
- ],
527
- "name": "transferOwnership",
528
- "outputs": [],
529
- "stateMutability": "nonpayable",
530
- "type": "function"
531
477
  }
532
478
  ] as const satisfies Abi;
533
479
 
534
480
  /**
535
- * Type-safe ABI for ERC20Token_json
481
+ * Type-safe ABI for Token_json
536
482
  */
537
- export type ERC20Token_jsonAbi = typeof ERC20Token_jsonAbi;
483
+ export type Token_jsonAbi = typeof Token_jsonAbi;
538
484
 
539
485
  /**
540
- * Contract instance type for ERC20Token_json
486
+ * Contract instance type for Token_json
541
487
  */
542
488
  // Use any for contract type to avoid complex viem type issues
543
489
  // The runtime behavior is type-safe through viem's ABI typing
544
- export type ERC20Token_jsonContract = any;
490
+ export type Token_jsonContract = any;
545
491
 
546
492
  /**
547
- * ERC20Token_json Contract Class
493
+ * Token_json Contract Class
548
494
  *
549
495
  * Provides a class-based API similar to TypeChain for interacting with the contract.
550
496
  *
@@ -552,12 +498,12 @@ export type ERC20Token_jsonContract = any;
552
498
  * ```typescript
553
499
  * import { createPublicClient, createWalletClient, http } from 'viem';
554
500
  * import { mainnet } from 'viem/chains';
555
- * import { ERC20Token_json } from 'ERC20Token_json';
501
+ * import { Token_json } from 'Token_json';
556
502
  *
557
503
  * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
558
504
  * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
559
505
  *
560
- * const contract = new ERC20Token_json('0x...', { publicClient, walletClient });
506
+ * const contract = new Token_json('0x...', { publicClient, walletClient });
561
507
  *
562
508
  * // Read functions
563
509
  * const result = await contract.balanceOf('0x...');
@@ -575,8 +521,8 @@ export type ERC20Token_jsonContract = any;
575
521
  * });
576
522
  * ```
577
523
  */
578
- export class ERC20Token_json {
579
- private contract: ERC20Token_jsonContract;
524
+ export class Token_json {
525
+ private contract: Token_jsonContract;
580
526
  private contractAddress: Address;
581
527
  private publicClient: PublicClient;
582
528
 
@@ -591,7 +537,7 @@ export class ERC20Token_json {
591
537
  this.publicClient = clients.publicClient;
592
538
  this.contract = getContract({
593
539
  address,
594
- abi: ERC20Token_jsonAbi,
540
+ abi: Token_jsonAbi,
595
541
  client: {
596
542
  public: clients.publicClient,
597
543
  wallet: clients.walletClient,
@@ -609,16 +555,24 @@ export class ERC20Token_json {
609
555
  /**
610
556
  * Get the underlying viem contract instance
611
557
  */
612
- getContract(): ERC20Token_jsonContract {
558
+ getContract(): Token_jsonContract {
613
559
  return this.contract;
614
560
  }
615
561
 
562
+ /**
563
+ * DOMAIN_SEPARATOR
564
+ * view
565
+ */
566
+ async DOMAIN_SEPARATOR(): Promise<`0x${string}`> {
567
+ return this.contract.read.DOMAIN_SEPARATOR() as Promise<`0x${string}`>;
568
+ }
569
+
616
570
  /**
617
571
  * allowance
618
572
  * view
619
573
  */
620
- async allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint> {
621
- return this.contract.read.allowance([owner, spender] as const) as Promise<bigint>;
574
+ async allowance(_owner: `0x${string}`, spender: `0x${string}`): Promise<bigint> {
575
+ return this.contract.read.allowance([_owner, spender] as const) as Promise<bigint>;
622
576
  }
623
577
 
624
578
  /**
@@ -637,6 +591,14 @@ export class ERC20Token_json {
637
591
  return this.contract.read.decimals() as Promise<bigint>;
638
592
  }
639
593
 
594
+ /**
595
+ * gateway
596
+ * view
597
+ */
598
+ async gateway(): Promise<`0x${string}`> {
599
+ return this.contract.read.gateway() as Promise<`0x${string}`>;
600
+ }
601
+
640
602
  /**
641
603
  * name
642
604
  * view
@@ -646,11 +608,11 @@ export class ERC20Token_json {
646
608
  }
647
609
 
648
610
  /**
649
- * owner
611
+ * nonces
650
612
  * view
651
613
  */
652
- async owner(): Promise<`0x${string}`> {
653
- return this.contract.read.owner() as Promise<`0x${string}`>;
614
+ async nonces(account: `0x${string}`): Promise<bigint> {
615
+ return this.contract.read.nonces([account] as const) as Promise<bigint>;
654
616
  }
655
617
 
656
618
  /**
@@ -674,7 +636,7 @@ export class ERC20Token_json {
674
636
  * nonpayable
675
637
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
676
638
  */
677
- async approve(spender: `0x${string}`, value: bigint, options?: {
639
+ async approve(spender: `0x${string}`, amount: bigint, options?: {
678
640
  accessList?: import('viem').AccessList;
679
641
  authorizationList?: import('viem').AuthorizationList;
680
642
  chain?: import('viem').Chain | null;
@@ -689,7 +651,7 @@ export class ERC20Token_json {
689
651
  if (!this.contract.write) {
690
652
  throw new Error('Wallet client is required for write operations');
691
653
  }
692
- return this.contract.write.approve([spender, value] as const, options) as Promise<`0x${string}`>;
654
+ return this.contract.write.approve([spender, amount] as const, options) as Promise<`0x${string}`>;
693
655
  }
694
656
 
695
657
  /**
@@ -739,80 +701,11 @@ export class ERC20Token_json {
739
701
  }
740
702
 
741
703
  /**
742
- * renounceOwnership
743
- * nonpayable
744
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
745
- */
746
- async renounceOwnership(options?: {
747
- accessList?: import('viem').AccessList;
748
- authorizationList?: import('viem').AuthorizationList;
749
- chain?: import('viem').Chain | null;
750
- dataSuffix?: `0x${string}`;
751
- gas?: bigint;
752
- gasPrice?: bigint;
753
- maxFeePerGas?: bigint;
754
- maxPriorityFeePerGas?: bigint;
755
- nonce?: number;
756
- value?: bigint;
757
- }): Promise<`0x${string}`> {
758
- if (!this.contract.write) {
759
- throw new Error('Wallet client is required for write operations');
760
- }
761
- return this.contract.write.renounceOwnership(options) as Promise<`0x${string}`>;
762
- }
763
-
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
704
+ * permit
812
705
  * nonpayable
813
706
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
814
707
  */
815
- async setSymbol(newSymbol: string, options?: {
708
+ async permit(issuer: `0x${string}`, spender: `0x${string}`, value: bigint, deadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
816
709
  accessList?: import('viem').AccessList;
817
710
  authorizationList?: import('viem').AuthorizationList;
818
711
  chain?: import('viem').Chain | null;
@@ -827,7 +720,7 @@ export class ERC20Token_json {
827
720
  if (!this.contract.write) {
828
721
  throw new Error('Wallet client is required for write operations');
829
722
  }
830
- return this.contract.write.setSymbol([newSymbol] as const, options) as Promise<`0x${string}`>;
723
+ return this.contract.write.permit([issuer, spender, value, deadline, v, r, s] as const, options) as Promise<`0x${string}`>;
831
724
  }
832
725
 
833
726
  /**
@@ -835,7 +728,7 @@ export class ERC20Token_json {
835
728
  * nonpayable
836
729
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
837
730
  */
838
- async transfer(to: `0x${string}`, value: bigint, options?: {
731
+ async transfer(recipient: `0x${string}`, amount: bigint, options?: {
839
732
  accessList?: import('viem').AccessList;
840
733
  authorizationList?: import('viem').AuthorizationList;
841
734
  chain?: import('viem').Chain | null;
@@ -850,7 +743,7 @@ export class ERC20Token_json {
850
743
  if (!this.contract.write) {
851
744
  throw new Error('Wallet client is required for write operations');
852
745
  }
853
- return this.contract.write.transfer([to, value] as const, options) as Promise<`0x${string}`>;
746
+ return this.contract.write.transfer([recipient, amount] as const, options) as Promise<`0x${string}`>;
854
747
  }
855
748
 
856
749
  /**
@@ -858,7 +751,7 @@ export class ERC20Token_json {
858
751
  * nonpayable
859
752
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
860
753
  */
861
- async transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
754
+ async transferFrom(sender: `0x${string}`, recipient: `0x${string}`, amount: bigint, options?: {
862
755
  accessList?: import('viem').AccessList;
863
756
  authorizationList?: import('viem').AuthorizationList;
864
757
  chain?: import('viem').Chain | null;
@@ -873,30 +766,7 @@ export class ERC20Token_json {
873
766
  if (!this.contract.write) {
874
767
  throw new Error('Wallet client is required for write operations');
875
768
  }
876
- return this.contract.write.transferFrom([from, to, value] as const, options) as Promise<`0x${string}`>;
877
- }
878
-
879
- /**
880
- * transferOwnership
881
- * nonpayable
882
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
883
- */
884
- async transferOwnership(newOwner: `0x${string}`, options?: {
885
- accessList?: import('viem').AccessList;
886
- authorizationList?: import('viem').AuthorizationList;
887
- chain?: import('viem').Chain | null;
888
- dataSuffix?: `0x${string}`;
889
- gas?: bigint;
890
- gasPrice?: bigint;
891
- maxFeePerGas?: bigint;
892
- maxPriorityFeePerGas?: bigint;
893
- nonce?: number;
894
- value?: bigint;
895
- }): Promise<`0x${string}`> {
896
- if (!this.contract.write) {
897
- throw new Error('Wallet client is required for write operations');
898
- }
899
- return this.contract.write.transferOwnership([newOwner] as const, options) as Promise<`0x${string}`>;
769
+ return this.contract.write.transferFrom([sender, recipient, amount] as const, options) as Promise<`0x${string}`>;
900
770
  }
901
771
 
902
772
 
@@ -920,7 +790,7 @@ export class ERC20Token_json {
920
790
  * Returns gas estimate and result without sending transaction
921
791
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
922
792
  */
923
- async approve(spender: `0x${string}`, value: bigint, options?: {
793
+ async approve(spender: `0x${string}`, amount: bigint, options?: {
924
794
  accessList?: import('viem').AccessList;
925
795
  authorizationList?: import('viem').AuthorizationList;
926
796
  chain?: import('viem').Chain | null;
@@ -932,7 +802,7 @@ export class ERC20Token_json {
932
802
  nonce?: number;
933
803
  value?: bigint;
934
804
  }): Promise<boolean> {
935
- return contract.simulate.approve([spender, value] as const, options) as Promise<boolean>;
805
+ return contract.simulate.approve([spender, amount] as const, options) as Promise<boolean>;
936
806
  },
937
807
  /**
938
808
  * Simulate burn
@@ -973,68 +843,11 @@ export class ERC20Token_json {
973
843
  return contract.simulate.mint([account, amount] as const, options) as Promise<void>;
974
844
  },
975
845
  /**
976
- * Simulate renounceOwnership
977
- * Returns gas estimate and result without sending transaction
978
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
979
- */
980
- async renounceOwnership(options?: {
981
- accessList?: import('viem').AccessList;
982
- authorizationList?: import('viem').AuthorizationList;
983
- chain?: import('viem').Chain | null;
984
- dataSuffix?: `0x${string}`;
985
- gas?: bigint;
986
- gasPrice?: bigint;
987
- maxFeePerGas?: bigint;
988
- maxPriorityFeePerGas?: bigint;
989
- nonce?: number;
990
- value?: bigint;
991
- }): Promise<void> {
992
- return contract.simulate.renounceOwnership(options) as Promise<void>;
993
- },
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
846
+ * Simulate permit
1034
847
  * Returns gas estimate and result without sending transaction
1035
848
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1036
849
  */
1037
- async setSymbol(newSymbol: string, options?: {
850
+ async permit(issuer: `0x${string}`, spender: `0x${string}`, value: bigint, deadline: bigint, v: bigint, r: `0x${string}`, s: `0x${string}`, options?: {
1038
851
  accessList?: import('viem').AccessList;
1039
852
  authorizationList?: import('viem').AuthorizationList;
1040
853
  chain?: import('viem').Chain | null;
@@ -1046,14 +859,14 @@ export class ERC20Token_json {
1046
859
  nonce?: number;
1047
860
  value?: bigint;
1048
861
  }): Promise<void> {
1049
- return contract.simulate.setSymbol([newSymbol] as const, options) as Promise<void>;
862
+ return contract.simulate.permit([issuer, spender, value, deadline, v, r, s] as const, options) as Promise<void>;
1050
863
  },
1051
864
  /**
1052
865
  * Simulate transfer
1053
866
  * Returns gas estimate and result without sending transaction
1054
867
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1055
868
  */
1056
- async transfer(to: `0x${string}`, value: bigint, options?: {
869
+ async transfer(recipient: `0x${string}`, amount: bigint, options?: {
1057
870
  accessList?: import('viem').AccessList;
1058
871
  authorizationList?: import('viem').AuthorizationList;
1059
872
  chain?: import('viem').Chain | null;
@@ -1065,14 +878,14 @@ export class ERC20Token_json {
1065
878
  nonce?: number;
1066
879
  value?: bigint;
1067
880
  }): Promise<boolean> {
1068
- return contract.simulate.transfer([to, value] as const, options) as Promise<boolean>;
881
+ return contract.simulate.transfer([recipient, amount] as const, options) as Promise<boolean>;
1069
882
  },
1070
883
  /**
1071
884
  * Simulate transferFrom
1072
885
  * Returns gas estimate and result without sending transaction
1073
886
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1074
887
  */
1075
- async transferFrom(from: `0x${string}`, to: `0x${string}`, value: bigint, options?: {
888
+ async transferFrom(sender: `0x${string}`, recipient: `0x${string}`, amount: bigint, options?: {
1076
889
  accessList?: import('viem').AccessList;
1077
890
  authorizationList?: import('viem').AuthorizationList;
1078
891
  chain?: import('viem').Chain | null;
@@ -1084,26 +897,7 @@ export class ERC20Token_json {
1084
897
  nonce?: number;
1085
898
  value?: bigint;
1086
899
  }): Promise<boolean> {
1087
- return contract.simulate.transferFrom([from, to, value] as const, options) as Promise<boolean>;
1088
- },
1089
- /**
1090
- * Simulate transferOwnership
1091
- * Returns gas estimate and result without sending transaction
1092
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1093
- */
1094
- async transferOwnership(newOwner: `0x${string}`, options?: {
1095
- accessList?: import('viem').AccessList;
1096
- authorizationList?: import('viem').AuthorizationList;
1097
- chain?: import('viem').Chain | null;
1098
- dataSuffix?: `0x${string}`;
1099
- gas?: bigint;
1100
- gasPrice?: bigint;
1101
- maxFeePerGas?: bigint;
1102
- maxPriorityFeePerGas?: bigint;
1103
- nonce?: number;
1104
- value?: bigint;
1105
- }): Promise<void> {
1106
- return contract.simulate.transferOwnership([newOwner] as const, options) as Promise<void>;
900
+ return contract.simulate.transferFrom([sender, recipient, amount] as const, options) as Promise<boolean>;
1107
901
  }
1108
902
  };
1109
903
  }
@@ -1131,7 +925,7 @@ export class ERC20Token_json {
1131
925
  Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner: `0x${string}`; spender: `0x${string}` }) => {
1132
926
  return this.publicClient.watchContractEvent({
1133
927
  address: this.contractAddress,
1134
- abi: ERC20Token_jsonAbi,
928
+ abi: Token_jsonAbi,
1135
929
  eventName: 'Approval',
1136
930
  args: filter,
1137
931
  onLogs: (logs: any[]) => {
@@ -1141,82 +935,6 @@ export class ERC20Token_json {
1141
935
  },
1142
936
  }) as () => void;
1143
937
  },
1144
- /**
1145
- * Watch OwnershipTransferred events
1146
- * @param callback Function to call when event is emitted
1147
- * @param filter Optional filter for indexed parameters
1148
- * @returns Unwatch function to stop listening
1149
- */
1150
- OwnershipTransferred: (callback: (event: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => void, filter?: { previousOwner: `0x${string}`; newOwner: `0x${string}` }) => {
1151
- return this.publicClient.watchContractEvent({
1152
- address: this.contractAddress,
1153
- abi: ERC20Token_jsonAbi,
1154
- eventName: 'OwnershipTransferred',
1155
- args: filter,
1156
- onLogs: (logs: any[]) => {
1157
- logs.forEach((log: any) => {
1158
- callback(log.args as any);
1159
- });
1160
- },
1161
- }) as () => void;
1162
- },
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
938
  /**
1221
939
  * Watch Transfer events
1222
940
  * @param callback Function to call when event is emitted
@@ -1226,7 +944,7 @@ export class ERC20Token_json {
1226
944
  Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from: `0x${string}`; to: `0x${string}` }) => {
1227
945
  return this.publicClient.watchContractEvent({
1228
946
  address: this.contractAddress,
1229
- abi: ERC20Token_jsonAbi,
947
+ abi: Token_jsonAbi,
1230
948
  eventName: 'Transfer',
1231
949
  args: filter,
1232
950
  onLogs: (logs: any[]) => {