@gitmyabi/usdt 1.0.12 → 1.0.13

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.
@@ -0,0 +1,1170 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EssentialToken_json = exports.EssentialToken_jsonAbi = void 0;
4
+ const viem_1 = require("viem");
5
+ /**
6
+ * EssentialToken_json ABI
7
+ *
8
+ * This ABI is typed using viem's type system for full type safety.
9
+ */
10
+ exports.EssentialToken_jsonAbi = [
11
+ {
12
+ "inputs": [],
13
+ "stateMutability": "nonpayable",
14
+ "type": "constructor"
15
+ },
16
+ {
17
+ "anonymous": false,
18
+ "inputs": [
19
+ {
20
+ "indexed": true,
21
+ "internalType": "address",
22
+ "name": "owner",
23
+ "type": "address"
24
+ },
25
+ {
26
+ "indexed": true,
27
+ "internalType": "address",
28
+ "name": "spender",
29
+ "type": "address"
30
+ },
31
+ {
32
+ "indexed": false,
33
+ "internalType": "uint256",
34
+ "name": "value",
35
+ "type": "uint256"
36
+ }
37
+ ],
38
+ "name": "Approval",
39
+ "type": "event"
40
+ },
41
+ {
42
+ "anonymous": false,
43
+ "inputs": [
44
+ {
45
+ "indexed": true,
46
+ "internalType": "address",
47
+ "name": "_account",
48
+ "type": "address"
49
+ }
50
+ ],
51
+ "name": "BlockedAccount",
52
+ "type": "event"
53
+ },
54
+ {
55
+ "anonymous": false,
56
+ "inputs": [
57
+ {
58
+ "indexed": false,
59
+ "internalType": "uint8",
60
+ "name": "version",
61
+ "type": "uint8"
62
+ }
63
+ ],
64
+ "name": "Initialized",
65
+ "type": "event"
66
+ },
67
+ {
68
+ "anonymous": false,
69
+ "inputs": [
70
+ {
71
+ "indexed": true,
72
+ "internalType": "address",
73
+ "name": "previousOwner",
74
+ "type": "address"
75
+ },
76
+ {
77
+ "indexed": true,
78
+ "internalType": "address",
79
+ "name": "newOwner",
80
+ "type": "address"
81
+ }
82
+ ],
83
+ "name": "OwnershipTransferred",
84
+ "type": "event"
85
+ },
86
+ {
87
+ "anonymous": false,
88
+ "inputs": [
89
+ {
90
+ "indexed": false,
91
+ "internalType": "address",
92
+ "name": "account",
93
+ "type": "address"
94
+ }
95
+ ],
96
+ "name": "Paused",
97
+ "type": "event"
98
+ },
99
+ {
100
+ "anonymous": false,
101
+ "inputs": [
102
+ {
103
+ "indexed": true,
104
+ "internalType": "address",
105
+ "name": "from",
106
+ "type": "address"
107
+ },
108
+ {
109
+ "indexed": true,
110
+ "internalType": "address",
111
+ "name": "to",
112
+ "type": "address"
113
+ },
114
+ {
115
+ "indexed": false,
116
+ "internalType": "uint256",
117
+ "name": "value",
118
+ "type": "uint256"
119
+ }
120
+ ],
121
+ "name": "Transfer",
122
+ "type": "event"
123
+ },
124
+ {
125
+ "anonymous": false,
126
+ "inputs": [
127
+ {
128
+ "indexed": true,
129
+ "internalType": "address",
130
+ "name": "_account",
131
+ "type": "address"
132
+ }
133
+ ],
134
+ "name": "UnblockedAccount",
135
+ "type": "event"
136
+ },
137
+ {
138
+ "anonymous": false,
139
+ "inputs": [
140
+ {
141
+ "indexed": false,
142
+ "internalType": "address",
143
+ "name": "account",
144
+ "type": "address"
145
+ }
146
+ ],
147
+ "name": "Unpaused",
148
+ "type": "event"
149
+ },
150
+ {
151
+ "inputs": [
152
+ {
153
+ "internalType": "address",
154
+ "name": "owner",
155
+ "type": "address"
156
+ },
157
+ {
158
+ "internalType": "address",
159
+ "name": "spender",
160
+ "type": "address"
161
+ }
162
+ ],
163
+ "name": "allowance",
164
+ "outputs": [
165
+ {
166
+ "internalType": "uint256",
167
+ "name": "",
168
+ "type": "uint256"
169
+ }
170
+ ],
171
+ "stateMutability": "view",
172
+ "type": "function"
173
+ },
174
+ {
175
+ "inputs": [
176
+ {
177
+ "internalType": "address",
178
+ "name": "spender",
179
+ "type": "address"
180
+ },
181
+ {
182
+ "internalType": "uint256",
183
+ "name": "amount",
184
+ "type": "uint256"
185
+ }
186
+ ],
187
+ "name": "approve",
188
+ "outputs": [
189
+ {
190
+ "internalType": "bool",
191
+ "name": "",
192
+ "type": "bool"
193
+ }
194
+ ],
195
+ "stateMutability": "nonpayable",
196
+ "type": "function"
197
+ },
198
+ {
199
+ "inputs": [
200
+ {
201
+ "internalType": "address",
202
+ "name": "account",
203
+ "type": "address"
204
+ }
205
+ ],
206
+ "name": "balanceOf",
207
+ "outputs": [
208
+ {
209
+ "internalType": "uint256",
210
+ "name": "",
211
+ "type": "uint256"
212
+ }
213
+ ],
214
+ "stateMutability": "view",
215
+ "type": "function"
216
+ },
217
+ {
218
+ "inputs": [
219
+ {
220
+ "internalType": "address",
221
+ "name": "_account",
222
+ "type": "address"
223
+ }
224
+ ],
225
+ "name": "blockAccount",
226
+ "outputs": [],
227
+ "stateMutability": "nonpayable",
228
+ "type": "function"
229
+ },
230
+ {
231
+ "inputs": [
232
+ {
233
+ "internalType": "uint256",
234
+ "name": "amount",
235
+ "type": "uint256"
236
+ }
237
+ ],
238
+ "name": "burn",
239
+ "outputs": [],
240
+ "stateMutability": "nonpayable",
241
+ "type": "function"
242
+ },
243
+ {
244
+ "inputs": [
245
+ {
246
+ "internalType": "address",
247
+ "name": "account",
248
+ "type": "address"
249
+ },
250
+ {
251
+ "internalType": "uint256",
252
+ "name": "amount",
253
+ "type": "uint256"
254
+ }
255
+ ],
256
+ "name": "burnFrom",
257
+ "outputs": [],
258
+ "stateMutability": "nonpayable",
259
+ "type": "function"
260
+ },
261
+ {
262
+ "inputs": [],
263
+ "name": "decimals",
264
+ "outputs": [
265
+ {
266
+ "internalType": "uint8",
267
+ "name": "",
268
+ "type": "uint8"
269
+ }
270
+ ],
271
+ "stateMutability": "view",
272
+ "type": "function"
273
+ },
274
+ {
275
+ "inputs": [
276
+ {
277
+ "internalType": "address",
278
+ "name": "spender",
279
+ "type": "address"
280
+ },
281
+ {
282
+ "internalType": "uint256",
283
+ "name": "subtractedValue",
284
+ "type": "uint256"
285
+ }
286
+ ],
287
+ "name": "decreaseAllowance",
288
+ "outputs": [
289
+ {
290
+ "internalType": "bool",
291
+ "name": "",
292
+ "type": "bool"
293
+ }
294
+ ],
295
+ "stateMutability": "nonpayable",
296
+ "type": "function"
297
+ },
298
+ {
299
+ "inputs": [
300
+ {
301
+ "internalType": "address",
302
+ "name": "spender",
303
+ "type": "address"
304
+ },
305
+ {
306
+ "internalType": "uint256",
307
+ "name": "addedValue",
308
+ "type": "uint256"
309
+ }
310
+ ],
311
+ "name": "increaseAllowance",
312
+ "outputs": [
313
+ {
314
+ "internalType": "bool",
315
+ "name": "",
316
+ "type": "bool"
317
+ }
318
+ ],
319
+ "stateMutability": "nonpayable",
320
+ "type": "function"
321
+ },
322
+ {
323
+ "inputs": [
324
+ {
325
+ "internalType": "address",
326
+ "name": "_owner",
327
+ "type": "address"
328
+ },
329
+ {
330
+ "internalType": "string",
331
+ "name": "_name",
332
+ "type": "string"
333
+ },
334
+ {
335
+ "internalType": "string",
336
+ "name": "_symbol",
337
+ "type": "string"
338
+ },
339
+ {
340
+ "internalType": "uint8",
341
+ "name": "_decimals",
342
+ "type": "uint8"
343
+ },
344
+ {
345
+ "internalType": "uint256",
346
+ "name": "_initialSupply",
347
+ "type": "uint256"
348
+ },
349
+ {
350
+ "internalType": "uint256",
351
+ "name": "_maxSupply",
352
+ "type": "uint256"
353
+ }
354
+ ],
355
+ "name": "initialize",
356
+ "outputs": [],
357
+ "stateMutability": "nonpayable",
358
+ "type": "function"
359
+ },
360
+ {
361
+ "inputs": [
362
+ {
363
+ "internalType": "address",
364
+ "name": "_account",
365
+ "type": "address"
366
+ }
367
+ ],
368
+ "name": "isAccountBlocked",
369
+ "outputs": [
370
+ {
371
+ "internalType": "bool",
372
+ "name": "",
373
+ "type": "bool"
374
+ }
375
+ ],
376
+ "stateMutability": "view",
377
+ "type": "function"
378
+ },
379
+ {
380
+ "inputs": [],
381
+ "name": "maxSupply",
382
+ "outputs": [
383
+ {
384
+ "internalType": "uint256",
385
+ "name": "",
386
+ "type": "uint256"
387
+ }
388
+ ],
389
+ "stateMutability": "view",
390
+ "type": "function"
391
+ },
392
+ {
393
+ "inputs": [
394
+ {
395
+ "internalType": "address",
396
+ "name": "to",
397
+ "type": "address"
398
+ },
399
+ {
400
+ "internalType": "uint256",
401
+ "name": "amount",
402
+ "type": "uint256"
403
+ }
404
+ ],
405
+ "name": "mint",
406
+ "outputs": [],
407
+ "stateMutability": "nonpayable",
408
+ "type": "function"
409
+ },
410
+ {
411
+ "inputs": [],
412
+ "name": "name",
413
+ "outputs": [
414
+ {
415
+ "internalType": "string",
416
+ "name": "",
417
+ "type": "string"
418
+ }
419
+ ],
420
+ "stateMutability": "view",
421
+ "type": "function"
422
+ },
423
+ {
424
+ "inputs": [],
425
+ "name": "owner",
426
+ "outputs": [
427
+ {
428
+ "internalType": "address",
429
+ "name": "",
430
+ "type": "address"
431
+ }
432
+ ],
433
+ "stateMutability": "view",
434
+ "type": "function"
435
+ },
436
+ {
437
+ "inputs": [],
438
+ "name": "pause",
439
+ "outputs": [],
440
+ "stateMutability": "nonpayable",
441
+ "type": "function"
442
+ },
443
+ {
444
+ "inputs": [],
445
+ "name": "paused",
446
+ "outputs": [
447
+ {
448
+ "internalType": "bool",
449
+ "name": "",
450
+ "type": "bool"
451
+ }
452
+ ],
453
+ "stateMutability": "view",
454
+ "type": "function"
455
+ },
456
+ {
457
+ "inputs": [],
458
+ "name": "renounceOwnership",
459
+ "outputs": [],
460
+ "stateMutability": "nonpayable",
461
+ "type": "function"
462
+ },
463
+ {
464
+ "inputs": [],
465
+ "name": "symbol",
466
+ "outputs": [
467
+ {
468
+ "internalType": "string",
469
+ "name": "",
470
+ "type": "string"
471
+ }
472
+ ],
473
+ "stateMutability": "view",
474
+ "type": "function"
475
+ },
476
+ {
477
+ "inputs": [],
478
+ "name": "totalSupply",
479
+ "outputs": [
480
+ {
481
+ "internalType": "uint256",
482
+ "name": "",
483
+ "type": "uint256"
484
+ }
485
+ ],
486
+ "stateMutability": "view",
487
+ "type": "function"
488
+ },
489
+ {
490
+ "inputs": [
491
+ {
492
+ "internalType": "address",
493
+ "name": "to",
494
+ "type": "address"
495
+ },
496
+ {
497
+ "internalType": "uint256",
498
+ "name": "amount",
499
+ "type": "uint256"
500
+ }
501
+ ],
502
+ "name": "transfer",
503
+ "outputs": [
504
+ {
505
+ "internalType": "bool",
506
+ "name": "",
507
+ "type": "bool"
508
+ }
509
+ ],
510
+ "stateMutability": "nonpayable",
511
+ "type": "function"
512
+ },
513
+ {
514
+ "inputs": [
515
+ {
516
+ "internalType": "address",
517
+ "name": "from",
518
+ "type": "address"
519
+ },
520
+ {
521
+ "internalType": "address",
522
+ "name": "to",
523
+ "type": "address"
524
+ },
525
+ {
526
+ "internalType": "uint256",
527
+ "name": "amount",
528
+ "type": "uint256"
529
+ }
530
+ ],
531
+ "name": "transferFrom",
532
+ "outputs": [
533
+ {
534
+ "internalType": "bool",
535
+ "name": "",
536
+ "type": "bool"
537
+ }
538
+ ],
539
+ "stateMutability": "nonpayable",
540
+ "type": "function"
541
+ },
542
+ {
543
+ "inputs": [
544
+ {
545
+ "internalType": "address",
546
+ "name": "newOwner",
547
+ "type": "address"
548
+ }
549
+ ],
550
+ "name": "transferOwnership",
551
+ "outputs": [],
552
+ "stateMutability": "nonpayable",
553
+ "type": "function"
554
+ },
555
+ {
556
+ "inputs": [
557
+ {
558
+ "internalType": "address",
559
+ "name": "_account",
560
+ "type": "address"
561
+ }
562
+ ],
563
+ "name": "unblockAccount",
564
+ "outputs": [],
565
+ "stateMutability": "nonpayable",
566
+ "type": "function"
567
+ },
568
+ {
569
+ "inputs": [],
570
+ "name": "unpause",
571
+ "outputs": [],
572
+ "stateMutability": "nonpayable",
573
+ "type": "function"
574
+ }
575
+ ];
576
+ /**
577
+ * EssentialToken_json Contract Class
578
+ *
579
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
580
+ *
581
+ * @example
582
+ * ```typescript
583
+ * import { createPublicClient, createWalletClient, http } from 'viem';
584
+ * import { mainnet } from 'viem/chains';
585
+ * import { EssentialToken_json } from 'EssentialToken_json';
586
+ *
587
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
588
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
589
+ *
590
+ * const contract = new EssentialToken_json('0x...', { publicClient, walletClient });
591
+ *
592
+ * // Read functions
593
+ * const result = await contract.balanceOf('0x...');
594
+ *
595
+ * // Write functions
596
+ * const hash = await contract.transfer('0x...', 1000n);
597
+ *
598
+ * // Simulate transactions (dry-run)
599
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
600
+ * console.log('Gas estimate:', simulation.request.gas);
601
+ *
602
+ * // Watch events
603
+ * const unwatch = contract.watch.Transfer((event) => {
604
+ * console.log('Transfer event:', event);
605
+ * });
606
+ * ```
607
+ */
608
+ class EssentialToken_json {
609
+ constructor(address, clients) {
610
+ this.contractAddress = address;
611
+ this.publicClient = clients.publicClient;
612
+ this.contract = (0, viem_1.getContract)({
613
+ address,
614
+ abi: exports.EssentialToken_jsonAbi,
615
+ client: {
616
+ public: clients.publicClient,
617
+ wallet: clients.walletClient,
618
+ },
619
+ });
620
+ }
621
+ /**
622
+ * Get the contract address
623
+ */
624
+ get address() {
625
+ return this.contractAddress;
626
+ }
627
+ /**
628
+ * Get the underlying viem contract instance
629
+ */
630
+ getContract() {
631
+ return this.contract;
632
+ }
633
+ /**
634
+ * allowance
635
+ * view
636
+ */
637
+ async allowance(owner, spender) {
638
+ return this.contract.read.allowance([owner, spender]);
639
+ }
640
+ /**
641
+ * balanceOf
642
+ * view
643
+ */
644
+ async balanceOf(account) {
645
+ return this.contract.read.balanceOf([account]);
646
+ }
647
+ /**
648
+ * decimals
649
+ * view
650
+ */
651
+ async decimals() {
652
+ return this.contract.read.decimals();
653
+ }
654
+ /**
655
+ * isAccountBlocked
656
+ * view
657
+ */
658
+ async isAccountBlocked(_account) {
659
+ return this.contract.read.isAccountBlocked([_account]);
660
+ }
661
+ /**
662
+ * maxSupply
663
+ * view
664
+ */
665
+ async maxSupply() {
666
+ return this.contract.read.maxSupply();
667
+ }
668
+ /**
669
+ * name
670
+ * view
671
+ */
672
+ async name() {
673
+ return this.contract.read.name();
674
+ }
675
+ /**
676
+ * owner
677
+ * view
678
+ */
679
+ async owner() {
680
+ return this.contract.read.owner();
681
+ }
682
+ /**
683
+ * paused
684
+ * view
685
+ */
686
+ async paused() {
687
+ return this.contract.read.paused();
688
+ }
689
+ /**
690
+ * symbol
691
+ * view
692
+ */
693
+ async symbol() {
694
+ return this.contract.read.symbol();
695
+ }
696
+ /**
697
+ * totalSupply
698
+ * view
699
+ */
700
+ async totalSupply() {
701
+ return this.contract.read.totalSupply();
702
+ }
703
+ /**
704
+ * approve
705
+ * nonpayable
706
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
707
+ */
708
+ async approve(spender, amount, options) {
709
+ if (!this.contract.write) {
710
+ throw new Error('Wallet client is required for write operations');
711
+ }
712
+ return this.contract.write.approve([spender, amount], options);
713
+ }
714
+ /**
715
+ * blockAccount
716
+ * nonpayable
717
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
718
+ */
719
+ async blockAccount(_account, options) {
720
+ if (!this.contract.write) {
721
+ throw new Error('Wallet client is required for write operations');
722
+ }
723
+ return this.contract.write.blockAccount([_account], options);
724
+ }
725
+ /**
726
+ * burn
727
+ * nonpayable
728
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
729
+ */
730
+ async burn(amount, options) {
731
+ if (!this.contract.write) {
732
+ throw new Error('Wallet client is required for write operations');
733
+ }
734
+ return this.contract.write.burn([amount], options);
735
+ }
736
+ /**
737
+ * burnFrom
738
+ * nonpayable
739
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
740
+ */
741
+ async burnFrom(account, amount, options) {
742
+ if (!this.contract.write) {
743
+ throw new Error('Wallet client is required for write operations');
744
+ }
745
+ return this.contract.write.burnFrom([account, amount], options);
746
+ }
747
+ /**
748
+ * decreaseAllowance
749
+ * nonpayable
750
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
751
+ */
752
+ async decreaseAllowance(spender, subtractedValue, options) {
753
+ if (!this.contract.write) {
754
+ throw new Error('Wallet client is required for write operations');
755
+ }
756
+ return this.contract.write.decreaseAllowance([spender, subtractedValue], options);
757
+ }
758
+ /**
759
+ * increaseAllowance
760
+ * nonpayable
761
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
762
+ */
763
+ async increaseAllowance(spender, addedValue, options) {
764
+ if (!this.contract.write) {
765
+ throw new Error('Wallet client is required for write operations');
766
+ }
767
+ return this.contract.write.increaseAllowance([spender, addedValue], options);
768
+ }
769
+ /**
770
+ * initialize
771
+ * nonpayable
772
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
773
+ */
774
+ async initialize(_owner, _name, _symbol, _decimals, _initialSupply, _maxSupply, options) {
775
+ if (!this.contract.write) {
776
+ throw new Error('Wallet client is required for write operations');
777
+ }
778
+ return this.contract.write.initialize([_owner, _name, _symbol, _decimals, _initialSupply, _maxSupply], options);
779
+ }
780
+ /**
781
+ * mint
782
+ * nonpayable
783
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
784
+ */
785
+ async mint(to, amount, options) {
786
+ if (!this.contract.write) {
787
+ throw new Error('Wallet client is required for write operations');
788
+ }
789
+ return this.contract.write.mint([to, amount], options);
790
+ }
791
+ /**
792
+ * pause
793
+ * nonpayable
794
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
795
+ */
796
+ async pause(options) {
797
+ if (!this.contract.write) {
798
+ throw new Error('Wallet client is required for write operations');
799
+ }
800
+ return this.contract.write.pause(options);
801
+ }
802
+ /**
803
+ * renounceOwnership
804
+ * nonpayable
805
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
806
+ */
807
+ async renounceOwnership(options) {
808
+ if (!this.contract.write) {
809
+ throw new Error('Wallet client is required for write operations');
810
+ }
811
+ return this.contract.write.renounceOwnership(options);
812
+ }
813
+ /**
814
+ * transfer
815
+ * nonpayable
816
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
817
+ */
818
+ async transfer(to, amount, options) {
819
+ if (!this.contract.write) {
820
+ throw new Error('Wallet client is required for write operations');
821
+ }
822
+ return this.contract.write.transfer([to, amount], options);
823
+ }
824
+ /**
825
+ * transferFrom
826
+ * nonpayable
827
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
828
+ */
829
+ async transferFrom(from, to, amount, options) {
830
+ if (!this.contract.write) {
831
+ throw new Error('Wallet client is required for write operations');
832
+ }
833
+ return this.contract.write.transferFrom([from, to, amount], options);
834
+ }
835
+ /**
836
+ * transferOwnership
837
+ * nonpayable
838
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
839
+ */
840
+ async transferOwnership(newOwner, options) {
841
+ if (!this.contract.write) {
842
+ throw new Error('Wallet client is required for write operations');
843
+ }
844
+ return this.contract.write.transferOwnership([newOwner], options);
845
+ }
846
+ /**
847
+ * unblockAccount
848
+ * nonpayable
849
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
850
+ */
851
+ async unblockAccount(_account, options) {
852
+ if (!this.contract.write) {
853
+ throw new Error('Wallet client is required for write operations');
854
+ }
855
+ return this.contract.write.unblockAccount([_account], options);
856
+ }
857
+ /**
858
+ * unpause
859
+ * nonpayable
860
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
861
+ */
862
+ async unpause(options) {
863
+ if (!this.contract.write) {
864
+ throw new Error('Wallet client is required for write operations');
865
+ }
866
+ return this.contract.write.unpause(options);
867
+ }
868
+ /**
869
+ * Simulate contract write operations (dry-run without sending transaction)
870
+ *
871
+ * @example
872
+ * const result = await contract.simulate.transfer('0x...', 1000n);
873
+ * console.log('Gas estimate:', result.request.gas);
874
+ * console.log('Would succeed:', result.result);
875
+ */
876
+ get simulate() {
877
+ const contract = this.contract;
878
+ if (!contract.simulate) {
879
+ throw new Error('Public client is required for simulation');
880
+ }
881
+ return {
882
+ /**
883
+ * Simulate approve
884
+ * Returns gas estimate and result without sending transaction
885
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
886
+ */
887
+ async approve(spender, amount, options) {
888
+ return contract.simulate.approve([spender, amount], options);
889
+ },
890
+ /**
891
+ * Simulate blockAccount
892
+ * Returns gas estimate and result without sending transaction
893
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
894
+ */
895
+ async blockAccount(_account, options) {
896
+ return contract.simulate.blockAccount([_account], options);
897
+ },
898
+ /**
899
+ * Simulate burn
900
+ * Returns gas estimate and result without sending transaction
901
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
902
+ */
903
+ async burn(amount, options) {
904
+ return contract.simulate.burn([amount], options);
905
+ },
906
+ /**
907
+ * Simulate burnFrom
908
+ * Returns gas estimate and result without sending transaction
909
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
910
+ */
911
+ async burnFrom(account, amount, options) {
912
+ return contract.simulate.burnFrom([account, amount], options);
913
+ },
914
+ /**
915
+ * Simulate decreaseAllowance
916
+ * Returns gas estimate and result without sending transaction
917
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
918
+ */
919
+ async decreaseAllowance(spender, subtractedValue, options) {
920
+ return contract.simulate.decreaseAllowance([spender, subtractedValue], options);
921
+ },
922
+ /**
923
+ * Simulate increaseAllowance
924
+ * Returns gas estimate and result without sending transaction
925
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
926
+ */
927
+ async increaseAllowance(spender, addedValue, options) {
928
+ return contract.simulate.increaseAllowance([spender, addedValue], options);
929
+ },
930
+ /**
931
+ * Simulate initialize
932
+ * Returns gas estimate and result without sending transaction
933
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
934
+ */
935
+ async initialize(_owner, _name, _symbol, _decimals, _initialSupply, _maxSupply, options) {
936
+ return contract.simulate.initialize([_owner, _name, _symbol, _decimals, _initialSupply, _maxSupply], options);
937
+ },
938
+ /**
939
+ * Simulate mint
940
+ * Returns gas estimate and result without sending transaction
941
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
942
+ */
943
+ async mint(to, amount, options) {
944
+ return contract.simulate.mint([to, amount], options);
945
+ },
946
+ /**
947
+ * Simulate pause
948
+ * Returns gas estimate and result without sending transaction
949
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
950
+ */
951
+ async pause(options) {
952
+ return contract.simulate.pause(options);
953
+ },
954
+ /**
955
+ * Simulate renounceOwnership
956
+ * Returns gas estimate and result without sending transaction
957
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
958
+ */
959
+ async renounceOwnership(options) {
960
+ return contract.simulate.renounceOwnership(options);
961
+ },
962
+ /**
963
+ * Simulate transfer
964
+ * Returns gas estimate and result without sending transaction
965
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
966
+ */
967
+ async transfer(to, amount, options) {
968
+ return contract.simulate.transfer([to, amount], options);
969
+ },
970
+ /**
971
+ * Simulate transferFrom
972
+ * Returns gas estimate and result without sending transaction
973
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
974
+ */
975
+ async transferFrom(from, to, amount, options) {
976
+ return contract.simulate.transferFrom([from, to, amount], options);
977
+ },
978
+ /**
979
+ * Simulate transferOwnership
980
+ * Returns gas estimate and result without sending transaction
981
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
982
+ */
983
+ async transferOwnership(newOwner, options) {
984
+ return contract.simulate.transferOwnership([newOwner], options);
985
+ },
986
+ /**
987
+ * Simulate unblockAccount
988
+ * Returns gas estimate and result without sending transaction
989
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
990
+ */
991
+ async unblockAccount(_account, options) {
992
+ return contract.simulate.unblockAccount([_account], options);
993
+ },
994
+ /**
995
+ * Simulate unpause
996
+ * Returns gas estimate and result without sending transaction
997
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
998
+ */
999
+ async unpause(options) {
1000
+ return contract.simulate.unpause(options);
1001
+ }
1002
+ };
1003
+ }
1004
+ /**
1005
+ * Watch contract events
1006
+ *
1007
+ * @example
1008
+ * // Watch all Transfer events
1009
+ * const unwatch = contract.watch.Transfer((event) => {
1010
+ * console.log('Transfer:', event);
1011
+ * });
1012
+ *
1013
+ * // Stop watching
1014
+ * unwatch();
1015
+ */
1016
+ get watch() {
1017
+ return {
1018
+ /**
1019
+ * Watch Approval events
1020
+ * @param callback Function to call when event is emitted
1021
+ * @param filter Optional filter for indexed parameters
1022
+ * @returns Unwatch function to stop listening
1023
+ */
1024
+ Approval: (callback, filter) => {
1025
+ return this.publicClient.watchContractEvent({
1026
+ address: this.contractAddress,
1027
+ abi: exports.EssentialToken_jsonAbi,
1028
+ eventName: 'Approval',
1029
+ args: filter,
1030
+ onLogs: (logs) => {
1031
+ logs.forEach((log) => {
1032
+ callback(log.args);
1033
+ });
1034
+ },
1035
+ });
1036
+ },
1037
+ /**
1038
+ * Watch BlockedAccount events
1039
+ * @param callback Function to call when event is emitted
1040
+ * @param filter Optional filter for indexed parameters
1041
+ * @returns Unwatch function to stop listening
1042
+ */
1043
+ BlockedAccount: (callback, filter) => {
1044
+ return this.publicClient.watchContractEvent({
1045
+ address: this.contractAddress,
1046
+ abi: exports.EssentialToken_jsonAbi,
1047
+ eventName: 'BlockedAccount',
1048
+ args: filter,
1049
+ onLogs: (logs) => {
1050
+ logs.forEach((log) => {
1051
+ callback(log.args);
1052
+ });
1053
+ },
1054
+ });
1055
+ },
1056
+ /**
1057
+ * Watch Initialized events
1058
+ * @param callback Function to call when event is emitted
1059
+ * @param filter Optional filter for indexed parameters
1060
+ * @returns Unwatch function to stop listening
1061
+ */
1062
+ Initialized: (callback) => {
1063
+ return this.publicClient.watchContractEvent({
1064
+ address: this.contractAddress,
1065
+ abi: exports.EssentialToken_jsonAbi,
1066
+ eventName: 'Initialized',
1067
+ onLogs: (logs) => {
1068
+ logs.forEach((log) => {
1069
+ callback(log.args);
1070
+ });
1071
+ },
1072
+ });
1073
+ },
1074
+ /**
1075
+ * Watch OwnershipTransferred events
1076
+ * @param callback Function to call when event is emitted
1077
+ * @param filter Optional filter for indexed parameters
1078
+ * @returns Unwatch function to stop listening
1079
+ */
1080
+ OwnershipTransferred: (callback, filter) => {
1081
+ return this.publicClient.watchContractEvent({
1082
+ address: this.contractAddress,
1083
+ abi: exports.EssentialToken_jsonAbi,
1084
+ eventName: 'OwnershipTransferred',
1085
+ args: filter,
1086
+ onLogs: (logs) => {
1087
+ logs.forEach((log) => {
1088
+ callback(log.args);
1089
+ });
1090
+ },
1091
+ });
1092
+ },
1093
+ /**
1094
+ * Watch Paused events
1095
+ * @param callback Function to call when event is emitted
1096
+ * @param filter Optional filter for indexed parameters
1097
+ * @returns Unwatch function to stop listening
1098
+ */
1099
+ Paused: (callback) => {
1100
+ return this.publicClient.watchContractEvent({
1101
+ address: this.contractAddress,
1102
+ abi: exports.EssentialToken_jsonAbi,
1103
+ eventName: 'Paused',
1104
+ onLogs: (logs) => {
1105
+ logs.forEach((log) => {
1106
+ callback(log.args);
1107
+ });
1108
+ },
1109
+ });
1110
+ },
1111
+ /**
1112
+ * Watch Transfer events
1113
+ * @param callback Function to call when event is emitted
1114
+ * @param filter Optional filter for indexed parameters
1115
+ * @returns Unwatch function to stop listening
1116
+ */
1117
+ Transfer: (callback, filter) => {
1118
+ return this.publicClient.watchContractEvent({
1119
+ address: this.contractAddress,
1120
+ abi: exports.EssentialToken_jsonAbi,
1121
+ eventName: 'Transfer',
1122
+ args: filter,
1123
+ onLogs: (logs) => {
1124
+ logs.forEach((log) => {
1125
+ callback(log.args);
1126
+ });
1127
+ },
1128
+ });
1129
+ },
1130
+ /**
1131
+ * Watch UnblockedAccount events
1132
+ * @param callback Function to call when event is emitted
1133
+ * @param filter Optional filter for indexed parameters
1134
+ * @returns Unwatch function to stop listening
1135
+ */
1136
+ UnblockedAccount: (callback, filter) => {
1137
+ return this.publicClient.watchContractEvent({
1138
+ address: this.contractAddress,
1139
+ abi: exports.EssentialToken_jsonAbi,
1140
+ eventName: 'UnblockedAccount',
1141
+ args: filter,
1142
+ onLogs: (logs) => {
1143
+ logs.forEach((log) => {
1144
+ callback(log.args);
1145
+ });
1146
+ },
1147
+ });
1148
+ },
1149
+ /**
1150
+ * Watch Unpaused events
1151
+ * @param callback Function to call when event is emitted
1152
+ * @param filter Optional filter for indexed parameters
1153
+ * @returns Unwatch function to stop listening
1154
+ */
1155
+ Unpaused: (callback) => {
1156
+ return this.publicClient.watchContractEvent({
1157
+ address: this.contractAddress,
1158
+ abi: exports.EssentialToken_jsonAbi,
1159
+ eventName: 'Unpaused',
1160
+ onLogs: (logs) => {
1161
+ logs.forEach((log) => {
1162
+ callback(log.args);
1163
+ });
1164
+ },
1165
+ });
1166
+ }
1167
+ };
1168
+ }
1169
+ }
1170
+ exports.EssentialToken_json = EssentialToken_json;