@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,1692 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.COVToken_json = exports.COVToken_jsonAbi = void 0;
4
+ const viem_1 = require("viem");
5
+ /**
6
+ * COVToken_json ABI
7
+ *
8
+ * This ABI is typed using viem's type system for full type safety.
9
+ */
10
+ exports.COVToken_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": "bytes32",
47
+ "name": "role",
48
+ "type": "bytes32"
49
+ },
50
+ {
51
+ "indexed": true,
52
+ "internalType": "bytes32",
53
+ "name": "previousAdminRole",
54
+ "type": "bytes32"
55
+ },
56
+ {
57
+ "indexed": true,
58
+ "internalType": "bytes32",
59
+ "name": "newAdminRole",
60
+ "type": "bytes32"
61
+ }
62
+ ],
63
+ "name": "RoleAdminChanged",
64
+ "type": "event"
65
+ },
66
+ {
67
+ "anonymous": false,
68
+ "inputs": [
69
+ {
70
+ "indexed": true,
71
+ "internalType": "bytes32",
72
+ "name": "role",
73
+ "type": "bytes32"
74
+ },
75
+ {
76
+ "indexed": true,
77
+ "internalType": "address",
78
+ "name": "account",
79
+ "type": "address"
80
+ },
81
+ {
82
+ "indexed": true,
83
+ "internalType": "address",
84
+ "name": "sender",
85
+ "type": "address"
86
+ }
87
+ ],
88
+ "name": "RoleGranted",
89
+ "type": "event"
90
+ },
91
+ {
92
+ "anonymous": false,
93
+ "inputs": [
94
+ {
95
+ "indexed": true,
96
+ "internalType": "bytes32",
97
+ "name": "role",
98
+ "type": "bytes32"
99
+ },
100
+ {
101
+ "indexed": true,
102
+ "internalType": "address",
103
+ "name": "account",
104
+ "type": "address"
105
+ },
106
+ {
107
+ "indexed": true,
108
+ "internalType": "address",
109
+ "name": "sender",
110
+ "type": "address"
111
+ }
112
+ ],
113
+ "name": "RoleRevoked",
114
+ "type": "event"
115
+ },
116
+ {
117
+ "anonymous": false,
118
+ "inputs": [
119
+ {
120
+ "indexed": true,
121
+ "internalType": "address",
122
+ "name": "from",
123
+ "type": "address"
124
+ },
125
+ {
126
+ "indexed": true,
127
+ "internalType": "address",
128
+ "name": "to",
129
+ "type": "address"
130
+ },
131
+ {
132
+ "indexed": false,
133
+ "internalType": "uint256",
134
+ "name": "value",
135
+ "type": "uint256"
136
+ }
137
+ ],
138
+ "name": "Transfer",
139
+ "type": "event"
140
+ },
141
+ {
142
+ "inputs": [],
143
+ "name": "DEFAULT_ADMIN_ROLE",
144
+ "outputs": [
145
+ {
146
+ "internalType": "bytes32",
147
+ "name": "",
148
+ "type": "bytes32"
149
+ }
150
+ ],
151
+ "stateMutability": "view",
152
+ "type": "function"
153
+ },
154
+ {
155
+ "inputs": [],
156
+ "name": "LOCK_ADDR_TIME_LOCK",
157
+ "outputs": [
158
+ {
159
+ "internalType": "bytes32",
160
+ "name": "",
161
+ "type": "bytes32"
162
+ }
163
+ ],
164
+ "stateMutability": "view",
165
+ "type": "function"
166
+ },
167
+ {
168
+ "inputs": [],
169
+ "name": "LOCK_BURN",
170
+ "outputs": [
171
+ {
172
+ "internalType": "bytes32",
173
+ "name": "",
174
+ "type": "bytes32"
175
+ }
176
+ ],
177
+ "stateMutability": "view",
178
+ "type": "function"
179
+ },
180
+ {
181
+ "inputs": [],
182
+ "name": "LOCK_MINT",
183
+ "outputs": [
184
+ {
185
+ "internalType": "bytes32",
186
+ "name": "",
187
+ "type": "bytes32"
188
+ }
189
+ ],
190
+ "stateMutability": "view",
191
+ "type": "function"
192
+ },
193
+ {
194
+ "inputs": [],
195
+ "name": "LOCK_TRANSFER",
196
+ "outputs": [
197
+ {
198
+ "internalType": "bytes32",
199
+ "name": "",
200
+ "type": "bytes32"
201
+ }
202
+ ],
203
+ "stateMutability": "view",
204
+ "type": "function"
205
+ },
206
+ {
207
+ "inputs": [],
208
+ "name": "MAX_INT",
209
+ "outputs": [
210
+ {
211
+ "internalType": "uint256",
212
+ "name": "",
213
+ "type": "uint256"
214
+ }
215
+ ],
216
+ "stateMutability": "view",
217
+ "type": "function"
218
+ },
219
+ {
220
+ "inputs": [],
221
+ "name": "ROLE_ADMIN",
222
+ "outputs": [
223
+ {
224
+ "internalType": "bytes32",
225
+ "name": "",
226
+ "type": "bytes32"
227
+ }
228
+ ],
229
+ "stateMutability": "view",
230
+ "type": "function"
231
+ },
232
+ {
233
+ "inputs": [],
234
+ "name": "ROLE_ALIEN_TOKEN_SENDER",
235
+ "outputs": [
236
+ {
237
+ "internalType": "bytes32",
238
+ "name": "",
239
+ "type": "bytes32"
240
+ }
241
+ ],
242
+ "stateMutability": "view",
243
+ "type": "function"
244
+ },
245
+ {
246
+ "inputs": [],
247
+ "name": "ROLE_BURNER",
248
+ "outputs": [
249
+ {
250
+ "internalType": "bytes32",
251
+ "name": "",
252
+ "type": "bytes32"
253
+ }
254
+ ],
255
+ "stateMutability": "view",
256
+ "type": "function"
257
+ },
258
+ {
259
+ "inputs": [],
260
+ "name": "ROLE_MINTER",
261
+ "outputs": [
262
+ {
263
+ "internalType": "bytes32",
264
+ "name": "",
265
+ "type": "bytes32"
266
+ }
267
+ ],
268
+ "stateMutability": "view",
269
+ "type": "function"
270
+ },
271
+ {
272
+ "inputs": [],
273
+ "name": "ROLE_TRANSFER",
274
+ "outputs": [
275
+ {
276
+ "internalType": "bytes32",
277
+ "name": "",
278
+ "type": "bytes32"
279
+ }
280
+ ],
281
+ "stateMutability": "view",
282
+ "type": "function"
283
+ },
284
+ {
285
+ "inputs": [
286
+ {
287
+ "internalType": "address",
288
+ "name": "account",
289
+ "type": "address"
290
+ },
291
+ {
292
+ "internalType": "uint256",
293
+ "name": "amount",
294
+ "type": "uint256"
295
+ }
296
+ ],
297
+ "name": "adminBurn",
298
+ "outputs": [],
299
+ "stateMutability": "nonpayable",
300
+ "type": "function"
301
+ },
302
+ {
303
+ "inputs": [
304
+ {
305
+ "internalType": "address",
306
+ "name": "account",
307
+ "type": "address"
308
+ },
309
+ {
310
+ "internalType": "uint256",
311
+ "name": "amount",
312
+ "type": "uint256"
313
+ }
314
+ ],
315
+ "name": "adminMint",
316
+ "outputs": [],
317
+ "stateMutability": "nonpayable",
318
+ "type": "function"
319
+ },
320
+ {
321
+ "inputs": [
322
+ {
323
+ "internalType": "address",
324
+ "name": "account",
325
+ "type": "address"
326
+ },
327
+ {
328
+ "internalType": "uint256",
329
+ "name": "periodInDays",
330
+ "type": "uint256"
331
+ }
332
+ ],
333
+ "name": "adminTimelockTransfer",
334
+ "outputs": [],
335
+ "stateMutability": "nonpayable",
336
+ "type": "function"
337
+ },
338
+ {
339
+ "inputs": [
340
+ {
341
+ "internalType": "address",
342
+ "name": "owner",
343
+ "type": "address"
344
+ },
345
+ {
346
+ "internalType": "address",
347
+ "name": "spender",
348
+ "type": "address"
349
+ }
350
+ ],
351
+ "name": "allowance",
352
+ "outputs": [
353
+ {
354
+ "internalType": "uint256",
355
+ "name": "",
356
+ "type": "uint256"
357
+ }
358
+ ],
359
+ "stateMutability": "view",
360
+ "type": "function"
361
+ },
362
+ {
363
+ "inputs": [
364
+ {
365
+ "internalType": "address",
366
+ "name": "spender",
367
+ "type": "address"
368
+ },
369
+ {
370
+ "internalType": "uint256",
371
+ "name": "amount",
372
+ "type": "uint256"
373
+ }
374
+ ],
375
+ "name": "approve",
376
+ "outputs": [
377
+ {
378
+ "internalType": "bool",
379
+ "name": "",
380
+ "type": "bool"
381
+ }
382
+ ],
383
+ "stateMutability": "nonpayable",
384
+ "type": "function"
385
+ },
386
+ {
387
+ "inputs": [
388
+ {
389
+ "internalType": "address",
390
+ "name": "account",
391
+ "type": "address"
392
+ }
393
+ ],
394
+ "name": "balanceOf",
395
+ "outputs": [
396
+ {
397
+ "internalType": "uint256",
398
+ "name": "",
399
+ "type": "uint256"
400
+ }
401
+ ],
402
+ "stateMutability": "view",
403
+ "type": "function"
404
+ },
405
+ {
406
+ "inputs": [
407
+ {
408
+ "internalType": "uint256",
409
+ "name": "amount",
410
+ "type": "uint256"
411
+ }
412
+ ],
413
+ "name": "burn",
414
+ "outputs": [],
415
+ "stateMutability": "nonpayable",
416
+ "type": "function"
417
+ },
418
+ {
419
+ "inputs": [
420
+ {
421
+ "internalType": "address",
422
+ "name": "account",
423
+ "type": "address"
424
+ },
425
+ {
426
+ "internalType": "uint256",
427
+ "name": "amount",
428
+ "type": "uint256"
429
+ }
430
+ ],
431
+ "name": "burnFrom",
432
+ "outputs": [],
433
+ "stateMutability": "nonpayable",
434
+ "type": "function"
435
+ },
436
+ {
437
+ "inputs": [],
438
+ "name": "decimals",
439
+ "outputs": [
440
+ {
441
+ "internalType": "uint8",
442
+ "name": "",
443
+ "type": "uint8"
444
+ }
445
+ ],
446
+ "stateMutability": "view",
447
+ "type": "function"
448
+ },
449
+ {
450
+ "inputs": [
451
+ {
452
+ "internalType": "address",
453
+ "name": "spender",
454
+ "type": "address"
455
+ },
456
+ {
457
+ "internalType": "uint256",
458
+ "name": "subtractedValue",
459
+ "type": "uint256"
460
+ }
461
+ ],
462
+ "name": "decreaseAllowance",
463
+ "outputs": [
464
+ {
465
+ "internalType": "bool",
466
+ "name": "",
467
+ "type": "bool"
468
+ }
469
+ ],
470
+ "stateMutability": "nonpayable",
471
+ "type": "function"
472
+ },
473
+ {
474
+ "inputs": [],
475
+ "name": "deregisterCallback",
476
+ "outputs": [],
477
+ "stateMutability": "nonpayable",
478
+ "type": "function"
479
+ },
480
+ {
481
+ "inputs": [
482
+ {
483
+ "internalType": "address[]",
484
+ "name": "receivers",
485
+ "type": "address[]"
486
+ }
487
+ ],
488
+ "name": "distributeLockOldToken",
489
+ "outputs": [],
490
+ "stateMutability": "nonpayable",
491
+ "type": "function"
492
+ },
493
+ {
494
+ "inputs": [
495
+ {
496
+ "internalType": "address[]",
497
+ "name": "receivers",
498
+ "type": "address[]"
499
+ },
500
+ {
501
+ "internalType": "uint256[]",
502
+ "name": "balances",
503
+ "type": "uint256[]"
504
+ }
505
+ ],
506
+ "name": "distributeMint",
507
+ "outputs": [],
508
+ "stateMutability": "nonpayable",
509
+ "type": "function"
510
+ },
511
+ {
512
+ "inputs": [
513
+ {
514
+ "internalType": "bytes32",
515
+ "name": "lock",
516
+ "type": "bytes32"
517
+ }
518
+ ],
519
+ "name": "finalFuncLock",
520
+ "outputs": [],
521
+ "stateMutability": "nonpayable",
522
+ "type": "function"
523
+ },
524
+ {
525
+ "inputs": [
526
+ {
527
+ "internalType": "bytes32",
528
+ "name": "",
529
+ "type": "bytes32"
530
+ }
531
+ ],
532
+ "name": "finalFuncLocks",
533
+ "outputs": [
534
+ {
535
+ "internalType": "bool",
536
+ "name": "",
537
+ "type": "bool"
538
+ }
539
+ ],
540
+ "stateMutability": "view",
541
+ "type": "function"
542
+ },
543
+ {
544
+ "inputs": [
545
+ {
546
+ "internalType": "bytes32",
547
+ "name": "role",
548
+ "type": "bytes32"
549
+ }
550
+ ],
551
+ "name": "getRoleAdmin",
552
+ "outputs": [
553
+ {
554
+ "internalType": "bytes32",
555
+ "name": "",
556
+ "type": "bytes32"
557
+ }
558
+ ],
559
+ "stateMutability": "view",
560
+ "type": "function"
561
+ },
562
+ {
563
+ "inputs": [
564
+ {
565
+ "internalType": "bytes32",
566
+ "name": "role",
567
+ "type": "bytes32"
568
+ },
569
+ {
570
+ "internalType": "uint256",
571
+ "name": "index",
572
+ "type": "uint256"
573
+ }
574
+ ],
575
+ "name": "getRoleMember",
576
+ "outputs": [
577
+ {
578
+ "internalType": "address",
579
+ "name": "",
580
+ "type": "address"
581
+ }
582
+ ],
583
+ "stateMutability": "view",
584
+ "type": "function"
585
+ },
586
+ {
587
+ "inputs": [
588
+ {
589
+ "internalType": "bytes32",
590
+ "name": "role",
591
+ "type": "bytes32"
592
+ }
593
+ ],
594
+ "name": "getRoleMemberCount",
595
+ "outputs": [
596
+ {
597
+ "internalType": "uint256",
598
+ "name": "",
599
+ "type": "uint256"
600
+ }
601
+ ],
602
+ "stateMutability": "view",
603
+ "type": "function"
604
+ },
605
+ {
606
+ "inputs": [
607
+ {
608
+ "internalType": "bytes32",
609
+ "name": "role",
610
+ "type": "bytes32"
611
+ },
612
+ {
613
+ "internalType": "address",
614
+ "name": "account",
615
+ "type": "address"
616
+ }
617
+ ],
618
+ "name": "grantRole",
619
+ "outputs": [],
620
+ "stateMutability": "nonpayable",
621
+ "type": "function"
622
+ },
623
+ {
624
+ "inputs": [
625
+ {
626
+ "internalType": "bytes32",
627
+ "name": "role",
628
+ "type": "bytes32"
629
+ },
630
+ {
631
+ "internalType": "address",
632
+ "name": "account",
633
+ "type": "address"
634
+ }
635
+ ],
636
+ "name": "hasRole",
637
+ "outputs": [
638
+ {
639
+ "internalType": "bool",
640
+ "name": "",
641
+ "type": "bool"
642
+ }
643
+ ],
644
+ "stateMutability": "view",
645
+ "type": "function"
646
+ },
647
+ {
648
+ "inputs": [
649
+ {
650
+ "internalType": "address",
651
+ "name": "spender",
652
+ "type": "address"
653
+ },
654
+ {
655
+ "internalType": "uint256",
656
+ "name": "addedValue",
657
+ "type": "uint256"
658
+ }
659
+ ],
660
+ "name": "increaseAllowance",
661
+ "outputs": [
662
+ {
663
+ "internalType": "bool",
664
+ "name": "",
665
+ "type": "bool"
666
+ }
667
+ ],
668
+ "stateMutability": "nonpayable",
669
+ "type": "function"
670
+ },
671
+ {
672
+ "inputs": [
673
+ {
674
+ "internalType": "address",
675
+ "name": "",
676
+ "type": "address"
677
+ }
678
+ ],
679
+ "name": "locks",
680
+ "outputs": [
681
+ {
682
+ "internalType": "uint256",
683
+ "name": "",
684
+ "type": "uint256"
685
+ }
686
+ ],
687
+ "stateMutability": "view",
688
+ "type": "function"
689
+ },
690
+ {
691
+ "inputs": [],
692
+ "name": "name",
693
+ "outputs": [
694
+ {
695
+ "internalType": "string",
696
+ "name": "",
697
+ "type": "string"
698
+ }
699
+ ],
700
+ "stateMutability": "view",
701
+ "type": "function"
702
+ },
703
+ {
704
+ "inputs": [],
705
+ "name": "oldCOVToken",
706
+ "outputs": [
707
+ {
708
+ "internalType": "contract IOldCOVToken",
709
+ "name": "",
710
+ "type": "address"
711
+ }
712
+ ],
713
+ "stateMutability": "view",
714
+ "type": "function"
715
+ },
716
+ {
717
+ "inputs": [
718
+ {
719
+ "internalType": "address",
720
+ "name": "callback",
721
+ "type": "address"
722
+ }
723
+ ],
724
+ "name": "registerCallback",
725
+ "outputs": [],
726
+ "stateMutability": "nonpayable",
727
+ "type": "function"
728
+ },
729
+ {
730
+ "inputs": [],
731
+ "name": "registeredCallback",
732
+ "outputs": [
733
+ {
734
+ "internalType": "address",
735
+ "name": "",
736
+ "type": "address"
737
+ }
738
+ ],
739
+ "stateMutability": "view",
740
+ "type": "function"
741
+ },
742
+ {
743
+ "inputs": [
744
+ {
745
+ "internalType": "bytes32",
746
+ "name": "role",
747
+ "type": "bytes32"
748
+ },
749
+ {
750
+ "internalType": "address",
751
+ "name": "account",
752
+ "type": "address"
753
+ }
754
+ ],
755
+ "name": "renounceRole",
756
+ "outputs": [],
757
+ "stateMutability": "nonpayable",
758
+ "type": "function"
759
+ },
760
+ {
761
+ "inputs": [
762
+ {
763
+ "internalType": "address",
764
+ "name": "to",
765
+ "type": "address"
766
+ },
767
+ {
768
+ "internalType": "address",
769
+ "name": "anotherToken",
770
+ "type": "address"
771
+ }
772
+ ],
773
+ "name": "retrieveTokens",
774
+ "outputs": [],
775
+ "stateMutability": "nonpayable",
776
+ "type": "function"
777
+ },
778
+ {
779
+ "inputs": [
780
+ {
781
+ "internalType": "bytes32",
782
+ "name": "role",
783
+ "type": "bytes32"
784
+ },
785
+ {
786
+ "internalType": "address",
787
+ "name": "account",
788
+ "type": "address"
789
+ }
790
+ ],
791
+ "name": "revokeRole",
792
+ "outputs": [],
793
+ "stateMutability": "nonpayable",
794
+ "type": "function"
795
+ },
796
+ {
797
+ "inputs": [
798
+ {
799
+ "internalType": "address",
800
+ "name": "oldCOVTokenAddress",
801
+ "type": "address"
802
+ }
803
+ ],
804
+ "name": "setOldCOVToken",
805
+ "outputs": [],
806
+ "stateMutability": "nonpayable",
807
+ "type": "function"
808
+ },
809
+ {
810
+ "inputs": [
811
+ {
812
+ "internalType": "bytes32",
813
+ "name": "lock",
814
+ "type": "bytes32"
815
+ },
816
+ {
817
+ "internalType": "bool",
818
+ "name": "status",
819
+ "type": "bool"
820
+ }
821
+ ],
822
+ "name": "setTempFuncLock",
823
+ "outputs": [],
824
+ "stateMutability": "nonpayable",
825
+ "type": "function"
826
+ },
827
+ {
828
+ "inputs": [],
829
+ "name": "symbol",
830
+ "outputs": [
831
+ {
832
+ "internalType": "string",
833
+ "name": "",
834
+ "type": "string"
835
+ }
836
+ ],
837
+ "stateMutability": "view",
838
+ "type": "function"
839
+ },
840
+ {
841
+ "inputs": [
842
+ {
843
+ "internalType": "bytes32",
844
+ "name": "",
845
+ "type": "bytes32"
846
+ }
847
+ ],
848
+ "name": "tempFuncLocks",
849
+ "outputs": [
850
+ {
851
+ "internalType": "bool",
852
+ "name": "",
853
+ "type": "bool"
854
+ }
855
+ ],
856
+ "stateMutability": "view",
857
+ "type": "function"
858
+ },
859
+ {
860
+ "inputs": [],
861
+ "name": "totalSupply",
862
+ "outputs": [
863
+ {
864
+ "internalType": "uint256",
865
+ "name": "",
866
+ "type": "uint256"
867
+ }
868
+ ],
869
+ "stateMutability": "view",
870
+ "type": "function"
871
+ },
872
+ {
873
+ "inputs": [
874
+ {
875
+ "internalType": "address",
876
+ "name": "recipient",
877
+ "type": "address"
878
+ },
879
+ {
880
+ "internalType": "uint256",
881
+ "name": "amount",
882
+ "type": "uint256"
883
+ }
884
+ ],
885
+ "name": "transfer",
886
+ "outputs": [
887
+ {
888
+ "internalType": "bool",
889
+ "name": "",
890
+ "type": "bool"
891
+ }
892
+ ],
893
+ "stateMutability": "nonpayable",
894
+ "type": "function"
895
+ },
896
+ {
897
+ "inputs": [
898
+ {
899
+ "internalType": "address",
900
+ "name": "sender",
901
+ "type": "address"
902
+ },
903
+ {
904
+ "internalType": "address",
905
+ "name": "recipient",
906
+ "type": "address"
907
+ },
908
+ {
909
+ "internalType": "uint256",
910
+ "name": "amount",
911
+ "type": "uint256"
912
+ }
913
+ ],
914
+ "name": "transferFrom",
915
+ "outputs": [
916
+ {
917
+ "internalType": "bool",
918
+ "name": "",
919
+ "type": "bool"
920
+ }
921
+ ],
922
+ "stateMutability": "nonpayable",
923
+ "type": "function"
924
+ }
925
+ ];
926
+ /**
927
+ * COVToken_json Contract Class
928
+ *
929
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
930
+ *
931
+ * @example
932
+ * ```typescript
933
+ * import { createPublicClient, createWalletClient, http } from 'viem';
934
+ * import { mainnet } from 'viem/chains';
935
+ * import { COVToken_json } from 'COVToken_json';
936
+ *
937
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
938
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
939
+ *
940
+ * const contract = new COVToken_json('0x...', { publicClient, walletClient });
941
+ *
942
+ * // Read functions
943
+ * const result = await contract.balanceOf('0x...');
944
+ *
945
+ * // Write functions
946
+ * const hash = await contract.transfer('0x...', 1000n);
947
+ *
948
+ * // Simulate transactions (dry-run)
949
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
950
+ * console.log('Gas estimate:', simulation.request.gas);
951
+ *
952
+ * // Watch events
953
+ * const unwatch = contract.watch.Transfer((event) => {
954
+ * console.log('Transfer event:', event);
955
+ * });
956
+ * ```
957
+ */
958
+ class COVToken_json {
959
+ constructor(address, clients) {
960
+ this.contractAddress = address;
961
+ this.publicClient = clients.publicClient;
962
+ this.contract = (0, viem_1.getContract)({
963
+ address,
964
+ abi: exports.COVToken_jsonAbi,
965
+ client: {
966
+ public: clients.publicClient,
967
+ wallet: clients.walletClient,
968
+ },
969
+ });
970
+ }
971
+ /**
972
+ * Get the contract address
973
+ */
974
+ get address() {
975
+ return this.contractAddress;
976
+ }
977
+ /**
978
+ * Get the underlying viem contract instance
979
+ */
980
+ getContract() {
981
+ return this.contract;
982
+ }
983
+ /**
984
+ * DEFAULT_ADMIN_ROLE
985
+ * view
986
+ */
987
+ async DEFAULT_ADMIN_ROLE() {
988
+ return this.contract.read.DEFAULT_ADMIN_ROLE();
989
+ }
990
+ /**
991
+ * LOCK_ADDR_TIME_LOCK
992
+ * view
993
+ */
994
+ async LOCK_ADDR_TIME_LOCK() {
995
+ return this.contract.read.LOCK_ADDR_TIME_LOCK();
996
+ }
997
+ /**
998
+ * LOCK_BURN
999
+ * view
1000
+ */
1001
+ async LOCK_BURN() {
1002
+ return this.contract.read.LOCK_BURN();
1003
+ }
1004
+ /**
1005
+ * LOCK_MINT
1006
+ * view
1007
+ */
1008
+ async LOCK_MINT() {
1009
+ return this.contract.read.LOCK_MINT();
1010
+ }
1011
+ /**
1012
+ * LOCK_TRANSFER
1013
+ * view
1014
+ */
1015
+ async LOCK_TRANSFER() {
1016
+ return this.contract.read.LOCK_TRANSFER();
1017
+ }
1018
+ /**
1019
+ * MAX_INT
1020
+ * view
1021
+ */
1022
+ async MAX_INT() {
1023
+ return this.contract.read.MAX_INT();
1024
+ }
1025
+ /**
1026
+ * ROLE_ADMIN
1027
+ * view
1028
+ */
1029
+ async ROLE_ADMIN() {
1030
+ return this.contract.read.ROLE_ADMIN();
1031
+ }
1032
+ /**
1033
+ * ROLE_ALIEN_TOKEN_SENDER
1034
+ * view
1035
+ */
1036
+ async ROLE_ALIEN_TOKEN_SENDER() {
1037
+ return this.contract.read.ROLE_ALIEN_TOKEN_SENDER();
1038
+ }
1039
+ /**
1040
+ * ROLE_BURNER
1041
+ * view
1042
+ */
1043
+ async ROLE_BURNER() {
1044
+ return this.contract.read.ROLE_BURNER();
1045
+ }
1046
+ /**
1047
+ * ROLE_MINTER
1048
+ * view
1049
+ */
1050
+ async ROLE_MINTER() {
1051
+ return this.contract.read.ROLE_MINTER();
1052
+ }
1053
+ /**
1054
+ * ROLE_TRANSFER
1055
+ * view
1056
+ */
1057
+ async ROLE_TRANSFER() {
1058
+ return this.contract.read.ROLE_TRANSFER();
1059
+ }
1060
+ /**
1061
+ * allowance
1062
+ * view
1063
+ */
1064
+ async allowance(owner, spender) {
1065
+ return this.contract.read.allowance([owner, spender]);
1066
+ }
1067
+ /**
1068
+ * balanceOf
1069
+ * view
1070
+ */
1071
+ async balanceOf(account) {
1072
+ return this.contract.read.balanceOf([account]);
1073
+ }
1074
+ /**
1075
+ * decimals
1076
+ * view
1077
+ */
1078
+ async decimals() {
1079
+ return this.contract.read.decimals();
1080
+ }
1081
+ /**
1082
+ * finalFuncLocks
1083
+ * view
1084
+ */
1085
+ async finalFuncLocks(arg0) {
1086
+ return this.contract.read.finalFuncLocks([arg0]);
1087
+ }
1088
+ /**
1089
+ * getRoleAdmin
1090
+ * view
1091
+ */
1092
+ async getRoleAdmin(role) {
1093
+ return this.contract.read.getRoleAdmin([role]);
1094
+ }
1095
+ /**
1096
+ * getRoleMember
1097
+ * view
1098
+ */
1099
+ async getRoleMember(role, index) {
1100
+ return this.contract.read.getRoleMember([role, index]);
1101
+ }
1102
+ /**
1103
+ * getRoleMemberCount
1104
+ * view
1105
+ */
1106
+ async getRoleMemberCount(role) {
1107
+ return this.contract.read.getRoleMemberCount([role]);
1108
+ }
1109
+ /**
1110
+ * hasRole
1111
+ * view
1112
+ */
1113
+ async hasRole(role, account) {
1114
+ return this.contract.read.hasRole([role, account]);
1115
+ }
1116
+ /**
1117
+ * locks
1118
+ * view
1119
+ */
1120
+ async locks(arg0) {
1121
+ return this.contract.read.locks([arg0]);
1122
+ }
1123
+ /**
1124
+ * name
1125
+ * view
1126
+ */
1127
+ async name() {
1128
+ return this.contract.read.name();
1129
+ }
1130
+ /**
1131
+ * oldCOVToken
1132
+ * view
1133
+ */
1134
+ async oldCOVToken() {
1135
+ return this.contract.read.oldCOVToken();
1136
+ }
1137
+ /**
1138
+ * registeredCallback
1139
+ * view
1140
+ */
1141
+ async registeredCallback() {
1142
+ return this.contract.read.registeredCallback();
1143
+ }
1144
+ /**
1145
+ * symbol
1146
+ * view
1147
+ */
1148
+ async symbol() {
1149
+ return this.contract.read.symbol();
1150
+ }
1151
+ /**
1152
+ * tempFuncLocks
1153
+ * view
1154
+ */
1155
+ async tempFuncLocks(arg0) {
1156
+ return this.contract.read.tempFuncLocks([arg0]);
1157
+ }
1158
+ /**
1159
+ * totalSupply
1160
+ * view
1161
+ */
1162
+ async totalSupply() {
1163
+ return this.contract.read.totalSupply();
1164
+ }
1165
+ /**
1166
+ * adminBurn
1167
+ * nonpayable
1168
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1169
+ */
1170
+ async adminBurn(account, amount, options) {
1171
+ if (!this.contract.write) {
1172
+ throw new Error('Wallet client is required for write operations');
1173
+ }
1174
+ return this.contract.write.adminBurn([account, amount], options);
1175
+ }
1176
+ /**
1177
+ * adminMint
1178
+ * nonpayable
1179
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1180
+ */
1181
+ async adminMint(account, amount, options) {
1182
+ if (!this.contract.write) {
1183
+ throw new Error('Wallet client is required for write operations');
1184
+ }
1185
+ return this.contract.write.adminMint([account, amount], options);
1186
+ }
1187
+ /**
1188
+ * adminTimelockTransfer
1189
+ * nonpayable
1190
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1191
+ */
1192
+ async adminTimelockTransfer(account, periodInDays, options) {
1193
+ if (!this.contract.write) {
1194
+ throw new Error('Wallet client is required for write operations');
1195
+ }
1196
+ return this.contract.write.adminTimelockTransfer([account, periodInDays], options);
1197
+ }
1198
+ /**
1199
+ * approve
1200
+ * nonpayable
1201
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1202
+ */
1203
+ async approve(spender, amount, options) {
1204
+ if (!this.contract.write) {
1205
+ throw new Error('Wallet client is required for write operations');
1206
+ }
1207
+ return this.contract.write.approve([spender, amount], options);
1208
+ }
1209
+ /**
1210
+ * burn
1211
+ * nonpayable
1212
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1213
+ */
1214
+ async burn(amount, options) {
1215
+ if (!this.contract.write) {
1216
+ throw new Error('Wallet client is required for write operations');
1217
+ }
1218
+ return this.contract.write.burn([amount], options);
1219
+ }
1220
+ /**
1221
+ * burnFrom
1222
+ * nonpayable
1223
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1224
+ */
1225
+ async burnFrom(account, amount, options) {
1226
+ if (!this.contract.write) {
1227
+ throw new Error('Wallet client is required for write operations');
1228
+ }
1229
+ return this.contract.write.burnFrom([account, amount], options);
1230
+ }
1231
+ /**
1232
+ * decreaseAllowance
1233
+ * nonpayable
1234
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1235
+ */
1236
+ async decreaseAllowance(spender, subtractedValue, options) {
1237
+ if (!this.contract.write) {
1238
+ throw new Error('Wallet client is required for write operations');
1239
+ }
1240
+ return this.contract.write.decreaseAllowance([spender, subtractedValue], options);
1241
+ }
1242
+ /**
1243
+ * deregisterCallback
1244
+ * nonpayable
1245
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1246
+ */
1247
+ async deregisterCallback(options) {
1248
+ if (!this.contract.write) {
1249
+ throw new Error('Wallet client is required for write operations');
1250
+ }
1251
+ return this.contract.write.deregisterCallback(options);
1252
+ }
1253
+ /**
1254
+ * distributeLockOldToken
1255
+ * nonpayable
1256
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1257
+ */
1258
+ async distributeLockOldToken(receivers, options) {
1259
+ if (!this.contract.write) {
1260
+ throw new Error('Wallet client is required for write operations');
1261
+ }
1262
+ return this.contract.write.distributeLockOldToken([receivers], options);
1263
+ }
1264
+ /**
1265
+ * distributeMint
1266
+ * nonpayable
1267
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1268
+ */
1269
+ async distributeMint(receivers, balances, options) {
1270
+ if (!this.contract.write) {
1271
+ throw new Error('Wallet client is required for write operations');
1272
+ }
1273
+ return this.contract.write.distributeMint([receivers, balances], options);
1274
+ }
1275
+ /**
1276
+ * finalFuncLock
1277
+ * nonpayable
1278
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1279
+ */
1280
+ async finalFuncLock(lock, options) {
1281
+ if (!this.contract.write) {
1282
+ throw new Error('Wallet client is required for write operations');
1283
+ }
1284
+ return this.contract.write.finalFuncLock([lock], options);
1285
+ }
1286
+ /**
1287
+ * grantRole
1288
+ * nonpayable
1289
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1290
+ */
1291
+ async grantRole(role, account, options) {
1292
+ if (!this.contract.write) {
1293
+ throw new Error('Wallet client is required for write operations');
1294
+ }
1295
+ return this.contract.write.grantRole([role, account], options);
1296
+ }
1297
+ /**
1298
+ * increaseAllowance
1299
+ * nonpayable
1300
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1301
+ */
1302
+ async increaseAllowance(spender, addedValue, options) {
1303
+ if (!this.contract.write) {
1304
+ throw new Error('Wallet client is required for write operations');
1305
+ }
1306
+ return this.contract.write.increaseAllowance([spender, addedValue], options);
1307
+ }
1308
+ /**
1309
+ * registerCallback
1310
+ * nonpayable
1311
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1312
+ */
1313
+ async registerCallback(callback, options) {
1314
+ if (!this.contract.write) {
1315
+ throw new Error('Wallet client is required for write operations');
1316
+ }
1317
+ return this.contract.write.registerCallback([callback], options);
1318
+ }
1319
+ /**
1320
+ * renounceRole
1321
+ * nonpayable
1322
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1323
+ */
1324
+ async renounceRole(role, account, options) {
1325
+ if (!this.contract.write) {
1326
+ throw new Error('Wallet client is required for write operations');
1327
+ }
1328
+ return this.contract.write.renounceRole([role, account], options);
1329
+ }
1330
+ /**
1331
+ * retrieveTokens
1332
+ * nonpayable
1333
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1334
+ */
1335
+ async retrieveTokens(to, anotherToken, options) {
1336
+ if (!this.contract.write) {
1337
+ throw new Error('Wallet client is required for write operations');
1338
+ }
1339
+ return this.contract.write.retrieveTokens([to, anotherToken], options);
1340
+ }
1341
+ /**
1342
+ * revokeRole
1343
+ * nonpayable
1344
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1345
+ */
1346
+ async revokeRole(role, account, options) {
1347
+ if (!this.contract.write) {
1348
+ throw new Error('Wallet client is required for write operations');
1349
+ }
1350
+ return this.contract.write.revokeRole([role, account], options);
1351
+ }
1352
+ /**
1353
+ * setOldCOVToken
1354
+ * nonpayable
1355
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1356
+ */
1357
+ async setOldCOVToken(oldCOVTokenAddress, options) {
1358
+ if (!this.contract.write) {
1359
+ throw new Error('Wallet client is required for write operations');
1360
+ }
1361
+ return this.contract.write.setOldCOVToken([oldCOVTokenAddress], options);
1362
+ }
1363
+ /**
1364
+ * setTempFuncLock
1365
+ * nonpayable
1366
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1367
+ */
1368
+ async setTempFuncLock(lock, status, options) {
1369
+ if (!this.contract.write) {
1370
+ throw new Error('Wallet client is required for write operations');
1371
+ }
1372
+ return this.contract.write.setTempFuncLock([lock, status], options);
1373
+ }
1374
+ /**
1375
+ * transfer
1376
+ * nonpayable
1377
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1378
+ */
1379
+ async transfer(recipient, amount, options) {
1380
+ if (!this.contract.write) {
1381
+ throw new Error('Wallet client is required for write operations');
1382
+ }
1383
+ return this.contract.write.transfer([recipient, amount], options);
1384
+ }
1385
+ /**
1386
+ * transferFrom
1387
+ * nonpayable
1388
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1389
+ */
1390
+ async transferFrom(sender, recipient, amount, options) {
1391
+ if (!this.contract.write) {
1392
+ throw new Error('Wallet client is required for write operations');
1393
+ }
1394
+ return this.contract.write.transferFrom([sender, recipient, amount], options);
1395
+ }
1396
+ /**
1397
+ * Simulate contract write operations (dry-run without sending transaction)
1398
+ *
1399
+ * @example
1400
+ * const result = await contract.simulate.transfer('0x...', 1000n);
1401
+ * console.log('Gas estimate:', result.request.gas);
1402
+ * console.log('Would succeed:', result.result);
1403
+ */
1404
+ get simulate() {
1405
+ const contract = this.contract;
1406
+ if (!contract.simulate) {
1407
+ throw new Error('Public client is required for simulation');
1408
+ }
1409
+ return {
1410
+ /**
1411
+ * Simulate adminBurn
1412
+ * Returns gas estimate and result without sending transaction
1413
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1414
+ */
1415
+ async adminBurn(account, amount, options) {
1416
+ return contract.simulate.adminBurn([account, amount], options);
1417
+ },
1418
+ /**
1419
+ * Simulate adminMint
1420
+ * Returns gas estimate and result without sending transaction
1421
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1422
+ */
1423
+ async adminMint(account, amount, options) {
1424
+ return contract.simulate.adminMint([account, amount], options);
1425
+ },
1426
+ /**
1427
+ * Simulate adminTimelockTransfer
1428
+ * Returns gas estimate and result without sending transaction
1429
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1430
+ */
1431
+ async adminTimelockTransfer(account, periodInDays, options) {
1432
+ return contract.simulate.adminTimelockTransfer([account, periodInDays], options);
1433
+ },
1434
+ /**
1435
+ * Simulate approve
1436
+ * Returns gas estimate and result without sending transaction
1437
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1438
+ */
1439
+ async approve(spender, amount, options) {
1440
+ return contract.simulate.approve([spender, amount], options);
1441
+ },
1442
+ /**
1443
+ * Simulate burn
1444
+ * Returns gas estimate and result without sending transaction
1445
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1446
+ */
1447
+ async burn(amount, options) {
1448
+ return contract.simulate.burn([amount], options);
1449
+ },
1450
+ /**
1451
+ * Simulate burnFrom
1452
+ * Returns gas estimate and result without sending transaction
1453
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1454
+ */
1455
+ async burnFrom(account, amount, options) {
1456
+ return contract.simulate.burnFrom([account, amount], options);
1457
+ },
1458
+ /**
1459
+ * Simulate decreaseAllowance
1460
+ * Returns gas estimate and result without sending transaction
1461
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1462
+ */
1463
+ async decreaseAllowance(spender, subtractedValue, options) {
1464
+ return contract.simulate.decreaseAllowance([spender, subtractedValue], options);
1465
+ },
1466
+ /**
1467
+ * Simulate deregisterCallback
1468
+ * Returns gas estimate and result without sending transaction
1469
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1470
+ */
1471
+ async deregisterCallback(options) {
1472
+ return contract.simulate.deregisterCallback(options);
1473
+ },
1474
+ /**
1475
+ * Simulate distributeLockOldToken
1476
+ * Returns gas estimate and result without sending transaction
1477
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1478
+ */
1479
+ async distributeLockOldToken(receivers, options) {
1480
+ return contract.simulate.distributeLockOldToken([receivers], options);
1481
+ },
1482
+ /**
1483
+ * Simulate distributeMint
1484
+ * Returns gas estimate and result without sending transaction
1485
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1486
+ */
1487
+ async distributeMint(receivers, balances, options) {
1488
+ return contract.simulate.distributeMint([receivers, balances], options);
1489
+ },
1490
+ /**
1491
+ * Simulate finalFuncLock
1492
+ * Returns gas estimate and result without sending transaction
1493
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1494
+ */
1495
+ async finalFuncLock(lock, options) {
1496
+ return contract.simulate.finalFuncLock([lock], options);
1497
+ },
1498
+ /**
1499
+ * Simulate grantRole
1500
+ * Returns gas estimate and result without sending transaction
1501
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1502
+ */
1503
+ async grantRole(role, account, options) {
1504
+ return contract.simulate.grantRole([role, account], options);
1505
+ },
1506
+ /**
1507
+ * Simulate increaseAllowance
1508
+ * Returns gas estimate and result without sending transaction
1509
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1510
+ */
1511
+ async increaseAllowance(spender, addedValue, options) {
1512
+ return contract.simulate.increaseAllowance([spender, addedValue], options);
1513
+ },
1514
+ /**
1515
+ * Simulate registerCallback
1516
+ * Returns gas estimate and result without sending transaction
1517
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1518
+ */
1519
+ async registerCallback(callback, options) {
1520
+ return contract.simulate.registerCallback([callback], options);
1521
+ },
1522
+ /**
1523
+ * Simulate renounceRole
1524
+ * Returns gas estimate and result without sending transaction
1525
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1526
+ */
1527
+ async renounceRole(role, account, options) {
1528
+ return contract.simulate.renounceRole([role, account], options);
1529
+ },
1530
+ /**
1531
+ * Simulate retrieveTokens
1532
+ * Returns gas estimate and result without sending transaction
1533
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1534
+ */
1535
+ async retrieveTokens(to, anotherToken, options) {
1536
+ return contract.simulate.retrieveTokens([to, anotherToken], options);
1537
+ },
1538
+ /**
1539
+ * Simulate revokeRole
1540
+ * Returns gas estimate and result without sending transaction
1541
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1542
+ */
1543
+ async revokeRole(role, account, options) {
1544
+ return contract.simulate.revokeRole([role, account], options);
1545
+ },
1546
+ /**
1547
+ * Simulate setOldCOVToken
1548
+ * Returns gas estimate and result without sending transaction
1549
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1550
+ */
1551
+ async setOldCOVToken(oldCOVTokenAddress, options) {
1552
+ return contract.simulate.setOldCOVToken([oldCOVTokenAddress], options);
1553
+ },
1554
+ /**
1555
+ * Simulate setTempFuncLock
1556
+ * Returns gas estimate and result without sending transaction
1557
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1558
+ */
1559
+ async setTempFuncLock(lock, status, options) {
1560
+ return contract.simulate.setTempFuncLock([lock, status], options);
1561
+ },
1562
+ /**
1563
+ * Simulate transfer
1564
+ * Returns gas estimate and result without sending transaction
1565
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1566
+ */
1567
+ async transfer(recipient, amount, options) {
1568
+ return contract.simulate.transfer([recipient, amount], options);
1569
+ },
1570
+ /**
1571
+ * Simulate transferFrom
1572
+ * Returns gas estimate and result without sending transaction
1573
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1574
+ */
1575
+ async transferFrom(sender, recipient, amount, options) {
1576
+ return contract.simulate.transferFrom([sender, recipient, amount], options);
1577
+ }
1578
+ };
1579
+ }
1580
+ /**
1581
+ * Watch contract events
1582
+ *
1583
+ * @example
1584
+ * // Watch all Transfer events
1585
+ * const unwatch = contract.watch.Transfer((event) => {
1586
+ * console.log('Transfer:', event);
1587
+ * });
1588
+ *
1589
+ * // Stop watching
1590
+ * unwatch();
1591
+ */
1592
+ get watch() {
1593
+ return {
1594
+ /**
1595
+ * Watch Approval events
1596
+ * @param callback Function to call when event is emitted
1597
+ * @param filter Optional filter for indexed parameters
1598
+ * @returns Unwatch function to stop listening
1599
+ */
1600
+ Approval: (callback, filter) => {
1601
+ return this.publicClient.watchContractEvent({
1602
+ address: this.contractAddress,
1603
+ abi: exports.COVToken_jsonAbi,
1604
+ eventName: 'Approval',
1605
+ args: filter,
1606
+ onLogs: (logs) => {
1607
+ logs.forEach((log) => {
1608
+ callback(log.args);
1609
+ });
1610
+ },
1611
+ });
1612
+ },
1613
+ /**
1614
+ * Watch RoleAdminChanged events
1615
+ * @param callback Function to call when event is emitted
1616
+ * @param filter Optional filter for indexed parameters
1617
+ * @returns Unwatch function to stop listening
1618
+ */
1619
+ RoleAdminChanged: (callback, filter) => {
1620
+ return this.publicClient.watchContractEvent({
1621
+ address: this.contractAddress,
1622
+ abi: exports.COVToken_jsonAbi,
1623
+ eventName: 'RoleAdminChanged',
1624
+ args: filter,
1625
+ onLogs: (logs) => {
1626
+ logs.forEach((log) => {
1627
+ callback(log.args);
1628
+ });
1629
+ },
1630
+ });
1631
+ },
1632
+ /**
1633
+ * Watch RoleGranted events
1634
+ * @param callback Function to call when event is emitted
1635
+ * @param filter Optional filter for indexed parameters
1636
+ * @returns Unwatch function to stop listening
1637
+ */
1638
+ RoleGranted: (callback, filter) => {
1639
+ return this.publicClient.watchContractEvent({
1640
+ address: this.contractAddress,
1641
+ abi: exports.COVToken_jsonAbi,
1642
+ eventName: 'RoleGranted',
1643
+ args: filter,
1644
+ onLogs: (logs) => {
1645
+ logs.forEach((log) => {
1646
+ callback(log.args);
1647
+ });
1648
+ },
1649
+ });
1650
+ },
1651
+ /**
1652
+ * Watch RoleRevoked events
1653
+ * @param callback Function to call when event is emitted
1654
+ * @param filter Optional filter for indexed parameters
1655
+ * @returns Unwatch function to stop listening
1656
+ */
1657
+ RoleRevoked: (callback, filter) => {
1658
+ return this.publicClient.watchContractEvent({
1659
+ address: this.contractAddress,
1660
+ abi: exports.COVToken_jsonAbi,
1661
+ eventName: 'RoleRevoked',
1662
+ args: filter,
1663
+ onLogs: (logs) => {
1664
+ logs.forEach((log) => {
1665
+ callback(log.args);
1666
+ });
1667
+ },
1668
+ });
1669
+ },
1670
+ /**
1671
+ * Watch Transfer events
1672
+ * @param callback Function to call when event is emitted
1673
+ * @param filter Optional filter for indexed parameters
1674
+ * @returns Unwatch function to stop listening
1675
+ */
1676
+ Transfer: (callback, filter) => {
1677
+ return this.publicClient.watchContractEvent({
1678
+ address: this.contractAddress,
1679
+ abi: exports.COVToken_jsonAbi,
1680
+ eventName: 'Transfer',
1681
+ args: filter,
1682
+ onLogs: (logs) => {
1683
+ logs.forEach((log) => {
1684
+ callback(log.args);
1685
+ });
1686
+ },
1687
+ });
1688
+ }
1689
+ };
1690
+ }
1691
+ }
1692
+ exports.COVToken_json = COVToken_json;