@gitmyabi/clevcvx 1.0.0

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