@gitmyabi/cov 0.0.0-stage → 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,2228 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+ /**
5
+ * COVToken_json ABI
6
+ *
7
+ * This ABI is typed using viem's type system for full type safety.
8
+ */
9
+ export const COVToken_jsonAbi = [
10
+ {
11
+ "inputs": [],
12
+ "stateMutability": "nonpayable",
13
+ "type": "constructor"
14
+ },
15
+ {
16
+ "anonymous": false,
17
+ "inputs": [
18
+ {
19
+ "indexed": true,
20
+ "internalType": "address",
21
+ "name": "owner",
22
+ "type": "address"
23
+ },
24
+ {
25
+ "indexed": true,
26
+ "internalType": "address",
27
+ "name": "spender",
28
+ "type": "address"
29
+ },
30
+ {
31
+ "indexed": false,
32
+ "internalType": "uint256",
33
+ "name": "value",
34
+ "type": "uint256"
35
+ }
36
+ ],
37
+ "name": "Approval",
38
+ "type": "event"
39
+ },
40
+ {
41
+ "anonymous": false,
42
+ "inputs": [
43
+ {
44
+ "indexed": true,
45
+ "internalType": "bytes32",
46
+ "name": "role",
47
+ "type": "bytes32"
48
+ },
49
+ {
50
+ "indexed": true,
51
+ "internalType": "bytes32",
52
+ "name": "previousAdminRole",
53
+ "type": "bytes32"
54
+ },
55
+ {
56
+ "indexed": true,
57
+ "internalType": "bytes32",
58
+ "name": "newAdminRole",
59
+ "type": "bytes32"
60
+ }
61
+ ],
62
+ "name": "RoleAdminChanged",
63
+ "type": "event"
64
+ },
65
+ {
66
+ "anonymous": false,
67
+ "inputs": [
68
+ {
69
+ "indexed": true,
70
+ "internalType": "bytes32",
71
+ "name": "role",
72
+ "type": "bytes32"
73
+ },
74
+ {
75
+ "indexed": true,
76
+ "internalType": "address",
77
+ "name": "account",
78
+ "type": "address"
79
+ },
80
+ {
81
+ "indexed": true,
82
+ "internalType": "address",
83
+ "name": "sender",
84
+ "type": "address"
85
+ }
86
+ ],
87
+ "name": "RoleGranted",
88
+ "type": "event"
89
+ },
90
+ {
91
+ "anonymous": false,
92
+ "inputs": [
93
+ {
94
+ "indexed": true,
95
+ "internalType": "bytes32",
96
+ "name": "role",
97
+ "type": "bytes32"
98
+ },
99
+ {
100
+ "indexed": true,
101
+ "internalType": "address",
102
+ "name": "account",
103
+ "type": "address"
104
+ },
105
+ {
106
+ "indexed": true,
107
+ "internalType": "address",
108
+ "name": "sender",
109
+ "type": "address"
110
+ }
111
+ ],
112
+ "name": "RoleRevoked",
113
+ "type": "event"
114
+ },
115
+ {
116
+ "anonymous": false,
117
+ "inputs": [
118
+ {
119
+ "indexed": true,
120
+ "internalType": "address",
121
+ "name": "from",
122
+ "type": "address"
123
+ },
124
+ {
125
+ "indexed": true,
126
+ "internalType": "address",
127
+ "name": "to",
128
+ "type": "address"
129
+ },
130
+ {
131
+ "indexed": false,
132
+ "internalType": "uint256",
133
+ "name": "value",
134
+ "type": "uint256"
135
+ }
136
+ ],
137
+ "name": "Transfer",
138
+ "type": "event"
139
+ },
140
+ {
141
+ "inputs": [],
142
+ "name": "DEFAULT_ADMIN_ROLE",
143
+ "outputs": [
144
+ {
145
+ "internalType": "bytes32",
146
+ "name": "",
147
+ "type": "bytes32"
148
+ }
149
+ ],
150
+ "stateMutability": "view",
151
+ "type": "function"
152
+ },
153
+ {
154
+ "inputs": [],
155
+ "name": "LOCK_ADDR_TIME_LOCK",
156
+ "outputs": [
157
+ {
158
+ "internalType": "bytes32",
159
+ "name": "",
160
+ "type": "bytes32"
161
+ }
162
+ ],
163
+ "stateMutability": "view",
164
+ "type": "function"
165
+ },
166
+ {
167
+ "inputs": [],
168
+ "name": "LOCK_BURN",
169
+ "outputs": [
170
+ {
171
+ "internalType": "bytes32",
172
+ "name": "",
173
+ "type": "bytes32"
174
+ }
175
+ ],
176
+ "stateMutability": "view",
177
+ "type": "function"
178
+ },
179
+ {
180
+ "inputs": [],
181
+ "name": "LOCK_MINT",
182
+ "outputs": [
183
+ {
184
+ "internalType": "bytes32",
185
+ "name": "",
186
+ "type": "bytes32"
187
+ }
188
+ ],
189
+ "stateMutability": "view",
190
+ "type": "function"
191
+ },
192
+ {
193
+ "inputs": [],
194
+ "name": "LOCK_TRANSFER",
195
+ "outputs": [
196
+ {
197
+ "internalType": "bytes32",
198
+ "name": "",
199
+ "type": "bytes32"
200
+ }
201
+ ],
202
+ "stateMutability": "view",
203
+ "type": "function"
204
+ },
205
+ {
206
+ "inputs": [],
207
+ "name": "MAX_INT",
208
+ "outputs": [
209
+ {
210
+ "internalType": "uint256",
211
+ "name": "",
212
+ "type": "uint256"
213
+ }
214
+ ],
215
+ "stateMutability": "view",
216
+ "type": "function"
217
+ },
218
+ {
219
+ "inputs": [],
220
+ "name": "ROLE_ADMIN",
221
+ "outputs": [
222
+ {
223
+ "internalType": "bytes32",
224
+ "name": "",
225
+ "type": "bytes32"
226
+ }
227
+ ],
228
+ "stateMutability": "view",
229
+ "type": "function"
230
+ },
231
+ {
232
+ "inputs": [],
233
+ "name": "ROLE_ALIEN_TOKEN_SENDER",
234
+ "outputs": [
235
+ {
236
+ "internalType": "bytes32",
237
+ "name": "",
238
+ "type": "bytes32"
239
+ }
240
+ ],
241
+ "stateMutability": "view",
242
+ "type": "function"
243
+ },
244
+ {
245
+ "inputs": [],
246
+ "name": "ROLE_BURNER",
247
+ "outputs": [
248
+ {
249
+ "internalType": "bytes32",
250
+ "name": "",
251
+ "type": "bytes32"
252
+ }
253
+ ],
254
+ "stateMutability": "view",
255
+ "type": "function"
256
+ },
257
+ {
258
+ "inputs": [],
259
+ "name": "ROLE_MINTER",
260
+ "outputs": [
261
+ {
262
+ "internalType": "bytes32",
263
+ "name": "",
264
+ "type": "bytes32"
265
+ }
266
+ ],
267
+ "stateMutability": "view",
268
+ "type": "function"
269
+ },
270
+ {
271
+ "inputs": [],
272
+ "name": "ROLE_TRANSFER",
273
+ "outputs": [
274
+ {
275
+ "internalType": "bytes32",
276
+ "name": "",
277
+ "type": "bytes32"
278
+ }
279
+ ],
280
+ "stateMutability": "view",
281
+ "type": "function"
282
+ },
283
+ {
284
+ "inputs": [
285
+ {
286
+ "internalType": "address",
287
+ "name": "account",
288
+ "type": "address"
289
+ },
290
+ {
291
+ "internalType": "uint256",
292
+ "name": "amount",
293
+ "type": "uint256"
294
+ }
295
+ ],
296
+ "name": "adminBurn",
297
+ "outputs": [],
298
+ "stateMutability": "nonpayable",
299
+ "type": "function"
300
+ },
301
+ {
302
+ "inputs": [
303
+ {
304
+ "internalType": "address",
305
+ "name": "account",
306
+ "type": "address"
307
+ },
308
+ {
309
+ "internalType": "uint256",
310
+ "name": "amount",
311
+ "type": "uint256"
312
+ }
313
+ ],
314
+ "name": "adminMint",
315
+ "outputs": [],
316
+ "stateMutability": "nonpayable",
317
+ "type": "function"
318
+ },
319
+ {
320
+ "inputs": [
321
+ {
322
+ "internalType": "address",
323
+ "name": "account",
324
+ "type": "address"
325
+ },
326
+ {
327
+ "internalType": "uint256",
328
+ "name": "periodInDays",
329
+ "type": "uint256"
330
+ }
331
+ ],
332
+ "name": "adminTimelockTransfer",
333
+ "outputs": [],
334
+ "stateMutability": "nonpayable",
335
+ "type": "function"
336
+ },
337
+ {
338
+ "inputs": [
339
+ {
340
+ "internalType": "address",
341
+ "name": "owner",
342
+ "type": "address"
343
+ },
344
+ {
345
+ "internalType": "address",
346
+ "name": "spender",
347
+ "type": "address"
348
+ }
349
+ ],
350
+ "name": "allowance",
351
+ "outputs": [
352
+ {
353
+ "internalType": "uint256",
354
+ "name": "",
355
+ "type": "uint256"
356
+ }
357
+ ],
358
+ "stateMutability": "view",
359
+ "type": "function"
360
+ },
361
+ {
362
+ "inputs": [
363
+ {
364
+ "internalType": "address",
365
+ "name": "spender",
366
+ "type": "address"
367
+ },
368
+ {
369
+ "internalType": "uint256",
370
+ "name": "amount",
371
+ "type": "uint256"
372
+ }
373
+ ],
374
+ "name": "approve",
375
+ "outputs": [
376
+ {
377
+ "internalType": "bool",
378
+ "name": "",
379
+ "type": "bool"
380
+ }
381
+ ],
382
+ "stateMutability": "nonpayable",
383
+ "type": "function"
384
+ },
385
+ {
386
+ "inputs": [
387
+ {
388
+ "internalType": "address",
389
+ "name": "account",
390
+ "type": "address"
391
+ }
392
+ ],
393
+ "name": "balanceOf",
394
+ "outputs": [
395
+ {
396
+ "internalType": "uint256",
397
+ "name": "",
398
+ "type": "uint256"
399
+ }
400
+ ],
401
+ "stateMutability": "view",
402
+ "type": "function"
403
+ },
404
+ {
405
+ "inputs": [
406
+ {
407
+ "internalType": "uint256",
408
+ "name": "amount",
409
+ "type": "uint256"
410
+ }
411
+ ],
412
+ "name": "burn",
413
+ "outputs": [],
414
+ "stateMutability": "nonpayable",
415
+ "type": "function"
416
+ },
417
+ {
418
+ "inputs": [
419
+ {
420
+ "internalType": "address",
421
+ "name": "account",
422
+ "type": "address"
423
+ },
424
+ {
425
+ "internalType": "uint256",
426
+ "name": "amount",
427
+ "type": "uint256"
428
+ }
429
+ ],
430
+ "name": "burnFrom",
431
+ "outputs": [],
432
+ "stateMutability": "nonpayable",
433
+ "type": "function"
434
+ },
435
+ {
436
+ "inputs": [],
437
+ "name": "decimals",
438
+ "outputs": [
439
+ {
440
+ "internalType": "uint8",
441
+ "name": "",
442
+ "type": "uint8"
443
+ }
444
+ ],
445
+ "stateMutability": "view",
446
+ "type": "function"
447
+ },
448
+ {
449
+ "inputs": [
450
+ {
451
+ "internalType": "address",
452
+ "name": "spender",
453
+ "type": "address"
454
+ },
455
+ {
456
+ "internalType": "uint256",
457
+ "name": "subtractedValue",
458
+ "type": "uint256"
459
+ }
460
+ ],
461
+ "name": "decreaseAllowance",
462
+ "outputs": [
463
+ {
464
+ "internalType": "bool",
465
+ "name": "",
466
+ "type": "bool"
467
+ }
468
+ ],
469
+ "stateMutability": "nonpayable",
470
+ "type": "function"
471
+ },
472
+ {
473
+ "inputs": [],
474
+ "name": "deregisterCallback",
475
+ "outputs": [],
476
+ "stateMutability": "nonpayable",
477
+ "type": "function"
478
+ },
479
+ {
480
+ "inputs": [
481
+ {
482
+ "internalType": "address[]",
483
+ "name": "receivers",
484
+ "type": "address[]"
485
+ }
486
+ ],
487
+ "name": "distributeLockOldToken",
488
+ "outputs": [],
489
+ "stateMutability": "nonpayable",
490
+ "type": "function"
491
+ },
492
+ {
493
+ "inputs": [
494
+ {
495
+ "internalType": "address[]",
496
+ "name": "receivers",
497
+ "type": "address[]"
498
+ },
499
+ {
500
+ "internalType": "uint256[]",
501
+ "name": "balances",
502
+ "type": "uint256[]"
503
+ }
504
+ ],
505
+ "name": "distributeMint",
506
+ "outputs": [],
507
+ "stateMutability": "nonpayable",
508
+ "type": "function"
509
+ },
510
+ {
511
+ "inputs": [
512
+ {
513
+ "internalType": "bytes32",
514
+ "name": "lock",
515
+ "type": "bytes32"
516
+ }
517
+ ],
518
+ "name": "finalFuncLock",
519
+ "outputs": [],
520
+ "stateMutability": "nonpayable",
521
+ "type": "function"
522
+ },
523
+ {
524
+ "inputs": [
525
+ {
526
+ "internalType": "bytes32",
527
+ "name": "",
528
+ "type": "bytes32"
529
+ }
530
+ ],
531
+ "name": "finalFuncLocks",
532
+ "outputs": [
533
+ {
534
+ "internalType": "bool",
535
+ "name": "",
536
+ "type": "bool"
537
+ }
538
+ ],
539
+ "stateMutability": "view",
540
+ "type": "function"
541
+ },
542
+ {
543
+ "inputs": [
544
+ {
545
+ "internalType": "bytes32",
546
+ "name": "role",
547
+ "type": "bytes32"
548
+ }
549
+ ],
550
+ "name": "getRoleAdmin",
551
+ "outputs": [
552
+ {
553
+ "internalType": "bytes32",
554
+ "name": "",
555
+ "type": "bytes32"
556
+ }
557
+ ],
558
+ "stateMutability": "view",
559
+ "type": "function"
560
+ },
561
+ {
562
+ "inputs": [
563
+ {
564
+ "internalType": "bytes32",
565
+ "name": "role",
566
+ "type": "bytes32"
567
+ },
568
+ {
569
+ "internalType": "uint256",
570
+ "name": "index",
571
+ "type": "uint256"
572
+ }
573
+ ],
574
+ "name": "getRoleMember",
575
+ "outputs": [
576
+ {
577
+ "internalType": "address",
578
+ "name": "",
579
+ "type": "address"
580
+ }
581
+ ],
582
+ "stateMutability": "view",
583
+ "type": "function"
584
+ },
585
+ {
586
+ "inputs": [
587
+ {
588
+ "internalType": "bytes32",
589
+ "name": "role",
590
+ "type": "bytes32"
591
+ }
592
+ ],
593
+ "name": "getRoleMemberCount",
594
+ "outputs": [
595
+ {
596
+ "internalType": "uint256",
597
+ "name": "",
598
+ "type": "uint256"
599
+ }
600
+ ],
601
+ "stateMutability": "view",
602
+ "type": "function"
603
+ },
604
+ {
605
+ "inputs": [
606
+ {
607
+ "internalType": "bytes32",
608
+ "name": "role",
609
+ "type": "bytes32"
610
+ },
611
+ {
612
+ "internalType": "address",
613
+ "name": "account",
614
+ "type": "address"
615
+ }
616
+ ],
617
+ "name": "grantRole",
618
+ "outputs": [],
619
+ "stateMutability": "nonpayable",
620
+ "type": "function"
621
+ },
622
+ {
623
+ "inputs": [
624
+ {
625
+ "internalType": "bytes32",
626
+ "name": "role",
627
+ "type": "bytes32"
628
+ },
629
+ {
630
+ "internalType": "address",
631
+ "name": "account",
632
+ "type": "address"
633
+ }
634
+ ],
635
+ "name": "hasRole",
636
+ "outputs": [
637
+ {
638
+ "internalType": "bool",
639
+ "name": "",
640
+ "type": "bool"
641
+ }
642
+ ],
643
+ "stateMutability": "view",
644
+ "type": "function"
645
+ },
646
+ {
647
+ "inputs": [
648
+ {
649
+ "internalType": "address",
650
+ "name": "spender",
651
+ "type": "address"
652
+ },
653
+ {
654
+ "internalType": "uint256",
655
+ "name": "addedValue",
656
+ "type": "uint256"
657
+ }
658
+ ],
659
+ "name": "increaseAllowance",
660
+ "outputs": [
661
+ {
662
+ "internalType": "bool",
663
+ "name": "",
664
+ "type": "bool"
665
+ }
666
+ ],
667
+ "stateMutability": "nonpayable",
668
+ "type": "function"
669
+ },
670
+ {
671
+ "inputs": [
672
+ {
673
+ "internalType": "address",
674
+ "name": "",
675
+ "type": "address"
676
+ }
677
+ ],
678
+ "name": "locks",
679
+ "outputs": [
680
+ {
681
+ "internalType": "uint256",
682
+ "name": "",
683
+ "type": "uint256"
684
+ }
685
+ ],
686
+ "stateMutability": "view",
687
+ "type": "function"
688
+ },
689
+ {
690
+ "inputs": [],
691
+ "name": "name",
692
+ "outputs": [
693
+ {
694
+ "internalType": "string",
695
+ "name": "",
696
+ "type": "string"
697
+ }
698
+ ],
699
+ "stateMutability": "view",
700
+ "type": "function"
701
+ },
702
+ {
703
+ "inputs": [],
704
+ "name": "oldCOVToken",
705
+ "outputs": [
706
+ {
707
+ "internalType": "contract IOldCOVToken",
708
+ "name": "",
709
+ "type": "address"
710
+ }
711
+ ],
712
+ "stateMutability": "view",
713
+ "type": "function"
714
+ },
715
+ {
716
+ "inputs": [
717
+ {
718
+ "internalType": "address",
719
+ "name": "callback",
720
+ "type": "address"
721
+ }
722
+ ],
723
+ "name": "registerCallback",
724
+ "outputs": [],
725
+ "stateMutability": "nonpayable",
726
+ "type": "function"
727
+ },
728
+ {
729
+ "inputs": [],
730
+ "name": "registeredCallback",
731
+ "outputs": [
732
+ {
733
+ "internalType": "address",
734
+ "name": "",
735
+ "type": "address"
736
+ }
737
+ ],
738
+ "stateMutability": "view",
739
+ "type": "function"
740
+ },
741
+ {
742
+ "inputs": [
743
+ {
744
+ "internalType": "bytes32",
745
+ "name": "role",
746
+ "type": "bytes32"
747
+ },
748
+ {
749
+ "internalType": "address",
750
+ "name": "account",
751
+ "type": "address"
752
+ }
753
+ ],
754
+ "name": "renounceRole",
755
+ "outputs": [],
756
+ "stateMutability": "nonpayable",
757
+ "type": "function"
758
+ },
759
+ {
760
+ "inputs": [
761
+ {
762
+ "internalType": "address",
763
+ "name": "to",
764
+ "type": "address"
765
+ },
766
+ {
767
+ "internalType": "address",
768
+ "name": "anotherToken",
769
+ "type": "address"
770
+ }
771
+ ],
772
+ "name": "retrieveTokens",
773
+ "outputs": [],
774
+ "stateMutability": "nonpayable",
775
+ "type": "function"
776
+ },
777
+ {
778
+ "inputs": [
779
+ {
780
+ "internalType": "bytes32",
781
+ "name": "role",
782
+ "type": "bytes32"
783
+ },
784
+ {
785
+ "internalType": "address",
786
+ "name": "account",
787
+ "type": "address"
788
+ }
789
+ ],
790
+ "name": "revokeRole",
791
+ "outputs": [],
792
+ "stateMutability": "nonpayable",
793
+ "type": "function"
794
+ },
795
+ {
796
+ "inputs": [
797
+ {
798
+ "internalType": "address",
799
+ "name": "oldCOVTokenAddress",
800
+ "type": "address"
801
+ }
802
+ ],
803
+ "name": "setOldCOVToken",
804
+ "outputs": [],
805
+ "stateMutability": "nonpayable",
806
+ "type": "function"
807
+ },
808
+ {
809
+ "inputs": [
810
+ {
811
+ "internalType": "bytes32",
812
+ "name": "lock",
813
+ "type": "bytes32"
814
+ },
815
+ {
816
+ "internalType": "bool",
817
+ "name": "status",
818
+ "type": "bool"
819
+ }
820
+ ],
821
+ "name": "setTempFuncLock",
822
+ "outputs": [],
823
+ "stateMutability": "nonpayable",
824
+ "type": "function"
825
+ },
826
+ {
827
+ "inputs": [],
828
+ "name": "symbol",
829
+ "outputs": [
830
+ {
831
+ "internalType": "string",
832
+ "name": "",
833
+ "type": "string"
834
+ }
835
+ ],
836
+ "stateMutability": "view",
837
+ "type": "function"
838
+ },
839
+ {
840
+ "inputs": [
841
+ {
842
+ "internalType": "bytes32",
843
+ "name": "",
844
+ "type": "bytes32"
845
+ }
846
+ ],
847
+ "name": "tempFuncLocks",
848
+ "outputs": [
849
+ {
850
+ "internalType": "bool",
851
+ "name": "",
852
+ "type": "bool"
853
+ }
854
+ ],
855
+ "stateMutability": "view",
856
+ "type": "function"
857
+ },
858
+ {
859
+ "inputs": [],
860
+ "name": "totalSupply",
861
+ "outputs": [
862
+ {
863
+ "internalType": "uint256",
864
+ "name": "",
865
+ "type": "uint256"
866
+ }
867
+ ],
868
+ "stateMutability": "view",
869
+ "type": "function"
870
+ },
871
+ {
872
+ "inputs": [
873
+ {
874
+ "internalType": "address",
875
+ "name": "recipient",
876
+ "type": "address"
877
+ },
878
+ {
879
+ "internalType": "uint256",
880
+ "name": "amount",
881
+ "type": "uint256"
882
+ }
883
+ ],
884
+ "name": "transfer",
885
+ "outputs": [
886
+ {
887
+ "internalType": "bool",
888
+ "name": "",
889
+ "type": "bool"
890
+ }
891
+ ],
892
+ "stateMutability": "nonpayable",
893
+ "type": "function"
894
+ },
895
+ {
896
+ "inputs": [
897
+ {
898
+ "internalType": "address",
899
+ "name": "sender",
900
+ "type": "address"
901
+ },
902
+ {
903
+ "internalType": "address",
904
+ "name": "recipient",
905
+ "type": "address"
906
+ },
907
+ {
908
+ "internalType": "uint256",
909
+ "name": "amount",
910
+ "type": "uint256"
911
+ }
912
+ ],
913
+ "name": "transferFrom",
914
+ "outputs": [
915
+ {
916
+ "internalType": "bool",
917
+ "name": "",
918
+ "type": "bool"
919
+ }
920
+ ],
921
+ "stateMutability": "nonpayable",
922
+ "type": "function"
923
+ }
924
+ ] as const satisfies Abi;
925
+
926
+ /**
927
+ * Type-safe ABI for COVToken_json
928
+ */
929
+ export type COVToken_jsonAbi = typeof COVToken_jsonAbi;
930
+
931
+ /**
932
+ * Contract instance type for COVToken_json
933
+ */
934
+ // Use any for contract type to avoid complex viem type issues
935
+ // The runtime behavior is type-safe through viem's ABI typing
936
+ export type COVToken_jsonContract = any;
937
+
938
+ /**
939
+ * COVToken_json Contract Class
940
+ *
941
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
942
+ *
943
+ * @example
944
+ * ```typescript
945
+ * import { createPublicClient, createWalletClient, http } from 'viem';
946
+ * import { mainnet } from 'viem/chains';
947
+ * import { COVToken_json } from 'COVToken_json';
948
+ *
949
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
950
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
951
+ *
952
+ * const contract = new COVToken_json('0x...', { publicClient, walletClient });
953
+ *
954
+ * // Read functions
955
+ * const result = await contract.balanceOf('0x...');
956
+ *
957
+ * // Write functions
958
+ * const hash = await contract.transfer('0x...', 1000n);
959
+ *
960
+ * // Simulate transactions (dry-run)
961
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
962
+ * console.log('Gas estimate:', simulation.request.gas);
963
+ *
964
+ * // Watch events
965
+ * const unwatch = contract.watch.Transfer((event) => {
966
+ * console.log('Transfer event:', event);
967
+ * });
968
+ * ```
969
+ */
970
+ export class COVToken_json {
971
+ private contract: COVToken_jsonContract;
972
+ private contractAddress: Address;
973
+ private publicClient: PublicClient;
974
+
975
+ constructor(
976
+ address: Address,
977
+ clients: {
978
+ publicClient: PublicClient;
979
+ walletClient?: WalletClient;
980
+ }
981
+ ) {
982
+ this.contractAddress = address;
983
+ this.publicClient = clients.publicClient;
984
+ this.contract = getContract({
985
+ address,
986
+ abi: COVToken_jsonAbi,
987
+ client: {
988
+ public: clients.publicClient,
989
+ wallet: clients.walletClient,
990
+ },
991
+ });
992
+ }
993
+
994
+ /**
995
+ * Get the contract address
996
+ */
997
+ get address(): Address {
998
+ return this.contractAddress;
999
+ }
1000
+
1001
+ /**
1002
+ * Get the underlying viem contract instance
1003
+ */
1004
+ getContract(): COVToken_jsonContract {
1005
+ return this.contract;
1006
+ }
1007
+
1008
+ /**
1009
+ * DEFAULT_ADMIN_ROLE
1010
+ * view
1011
+ */
1012
+ async DEFAULT_ADMIN_ROLE(): Promise<`0x${string}`> {
1013
+ return this.contract.read.DEFAULT_ADMIN_ROLE() as Promise<`0x${string}`>;
1014
+ }
1015
+
1016
+ /**
1017
+ * LOCK_ADDR_TIME_LOCK
1018
+ * view
1019
+ */
1020
+ async LOCK_ADDR_TIME_LOCK(): Promise<`0x${string}`> {
1021
+ return this.contract.read.LOCK_ADDR_TIME_LOCK() as Promise<`0x${string}`>;
1022
+ }
1023
+
1024
+ /**
1025
+ * LOCK_BURN
1026
+ * view
1027
+ */
1028
+ async LOCK_BURN(): Promise<`0x${string}`> {
1029
+ return this.contract.read.LOCK_BURN() as Promise<`0x${string}`>;
1030
+ }
1031
+
1032
+ /**
1033
+ * LOCK_MINT
1034
+ * view
1035
+ */
1036
+ async LOCK_MINT(): Promise<`0x${string}`> {
1037
+ return this.contract.read.LOCK_MINT() as Promise<`0x${string}`>;
1038
+ }
1039
+
1040
+ /**
1041
+ * LOCK_TRANSFER
1042
+ * view
1043
+ */
1044
+ async LOCK_TRANSFER(): Promise<`0x${string}`> {
1045
+ return this.contract.read.LOCK_TRANSFER() as Promise<`0x${string}`>;
1046
+ }
1047
+
1048
+ /**
1049
+ * MAX_INT
1050
+ * view
1051
+ */
1052
+ async MAX_INT(): Promise<bigint> {
1053
+ return this.contract.read.MAX_INT() as Promise<bigint>;
1054
+ }
1055
+
1056
+ /**
1057
+ * ROLE_ADMIN
1058
+ * view
1059
+ */
1060
+ async ROLE_ADMIN(): Promise<`0x${string}`> {
1061
+ return this.contract.read.ROLE_ADMIN() as Promise<`0x${string}`>;
1062
+ }
1063
+
1064
+ /**
1065
+ * ROLE_ALIEN_TOKEN_SENDER
1066
+ * view
1067
+ */
1068
+ async ROLE_ALIEN_TOKEN_SENDER(): Promise<`0x${string}`> {
1069
+ return this.contract.read.ROLE_ALIEN_TOKEN_SENDER() as Promise<`0x${string}`>;
1070
+ }
1071
+
1072
+ /**
1073
+ * ROLE_BURNER
1074
+ * view
1075
+ */
1076
+ async ROLE_BURNER(): Promise<`0x${string}`> {
1077
+ return this.contract.read.ROLE_BURNER() as Promise<`0x${string}`>;
1078
+ }
1079
+
1080
+ /**
1081
+ * ROLE_MINTER
1082
+ * view
1083
+ */
1084
+ async ROLE_MINTER(): Promise<`0x${string}`> {
1085
+ return this.contract.read.ROLE_MINTER() as Promise<`0x${string}`>;
1086
+ }
1087
+
1088
+ /**
1089
+ * ROLE_TRANSFER
1090
+ * view
1091
+ */
1092
+ async ROLE_TRANSFER(): Promise<`0x${string}`> {
1093
+ return this.contract.read.ROLE_TRANSFER() as Promise<`0x${string}`>;
1094
+ }
1095
+
1096
+ /**
1097
+ * allowance
1098
+ * view
1099
+ */
1100
+ async allowance(owner: `0x${string}`, spender: `0x${string}`): Promise<bigint> {
1101
+ return this.contract.read.allowance([owner, spender] as const) as Promise<bigint>;
1102
+ }
1103
+
1104
+ /**
1105
+ * balanceOf
1106
+ * view
1107
+ */
1108
+ async balanceOf(account: `0x${string}`): Promise<bigint> {
1109
+ return this.contract.read.balanceOf([account] as const) as Promise<bigint>;
1110
+ }
1111
+
1112
+ /**
1113
+ * decimals
1114
+ * view
1115
+ */
1116
+ async decimals(): Promise<bigint> {
1117
+ return this.contract.read.decimals() as Promise<bigint>;
1118
+ }
1119
+
1120
+ /**
1121
+ * finalFuncLocks
1122
+ * view
1123
+ */
1124
+ async finalFuncLocks(arg0: `0x${string}`): Promise<boolean> {
1125
+ return this.contract.read.finalFuncLocks([arg0] as const) as Promise<boolean>;
1126
+ }
1127
+
1128
+ /**
1129
+ * getRoleAdmin
1130
+ * view
1131
+ */
1132
+ async getRoleAdmin(role: `0x${string}`): Promise<`0x${string}`> {
1133
+ return this.contract.read.getRoleAdmin([role] as const) as Promise<`0x${string}`>;
1134
+ }
1135
+
1136
+ /**
1137
+ * getRoleMember
1138
+ * view
1139
+ */
1140
+ async getRoleMember(role: `0x${string}`, index: bigint): Promise<`0x${string}`> {
1141
+ return this.contract.read.getRoleMember([role, index] as const) as Promise<`0x${string}`>;
1142
+ }
1143
+
1144
+ /**
1145
+ * getRoleMemberCount
1146
+ * view
1147
+ */
1148
+ async getRoleMemberCount(role: `0x${string}`): Promise<bigint> {
1149
+ return this.contract.read.getRoleMemberCount([role] as const) as Promise<bigint>;
1150
+ }
1151
+
1152
+ /**
1153
+ * hasRole
1154
+ * view
1155
+ */
1156
+ async hasRole(role: `0x${string}`, account: `0x${string}`): Promise<boolean> {
1157
+ return this.contract.read.hasRole([role, account] as const) as Promise<boolean>;
1158
+ }
1159
+
1160
+ /**
1161
+ * locks
1162
+ * view
1163
+ */
1164
+ async locks(arg0: `0x${string}`): Promise<bigint> {
1165
+ return this.contract.read.locks([arg0] as const) as Promise<bigint>;
1166
+ }
1167
+
1168
+ /**
1169
+ * name
1170
+ * view
1171
+ */
1172
+ async name(): Promise<string> {
1173
+ return this.contract.read.name() as Promise<string>;
1174
+ }
1175
+
1176
+ /**
1177
+ * oldCOVToken
1178
+ * view
1179
+ */
1180
+ async oldCOVToken(): Promise<`0x${string}`> {
1181
+ return this.contract.read.oldCOVToken() as Promise<`0x${string}`>;
1182
+ }
1183
+
1184
+ /**
1185
+ * registeredCallback
1186
+ * view
1187
+ */
1188
+ async registeredCallback(): Promise<`0x${string}`> {
1189
+ return this.contract.read.registeredCallback() as Promise<`0x${string}`>;
1190
+ }
1191
+
1192
+ /**
1193
+ * symbol
1194
+ * view
1195
+ */
1196
+ async symbol(): Promise<string> {
1197
+ return this.contract.read.symbol() as Promise<string>;
1198
+ }
1199
+
1200
+ /**
1201
+ * tempFuncLocks
1202
+ * view
1203
+ */
1204
+ async tempFuncLocks(arg0: `0x${string}`): Promise<boolean> {
1205
+ return this.contract.read.tempFuncLocks([arg0] as const) as Promise<boolean>;
1206
+ }
1207
+
1208
+ /**
1209
+ * totalSupply
1210
+ * view
1211
+ */
1212
+ async totalSupply(): Promise<bigint> {
1213
+ return this.contract.read.totalSupply() as Promise<bigint>;
1214
+ }
1215
+
1216
+ /**
1217
+ * adminBurn
1218
+ * nonpayable
1219
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1220
+ */
1221
+ async adminBurn(account: `0x${string}`, amount: bigint, options?: {
1222
+ accessList?: import('viem').AccessList;
1223
+ authorizationList?: import('viem').AuthorizationList;
1224
+ chain?: import('viem').Chain | null;
1225
+ dataSuffix?: `0x${string}`;
1226
+ gas?: bigint;
1227
+ gasPrice?: bigint;
1228
+ maxFeePerGas?: bigint;
1229
+ maxPriorityFeePerGas?: bigint;
1230
+ nonce?: number;
1231
+ value?: bigint;
1232
+ }): Promise<`0x${string}`> {
1233
+ if (!this.contract.write) {
1234
+ throw new Error('Wallet client is required for write operations');
1235
+ }
1236
+ return this.contract.write.adminBurn([account, amount] as const, options) as Promise<`0x${string}`>;
1237
+ }
1238
+
1239
+ /**
1240
+ * adminMint
1241
+ * nonpayable
1242
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1243
+ */
1244
+ async adminMint(account: `0x${string}`, amount: bigint, options?: {
1245
+ accessList?: import('viem').AccessList;
1246
+ authorizationList?: import('viem').AuthorizationList;
1247
+ chain?: import('viem').Chain | null;
1248
+ dataSuffix?: `0x${string}`;
1249
+ gas?: bigint;
1250
+ gasPrice?: bigint;
1251
+ maxFeePerGas?: bigint;
1252
+ maxPriorityFeePerGas?: bigint;
1253
+ nonce?: number;
1254
+ value?: bigint;
1255
+ }): Promise<`0x${string}`> {
1256
+ if (!this.contract.write) {
1257
+ throw new Error('Wallet client is required for write operations');
1258
+ }
1259
+ return this.contract.write.adminMint([account, amount] as const, options) as Promise<`0x${string}`>;
1260
+ }
1261
+
1262
+ /**
1263
+ * adminTimelockTransfer
1264
+ * nonpayable
1265
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1266
+ */
1267
+ async adminTimelockTransfer(account: `0x${string}`, periodInDays: bigint, options?: {
1268
+ accessList?: import('viem').AccessList;
1269
+ authorizationList?: import('viem').AuthorizationList;
1270
+ chain?: import('viem').Chain | null;
1271
+ dataSuffix?: `0x${string}`;
1272
+ gas?: bigint;
1273
+ gasPrice?: bigint;
1274
+ maxFeePerGas?: bigint;
1275
+ maxPriorityFeePerGas?: bigint;
1276
+ nonce?: number;
1277
+ value?: bigint;
1278
+ }): Promise<`0x${string}`> {
1279
+ if (!this.contract.write) {
1280
+ throw new Error('Wallet client is required for write operations');
1281
+ }
1282
+ return this.contract.write.adminTimelockTransfer([account, periodInDays] as const, options) as Promise<`0x${string}`>;
1283
+ }
1284
+
1285
+ /**
1286
+ * approve
1287
+ * nonpayable
1288
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1289
+ */
1290
+ async approve(spender: `0x${string}`, amount: bigint, options?: {
1291
+ accessList?: import('viem').AccessList;
1292
+ authorizationList?: import('viem').AuthorizationList;
1293
+ chain?: import('viem').Chain | null;
1294
+ dataSuffix?: `0x${string}`;
1295
+ gas?: bigint;
1296
+ gasPrice?: bigint;
1297
+ maxFeePerGas?: bigint;
1298
+ maxPriorityFeePerGas?: bigint;
1299
+ nonce?: number;
1300
+ value?: bigint;
1301
+ }): Promise<`0x${string}`> {
1302
+ if (!this.contract.write) {
1303
+ throw new Error('Wallet client is required for write operations');
1304
+ }
1305
+ return this.contract.write.approve([spender, amount] as const, options) as Promise<`0x${string}`>;
1306
+ }
1307
+
1308
+ /**
1309
+ * burn
1310
+ * nonpayable
1311
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1312
+ */
1313
+ async burn(amount: bigint, options?: {
1314
+ accessList?: import('viem').AccessList;
1315
+ authorizationList?: import('viem').AuthorizationList;
1316
+ chain?: import('viem').Chain | null;
1317
+ dataSuffix?: `0x${string}`;
1318
+ gas?: bigint;
1319
+ gasPrice?: bigint;
1320
+ maxFeePerGas?: bigint;
1321
+ maxPriorityFeePerGas?: bigint;
1322
+ nonce?: number;
1323
+ value?: bigint;
1324
+ }): Promise<`0x${string}`> {
1325
+ if (!this.contract.write) {
1326
+ throw new Error('Wallet client is required for write operations');
1327
+ }
1328
+ return this.contract.write.burn([amount] as const, options) as Promise<`0x${string}`>;
1329
+ }
1330
+
1331
+ /**
1332
+ * burnFrom
1333
+ * nonpayable
1334
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1335
+ */
1336
+ async burnFrom(account: `0x${string}`, amount: bigint, options?: {
1337
+ accessList?: import('viem').AccessList;
1338
+ authorizationList?: import('viem').AuthorizationList;
1339
+ chain?: import('viem').Chain | null;
1340
+ dataSuffix?: `0x${string}`;
1341
+ gas?: bigint;
1342
+ gasPrice?: bigint;
1343
+ maxFeePerGas?: bigint;
1344
+ maxPriorityFeePerGas?: bigint;
1345
+ nonce?: number;
1346
+ value?: bigint;
1347
+ }): Promise<`0x${string}`> {
1348
+ if (!this.contract.write) {
1349
+ throw new Error('Wallet client is required for write operations');
1350
+ }
1351
+ return this.contract.write.burnFrom([account, amount] as const, options) as Promise<`0x${string}`>;
1352
+ }
1353
+
1354
+ /**
1355
+ * decreaseAllowance
1356
+ * nonpayable
1357
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1358
+ */
1359
+ async decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
1360
+ accessList?: import('viem').AccessList;
1361
+ authorizationList?: import('viem').AuthorizationList;
1362
+ chain?: import('viem').Chain | null;
1363
+ dataSuffix?: `0x${string}`;
1364
+ gas?: bigint;
1365
+ gasPrice?: bigint;
1366
+ maxFeePerGas?: bigint;
1367
+ maxPriorityFeePerGas?: bigint;
1368
+ nonce?: number;
1369
+ value?: bigint;
1370
+ }): Promise<`0x${string}`> {
1371
+ if (!this.contract.write) {
1372
+ throw new Error('Wallet client is required for write operations');
1373
+ }
1374
+ return this.contract.write.decreaseAllowance([spender, subtractedValue] as const, options) as Promise<`0x${string}`>;
1375
+ }
1376
+
1377
+ /**
1378
+ * deregisterCallback
1379
+ * nonpayable
1380
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1381
+ */
1382
+ async deregisterCallback(options?: {
1383
+ accessList?: import('viem').AccessList;
1384
+ authorizationList?: import('viem').AuthorizationList;
1385
+ chain?: import('viem').Chain | null;
1386
+ dataSuffix?: `0x${string}`;
1387
+ gas?: bigint;
1388
+ gasPrice?: bigint;
1389
+ maxFeePerGas?: bigint;
1390
+ maxPriorityFeePerGas?: bigint;
1391
+ nonce?: number;
1392
+ value?: bigint;
1393
+ }): Promise<`0x${string}`> {
1394
+ if (!this.contract.write) {
1395
+ throw new Error('Wallet client is required for write operations');
1396
+ }
1397
+ return this.contract.write.deregisterCallback(options) as Promise<`0x${string}`>;
1398
+ }
1399
+
1400
+ /**
1401
+ * distributeLockOldToken
1402
+ * nonpayable
1403
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1404
+ */
1405
+ async distributeLockOldToken(receivers: `0x${string}`[], options?: {
1406
+ accessList?: import('viem').AccessList;
1407
+ authorizationList?: import('viem').AuthorizationList;
1408
+ chain?: import('viem').Chain | null;
1409
+ dataSuffix?: `0x${string}`;
1410
+ gas?: bigint;
1411
+ gasPrice?: bigint;
1412
+ maxFeePerGas?: bigint;
1413
+ maxPriorityFeePerGas?: bigint;
1414
+ nonce?: number;
1415
+ value?: bigint;
1416
+ }): Promise<`0x${string}`> {
1417
+ if (!this.contract.write) {
1418
+ throw new Error('Wallet client is required for write operations');
1419
+ }
1420
+ return this.contract.write.distributeLockOldToken([receivers] as const, options) as Promise<`0x${string}`>;
1421
+ }
1422
+
1423
+ /**
1424
+ * distributeMint
1425
+ * nonpayable
1426
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1427
+ */
1428
+ async distributeMint(receivers: `0x${string}`[], balances: bigint[], options?: {
1429
+ accessList?: import('viem').AccessList;
1430
+ authorizationList?: import('viem').AuthorizationList;
1431
+ chain?: import('viem').Chain | null;
1432
+ dataSuffix?: `0x${string}`;
1433
+ gas?: bigint;
1434
+ gasPrice?: bigint;
1435
+ maxFeePerGas?: bigint;
1436
+ maxPriorityFeePerGas?: bigint;
1437
+ nonce?: number;
1438
+ value?: bigint;
1439
+ }): Promise<`0x${string}`> {
1440
+ if (!this.contract.write) {
1441
+ throw new Error('Wallet client is required for write operations');
1442
+ }
1443
+ return this.contract.write.distributeMint([receivers, balances] as const, options) as Promise<`0x${string}`>;
1444
+ }
1445
+
1446
+ /**
1447
+ * finalFuncLock
1448
+ * nonpayable
1449
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1450
+ */
1451
+ async finalFuncLock(lock: `0x${string}`, options?: {
1452
+ accessList?: import('viem').AccessList;
1453
+ authorizationList?: import('viem').AuthorizationList;
1454
+ chain?: import('viem').Chain | null;
1455
+ dataSuffix?: `0x${string}`;
1456
+ gas?: bigint;
1457
+ gasPrice?: bigint;
1458
+ maxFeePerGas?: bigint;
1459
+ maxPriorityFeePerGas?: bigint;
1460
+ nonce?: number;
1461
+ value?: bigint;
1462
+ }): Promise<`0x${string}`> {
1463
+ if (!this.contract.write) {
1464
+ throw new Error('Wallet client is required for write operations');
1465
+ }
1466
+ return this.contract.write.finalFuncLock([lock] as const, options) as Promise<`0x${string}`>;
1467
+ }
1468
+
1469
+ /**
1470
+ * grantRole
1471
+ * nonpayable
1472
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1473
+ */
1474
+ async grantRole(role: `0x${string}`, account: `0x${string}`, options?: {
1475
+ accessList?: import('viem').AccessList;
1476
+ authorizationList?: import('viem').AuthorizationList;
1477
+ chain?: import('viem').Chain | null;
1478
+ dataSuffix?: `0x${string}`;
1479
+ gas?: bigint;
1480
+ gasPrice?: bigint;
1481
+ maxFeePerGas?: bigint;
1482
+ maxPriorityFeePerGas?: bigint;
1483
+ nonce?: number;
1484
+ value?: bigint;
1485
+ }): Promise<`0x${string}`> {
1486
+ if (!this.contract.write) {
1487
+ throw new Error('Wallet client is required for write operations');
1488
+ }
1489
+ return this.contract.write.grantRole([role, account] as const, options) as Promise<`0x${string}`>;
1490
+ }
1491
+
1492
+ /**
1493
+ * increaseAllowance
1494
+ * nonpayable
1495
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1496
+ */
1497
+ async increaseAllowance(spender: `0x${string}`, addedValue: bigint, options?: {
1498
+ accessList?: import('viem').AccessList;
1499
+ authorizationList?: import('viem').AuthorizationList;
1500
+ chain?: import('viem').Chain | null;
1501
+ dataSuffix?: `0x${string}`;
1502
+ gas?: bigint;
1503
+ gasPrice?: bigint;
1504
+ maxFeePerGas?: bigint;
1505
+ maxPriorityFeePerGas?: bigint;
1506
+ nonce?: number;
1507
+ value?: bigint;
1508
+ }): Promise<`0x${string}`> {
1509
+ if (!this.contract.write) {
1510
+ throw new Error('Wallet client is required for write operations');
1511
+ }
1512
+ return this.contract.write.increaseAllowance([spender, addedValue] as const, options) as Promise<`0x${string}`>;
1513
+ }
1514
+
1515
+ /**
1516
+ * registerCallback
1517
+ * nonpayable
1518
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1519
+ */
1520
+ async registerCallback(callback: `0x${string}`, options?: {
1521
+ accessList?: import('viem').AccessList;
1522
+ authorizationList?: import('viem').AuthorizationList;
1523
+ chain?: import('viem').Chain | null;
1524
+ dataSuffix?: `0x${string}`;
1525
+ gas?: bigint;
1526
+ gasPrice?: bigint;
1527
+ maxFeePerGas?: bigint;
1528
+ maxPriorityFeePerGas?: bigint;
1529
+ nonce?: number;
1530
+ value?: bigint;
1531
+ }): Promise<`0x${string}`> {
1532
+ if (!this.contract.write) {
1533
+ throw new Error('Wallet client is required for write operations');
1534
+ }
1535
+ return this.contract.write.registerCallback([callback] as const, options) as Promise<`0x${string}`>;
1536
+ }
1537
+
1538
+ /**
1539
+ * renounceRole
1540
+ * nonpayable
1541
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1542
+ */
1543
+ async renounceRole(role: `0x${string}`, account: `0x${string}`, options?: {
1544
+ accessList?: import('viem').AccessList;
1545
+ authorizationList?: import('viem').AuthorizationList;
1546
+ chain?: import('viem').Chain | null;
1547
+ dataSuffix?: `0x${string}`;
1548
+ gas?: bigint;
1549
+ gasPrice?: bigint;
1550
+ maxFeePerGas?: bigint;
1551
+ maxPriorityFeePerGas?: bigint;
1552
+ nonce?: number;
1553
+ value?: bigint;
1554
+ }): Promise<`0x${string}`> {
1555
+ if (!this.contract.write) {
1556
+ throw new Error('Wallet client is required for write operations');
1557
+ }
1558
+ return this.contract.write.renounceRole([role, account] as const, options) as Promise<`0x${string}`>;
1559
+ }
1560
+
1561
+ /**
1562
+ * retrieveTokens
1563
+ * nonpayable
1564
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1565
+ */
1566
+ async retrieveTokens(to: `0x${string}`, anotherToken: `0x${string}`, options?: {
1567
+ accessList?: import('viem').AccessList;
1568
+ authorizationList?: import('viem').AuthorizationList;
1569
+ chain?: import('viem').Chain | null;
1570
+ dataSuffix?: `0x${string}`;
1571
+ gas?: bigint;
1572
+ gasPrice?: bigint;
1573
+ maxFeePerGas?: bigint;
1574
+ maxPriorityFeePerGas?: bigint;
1575
+ nonce?: number;
1576
+ value?: bigint;
1577
+ }): Promise<`0x${string}`> {
1578
+ if (!this.contract.write) {
1579
+ throw new Error('Wallet client is required for write operations');
1580
+ }
1581
+ return this.contract.write.retrieveTokens([to, anotherToken] as const, options) as Promise<`0x${string}`>;
1582
+ }
1583
+
1584
+ /**
1585
+ * revokeRole
1586
+ * nonpayable
1587
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1588
+ */
1589
+ async revokeRole(role: `0x${string}`, account: `0x${string}`, options?: {
1590
+ accessList?: import('viem').AccessList;
1591
+ authorizationList?: import('viem').AuthorizationList;
1592
+ chain?: import('viem').Chain | null;
1593
+ dataSuffix?: `0x${string}`;
1594
+ gas?: bigint;
1595
+ gasPrice?: bigint;
1596
+ maxFeePerGas?: bigint;
1597
+ maxPriorityFeePerGas?: bigint;
1598
+ nonce?: number;
1599
+ value?: bigint;
1600
+ }): Promise<`0x${string}`> {
1601
+ if (!this.contract.write) {
1602
+ throw new Error('Wallet client is required for write operations');
1603
+ }
1604
+ return this.contract.write.revokeRole([role, account] as const, options) as Promise<`0x${string}`>;
1605
+ }
1606
+
1607
+ /**
1608
+ * setOldCOVToken
1609
+ * nonpayable
1610
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1611
+ */
1612
+ async setOldCOVToken(oldCOVTokenAddress: `0x${string}`, options?: {
1613
+ accessList?: import('viem').AccessList;
1614
+ authorizationList?: import('viem').AuthorizationList;
1615
+ chain?: import('viem').Chain | null;
1616
+ dataSuffix?: `0x${string}`;
1617
+ gas?: bigint;
1618
+ gasPrice?: bigint;
1619
+ maxFeePerGas?: bigint;
1620
+ maxPriorityFeePerGas?: bigint;
1621
+ nonce?: number;
1622
+ value?: bigint;
1623
+ }): Promise<`0x${string}`> {
1624
+ if (!this.contract.write) {
1625
+ throw new Error('Wallet client is required for write operations');
1626
+ }
1627
+ return this.contract.write.setOldCOVToken([oldCOVTokenAddress] as const, options) as Promise<`0x${string}`>;
1628
+ }
1629
+
1630
+ /**
1631
+ * setTempFuncLock
1632
+ * nonpayable
1633
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1634
+ */
1635
+ async setTempFuncLock(lock: `0x${string}`, status: boolean, options?: {
1636
+ accessList?: import('viem').AccessList;
1637
+ authorizationList?: import('viem').AuthorizationList;
1638
+ chain?: import('viem').Chain | null;
1639
+ dataSuffix?: `0x${string}`;
1640
+ gas?: bigint;
1641
+ gasPrice?: bigint;
1642
+ maxFeePerGas?: bigint;
1643
+ maxPriorityFeePerGas?: bigint;
1644
+ nonce?: number;
1645
+ value?: bigint;
1646
+ }): Promise<`0x${string}`> {
1647
+ if (!this.contract.write) {
1648
+ throw new Error('Wallet client is required for write operations');
1649
+ }
1650
+ return this.contract.write.setTempFuncLock([lock, status] as const, options) as Promise<`0x${string}`>;
1651
+ }
1652
+
1653
+ /**
1654
+ * transfer
1655
+ * nonpayable
1656
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1657
+ */
1658
+ async transfer(recipient: `0x${string}`, amount: bigint, options?: {
1659
+ accessList?: import('viem').AccessList;
1660
+ authorizationList?: import('viem').AuthorizationList;
1661
+ chain?: import('viem').Chain | null;
1662
+ dataSuffix?: `0x${string}`;
1663
+ gas?: bigint;
1664
+ gasPrice?: bigint;
1665
+ maxFeePerGas?: bigint;
1666
+ maxPriorityFeePerGas?: bigint;
1667
+ nonce?: number;
1668
+ value?: bigint;
1669
+ }): Promise<`0x${string}`> {
1670
+ if (!this.contract.write) {
1671
+ throw new Error('Wallet client is required for write operations');
1672
+ }
1673
+ return this.contract.write.transfer([recipient, amount] as const, options) as Promise<`0x${string}`>;
1674
+ }
1675
+
1676
+ /**
1677
+ * transferFrom
1678
+ * nonpayable
1679
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1680
+ */
1681
+ async transferFrom(sender: `0x${string}`, recipient: `0x${string}`, amount: bigint, options?: {
1682
+ accessList?: import('viem').AccessList;
1683
+ authorizationList?: import('viem').AuthorizationList;
1684
+ chain?: import('viem').Chain | null;
1685
+ dataSuffix?: `0x${string}`;
1686
+ gas?: bigint;
1687
+ gasPrice?: bigint;
1688
+ maxFeePerGas?: bigint;
1689
+ maxPriorityFeePerGas?: bigint;
1690
+ nonce?: number;
1691
+ value?: bigint;
1692
+ }): Promise<`0x${string}`> {
1693
+ if (!this.contract.write) {
1694
+ throw new Error('Wallet client is required for write operations');
1695
+ }
1696
+ return this.contract.write.transferFrom([sender, recipient, amount] as const, options) as Promise<`0x${string}`>;
1697
+ }
1698
+
1699
+
1700
+
1701
+ /**
1702
+ * Simulate contract write operations (dry-run without sending transaction)
1703
+ *
1704
+ * @example
1705
+ * const result = await contract.simulate.transfer('0x...', 1000n);
1706
+ * console.log('Gas estimate:', result.request.gas);
1707
+ * console.log('Would succeed:', result.result);
1708
+ */
1709
+ get simulate() {
1710
+ const contract = this.contract;
1711
+ if (!contract.simulate) {
1712
+ throw new Error('Public client is required for simulation');
1713
+ }
1714
+ return {
1715
+ /**
1716
+ * Simulate adminBurn
1717
+ * Returns gas estimate and result without sending transaction
1718
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1719
+ */
1720
+ async adminBurn(account: `0x${string}`, amount: bigint, options?: {
1721
+ accessList?: import('viem').AccessList;
1722
+ authorizationList?: import('viem').AuthorizationList;
1723
+ chain?: import('viem').Chain | null;
1724
+ dataSuffix?: `0x${string}`;
1725
+ gas?: bigint;
1726
+ gasPrice?: bigint;
1727
+ maxFeePerGas?: bigint;
1728
+ maxPriorityFeePerGas?: bigint;
1729
+ nonce?: number;
1730
+ value?: bigint;
1731
+ }): Promise<void> {
1732
+ return contract.simulate.adminBurn([account, amount] as const, options) as Promise<void>;
1733
+ },
1734
+ /**
1735
+ * Simulate adminMint
1736
+ * Returns gas estimate and result without sending transaction
1737
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1738
+ */
1739
+ async adminMint(account: `0x${string}`, amount: bigint, options?: {
1740
+ accessList?: import('viem').AccessList;
1741
+ authorizationList?: import('viem').AuthorizationList;
1742
+ chain?: import('viem').Chain | null;
1743
+ dataSuffix?: `0x${string}`;
1744
+ gas?: bigint;
1745
+ gasPrice?: bigint;
1746
+ maxFeePerGas?: bigint;
1747
+ maxPriorityFeePerGas?: bigint;
1748
+ nonce?: number;
1749
+ value?: bigint;
1750
+ }): Promise<void> {
1751
+ return contract.simulate.adminMint([account, amount] as const, options) as Promise<void>;
1752
+ },
1753
+ /**
1754
+ * Simulate adminTimelockTransfer
1755
+ * Returns gas estimate and result without sending transaction
1756
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1757
+ */
1758
+ async adminTimelockTransfer(account: `0x${string}`, periodInDays: bigint, options?: {
1759
+ accessList?: import('viem').AccessList;
1760
+ authorizationList?: import('viem').AuthorizationList;
1761
+ chain?: import('viem').Chain | null;
1762
+ dataSuffix?: `0x${string}`;
1763
+ gas?: bigint;
1764
+ gasPrice?: bigint;
1765
+ maxFeePerGas?: bigint;
1766
+ maxPriorityFeePerGas?: bigint;
1767
+ nonce?: number;
1768
+ value?: bigint;
1769
+ }): Promise<void> {
1770
+ return contract.simulate.adminTimelockTransfer([account, periodInDays] as const, options) as Promise<void>;
1771
+ },
1772
+ /**
1773
+ * Simulate approve
1774
+ * Returns gas estimate and result without sending transaction
1775
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1776
+ */
1777
+ async approve(spender: `0x${string}`, amount: bigint, options?: {
1778
+ accessList?: import('viem').AccessList;
1779
+ authorizationList?: import('viem').AuthorizationList;
1780
+ chain?: import('viem').Chain | null;
1781
+ dataSuffix?: `0x${string}`;
1782
+ gas?: bigint;
1783
+ gasPrice?: bigint;
1784
+ maxFeePerGas?: bigint;
1785
+ maxPriorityFeePerGas?: bigint;
1786
+ nonce?: number;
1787
+ value?: bigint;
1788
+ }): Promise<boolean> {
1789
+ return contract.simulate.approve([spender, amount] as const, options) as Promise<boolean>;
1790
+ },
1791
+ /**
1792
+ * Simulate burn
1793
+ * Returns gas estimate and result without sending transaction
1794
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1795
+ */
1796
+ async burn(amount: bigint, options?: {
1797
+ accessList?: import('viem').AccessList;
1798
+ authorizationList?: import('viem').AuthorizationList;
1799
+ chain?: import('viem').Chain | null;
1800
+ dataSuffix?: `0x${string}`;
1801
+ gas?: bigint;
1802
+ gasPrice?: bigint;
1803
+ maxFeePerGas?: bigint;
1804
+ maxPriorityFeePerGas?: bigint;
1805
+ nonce?: number;
1806
+ value?: bigint;
1807
+ }): Promise<void> {
1808
+ return contract.simulate.burn([amount] as const, options) as Promise<void>;
1809
+ },
1810
+ /**
1811
+ * Simulate burnFrom
1812
+ * Returns gas estimate and result without sending transaction
1813
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1814
+ */
1815
+ async burnFrom(account: `0x${string}`, amount: bigint, options?: {
1816
+ accessList?: import('viem').AccessList;
1817
+ authorizationList?: import('viem').AuthorizationList;
1818
+ chain?: import('viem').Chain | null;
1819
+ dataSuffix?: `0x${string}`;
1820
+ gas?: bigint;
1821
+ gasPrice?: bigint;
1822
+ maxFeePerGas?: bigint;
1823
+ maxPriorityFeePerGas?: bigint;
1824
+ nonce?: number;
1825
+ value?: bigint;
1826
+ }): Promise<void> {
1827
+ return contract.simulate.burnFrom([account, amount] as const, options) as Promise<void>;
1828
+ },
1829
+ /**
1830
+ * Simulate decreaseAllowance
1831
+ * Returns gas estimate and result without sending transaction
1832
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1833
+ */
1834
+ async decreaseAllowance(spender: `0x${string}`, subtractedValue: bigint, options?: {
1835
+ accessList?: import('viem').AccessList;
1836
+ authorizationList?: import('viem').AuthorizationList;
1837
+ chain?: import('viem').Chain | null;
1838
+ dataSuffix?: `0x${string}`;
1839
+ gas?: bigint;
1840
+ gasPrice?: bigint;
1841
+ maxFeePerGas?: bigint;
1842
+ maxPriorityFeePerGas?: bigint;
1843
+ nonce?: number;
1844
+ value?: bigint;
1845
+ }): Promise<boolean> {
1846
+ return contract.simulate.decreaseAllowance([spender, subtractedValue] as const, options) as Promise<boolean>;
1847
+ },
1848
+ /**
1849
+ * Simulate deregisterCallback
1850
+ * Returns gas estimate and result without sending transaction
1851
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1852
+ */
1853
+ async deregisterCallback(options?: {
1854
+ accessList?: import('viem').AccessList;
1855
+ authorizationList?: import('viem').AuthorizationList;
1856
+ chain?: import('viem').Chain | null;
1857
+ dataSuffix?: `0x${string}`;
1858
+ gas?: bigint;
1859
+ gasPrice?: bigint;
1860
+ maxFeePerGas?: bigint;
1861
+ maxPriorityFeePerGas?: bigint;
1862
+ nonce?: number;
1863
+ value?: bigint;
1864
+ }): Promise<void> {
1865
+ return contract.simulate.deregisterCallback(options) as Promise<void>;
1866
+ },
1867
+ /**
1868
+ * Simulate distributeLockOldToken
1869
+ * Returns gas estimate and result without sending transaction
1870
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1871
+ */
1872
+ async distributeLockOldToken(receivers: `0x${string}`[], options?: {
1873
+ accessList?: import('viem').AccessList;
1874
+ authorizationList?: import('viem').AuthorizationList;
1875
+ chain?: import('viem').Chain | null;
1876
+ dataSuffix?: `0x${string}`;
1877
+ gas?: bigint;
1878
+ gasPrice?: bigint;
1879
+ maxFeePerGas?: bigint;
1880
+ maxPriorityFeePerGas?: bigint;
1881
+ nonce?: number;
1882
+ value?: bigint;
1883
+ }): Promise<void> {
1884
+ return contract.simulate.distributeLockOldToken([receivers] as const, options) as Promise<void>;
1885
+ },
1886
+ /**
1887
+ * Simulate distributeMint
1888
+ * Returns gas estimate and result without sending transaction
1889
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1890
+ */
1891
+ async distributeMint(receivers: `0x${string}`[], balances: bigint[], options?: {
1892
+ accessList?: import('viem').AccessList;
1893
+ authorizationList?: import('viem').AuthorizationList;
1894
+ chain?: import('viem').Chain | null;
1895
+ dataSuffix?: `0x${string}`;
1896
+ gas?: bigint;
1897
+ gasPrice?: bigint;
1898
+ maxFeePerGas?: bigint;
1899
+ maxPriorityFeePerGas?: bigint;
1900
+ nonce?: number;
1901
+ value?: bigint;
1902
+ }): Promise<void> {
1903
+ return contract.simulate.distributeMint([receivers, balances] as const, options) as Promise<void>;
1904
+ },
1905
+ /**
1906
+ * Simulate finalFuncLock
1907
+ * Returns gas estimate and result without sending transaction
1908
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1909
+ */
1910
+ async finalFuncLock(lock: `0x${string}`, options?: {
1911
+ accessList?: import('viem').AccessList;
1912
+ authorizationList?: import('viem').AuthorizationList;
1913
+ chain?: import('viem').Chain | null;
1914
+ dataSuffix?: `0x${string}`;
1915
+ gas?: bigint;
1916
+ gasPrice?: bigint;
1917
+ maxFeePerGas?: bigint;
1918
+ maxPriorityFeePerGas?: bigint;
1919
+ nonce?: number;
1920
+ value?: bigint;
1921
+ }): Promise<void> {
1922
+ return contract.simulate.finalFuncLock([lock] as const, options) as Promise<void>;
1923
+ },
1924
+ /**
1925
+ * Simulate grantRole
1926
+ * Returns gas estimate and result without sending transaction
1927
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1928
+ */
1929
+ async grantRole(role: `0x${string}`, account: `0x${string}`, options?: {
1930
+ accessList?: import('viem').AccessList;
1931
+ authorizationList?: import('viem').AuthorizationList;
1932
+ chain?: import('viem').Chain | null;
1933
+ dataSuffix?: `0x${string}`;
1934
+ gas?: bigint;
1935
+ gasPrice?: bigint;
1936
+ maxFeePerGas?: bigint;
1937
+ maxPriorityFeePerGas?: bigint;
1938
+ nonce?: number;
1939
+ value?: bigint;
1940
+ }): Promise<void> {
1941
+ return contract.simulate.grantRole([role, account] as const, options) as Promise<void>;
1942
+ },
1943
+ /**
1944
+ * Simulate increaseAllowance
1945
+ * Returns gas estimate and result without sending transaction
1946
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1947
+ */
1948
+ async increaseAllowance(spender: `0x${string}`, addedValue: bigint, options?: {
1949
+ accessList?: import('viem').AccessList;
1950
+ authorizationList?: import('viem').AuthorizationList;
1951
+ chain?: import('viem').Chain | null;
1952
+ dataSuffix?: `0x${string}`;
1953
+ gas?: bigint;
1954
+ gasPrice?: bigint;
1955
+ maxFeePerGas?: bigint;
1956
+ maxPriorityFeePerGas?: bigint;
1957
+ nonce?: number;
1958
+ value?: bigint;
1959
+ }): Promise<boolean> {
1960
+ return contract.simulate.increaseAllowance([spender, addedValue] as const, options) as Promise<boolean>;
1961
+ },
1962
+ /**
1963
+ * Simulate registerCallback
1964
+ * Returns gas estimate and result without sending transaction
1965
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1966
+ */
1967
+ async registerCallback(callback: `0x${string}`, options?: {
1968
+ accessList?: import('viem').AccessList;
1969
+ authorizationList?: import('viem').AuthorizationList;
1970
+ chain?: import('viem').Chain | null;
1971
+ dataSuffix?: `0x${string}`;
1972
+ gas?: bigint;
1973
+ gasPrice?: bigint;
1974
+ maxFeePerGas?: bigint;
1975
+ maxPriorityFeePerGas?: bigint;
1976
+ nonce?: number;
1977
+ value?: bigint;
1978
+ }): Promise<void> {
1979
+ return contract.simulate.registerCallback([callback] as const, options) as Promise<void>;
1980
+ },
1981
+ /**
1982
+ * Simulate renounceRole
1983
+ * Returns gas estimate and result without sending transaction
1984
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1985
+ */
1986
+ async renounceRole(role: `0x${string}`, account: `0x${string}`, options?: {
1987
+ accessList?: import('viem').AccessList;
1988
+ authorizationList?: import('viem').AuthorizationList;
1989
+ chain?: import('viem').Chain | null;
1990
+ dataSuffix?: `0x${string}`;
1991
+ gas?: bigint;
1992
+ gasPrice?: bigint;
1993
+ maxFeePerGas?: bigint;
1994
+ maxPriorityFeePerGas?: bigint;
1995
+ nonce?: number;
1996
+ value?: bigint;
1997
+ }): Promise<void> {
1998
+ return contract.simulate.renounceRole([role, account] as const, options) as Promise<void>;
1999
+ },
2000
+ /**
2001
+ * Simulate retrieveTokens
2002
+ * Returns gas estimate and result without sending transaction
2003
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2004
+ */
2005
+ async retrieveTokens(to: `0x${string}`, anotherToken: `0x${string}`, options?: {
2006
+ accessList?: import('viem').AccessList;
2007
+ authorizationList?: import('viem').AuthorizationList;
2008
+ chain?: import('viem').Chain | null;
2009
+ dataSuffix?: `0x${string}`;
2010
+ gas?: bigint;
2011
+ gasPrice?: bigint;
2012
+ maxFeePerGas?: bigint;
2013
+ maxPriorityFeePerGas?: bigint;
2014
+ nonce?: number;
2015
+ value?: bigint;
2016
+ }): Promise<void> {
2017
+ return contract.simulate.retrieveTokens([to, anotherToken] as const, options) as Promise<void>;
2018
+ },
2019
+ /**
2020
+ * Simulate revokeRole
2021
+ * Returns gas estimate and result without sending transaction
2022
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2023
+ */
2024
+ async revokeRole(role: `0x${string}`, account: `0x${string}`, options?: {
2025
+ accessList?: import('viem').AccessList;
2026
+ authorizationList?: import('viem').AuthorizationList;
2027
+ chain?: import('viem').Chain | null;
2028
+ dataSuffix?: `0x${string}`;
2029
+ gas?: bigint;
2030
+ gasPrice?: bigint;
2031
+ maxFeePerGas?: bigint;
2032
+ maxPriorityFeePerGas?: bigint;
2033
+ nonce?: number;
2034
+ value?: bigint;
2035
+ }): Promise<void> {
2036
+ return contract.simulate.revokeRole([role, account] as const, options) as Promise<void>;
2037
+ },
2038
+ /**
2039
+ * Simulate setOldCOVToken
2040
+ * Returns gas estimate and result without sending transaction
2041
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2042
+ */
2043
+ async setOldCOVToken(oldCOVTokenAddress: `0x${string}`, options?: {
2044
+ accessList?: import('viem').AccessList;
2045
+ authorizationList?: import('viem').AuthorizationList;
2046
+ chain?: import('viem').Chain | null;
2047
+ dataSuffix?: `0x${string}`;
2048
+ gas?: bigint;
2049
+ gasPrice?: bigint;
2050
+ maxFeePerGas?: bigint;
2051
+ maxPriorityFeePerGas?: bigint;
2052
+ nonce?: number;
2053
+ value?: bigint;
2054
+ }): Promise<void> {
2055
+ return contract.simulate.setOldCOVToken([oldCOVTokenAddress] as const, options) as Promise<void>;
2056
+ },
2057
+ /**
2058
+ * Simulate setTempFuncLock
2059
+ * Returns gas estimate and result without sending transaction
2060
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2061
+ */
2062
+ async setTempFuncLock(lock: `0x${string}`, status: boolean, options?: {
2063
+ accessList?: import('viem').AccessList;
2064
+ authorizationList?: import('viem').AuthorizationList;
2065
+ chain?: import('viem').Chain | null;
2066
+ dataSuffix?: `0x${string}`;
2067
+ gas?: bigint;
2068
+ gasPrice?: bigint;
2069
+ maxFeePerGas?: bigint;
2070
+ maxPriorityFeePerGas?: bigint;
2071
+ nonce?: number;
2072
+ value?: bigint;
2073
+ }): Promise<void> {
2074
+ return contract.simulate.setTempFuncLock([lock, status] as const, options) as Promise<void>;
2075
+ },
2076
+ /**
2077
+ * Simulate transfer
2078
+ * Returns gas estimate and result without sending transaction
2079
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2080
+ */
2081
+ async transfer(recipient: `0x${string}`, amount: bigint, options?: {
2082
+ accessList?: import('viem').AccessList;
2083
+ authorizationList?: import('viem').AuthorizationList;
2084
+ chain?: import('viem').Chain | null;
2085
+ dataSuffix?: `0x${string}`;
2086
+ gas?: bigint;
2087
+ gasPrice?: bigint;
2088
+ maxFeePerGas?: bigint;
2089
+ maxPriorityFeePerGas?: bigint;
2090
+ nonce?: number;
2091
+ value?: bigint;
2092
+ }): Promise<boolean> {
2093
+ return contract.simulate.transfer([recipient, amount] as const, options) as Promise<boolean>;
2094
+ },
2095
+ /**
2096
+ * Simulate transferFrom
2097
+ * Returns gas estimate and result without sending transaction
2098
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2099
+ */
2100
+ async transferFrom(sender: `0x${string}`, recipient: `0x${string}`, amount: bigint, options?: {
2101
+ accessList?: import('viem').AccessList;
2102
+ authorizationList?: import('viem').AuthorizationList;
2103
+ chain?: import('viem').Chain | null;
2104
+ dataSuffix?: `0x${string}`;
2105
+ gas?: bigint;
2106
+ gasPrice?: bigint;
2107
+ maxFeePerGas?: bigint;
2108
+ maxPriorityFeePerGas?: bigint;
2109
+ nonce?: number;
2110
+ value?: bigint;
2111
+ }): Promise<boolean> {
2112
+ return contract.simulate.transferFrom([sender, recipient, amount] as const, options) as Promise<boolean>;
2113
+ }
2114
+ };
2115
+ }
2116
+
2117
+ /**
2118
+ * Watch contract events
2119
+ *
2120
+ * @example
2121
+ * // Watch all Transfer events
2122
+ * const unwatch = contract.watch.Transfer((event) => {
2123
+ * console.log('Transfer:', event);
2124
+ * });
2125
+ *
2126
+ * // Stop watching
2127
+ * unwatch();
2128
+ */
2129
+ get watch() {
2130
+ return {
2131
+ /**
2132
+ * Watch Approval events
2133
+ * @param callback Function to call when event is emitted
2134
+ * @param filter Optional filter for indexed parameters
2135
+ * @returns Unwatch function to stop listening
2136
+ */
2137
+ Approval: (callback: (event: { owner: `0x${string}`; spender: `0x${string}`; value: bigint }) => void, filter?: { owner: `0x${string}`; spender: `0x${string}` }) => {
2138
+ return this.publicClient.watchContractEvent({
2139
+ address: this.contractAddress,
2140
+ abi: COVToken_jsonAbi,
2141
+ eventName: 'Approval',
2142
+ args: filter,
2143
+ onLogs: (logs: any[]) => {
2144
+ logs.forEach((log: any) => {
2145
+ callback(log.args as any);
2146
+ });
2147
+ },
2148
+ }) as () => void;
2149
+ },
2150
+ /**
2151
+ * Watch RoleAdminChanged events
2152
+ * @param callback Function to call when event is emitted
2153
+ * @param filter Optional filter for indexed parameters
2154
+ * @returns Unwatch function to stop listening
2155
+ */
2156
+ RoleAdminChanged: (callback: (event: { role: `0x${string}`; previousAdminRole: `0x${string}`; newAdminRole: `0x${string}` }) => void, filter?: { role: `0x${string}`; previousAdminRole: `0x${string}`; newAdminRole: `0x${string}` }) => {
2157
+ return this.publicClient.watchContractEvent({
2158
+ address: this.contractAddress,
2159
+ abi: COVToken_jsonAbi,
2160
+ eventName: 'RoleAdminChanged',
2161
+ args: filter,
2162
+ onLogs: (logs: any[]) => {
2163
+ logs.forEach((log: any) => {
2164
+ callback(log.args as any);
2165
+ });
2166
+ },
2167
+ }) as () => void;
2168
+ },
2169
+ /**
2170
+ * Watch RoleGranted events
2171
+ * @param callback Function to call when event is emitted
2172
+ * @param filter Optional filter for indexed parameters
2173
+ * @returns Unwatch function to stop listening
2174
+ */
2175
+ RoleGranted: (callback: (event: { role: `0x${string}`; account: `0x${string}`; sender: `0x${string}` }) => void, filter?: { role: `0x${string}`; account: `0x${string}`; sender: `0x${string}` }) => {
2176
+ return this.publicClient.watchContractEvent({
2177
+ address: this.contractAddress,
2178
+ abi: COVToken_jsonAbi,
2179
+ eventName: 'RoleGranted',
2180
+ args: filter,
2181
+ onLogs: (logs: any[]) => {
2182
+ logs.forEach((log: any) => {
2183
+ callback(log.args as any);
2184
+ });
2185
+ },
2186
+ }) as () => void;
2187
+ },
2188
+ /**
2189
+ * Watch RoleRevoked events
2190
+ * @param callback Function to call when event is emitted
2191
+ * @param filter Optional filter for indexed parameters
2192
+ * @returns Unwatch function to stop listening
2193
+ */
2194
+ RoleRevoked: (callback: (event: { role: `0x${string}`; account: `0x${string}`; sender: `0x${string}` }) => void, filter?: { role: `0x${string}`; account: `0x${string}`; sender: `0x${string}` }) => {
2195
+ return this.publicClient.watchContractEvent({
2196
+ address: this.contractAddress,
2197
+ abi: COVToken_jsonAbi,
2198
+ eventName: 'RoleRevoked',
2199
+ args: filter,
2200
+ onLogs: (logs: any[]) => {
2201
+ logs.forEach((log: any) => {
2202
+ callback(log.args as any);
2203
+ });
2204
+ },
2205
+ }) as () => void;
2206
+ },
2207
+ /**
2208
+ * Watch Transfer events
2209
+ * @param callback Function to call when event is emitted
2210
+ * @param filter Optional filter for indexed parameters
2211
+ * @returns Unwatch function to stop listening
2212
+ */
2213
+ Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; value: bigint }) => void, filter?: { from: `0x${string}`; to: `0x${string}` }) => {
2214
+ return this.publicClient.watchContractEvent({
2215
+ address: this.contractAddress,
2216
+ abi: COVToken_jsonAbi,
2217
+ eventName: 'Transfer',
2218
+ args: filter,
2219
+ onLogs: (logs: any[]) => {
2220
+ logs.forEach((log: any) => {
2221
+ callback(log.args as any);
2222
+ });
2223
+ },
2224
+ }) as () => void;
2225
+ }
2226
+ };
2227
+ }
2228
+ }