@gitmyabi/cinusdc 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,3954 @@
1
+ import type { Abi, Address, PublicClient, WalletClient, GetContractReturnType } from 'viem';
2
+ import { getContract } from 'viem';
3
+
4
+
5
+ /**
6
+ * CometConfiguration.Configuration struct type
7
+ */
8
+ export type CometConfiguration_Configuration = {
9
+ governor: `0x${string}`;
10
+ pauseGuardian: `0x${string}`;
11
+ baseToken: `0x${string}`;
12
+ baseTokenPriceFeed: `0x${string}`;
13
+ extensionDelegate: `0x${string}`;
14
+ supplyKink: bigint;
15
+ supplyPerYearInterestRateSlopeLow: bigint;
16
+ supplyPerYearInterestRateSlopeHigh: bigint;
17
+ supplyPerYearInterestRateBase: bigint;
18
+ borrowKink: bigint;
19
+ borrowPerYearInterestRateSlopeLow: bigint;
20
+ borrowPerYearInterestRateSlopeHigh: bigint;
21
+ borrowPerYearInterestRateBase: bigint;
22
+ storeFrontPriceFactor: bigint;
23
+ trackingIndexScale: bigint;
24
+ baseTrackingSupplySpeed: bigint;
25
+ baseTrackingBorrowSpeed: bigint;
26
+ baseMinForRewards: bigint;
27
+ baseBorrowMin: bigint;
28
+ targetReserves: bigint;
29
+ assetConfigs: CometConfiguration_AssetConfig[];
30
+ };
31
+
32
+ /**
33
+ * CometConfiguration.AssetConfig struct type
34
+ */
35
+ export type CometConfiguration_AssetConfig = {
36
+ asset: `0x${string}`;
37
+ priceFeed: `0x${string}`;
38
+ decimals: bigint;
39
+ borrowCollateralFactor: bigint;
40
+ liquidateCollateralFactor: bigint;
41
+ liquidationFactor: bigint;
42
+ supplyCap: bigint;
43
+ };
44
+
45
+ /**
46
+ * CometCore.AssetInfo struct type
47
+ */
48
+ export type CometCore_AssetInfo = {
49
+ offset: bigint;
50
+ asset: `0x${string}`;
51
+ priceFeed: `0x${string}`;
52
+ scale: bigint;
53
+ borrowCollateralFactor: bigint;
54
+ liquidateCollateralFactor: bigint;
55
+ liquidationFactor: bigint;
56
+ supplyCap: bigint;
57
+ };
58
+ /**
59
+ * InstitutionalComet_json ABI
60
+ *
61
+ * This ABI is typed using viem's type system for full type safety.
62
+ */
63
+ export const InstitutionalComet_jsonAbi = [
64
+ {
65
+ "inputs": [
66
+ {
67
+ "components": [
68
+ {
69
+ "internalType": "address",
70
+ "name": "governor",
71
+ "type": "address"
72
+ },
73
+ {
74
+ "internalType": "address",
75
+ "name": "pauseGuardian",
76
+ "type": "address"
77
+ },
78
+ {
79
+ "internalType": "address",
80
+ "name": "baseToken",
81
+ "type": "address"
82
+ },
83
+ {
84
+ "internalType": "address",
85
+ "name": "baseTokenPriceFeed",
86
+ "type": "address"
87
+ },
88
+ {
89
+ "internalType": "address",
90
+ "name": "extensionDelegate",
91
+ "type": "address"
92
+ },
93
+ {
94
+ "internalType": "uint64",
95
+ "name": "supplyKink",
96
+ "type": "uint64"
97
+ },
98
+ {
99
+ "internalType": "uint64",
100
+ "name": "supplyPerYearInterestRateSlopeLow",
101
+ "type": "uint64"
102
+ },
103
+ {
104
+ "internalType": "uint64",
105
+ "name": "supplyPerYearInterestRateSlopeHigh",
106
+ "type": "uint64"
107
+ },
108
+ {
109
+ "internalType": "uint64",
110
+ "name": "supplyPerYearInterestRateBase",
111
+ "type": "uint64"
112
+ },
113
+ {
114
+ "internalType": "uint64",
115
+ "name": "borrowKink",
116
+ "type": "uint64"
117
+ },
118
+ {
119
+ "internalType": "uint64",
120
+ "name": "borrowPerYearInterestRateSlopeLow",
121
+ "type": "uint64"
122
+ },
123
+ {
124
+ "internalType": "uint64",
125
+ "name": "borrowPerYearInterestRateSlopeHigh",
126
+ "type": "uint64"
127
+ },
128
+ {
129
+ "internalType": "uint64",
130
+ "name": "borrowPerYearInterestRateBase",
131
+ "type": "uint64"
132
+ },
133
+ {
134
+ "internalType": "uint64",
135
+ "name": "storeFrontPriceFactor",
136
+ "type": "uint64"
137
+ },
138
+ {
139
+ "internalType": "uint64",
140
+ "name": "trackingIndexScale",
141
+ "type": "uint64"
142
+ },
143
+ {
144
+ "internalType": "uint64",
145
+ "name": "baseTrackingSupplySpeed",
146
+ "type": "uint64"
147
+ },
148
+ {
149
+ "internalType": "uint64",
150
+ "name": "baseTrackingBorrowSpeed",
151
+ "type": "uint64"
152
+ },
153
+ {
154
+ "internalType": "uint104",
155
+ "name": "baseMinForRewards",
156
+ "type": "uint104"
157
+ },
158
+ {
159
+ "internalType": "uint104",
160
+ "name": "baseBorrowMin",
161
+ "type": "uint104"
162
+ },
163
+ {
164
+ "internalType": "uint104",
165
+ "name": "targetReserves",
166
+ "type": "uint104"
167
+ },
168
+ {
169
+ "components": [
170
+ {
171
+ "internalType": "address",
172
+ "name": "asset",
173
+ "type": "address"
174
+ },
175
+ {
176
+ "internalType": "address",
177
+ "name": "priceFeed",
178
+ "type": "address"
179
+ },
180
+ {
181
+ "internalType": "uint8",
182
+ "name": "decimals",
183
+ "type": "uint8"
184
+ },
185
+ {
186
+ "internalType": "uint64",
187
+ "name": "borrowCollateralFactor",
188
+ "type": "uint64"
189
+ },
190
+ {
191
+ "internalType": "uint64",
192
+ "name": "liquidateCollateralFactor",
193
+ "type": "uint64"
194
+ },
195
+ {
196
+ "internalType": "uint64",
197
+ "name": "liquidationFactor",
198
+ "type": "uint64"
199
+ },
200
+ {
201
+ "internalType": "uint128",
202
+ "name": "supplyCap",
203
+ "type": "uint128"
204
+ }
205
+ ],
206
+ "internalType": "struct CometConfiguration.AssetConfig[]",
207
+ "name": "assetConfigs",
208
+ "type": "tuple[]"
209
+ }
210
+ ],
211
+ "internalType": "struct CometConfiguration.Configuration",
212
+ "name": "config",
213
+ "type": "tuple"
214
+ }
215
+ ],
216
+ "stateMutability": "nonpayable",
217
+ "type": "constructor"
218
+ },
219
+ {
220
+ "inputs": [],
221
+ "name": "Absurd",
222
+ "type": "error"
223
+ },
224
+ {
225
+ "inputs": [],
226
+ "name": "AlreadyInitialized",
227
+ "type": "error"
228
+ },
229
+ {
230
+ "inputs": [],
231
+ "name": "BadAsset",
232
+ "type": "error"
233
+ },
234
+ {
235
+ "inputs": [],
236
+ "name": "BadDecimals",
237
+ "type": "error"
238
+ },
239
+ {
240
+ "inputs": [],
241
+ "name": "BadDiscount",
242
+ "type": "error"
243
+ },
244
+ {
245
+ "inputs": [],
246
+ "name": "BadMinimum",
247
+ "type": "error"
248
+ },
249
+ {
250
+ "inputs": [],
251
+ "name": "BadPrice",
252
+ "type": "error"
253
+ },
254
+ {
255
+ "inputs": [],
256
+ "name": "BaseSupplyPaused",
257
+ "type": "error"
258
+ },
259
+ {
260
+ "inputs": [],
261
+ "name": "BorrowCFTooLarge",
262
+ "type": "error"
263
+ },
264
+ {
265
+ "inputs": [],
266
+ "name": "BorrowTooSmall",
267
+ "type": "error"
268
+ },
269
+ {
270
+ "inputs": [],
271
+ "name": "BorrowersTransferPaused",
272
+ "type": "error"
273
+ },
274
+ {
275
+ "inputs": [],
276
+ "name": "BorrowersWithdrawPaused",
277
+ "type": "error"
278
+ },
279
+ {
280
+ "inputs": [
281
+ {
282
+ "internalType": "uint24",
283
+ "name": "assetIndex",
284
+ "type": "uint24"
285
+ }
286
+ ],
287
+ "name": "CollateralAssetSupplyPaused",
288
+ "type": "error"
289
+ },
290
+ {
291
+ "inputs": [
292
+ {
293
+ "internalType": "uint24",
294
+ "name": "assetIndex",
295
+ "type": "uint24"
296
+ }
297
+ ],
298
+ "name": "CollateralAssetTransferPaused",
299
+ "type": "error"
300
+ },
301
+ {
302
+ "inputs": [
303
+ {
304
+ "internalType": "uint24",
305
+ "name": "assetIndex",
306
+ "type": "uint24"
307
+ }
308
+ ],
309
+ "name": "CollateralAssetWithdrawPaused",
310
+ "type": "error"
311
+ },
312
+ {
313
+ "inputs": [],
314
+ "name": "CollateralSupplyPaused",
315
+ "type": "error"
316
+ },
317
+ {
318
+ "inputs": [],
319
+ "name": "CollateralTransferPaused",
320
+ "type": "error"
321
+ },
322
+ {
323
+ "inputs": [],
324
+ "name": "CollateralWithdrawPaused",
325
+ "type": "error"
326
+ },
327
+ {
328
+ "inputs": [],
329
+ "name": "DeactivatedCollateralBorrowBlocked",
330
+ "type": "error"
331
+ },
332
+ {
333
+ "inputs": [],
334
+ "name": "DeactivatedCollateralTransferBlocked",
335
+ "type": "error"
336
+ },
337
+ {
338
+ "inputs": [],
339
+ "name": "ExceedsSupportedUtilization",
340
+ "type": "error"
341
+ },
342
+ {
343
+ "inputs": [],
344
+ "name": "InsufficientReserves",
345
+ "type": "error"
346
+ },
347
+ {
348
+ "inputs": [],
349
+ "name": "InvalidInt104",
350
+ "type": "error"
351
+ },
352
+ {
353
+ "inputs": [],
354
+ "name": "InvalidInt256",
355
+ "type": "error"
356
+ },
357
+ {
358
+ "inputs": [],
359
+ "name": "InvalidUInt104",
360
+ "type": "error"
361
+ },
362
+ {
363
+ "inputs": [],
364
+ "name": "InvalidUInt128",
365
+ "type": "error"
366
+ },
367
+ {
368
+ "inputs": [],
369
+ "name": "InvalidUInt64",
370
+ "type": "error"
371
+ },
372
+ {
373
+ "inputs": [],
374
+ "name": "LendersTransferPaused",
375
+ "type": "error"
376
+ },
377
+ {
378
+ "inputs": [],
379
+ "name": "LendersWithdrawPaused",
380
+ "type": "error"
381
+ },
382
+ {
383
+ "inputs": [],
384
+ "name": "LiqPenaltyTooHigh",
385
+ "type": "error"
386
+ },
387
+ {
388
+ "inputs": [],
389
+ "name": "LiquidateCFTooLarge",
390
+ "type": "error"
391
+ },
392
+ {
393
+ "inputs": [],
394
+ "name": "NegativeNumber",
395
+ "type": "error"
396
+ },
397
+ {
398
+ "inputs": [],
399
+ "name": "NoSelfTransfer",
400
+ "type": "error"
401
+ },
402
+ {
403
+ "inputs": [],
404
+ "name": "NotCollateralized",
405
+ "type": "error"
406
+ },
407
+ {
408
+ "inputs": [],
409
+ "name": "NotForSale",
410
+ "type": "error"
411
+ },
412
+ {
413
+ "inputs": [],
414
+ "name": "NotLiquidatable",
415
+ "type": "error"
416
+ },
417
+ {
418
+ "inputs": [],
419
+ "name": "Paused",
420
+ "type": "error"
421
+ },
422
+ {
423
+ "inputs": [],
424
+ "name": "ReentrantCallBlocked",
425
+ "type": "error"
426
+ },
427
+ {
428
+ "inputs": [],
429
+ "name": "SupplyCapExceeded",
430
+ "type": "error"
431
+ },
432
+ {
433
+ "inputs": [],
434
+ "name": "TimestampTooLarge",
435
+ "type": "error"
436
+ },
437
+ {
438
+ "inputs": [
439
+ {
440
+ "internalType": "address",
441
+ "name": "asset",
442
+ "type": "address"
443
+ }
444
+ ],
445
+ "name": "TokenIsDeactivated",
446
+ "type": "error"
447
+ },
448
+ {
449
+ "inputs": [],
450
+ "name": "TooManyAssets",
451
+ "type": "error"
452
+ },
453
+ {
454
+ "inputs": [],
455
+ "name": "TooMuchSlippage",
456
+ "type": "error"
457
+ },
458
+ {
459
+ "inputs": [],
460
+ "name": "TransferInFailed",
461
+ "type": "error"
462
+ },
463
+ {
464
+ "inputs": [],
465
+ "name": "TransferOutFailed",
466
+ "type": "error"
467
+ },
468
+ {
469
+ "inputs": [],
470
+ "name": "Unauthorized",
471
+ "type": "error"
472
+ },
473
+ {
474
+ "anonymous": false,
475
+ "inputs": [
476
+ {
477
+ "indexed": true,
478
+ "internalType": "address",
479
+ "name": "absorber",
480
+ "type": "address"
481
+ },
482
+ {
483
+ "indexed": true,
484
+ "internalType": "address",
485
+ "name": "borrower",
486
+ "type": "address"
487
+ },
488
+ {
489
+ "indexed": true,
490
+ "internalType": "address",
491
+ "name": "asset",
492
+ "type": "address"
493
+ },
494
+ {
495
+ "indexed": false,
496
+ "internalType": "uint256",
497
+ "name": "collateralAbsorbed",
498
+ "type": "uint256"
499
+ },
500
+ {
501
+ "indexed": false,
502
+ "internalType": "uint256",
503
+ "name": "usdValue",
504
+ "type": "uint256"
505
+ }
506
+ ],
507
+ "name": "AbsorbCollateral",
508
+ "type": "event"
509
+ },
510
+ {
511
+ "anonymous": false,
512
+ "inputs": [
513
+ {
514
+ "indexed": true,
515
+ "internalType": "address",
516
+ "name": "absorber",
517
+ "type": "address"
518
+ },
519
+ {
520
+ "indexed": true,
521
+ "internalType": "address",
522
+ "name": "borrower",
523
+ "type": "address"
524
+ },
525
+ {
526
+ "indexed": false,
527
+ "internalType": "uint256",
528
+ "name": "basePaidOut",
529
+ "type": "uint256"
530
+ },
531
+ {
532
+ "indexed": false,
533
+ "internalType": "uint256",
534
+ "name": "usdValue",
535
+ "type": "uint256"
536
+ }
537
+ ],
538
+ "name": "AbsorbDebt",
539
+ "type": "event"
540
+ },
541
+ {
542
+ "anonymous": false,
543
+ "inputs": [
544
+ {
545
+ "indexed": true,
546
+ "internalType": "address",
547
+ "name": "buyer",
548
+ "type": "address"
549
+ },
550
+ {
551
+ "indexed": true,
552
+ "internalType": "address",
553
+ "name": "asset",
554
+ "type": "address"
555
+ },
556
+ {
557
+ "indexed": false,
558
+ "internalType": "uint256",
559
+ "name": "baseAmount",
560
+ "type": "uint256"
561
+ },
562
+ {
563
+ "indexed": false,
564
+ "internalType": "uint256",
565
+ "name": "collateralAmount",
566
+ "type": "uint256"
567
+ }
568
+ ],
569
+ "name": "BuyCollateral",
570
+ "type": "event"
571
+ },
572
+ {
573
+ "anonymous": false,
574
+ "inputs": [
575
+ {
576
+ "indexed": false,
577
+ "internalType": "bool",
578
+ "name": "supplyPaused",
579
+ "type": "bool"
580
+ },
581
+ {
582
+ "indexed": false,
583
+ "internalType": "bool",
584
+ "name": "transferPaused",
585
+ "type": "bool"
586
+ },
587
+ {
588
+ "indexed": false,
589
+ "internalType": "bool",
590
+ "name": "withdrawPaused",
591
+ "type": "bool"
592
+ },
593
+ {
594
+ "indexed": false,
595
+ "internalType": "bool",
596
+ "name": "absorbPaused",
597
+ "type": "bool"
598
+ },
599
+ {
600
+ "indexed": false,
601
+ "internalType": "bool",
602
+ "name": "buyPaused",
603
+ "type": "bool"
604
+ }
605
+ ],
606
+ "name": "PauseAction",
607
+ "type": "event"
608
+ },
609
+ {
610
+ "anonymous": false,
611
+ "inputs": [
612
+ {
613
+ "indexed": true,
614
+ "internalType": "address",
615
+ "name": "from",
616
+ "type": "address"
617
+ },
618
+ {
619
+ "indexed": true,
620
+ "internalType": "address",
621
+ "name": "dst",
622
+ "type": "address"
623
+ },
624
+ {
625
+ "indexed": false,
626
+ "internalType": "uint256",
627
+ "name": "amount",
628
+ "type": "uint256"
629
+ }
630
+ ],
631
+ "name": "Supply",
632
+ "type": "event"
633
+ },
634
+ {
635
+ "anonymous": false,
636
+ "inputs": [
637
+ {
638
+ "indexed": true,
639
+ "internalType": "address",
640
+ "name": "from",
641
+ "type": "address"
642
+ },
643
+ {
644
+ "indexed": true,
645
+ "internalType": "address",
646
+ "name": "dst",
647
+ "type": "address"
648
+ },
649
+ {
650
+ "indexed": true,
651
+ "internalType": "address",
652
+ "name": "asset",
653
+ "type": "address"
654
+ },
655
+ {
656
+ "indexed": false,
657
+ "internalType": "uint256",
658
+ "name": "amount",
659
+ "type": "uint256"
660
+ }
661
+ ],
662
+ "name": "SupplyCollateral",
663
+ "type": "event"
664
+ },
665
+ {
666
+ "anonymous": false,
667
+ "inputs": [
668
+ {
669
+ "indexed": true,
670
+ "internalType": "address",
671
+ "name": "from",
672
+ "type": "address"
673
+ },
674
+ {
675
+ "indexed": true,
676
+ "internalType": "address",
677
+ "name": "to",
678
+ "type": "address"
679
+ },
680
+ {
681
+ "indexed": false,
682
+ "internalType": "uint256",
683
+ "name": "amount",
684
+ "type": "uint256"
685
+ }
686
+ ],
687
+ "name": "Transfer",
688
+ "type": "event"
689
+ },
690
+ {
691
+ "anonymous": false,
692
+ "inputs": [
693
+ {
694
+ "indexed": true,
695
+ "internalType": "address",
696
+ "name": "from",
697
+ "type": "address"
698
+ },
699
+ {
700
+ "indexed": true,
701
+ "internalType": "address",
702
+ "name": "to",
703
+ "type": "address"
704
+ },
705
+ {
706
+ "indexed": true,
707
+ "internalType": "address",
708
+ "name": "asset",
709
+ "type": "address"
710
+ },
711
+ {
712
+ "indexed": false,
713
+ "internalType": "uint256",
714
+ "name": "amount",
715
+ "type": "uint256"
716
+ }
717
+ ],
718
+ "name": "TransferCollateral",
719
+ "type": "event"
720
+ },
721
+ {
722
+ "anonymous": false,
723
+ "inputs": [
724
+ {
725
+ "indexed": true,
726
+ "internalType": "address",
727
+ "name": "src",
728
+ "type": "address"
729
+ },
730
+ {
731
+ "indexed": true,
732
+ "internalType": "address",
733
+ "name": "to",
734
+ "type": "address"
735
+ },
736
+ {
737
+ "indexed": false,
738
+ "internalType": "uint256",
739
+ "name": "amount",
740
+ "type": "uint256"
741
+ }
742
+ ],
743
+ "name": "Withdraw",
744
+ "type": "event"
745
+ },
746
+ {
747
+ "anonymous": false,
748
+ "inputs": [
749
+ {
750
+ "indexed": true,
751
+ "internalType": "address",
752
+ "name": "src",
753
+ "type": "address"
754
+ },
755
+ {
756
+ "indexed": true,
757
+ "internalType": "address",
758
+ "name": "to",
759
+ "type": "address"
760
+ },
761
+ {
762
+ "indexed": true,
763
+ "internalType": "address",
764
+ "name": "asset",
765
+ "type": "address"
766
+ },
767
+ {
768
+ "indexed": false,
769
+ "internalType": "uint256",
770
+ "name": "amount",
771
+ "type": "uint256"
772
+ }
773
+ ],
774
+ "name": "WithdrawCollateral",
775
+ "type": "event"
776
+ },
777
+ {
778
+ "anonymous": false,
779
+ "inputs": [
780
+ {
781
+ "indexed": true,
782
+ "internalType": "address",
783
+ "name": "to",
784
+ "type": "address"
785
+ },
786
+ {
787
+ "indexed": false,
788
+ "internalType": "uint256",
789
+ "name": "amount",
790
+ "type": "uint256"
791
+ }
792
+ ],
793
+ "name": "WithdrawReserves",
794
+ "type": "event"
795
+ },
796
+ {
797
+ "stateMutability": "payable",
798
+ "type": "fallback"
799
+ },
800
+ {
801
+ "inputs": [],
802
+ "name": "MAX_SUPPORTED_UTILIZATION",
803
+ "outputs": [
804
+ {
805
+ "internalType": "uint256",
806
+ "name": "",
807
+ "type": "uint256"
808
+ }
809
+ ],
810
+ "stateMutability": "view",
811
+ "type": "function"
812
+ },
813
+ {
814
+ "inputs": [
815
+ {
816
+ "internalType": "address",
817
+ "name": "absorber",
818
+ "type": "address"
819
+ },
820
+ {
821
+ "internalType": "address[]",
822
+ "name": "accounts",
823
+ "type": "address[]"
824
+ }
825
+ ],
826
+ "name": "absorb",
827
+ "outputs": [],
828
+ "stateMutability": "nonpayable",
829
+ "type": "function"
830
+ },
831
+ {
832
+ "inputs": [
833
+ {
834
+ "internalType": "address",
835
+ "name": "account",
836
+ "type": "address"
837
+ }
838
+ ],
839
+ "name": "accrueAccount",
840
+ "outputs": [],
841
+ "stateMutability": "nonpayable",
842
+ "type": "function"
843
+ },
844
+ {
845
+ "inputs": [
846
+ {
847
+ "internalType": "address",
848
+ "name": "manager",
849
+ "type": "address"
850
+ },
851
+ {
852
+ "internalType": "address",
853
+ "name": "asset",
854
+ "type": "address"
855
+ },
856
+ {
857
+ "internalType": "uint256",
858
+ "name": "amount",
859
+ "type": "uint256"
860
+ }
861
+ ],
862
+ "name": "approveThis",
863
+ "outputs": [],
864
+ "stateMutability": "nonpayable",
865
+ "type": "function"
866
+ },
867
+ {
868
+ "inputs": [],
869
+ "name": "assetList",
870
+ "outputs": [
871
+ {
872
+ "internalType": "address",
873
+ "name": "",
874
+ "type": "address"
875
+ }
876
+ ],
877
+ "stateMutability": "view",
878
+ "type": "function"
879
+ },
880
+ {
881
+ "inputs": [
882
+ {
883
+ "internalType": "address",
884
+ "name": "account",
885
+ "type": "address"
886
+ }
887
+ ],
888
+ "name": "balanceOf",
889
+ "outputs": [
890
+ {
891
+ "internalType": "uint256",
892
+ "name": "",
893
+ "type": "uint256"
894
+ }
895
+ ],
896
+ "stateMutability": "view",
897
+ "type": "function"
898
+ },
899
+ {
900
+ "inputs": [],
901
+ "name": "baseBorrowMin",
902
+ "outputs": [
903
+ {
904
+ "internalType": "uint256",
905
+ "name": "",
906
+ "type": "uint256"
907
+ }
908
+ ],
909
+ "stateMutability": "view",
910
+ "type": "function"
911
+ },
912
+ {
913
+ "inputs": [],
914
+ "name": "baseMinForRewards",
915
+ "outputs": [
916
+ {
917
+ "internalType": "uint256",
918
+ "name": "",
919
+ "type": "uint256"
920
+ }
921
+ ],
922
+ "stateMutability": "view",
923
+ "type": "function"
924
+ },
925
+ {
926
+ "inputs": [],
927
+ "name": "baseScale",
928
+ "outputs": [
929
+ {
930
+ "internalType": "uint256",
931
+ "name": "",
932
+ "type": "uint256"
933
+ }
934
+ ],
935
+ "stateMutability": "view",
936
+ "type": "function"
937
+ },
938
+ {
939
+ "inputs": [],
940
+ "name": "baseToken",
941
+ "outputs": [
942
+ {
943
+ "internalType": "address",
944
+ "name": "",
945
+ "type": "address"
946
+ }
947
+ ],
948
+ "stateMutability": "view",
949
+ "type": "function"
950
+ },
951
+ {
952
+ "inputs": [],
953
+ "name": "baseTokenPriceFeed",
954
+ "outputs": [
955
+ {
956
+ "internalType": "address",
957
+ "name": "",
958
+ "type": "address"
959
+ }
960
+ ],
961
+ "stateMutability": "view",
962
+ "type": "function"
963
+ },
964
+ {
965
+ "inputs": [],
966
+ "name": "baseTrackingBorrowSpeed",
967
+ "outputs": [
968
+ {
969
+ "internalType": "uint256",
970
+ "name": "",
971
+ "type": "uint256"
972
+ }
973
+ ],
974
+ "stateMutability": "view",
975
+ "type": "function"
976
+ },
977
+ {
978
+ "inputs": [],
979
+ "name": "baseTrackingSupplySpeed",
980
+ "outputs": [
981
+ {
982
+ "internalType": "uint256",
983
+ "name": "",
984
+ "type": "uint256"
985
+ }
986
+ ],
987
+ "stateMutability": "view",
988
+ "type": "function"
989
+ },
990
+ {
991
+ "inputs": [
992
+ {
993
+ "internalType": "address",
994
+ "name": "account",
995
+ "type": "address"
996
+ }
997
+ ],
998
+ "name": "borrowBalanceOf",
999
+ "outputs": [
1000
+ {
1001
+ "internalType": "uint256",
1002
+ "name": "",
1003
+ "type": "uint256"
1004
+ }
1005
+ ],
1006
+ "stateMutability": "view",
1007
+ "type": "function"
1008
+ },
1009
+ {
1010
+ "inputs": [],
1011
+ "name": "borrowKink",
1012
+ "outputs": [
1013
+ {
1014
+ "internalType": "uint256",
1015
+ "name": "",
1016
+ "type": "uint256"
1017
+ }
1018
+ ],
1019
+ "stateMutability": "view",
1020
+ "type": "function"
1021
+ },
1022
+ {
1023
+ "inputs": [],
1024
+ "name": "borrowPerSecondInterestRateBase",
1025
+ "outputs": [
1026
+ {
1027
+ "internalType": "uint256",
1028
+ "name": "",
1029
+ "type": "uint256"
1030
+ }
1031
+ ],
1032
+ "stateMutability": "view",
1033
+ "type": "function"
1034
+ },
1035
+ {
1036
+ "inputs": [],
1037
+ "name": "borrowPerSecondInterestRateSlopeHigh",
1038
+ "outputs": [
1039
+ {
1040
+ "internalType": "uint256",
1041
+ "name": "",
1042
+ "type": "uint256"
1043
+ }
1044
+ ],
1045
+ "stateMutability": "view",
1046
+ "type": "function"
1047
+ },
1048
+ {
1049
+ "inputs": [],
1050
+ "name": "borrowPerSecondInterestRateSlopeLow",
1051
+ "outputs": [
1052
+ {
1053
+ "internalType": "uint256",
1054
+ "name": "",
1055
+ "type": "uint256"
1056
+ }
1057
+ ],
1058
+ "stateMutability": "view",
1059
+ "type": "function"
1060
+ },
1061
+ {
1062
+ "inputs": [
1063
+ {
1064
+ "internalType": "address",
1065
+ "name": "asset",
1066
+ "type": "address"
1067
+ },
1068
+ {
1069
+ "internalType": "uint256",
1070
+ "name": "minAmount",
1071
+ "type": "uint256"
1072
+ },
1073
+ {
1074
+ "internalType": "uint256",
1075
+ "name": "baseAmount",
1076
+ "type": "uint256"
1077
+ },
1078
+ {
1079
+ "internalType": "address",
1080
+ "name": "recipient",
1081
+ "type": "address"
1082
+ }
1083
+ ],
1084
+ "name": "buyCollateral",
1085
+ "outputs": [],
1086
+ "stateMutability": "nonpayable",
1087
+ "type": "function"
1088
+ },
1089
+ {
1090
+ "inputs": [],
1091
+ "name": "collateralsSupplyPauseFlags",
1092
+ "outputs": [
1093
+ {
1094
+ "internalType": "uint24",
1095
+ "name": "",
1096
+ "type": "uint24"
1097
+ }
1098
+ ],
1099
+ "stateMutability": "view",
1100
+ "type": "function"
1101
+ },
1102
+ {
1103
+ "inputs": [],
1104
+ "name": "collateralsTransferPauseFlags",
1105
+ "outputs": [
1106
+ {
1107
+ "internalType": "uint24",
1108
+ "name": "",
1109
+ "type": "uint24"
1110
+ }
1111
+ ],
1112
+ "stateMutability": "view",
1113
+ "type": "function"
1114
+ },
1115
+ {
1116
+ "inputs": [],
1117
+ "name": "collateralsWithdrawPauseFlags",
1118
+ "outputs": [
1119
+ {
1120
+ "internalType": "uint24",
1121
+ "name": "",
1122
+ "type": "uint24"
1123
+ }
1124
+ ],
1125
+ "stateMutability": "view",
1126
+ "type": "function"
1127
+ },
1128
+ {
1129
+ "inputs": [],
1130
+ "name": "deactivatedCollaterals",
1131
+ "outputs": [
1132
+ {
1133
+ "internalType": "uint24",
1134
+ "name": "",
1135
+ "type": "uint24"
1136
+ }
1137
+ ],
1138
+ "stateMutability": "view",
1139
+ "type": "function"
1140
+ },
1141
+ {
1142
+ "inputs": [],
1143
+ "name": "decimals",
1144
+ "outputs": [
1145
+ {
1146
+ "internalType": "uint8",
1147
+ "name": "",
1148
+ "type": "uint8"
1149
+ }
1150
+ ],
1151
+ "stateMutability": "view",
1152
+ "type": "function"
1153
+ },
1154
+ {
1155
+ "inputs": [],
1156
+ "name": "extendedPauseFlags",
1157
+ "outputs": [
1158
+ {
1159
+ "internalType": "uint24",
1160
+ "name": "",
1161
+ "type": "uint24"
1162
+ }
1163
+ ],
1164
+ "stateMutability": "view",
1165
+ "type": "function"
1166
+ },
1167
+ {
1168
+ "inputs": [],
1169
+ "name": "extensionDelegate",
1170
+ "outputs": [
1171
+ {
1172
+ "internalType": "address",
1173
+ "name": "",
1174
+ "type": "address"
1175
+ }
1176
+ ],
1177
+ "stateMutability": "view",
1178
+ "type": "function"
1179
+ },
1180
+ {
1181
+ "inputs": [
1182
+ {
1183
+ "internalType": "uint8",
1184
+ "name": "i",
1185
+ "type": "uint8"
1186
+ }
1187
+ ],
1188
+ "name": "getAssetInfo",
1189
+ "outputs": [
1190
+ {
1191
+ "components": [
1192
+ {
1193
+ "internalType": "uint8",
1194
+ "name": "offset",
1195
+ "type": "uint8"
1196
+ },
1197
+ {
1198
+ "internalType": "address",
1199
+ "name": "asset",
1200
+ "type": "address"
1201
+ },
1202
+ {
1203
+ "internalType": "address",
1204
+ "name": "priceFeed",
1205
+ "type": "address"
1206
+ },
1207
+ {
1208
+ "internalType": "uint64",
1209
+ "name": "scale",
1210
+ "type": "uint64"
1211
+ },
1212
+ {
1213
+ "internalType": "uint64",
1214
+ "name": "borrowCollateralFactor",
1215
+ "type": "uint64"
1216
+ },
1217
+ {
1218
+ "internalType": "uint64",
1219
+ "name": "liquidateCollateralFactor",
1220
+ "type": "uint64"
1221
+ },
1222
+ {
1223
+ "internalType": "uint64",
1224
+ "name": "liquidationFactor",
1225
+ "type": "uint64"
1226
+ },
1227
+ {
1228
+ "internalType": "uint128",
1229
+ "name": "supplyCap",
1230
+ "type": "uint128"
1231
+ }
1232
+ ],
1233
+ "internalType": "struct CometCore.AssetInfo",
1234
+ "name": "",
1235
+ "type": "tuple"
1236
+ }
1237
+ ],
1238
+ "stateMutability": "view",
1239
+ "type": "function"
1240
+ },
1241
+ {
1242
+ "inputs": [
1243
+ {
1244
+ "internalType": "address",
1245
+ "name": "asset",
1246
+ "type": "address"
1247
+ }
1248
+ ],
1249
+ "name": "getAssetInfoByAddress",
1250
+ "outputs": [
1251
+ {
1252
+ "components": [
1253
+ {
1254
+ "internalType": "uint8",
1255
+ "name": "offset",
1256
+ "type": "uint8"
1257
+ },
1258
+ {
1259
+ "internalType": "address",
1260
+ "name": "asset",
1261
+ "type": "address"
1262
+ },
1263
+ {
1264
+ "internalType": "address",
1265
+ "name": "priceFeed",
1266
+ "type": "address"
1267
+ },
1268
+ {
1269
+ "internalType": "uint64",
1270
+ "name": "scale",
1271
+ "type": "uint64"
1272
+ },
1273
+ {
1274
+ "internalType": "uint64",
1275
+ "name": "borrowCollateralFactor",
1276
+ "type": "uint64"
1277
+ },
1278
+ {
1279
+ "internalType": "uint64",
1280
+ "name": "liquidateCollateralFactor",
1281
+ "type": "uint64"
1282
+ },
1283
+ {
1284
+ "internalType": "uint64",
1285
+ "name": "liquidationFactor",
1286
+ "type": "uint64"
1287
+ },
1288
+ {
1289
+ "internalType": "uint128",
1290
+ "name": "supplyCap",
1291
+ "type": "uint128"
1292
+ }
1293
+ ],
1294
+ "internalType": "struct CometCore.AssetInfo",
1295
+ "name": "",
1296
+ "type": "tuple"
1297
+ }
1298
+ ],
1299
+ "stateMutability": "view",
1300
+ "type": "function"
1301
+ },
1302
+ {
1303
+ "inputs": [
1304
+ {
1305
+ "internalType": "uint256",
1306
+ "name": "utilization",
1307
+ "type": "uint256"
1308
+ }
1309
+ ],
1310
+ "name": "getBorrowRate",
1311
+ "outputs": [
1312
+ {
1313
+ "internalType": "uint64",
1314
+ "name": "",
1315
+ "type": "uint64"
1316
+ }
1317
+ ],
1318
+ "stateMutability": "view",
1319
+ "type": "function"
1320
+ },
1321
+ {
1322
+ "inputs": [
1323
+ {
1324
+ "internalType": "address",
1325
+ "name": "asset",
1326
+ "type": "address"
1327
+ }
1328
+ ],
1329
+ "name": "getCollateralReserves",
1330
+ "outputs": [
1331
+ {
1332
+ "internalType": "uint256",
1333
+ "name": "",
1334
+ "type": "uint256"
1335
+ }
1336
+ ],
1337
+ "stateMutability": "view",
1338
+ "type": "function"
1339
+ },
1340
+ {
1341
+ "inputs": [
1342
+ {
1343
+ "internalType": "address",
1344
+ "name": "priceFeed",
1345
+ "type": "address"
1346
+ }
1347
+ ],
1348
+ "name": "getPrice",
1349
+ "outputs": [
1350
+ {
1351
+ "internalType": "uint256",
1352
+ "name": "",
1353
+ "type": "uint256"
1354
+ }
1355
+ ],
1356
+ "stateMutability": "view",
1357
+ "type": "function"
1358
+ },
1359
+ {
1360
+ "inputs": [],
1361
+ "name": "getReserves",
1362
+ "outputs": [
1363
+ {
1364
+ "internalType": "int256",
1365
+ "name": "",
1366
+ "type": "int256"
1367
+ }
1368
+ ],
1369
+ "stateMutability": "view",
1370
+ "type": "function"
1371
+ },
1372
+ {
1373
+ "inputs": [
1374
+ {
1375
+ "internalType": "uint256",
1376
+ "name": "utilization",
1377
+ "type": "uint256"
1378
+ }
1379
+ ],
1380
+ "name": "getSupplyRate",
1381
+ "outputs": [
1382
+ {
1383
+ "internalType": "uint64",
1384
+ "name": "",
1385
+ "type": "uint64"
1386
+ }
1387
+ ],
1388
+ "stateMutability": "view",
1389
+ "type": "function"
1390
+ },
1391
+ {
1392
+ "inputs": [],
1393
+ "name": "getUtilization",
1394
+ "outputs": [
1395
+ {
1396
+ "internalType": "uint256",
1397
+ "name": "",
1398
+ "type": "uint256"
1399
+ }
1400
+ ],
1401
+ "stateMutability": "view",
1402
+ "type": "function"
1403
+ },
1404
+ {
1405
+ "inputs": [],
1406
+ "name": "governor",
1407
+ "outputs": [
1408
+ {
1409
+ "internalType": "address",
1410
+ "name": "",
1411
+ "type": "address"
1412
+ }
1413
+ ],
1414
+ "stateMutability": "view",
1415
+ "type": "function"
1416
+ },
1417
+ {
1418
+ "inputs": [
1419
+ {
1420
+ "internalType": "address",
1421
+ "name": "owner",
1422
+ "type": "address"
1423
+ },
1424
+ {
1425
+ "internalType": "address",
1426
+ "name": "manager",
1427
+ "type": "address"
1428
+ }
1429
+ ],
1430
+ "name": "hasPermission",
1431
+ "outputs": [
1432
+ {
1433
+ "internalType": "bool",
1434
+ "name": "",
1435
+ "type": "bool"
1436
+ }
1437
+ ],
1438
+ "stateMutability": "view",
1439
+ "type": "function"
1440
+ },
1441
+ {
1442
+ "inputs": [],
1443
+ "name": "initializeStorage",
1444
+ "outputs": [],
1445
+ "stateMutability": "nonpayable",
1446
+ "type": "function"
1447
+ },
1448
+ {
1449
+ "inputs": [],
1450
+ "name": "isAbsorbPaused",
1451
+ "outputs": [
1452
+ {
1453
+ "internalType": "bool",
1454
+ "name": "",
1455
+ "type": "bool"
1456
+ }
1457
+ ],
1458
+ "stateMutability": "view",
1459
+ "type": "function"
1460
+ },
1461
+ {
1462
+ "inputs": [
1463
+ {
1464
+ "internalType": "address",
1465
+ "name": "",
1466
+ "type": "address"
1467
+ },
1468
+ {
1469
+ "internalType": "address",
1470
+ "name": "",
1471
+ "type": "address"
1472
+ }
1473
+ ],
1474
+ "name": "isAllowed",
1475
+ "outputs": [
1476
+ {
1477
+ "internalType": "bool",
1478
+ "name": "",
1479
+ "type": "bool"
1480
+ }
1481
+ ],
1482
+ "stateMutability": "view",
1483
+ "type": "function"
1484
+ },
1485
+ {
1486
+ "inputs": [],
1487
+ "name": "isBaseSupplyPaused",
1488
+ "outputs": [
1489
+ {
1490
+ "internalType": "bool",
1491
+ "name": "",
1492
+ "type": "bool"
1493
+ }
1494
+ ],
1495
+ "stateMutability": "view",
1496
+ "type": "function"
1497
+ },
1498
+ {
1499
+ "inputs": [
1500
+ {
1501
+ "internalType": "address",
1502
+ "name": "account",
1503
+ "type": "address"
1504
+ }
1505
+ ],
1506
+ "name": "isBorrowCollateralized",
1507
+ "outputs": [
1508
+ {
1509
+ "internalType": "bool",
1510
+ "name": "",
1511
+ "type": "bool"
1512
+ }
1513
+ ],
1514
+ "stateMutability": "view",
1515
+ "type": "function"
1516
+ },
1517
+ {
1518
+ "inputs": [],
1519
+ "name": "isBorrowersTransferPaused",
1520
+ "outputs": [
1521
+ {
1522
+ "internalType": "bool",
1523
+ "name": "",
1524
+ "type": "bool"
1525
+ }
1526
+ ],
1527
+ "stateMutability": "view",
1528
+ "type": "function"
1529
+ },
1530
+ {
1531
+ "inputs": [],
1532
+ "name": "isBorrowersWithdrawPaused",
1533
+ "outputs": [
1534
+ {
1535
+ "internalType": "bool",
1536
+ "name": "",
1537
+ "type": "bool"
1538
+ }
1539
+ ],
1540
+ "stateMutability": "view",
1541
+ "type": "function"
1542
+ },
1543
+ {
1544
+ "inputs": [],
1545
+ "name": "isBuyPaused",
1546
+ "outputs": [
1547
+ {
1548
+ "internalType": "bool",
1549
+ "name": "",
1550
+ "type": "bool"
1551
+ }
1552
+ ],
1553
+ "stateMutability": "view",
1554
+ "type": "function"
1555
+ },
1556
+ {
1557
+ "inputs": [
1558
+ {
1559
+ "internalType": "uint24",
1560
+ "name": "assetIndex",
1561
+ "type": "uint24"
1562
+ }
1563
+ ],
1564
+ "name": "isCollateralAssetSupplyPaused",
1565
+ "outputs": [
1566
+ {
1567
+ "internalType": "bool",
1568
+ "name": "",
1569
+ "type": "bool"
1570
+ }
1571
+ ],
1572
+ "stateMutability": "view",
1573
+ "type": "function"
1574
+ },
1575
+ {
1576
+ "inputs": [
1577
+ {
1578
+ "internalType": "uint24",
1579
+ "name": "assetIndex",
1580
+ "type": "uint24"
1581
+ }
1582
+ ],
1583
+ "name": "isCollateralAssetTransferPaused",
1584
+ "outputs": [
1585
+ {
1586
+ "internalType": "bool",
1587
+ "name": "",
1588
+ "type": "bool"
1589
+ }
1590
+ ],
1591
+ "stateMutability": "view",
1592
+ "type": "function"
1593
+ },
1594
+ {
1595
+ "inputs": [
1596
+ {
1597
+ "internalType": "uint24",
1598
+ "name": "assetIndex",
1599
+ "type": "uint24"
1600
+ }
1601
+ ],
1602
+ "name": "isCollateralAssetWithdrawPaused",
1603
+ "outputs": [
1604
+ {
1605
+ "internalType": "bool",
1606
+ "name": "",
1607
+ "type": "bool"
1608
+ }
1609
+ ],
1610
+ "stateMutability": "view",
1611
+ "type": "function"
1612
+ },
1613
+ {
1614
+ "inputs": [
1615
+ {
1616
+ "internalType": "uint24",
1617
+ "name": "assetIndex",
1618
+ "type": "uint24"
1619
+ }
1620
+ ],
1621
+ "name": "isCollateralDeactivated",
1622
+ "outputs": [
1623
+ {
1624
+ "internalType": "bool",
1625
+ "name": "",
1626
+ "type": "bool"
1627
+ }
1628
+ ],
1629
+ "stateMutability": "view",
1630
+ "type": "function"
1631
+ },
1632
+ {
1633
+ "inputs": [],
1634
+ "name": "isCollateralSupplyPaused",
1635
+ "outputs": [
1636
+ {
1637
+ "internalType": "bool",
1638
+ "name": "",
1639
+ "type": "bool"
1640
+ }
1641
+ ],
1642
+ "stateMutability": "view",
1643
+ "type": "function"
1644
+ },
1645
+ {
1646
+ "inputs": [],
1647
+ "name": "isCollateralTransferPaused",
1648
+ "outputs": [
1649
+ {
1650
+ "internalType": "bool",
1651
+ "name": "",
1652
+ "type": "bool"
1653
+ }
1654
+ ],
1655
+ "stateMutability": "view",
1656
+ "type": "function"
1657
+ },
1658
+ {
1659
+ "inputs": [],
1660
+ "name": "isCollateralWithdrawPaused",
1661
+ "outputs": [
1662
+ {
1663
+ "internalType": "bool",
1664
+ "name": "",
1665
+ "type": "bool"
1666
+ }
1667
+ ],
1668
+ "stateMutability": "view",
1669
+ "type": "function"
1670
+ },
1671
+ {
1672
+ "inputs": [],
1673
+ "name": "isLendersTransferPaused",
1674
+ "outputs": [
1675
+ {
1676
+ "internalType": "bool",
1677
+ "name": "",
1678
+ "type": "bool"
1679
+ }
1680
+ ],
1681
+ "stateMutability": "view",
1682
+ "type": "function"
1683
+ },
1684
+ {
1685
+ "inputs": [],
1686
+ "name": "isLendersWithdrawPaused",
1687
+ "outputs": [
1688
+ {
1689
+ "internalType": "bool",
1690
+ "name": "",
1691
+ "type": "bool"
1692
+ }
1693
+ ],
1694
+ "stateMutability": "view",
1695
+ "type": "function"
1696
+ },
1697
+ {
1698
+ "inputs": [
1699
+ {
1700
+ "internalType": "address",
1701
+ "name": "account",
1702
+ "type": "address"
1703
+ }
1704
+ ],
1705
+ "name": "isLiquidatable",
1706
+ "outputs": [
1707
+ {
1708
+ "internalType": "bool",
1709
+ "name": "",
1710
+ "type": "bool"
1711
+ }
1712
+ ],
1713
+ "stateMutability": "view",
1714
+ "type": "function"
1715
+ },
1716
+ {
1717
+ "inputs": [],
1718
+ "name": "isSupplyPaused",
1719
+ "outputs": [
1720
+ {
1721
+ "internalType": "bool",
1722
+ "name": "",
1723
+ "type": "bool"
1724
+ }
1725
+ ],
1726
+ "stateMutability": "view",
1727
+ "type": "function"
1728
+ },
1729
+ {
1730
+ "inputs": [],
1731
+ "name": "isTransferPaused",
1732
+ "outputs": [
1733
+ {
1734
+ "internalType": "bool",
1735
+ "name": "",
1736
+ "type": "bool"
1737
+ }
1738
+ ],
1739
+ "stateMutability": "view",
1740
+ "type": "function"
1741
+ },
1742
+ {
1743
+ "inputs": [],
1744
+ "name": "isWithdrawPaused",
1745
+ "outputs": [
1746
+ {
1747
+ "internalType": "bool",
1748
+ "name": "",
1749
+ "type": "bool"
1750
+ }
1751
+ ],
1752
+ "stateMutability": "view",
1753
+ "type": "function"
1754
+ },
1755
+ {
1756
+ "inputs": [
1757
+ {
1758
+ "internalType": "address",
1759
+ "name": "",
1760
+ "type": "address"
1761
+ }
1762
+ ],
1763
+ "name": "liquidatorPoints",
1764
+ "outputs": [
1765
+ {
1766
+ "internalType": "uint32",
1767
+ "name": "numAbsorbs",
1768
+ "type": "uint32"
1769
+ },
1770
+ {
1771
+ "internalType": "uint64",
1772
+ "name": "numAbsorbed",
1773
+ "type": "uint64"
1774
+ },
1775
+ {
1776
+ "internalType": "uint128",
1777
+ "name": "approxSpend",
1778
+ "type": "uint128"
1779
+ },
1780
+ {
1781
+ "internalType": "uint32",
1782
+ "name": "_reserved",
1783
+ "type": "uint32"
1784
+ }
1785
+ ],
1786
+ "stateMutability": "view",
1787
+ "type": "function"
1788
+ },
1789
+ {
1790
+ "inputs": [],
1791
+ "name": "numAssets",
1792
+ "outputs": [
1793
+ {
1794
+ "internalType": "uint8",
1795
+ "name": "",
1796
+ "type": "uint8"
1797
+ }
1798
+ ],
1799
+ "stateMutability": "view",
1800
+ "type": "function"
1801
+ },
1802
+ {
1803
+ "inputs": [
1804
+ {
1805
+ "internalType": "bool",
1806
+ "name": "supplyPaused",
1807
+ "type": "bool"
1808
+ },
1809
+ {
1810
+ "internalType": "bool",
1811
+ "name": "transferPaused",
1812
+ "type": "bool"
1813
+ },
1814
+ {
1815
+ "internalType": "bool",
1816
+ "name": "withdrawPaused",
1817
+ "type": "bool"
1818
+ },
1819
+ {
1820
+ "internalType": "bool",
1821
+ "name": "absorbPaused",
1822
+ "type": "bool"
1823
+ },
1824
+ {
1825
+ "internalType": "bool",
1826
+ "name": "buyPaused",
1827
+ "type": "bool"
1828
+ }
1829
+ ],
1830
+ "name": "pause",
1831
+ "outputs": [],
1832
+ "stateMutability": "nonpayable",
1833
+ "type": "function"
1834
+ },
1835
+ {
1836
+ "inputs": [],
1837
+ "name": "pauseGuardian",
1838
+ "outputs": [
1839
+ {
1840
+ "internalType": "address",
1841
+ "name": "",
1842
+ "type": "address"
1843
+ }
1844
+ ],
1845
+ "stateMutability": "view",
1846
+ "type": "function"
1847
+ },
1848
+ {
1849
+ "inputs": [
1850
+ {
1851
+ "internalType": "address",
1852
+ "name": "asset",
1853
+ "type": "address"
1854
+ },
1855
+ {
1856
+ "internalType": "uint256",
1857
+ "name": "baseAmount",
1858
+ "type": "uint256"
1859
+ }
1860
+ ],
1861
+ "name": "quoteCollateral",
1862
+ "outputs": [
1863
+ {
1864
+ "internalType": "uint256",
1865
+ "name": "",
1866
+ "type": "uint256"
1867
+ }
1868
+ ],
1869
+ "stateMutability": "view",
1870
+ "type": "function"
1871
+ },
1872
+ {
1873
+ "inputs": [],
1874
+ "name": "storeFrontPriceFactor",
1875
+ "outputs": [
1876
+ {
1877
+ "internalType": "uint256",
1878
+ "name": "",
1879
+ "type": "uint256"
1880
+ }
1881
+ ],
1882
+ "stateMutability": "view",
1883
+ "type": "function"
1884
+ },
1885
+ {
1886
+ "inputs": [
1887
+ {
1888
+ "internalType": "address",
1889
+ "name": "asset",
1890
+ "type": "address"
1891
+ },
1892
+ {
1893
+ "internalType": "uint256",
1894
+ "name": "amount",
1895
+ "type": "uint256"
1896
+ }
1897
+ ],
1898
+ "name": "supply",
1899
+ "outputs": [],
1900
+ "stateMutability": "nonpayable",
1901
+ "type": "function"
1902
+ },
1903
+ {
1904
+ "inputs": [
1905
+ {
1906
+ "internalType": "address",
1907
+ "name": "from",
1908
+ "type": "address"
1909
+ },
1910
+ {
1911
+ "internalType": "address",
1912
+ "name": "dst",
1913
+ "type": "address"
1914
+ },
1915
+ {
1916
+ "internalType": "address",
1917
+ "name": "asset",
1918
+ "type": "address"
1919
+ },
1920
+ {
1921
+ "internalType": "uint256",
1922
+ "name": "amount",
1923
+ "type": "uint256"
1924
+ }
1925
+ ],
1926
+ "name": "supplyFrom",
1927
+ "outputs": [],
1928
+ "stateMutability": "nonpayable",
1929
+ "type": "function"
1930
+ },
1931
+ {
1932
+ "inputs": [],
1933
+ "name": "supplyKink",
1934
+ "outputs": [
1935
+ {
1936
+ "internalType": "uint256",
1937
+ "name": "",
1938
+ "type": "uint256"
1939
+ }
1940
+ ],
1941
+ "stateMutability": "view",
1942
+ "type": "function"
1943
+ },
1944
+ {
1945
+ "inputs": [],
1946
+ "name": "supplyPerSecondInterestRateBase",
1947
+ "outputs": [
1948
+ {
1949
+ "internalType": "uint256",
1950
+ "name": "",
1951
+ "type": "uint256"
1952
+ }
1953
+ ],
1954
+ "stateMutability": "view",
1955
+ "type": "function"
1956
+ },
1957
+ {
1958
+ "inputs": [],
1959
+ "name": "supplyPerSecondInterestRateSlopeHigh",
1960
+ "outputs": [
1961
+ {
1962
+ "internalType": "uint256",
1963
+ "name": "",
1964
+ "type": "uint256"
1965
+ }
1966
+ ],
1967
+ "stateMutability": "view",
1968
+ "type": "function"
1969
+ },
1970
+ {
1971
+ "inputs": [],
1972
+ "name": "supplyPerSecondInterestRateSlopeLow",
1973
+ "outputs": [
1974
+ {
1975
+ "internalType": "uint256",
1976
+ "name": "",
1977
+ "type": "uint256"
1978
+ }
1979
+ ],
1980
+ "stateMutability": "view",
1981
+ "type": "function"
1982
+ },
1983
+ {
1984
+ "inputs": [
1985
+ {
1986
+ "internalType": "address",
1987
+ "name": "dst",
1988
+ "type": "address"
1989
+ },
1990
+ {
1991
+ "internalType": "address",
1992
+ "name": "asset",
1993
+ "type": "address"
1994
+ },
1995
+ {
1996
+ "internalType": "uint256",
1997
+ "name": "amount",
1998
+ "type": "uint256"
1999
+ }
2000
+ ],
2001
+ "name": "supplyTo",
2002
+ "outputs": [],
2003
+ "stateMutability": "nonpayable",
2004
+ "type": "function"
2005
+ },
2006
+ {
2007
+ "inputs": [],
2008
+ "name": "targetReserves",
2009
+ "outputs": [
2010
+ {
2011
+ "internalType": "uint256",
2012
+ "name": "",
2013
+ "type": "uint256"
2014
+ }
2015
+ ],
2016
+ "stateMutability": "view",
2017
+ "type": "function"
2018
+ },
2019
+ {
2020
+ "inputs": [],
2021
+ "name": "totalBorrow",
2022
+ "outputs": [
2023
+ {
2024
+ "internalType": "uint256",
2025
+ "name": "",
2026
+ "type": "uint256"
2027
+ }
2028
+ ],
2029
+ "stateMutability": "view",
2030
+ "type": "function"
2031
+ },
2032
+ {
2033
+ "inputs": [],
2034
+ "name": "totalSupply",
2035
+ "outputs": [
2036
+ {
2037
+ "internalType": "uint256",
2038
+ "name": "",
2039
+ "type": "uint256"
2040
+ }
2041
+ ],
2042
+ "stateMutability": "view",
2043
+ "type": "function"
2044
+ },
2045
+ {
2046
+ "inputs": [
2047
+ {
2048
+ "internalType": "address",
2049
+ "name": "",
2050
+ "type": "address"
2051
+ }
2052
+ ],
2053
+ "name": "totalsCollateral",
2054
+ "outputs": [
2055
+ {
2056
+ "internalType": "uint128",
2057
+ "name": "totalSupplyAsset",
2058
+ "type": "uint128"
2059
+ },
2060
+ {
2061
+ "internalType": "uint128",
2062
+ "name": "_reserved",
2063
+ "type": "uint128"
2064
+ }
2065
+ ],
2066
+ "stateMutability": "view",
2067
+ "type": "function"
2068
+ },
2069
+ {
2070
+ "inputs": [],
2071
+ "name": "trackingIndexScale",
2072
+ "outputs": [
2073
+ {
2074
+ "internalType": "uint256",
2075
+ "name": "",
2076
+ "type": "uint256"
2077
+ }
2078
+ ],
2079
+ "stateMutability": "view",
2080
+ "type": "function"
2081
+ },
2082
+ {
2083
+ "inputs": [
2084
+ {
2085
+ "internalType": "address",
2086
+ "name": "dst",
2087
+ "type": "address"
2088
+ },
2089
+ {
2090
+ "internalType": "uint256",
2091
+ "name": "amount",
2092
+ "type": "uint256"
2093
+ }
2094
+ ],
2095
+ "name": "transfer",
2096
+ "outputs": [
2097
+ {
2098
+ "internalType": "bool",
2099
+ "name": "",
2100
+ "type": "bool"
2101
+ }
2102
+ ],
2103
+ "stateMutability": "nonpayable",
2104
+ "type": "function"
2105
+ },
2106
+ {
2107
+ "inputs": [
2108
+ {
2109
+ "internalType": "address",
2110
+ "name": "dst",
2111
+ "type": "address"
2112
+ },
2113
+ {
2114
+ "internalType": "address",
2115
+ "name": "asset",
2116
+ "type": "address"
2117
+ },
2118
+ {
2119
+ "internalType": "uint256",
2120
+ "name": "amount",
2121
+ "type": "uint256"
2122
+ }
2123
+ ],
2124
+ "name": "transferAsset",
2125
+ "outputs": [],
2126
+ "stateMutability": "nonpayable",
2127
+ "type": "function"
2128
+ },
2129
+ {
2130
+ "inputs": [
2131
+ {
2132
+ "internalType": "address",
2133
+ "name": "src",
2134
+ "type": "address"
2135
+ },
2136
+ {
2137
+ "internalType": "address",
2138
+ "name": "dst",
2139
+ "type": "address"
2140
+ },
2141
+ {
2142
+ "internalType": "address",
2143
+ "name": "asset",
2144
+ "type": "address"
2145
+ },
2146
+ {
2147
+ "internalType": "uint256",
2148
+ "name": "amount",
2149
+ "type": "uint256"
2150
+ }
2151
+ ],
2152
+ "name": "transferAssetFrom",
2153
+ "outputs": [],
2154
+ "stateMutability": "nonpayable",
2155
+ "type": "function"
2156
+ },
2157
+ {
2158
+ "inputs": [
2159
+ {
2160
+ "internalType": "address",
2161
+ "name": "src",
2162
+ "type": "address"
2163
+ },
2164
+ {
2165
+ "internalType": "address",
2166
+ "name": "dst",
2167
+ "type": "address"
2168
+ },
2169
+ {
2170
+ "internalType": "uint256",
2171
+ "name": "amount",
2172
+ "type": "uint256"
2173
+ }
2174
+ ],
2175
+ "name": "transferFrom",
2176
+ "outputs": [
2177
+ {
2178
+ "internalType": "bool",
2179
+ "name": "",
2180
+ "type": "bool"
2181
+ }
2182
+ ],
2183
+ "stateMutability": "nonpayable",
2184
+ "type": "function"
2185
+ },
2186
+ {
2187
+ "inputs": [
2188
+ {
2189
+ "internalType": "address",
2190
+ "name": "",
2191
+ "type": "address"
2192
+ }
2193
+ ],
2194
+ "name": "userBasic",
2195
+ "outputs": [
2196
+ {
2197
+ "internalType": "int104",
2198
+ "name": "principal",
2199
+ "type": "int104"
2200
+ },
2201
+ {
2202
+ "internalType": "uint64",
2203
+ "name": "baseTrackingIndex",
2204
+ "type": "uint64"
2205
+ },
2206
+ {
2207
+ "internalType": "uint64",
2208
+ "name": "baseTrackingAccrued",
2209
+ "type": "uint64"
2210
+ },
2211
+ {
2212
+ "internalType": "uint16",
2213
+ "name": "assetsIn",
2214
+ "type": "uint16"
2215
+ },
2216
+ {
2217
+ "internalType": "uint8",
2218
+ "name": "_reserved",
2219
+ "type": "uint8"
2220
+ }
2221
+ ],
2222
+ "stateMutability": "view",
2223
+ "type": "function"
2224
+ },
2225
+ {
2226
+ "inputs": [
2227
+ {
2228
+ "internalType": "address",
2229
+ "name": "",
2230
+ "type": "address"
2231
+ },
2232
+ {
2233
+ "internalType": "address",
2234
+ "name": "",
2235
+ "type": "address"
2236
+ }
2237
+ ],
2238
+ "name": "userCollateral",
2239
+ "outputs": [
2240
+ {
2241
+ "internalType": "uint128",
2242
+ "name": "balance",
2243
+ "type": "uint128"
2244
+ },
2245
+ {
2246
+ "internalType": "uint128",
2247
+ "name": "_reserved",
2248
+ "type": "uint128"
2249
+ }
2250
+ ],
2251
+ "stateMutability": "view",
2252
+ "type": "function"
2253
+ },
2254
+ {
2255
+ "inputs": [
2256
+ {
2257
+ "internalType": "address",
2258
+ "name": "",
2259
+ "type": "address"
2260
+ }
2261
+ ],
2262
+ "name": "userNonce",
2263
+ "outputs": [
2264
+ {
2265
+ "internalType": "uint256",
2266
+ "name": "",
2267
+ "type": "uint256"
2268
+ }
2269
+ ],
2270
+ "stateMutability": "view",
2271
+ "type": "function"
2272
+ },
2273
+ {
2274
+ "inputs": [
2275
+ {
2276
+ "internalType": "address",
2277
+ "name": "asset",
2278
+ "type": "address"
2279
+ },
2280
+ {
2281
+ "internalType": "uint256",
2282
+ "name": "amount",
2283
+ "type": "uint256"
2284
+ }
2285
+ ],
2286
+ "name": "withdraw",
2287
+ "outputs": [],
2288
+ "stateMutability": "nonpayable",
2289
+ "type": "function"
2290
+ },
2291
+ {
2292
+ "inputs": [
2293
+ {
2294
+ "internalType": "address",
2295
+ "name": "src",
2296
+ "type": "address"
2297
+ },
2298
+ {
2299
+ "internalType": "address",
2300
+ "name": "to",
2301
+ "type": "address"
2302
+ },
2303
+ {
2304
+ "internalType": "address",
2305
+ "name": "asset",
2306
+ "type": "address"
2307
+ },
2308
+ {
2309
+ "internalType": "uint256",
2310
+ "name": "amount",
2311
+ "type": "uint256"
2312
+ }
2313
+ ],
2314
+ "name": "withdrawFrom",
2315
+ "outputs": [],
2316
+ "stateMutability": "nonpayable",
2317
+ "type": "function"
2318
+ },
2319
+ {
2320
+ "inputs": [
2321
+ {
2322
+ "internalType": "address",
2323
+ "name": "to",
2324
+ "type": "address"
2325
+ },
2326
+ {
2327
+ "internalType": "uint256",
2328
+ "name": "amount",
2329
+ "type": "uint256"
2330
+ }
2331
+ ],
2332
+ "name": "withdrawReserves",
2333
+ "outputs": [],
2334
+ "stateMutability": "nonpayable",
2335
+ "type": "function"
2336
+ },
2337
+ {
2338
+ "inputs": [
2339
+ {
2340
+ "internalType": "address",
2341
+ "name": "to",
2342
+ "type": "address"
2343
+ },
2344
+ {
2345
+ "internalType": "address",
2346
+ "name": "asset",
2347
+ "type": "address"
2348
+ },
2349
+ {
2350
+ "internalType": "uint256",
2351
+ "name": "amount",
2352
+ "type": "uint256"
2353
+ }
2354
+ ],
2355
+ "name": "withdrawTo",
2356
+ "outputs": [],
2357
+ "stateMutability": "nonpayable",
2358
+ "type": "function"
2359
+ }
2360
+ ] as const satisfies Abi;
2361
+
2362
+ /**
2363
+ * Type-safe ABI for InstitutionalComet_json
2364
+ */
2365
+ export type InstitutionalComet_jsonAbi = typeof InstitutionalComet_jsonAbi;
2366
+
2367
+ /**
2368
+ * Contract instance type for InstitutionalComet_json
2369
+ */
2370
+ // Use any for contract type to avoid complex viem type issues
2371
+ // The runtime behavior is type-safe through viem's ABI typing
2372
+ export type InstitutionalComet_jsonContract = any;
2373
+
2374
+ /**
2375
+ * InstitutionalComet_json Contract Class
2376
+ *
2377
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
2378
+ *
2379
+ * @example
2380
+ * ```typescript
2381
+ * import { createPublicClient, createWalletClient, http } from 'viem';
2382
+ * import { mainnet } from 'viem/chains';
2383
+ * import { InstitutionalComet_json } from 'InstitutionalComet_json';
2384
+ *
2385
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
2386
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
2387
+ *
2388
+ * const contract = new InstitutionalComet_json('0x...', { publicClient, walletClient });
2389
+ *
2390
+ * // Read functions
2391
+ * const result = await contract.balanceOf('0x...');
2392
+ *
2393
+ * // Write functions
2394
+ * const hash = await contract.transfer('0x...', 1000n);
2395
+ *
2396
+ * // Simulate transactions (dry-run)
2397
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
2398
+ * console.log('Gas estimate:', simulation.request.gas);
2399
+ *
2400
+ * // Watch events
2401
+ * const unwatch = contract.watch.Transfer((event) => {
2402
+ * console.log('Transfer event:', event);
2403
+ * });
2404
+ * ```
2405
+ */
2406
+ export class InstitutionalComet_json {
2407
+ private contract: InstitutionalComet_jsonContract;
2408
+ private contractAddress: Address;
2409
+ private publicClient: PublicClient;
2410
+
2411
+ constructor(
2412
+ address: Address,
2413
+ clients: {
2414
+ publicClient: PublicClient;
2415
+ walletClient?: WalletClient;
2416
+ }
2417
+ ) {
2418
+ this.contractAddress = address;
2419
+ this.publicClient = clients.publicClient;
2420
+ this.contract = getContract({
2421
+ address,
2422
+ abi: InstitutionalComet_jsonAbi,
2423
+ client: {
2424
+ public: clients.publicClient,
2425
+ wallet: clients.walletClient,
2426
+ },
2427
+ });
2428
+ }
2429
+
2430
+ /**
2431
+ * Get the contract address
2432
+ */
2433
+ get address(): Address {
2434
+ return this.contractAddress;
2435
+ }
2436
+
2437
+ /**
2438
+ * Get the underlying viem contract instance
2439
+ */
2440
+ getContract(): InstitutionalComet_jsonContract {
2441
+ return this.contract;
2442
+ }
2443
+
2444
+ /**
2445
+ * MAX_SUPPORTED_UTILIZATION
2446
+ * view
2447
+ */
2448
+ async MAX_SUPPORTED_UTILIZATION(): Promise<bigint> {
2449
+ return this.contract.read.MAX_SUPPORTED_UTILIZATION() as Promise<bigint>;
2450
+ }
2451
+
2452
+ /**
2453
+ * assetList
2454
+ * view
2455
+ */
2456
+ async assetList(): Promise<`0x${string}`> {
2457
+ return this.contract.read.assetList() as Promise<`0x${string}`>;
2458
+ }
2459
+
2460
+ /**
2461
+ * balanceOf
2462
+ * view
2463
+ */
2464
+ async balanceOf(account: `0x${string}`): Promise<bigint> {
2465
+ return this.contract.read.balanceOf([account] as const) as Promise<bigint>;
2466
+ }
2467
+
2468
+ /**
2469
+ * baseBorrowMin
2470
+ * view
2471
+ */
2472
+ async baseBorrowMin(): Promise<bigint> {
2473
+ return this.contract.read.baseBorrowMin() as Promise<bigint>;
2474
+ }
2475
+
2476
+ /**
2477
+ * baseMinForRewards
2478
+ * view
2479
+ */
2480
+ async baseMinForRewards(): Promise<bigint> {
2481
+ return this.contract.read.baseMinForRewards() as Promise<bigint>;
2482
+ }
2483
+
2484
+ /**
2485
+ * baseScale
2486
+ * view
2487
+ */
2488
+ async baseScale(): Promise<bigint> {
2489
+ return this.contract.read.baseScale() as Promise<bigint>;
2490
+ }
2491
+
2492
+ /**
2493
+ * baseToken
2494
+ * view
2495
+ */
2496
+ async baseToken(): Promise<`0x${string}`> {
2497
+ return this.contract.read.baseToken() as Promise<`0x${string}`>;
2498
+ }
2499
+
2500
+ /**
2501
+ * baseTokenPriceFeed
2502
+ * view
2503
+ */
2504
+ async baseTokenPriceFeed(): Promise<`0x${string}`> {
2505
+ return this.contract.read.baseTokenPriceFeed() as Promise<`0x${string}`>;
2506
+ }
2507
+
2508
+ /**
2509
+ * baseTrackingBorrowSpeed
2510
+ * view
2511
+ */
2512
+ async baseTrackingBorrowSpeed(): Promise<bigint> {
2513
+ return this.contract.read.baseTrackingBorrowSpeed() as Promise<bigint>;
2514
+ }
2515
+
2516
+ /**
2517
+ * baseTrackingSupplySpeed
2518
+ * view
2519
+ */
2520
+ async baseTrackingSupplySpeed(): Promise<bigint> {
2521
+ return this.contract.read.baseTrackingSupplySpeed() as Promise<bigint>;
2522
+ }
2523
+
2524
+ /**
2525
+ * borrowBalanceOf
2526
+ * view
2527
+ */
2528
+ async borrowBalanceOf(account: `0x${string}`): Promise<bigint> {
2529
+ return this.contract.read.borrowBalanceOf([account] as const) as Promise<bigint>;
2530
+ }
2531
+
2532
+ /**
2533
+ * borrowKink
2534
+ * view
2535
+ */
2536
+ async borrowKink(): Promise<bigint> {
2537
+ return this.contract.read.borrowKink() as Promise<bigint>;
2538
+ }
2539
+
2540
+ /**
2541
+ * borrowPerSecondInterestRateBase
2542
+ * view
2543
+ */
2544
+ async borrowPerSecondInterestRateBase(): Promise<bigint> {
2545
+ return this.contract.read.borrowPerSecondInterestRateBase() as Promise<bigint>;
2546
+ }
2547
+
2548
+ /**
2549
+ * borrowPerSecondInterestRateSlopeHigh
2550
+ * view
2551
+ */
2552
+ async borrowPerSecondInterestRateSlopeHigh(): Promise<bigint> {
2553
+ return this.contract.read.borrowPerSecondInterestRateSlopeHigh() as Promise<bigint>;
2554
+ }
2555
+
2556
+ /**
2557
+ * borrowPerSecondInterestRateSlopeLow
2558
+ * view
2559
+ */
2560
+ async borrowPerSecondInterestRateSlopeLow(): Promise<bigint> {
2561
+ return this.contract.read.borrowPerSecondInterestRateSlopeLow() as Promise<bigint>;
2562
+ }
2563
+
2564
+ /**
2565
+ * collateralsSupplyPauseFlags
2566
+ * view
2567
+ */
2568
+ async collateralsSupplyPauseFlags(): Promise<bigint> {
2569
+ return this.contract.read.collateralsSupplyPauseFlags() as Promise<bigint>;
2570
+ }
2571
+
2572
+ /**
2573
+ * collateralsTransferPauseFlags
2574
+ * view
2575
+ */
2576
+ async collateralsTransferPauseFlags(): Promise<bigint> {
2577
+ return this.contract.read.collateralsTransferPauseFlags() as Promise<bigint>;
2578
+ }
2579
+
2580
+ /**
2581
+ * collateralsWithdrawPauseFlags
2582
+ * view
2583
+ */
2584
+ async collateralsWithdrawPauseFlags(): Promise<bigint> {
2585
+ return this.contract.read.collateralsWithdrawPauseFlags() as Promise<bigint>;
2586
+ }
2587
+
2588
+ /**
2589
+ * deactivatedCollaterals
2590
+ * view
2591
+ */
2592
+ async deactivatedCollaterals(): Promise<bigint> {
2593
+ return this.contract.read.deactivatedCollaterals() as Promise<bigint>;
2594
+ }
2595
+
2596
+ /**
2597
+ * decimals
2598
+ * view
2599
+ */
2600
+ async decimals(): Promise<bigint> {
2601
+ return this.contract.read.decimals() as Promise<bigint>;
2602
+ }
2603
+
2604
+ /**
2605
+ * extendedPauseFlags
2606
+ * view
2607
+ */
2608
+ async extendedPauseFlags(): Promise<bigint> {
2609
+ return this.contract.read.extendedPauseFlags() as Promise<bigint>;
2610
+ }
2611
+
2612
+ /**
2613
+ * extensionDelegate
2614
+ * view
2615
+ */
2616
+ async extensionDelegate(): Promise<`0x${string}`> {
2617
+ return this.contract.read.extensionDelegate() as Promise<`0x${string}`>;
2618
+ }
2619
+
2620
+ /**
2621
+ * getAssetInfo
2622
+ * view
2623
+ */
2624
+ async getAssetInfo(i: bigint): Promise<CometCore_AssetInfo> {
2625
+ return this.contract.read.getAssetInfo([i] as const) as Promise<CometCore_AssetInfo>;
2626
+ }
2627
+
2628
+ /**
2629
+ * getAssetInfoByAddress
2630
+ * view
2631
+ */
2632
+ async getAssetInfoByAddress(asset: `0x${string}`): Promise<CometCore_AssetInfo> {
2633
+ return this.contract.read.getAssetInfoByAddress([asset] as const) as Promise<CometCore_AssetInfo>;
2634
+ }
2635
+
2636
+ /**
2637
+ * getBorrowRate
2638
+ * view
2639
+ */
2640
+ async getBorrowRate(utilization: bigint): Promise<bigint> {
2641
+ return this.contract.read.getBorrowRate([utilization] as const) as Promise<bigint>;
2642
+ }
2643
+
2644
+ /**
2645
+ * getCollateralReserves
2646
+ * view
2647
+ */
2648
+ async getCollateralReserves(asset: `0x${string}`): Promise<bigint> {
2649
+ return this.contract.read.getCollateralReserves([asset] as const) as Promise<bigint>;
2650
+ }
2651
+
2652
+ /**
2653
+ * getPrice
2654
+ * view
2655
+ */
2656
+ async getPrice(priceFeed: `0x${string}`): Promise<bigint> {
2657
+ return this.contract.read.getPrice([priceFeed] as const) as Promise<bigint>;
2658
+ }
2659
+
2660
+ /**
2661
+ * getReserves
2662
+ * view
2663
+ */
2664
+ async getReserves(): Promise<bigint> {
2665
+ return this.contract.read.getReserves() as Promise<bigint>;
2666
+ }
2667
+
2668
+ /**
2669
+ * getSupplyRate
2670
+ * view
2671
+ */
2672
+ async getSupplyRate(utilization: bigint): Promise<bigint> {
2673
+ return this.contract.read.getSupplyRate([utilization] as const) as Promise<bigint>;
2674
+ }
2675
+
2676
+ /**
2677
+ * getUtilization
2678
+ * view
2679
+ */
2680
+ async getUtilization(): Promise<bigint> {
2681
+ return this.contract.read.getUtilization() as Promise<bigint>;
2682
+ }
2683
+
2684
+ /**
2685
+ * governor
2686
+ * view
2687
+ */
2688
+ async governor(): Promise<`0x${string}`> {
2689
+ return this.contract.read.governor() as Promise<`0x${string}`>;
2690
+ }
2691
+
2692
+ /**
2693
+ * hasPermission
2694
+ * view
2695
+ */
2696
+ async hasPermission(owner: `0x${string}`, manager: `0x${string}`): Promise<boolean> {
2697
+ return this.contract.read.hasPermission([owner, manager] as const) as Promise<boolean>;
2698
+ }
2699
+
2700
+ /**
2701
+ * isAbsorbPaused
2702
+ * view
2703
+ */
2704
+ async isAbsorbPaused(): Promise<boolean> {
2705
+ return this.contract.read.isAbsorbPaused() as Promise<boolean>;
2706
+ }
2707
+
2708
+ /**
2709
+ * isAllowed
2710
+ * view
2711
+ */
2712
+ async isAllowed(arg0: `0x${string}`, arg1: `0x${string}`): Promise<boolean> {
2713
+ return this.contract.read.isAllowed([arg0, arg1] as const) as Promise<boolean>;
2714
+ }
2715
+
2716
+ /**
2717
+ * isBaseSupplyPaused
2718
+ * view
2719
+ */
2720
+ async isBaseSupplyPaused(): Promise<boolean> {
2721
+ return this.contract.read.isBaseSupplyPaused() as Promise<boolean>;
2722
+ }
2723
+
2724
+ /**
2725
+ * isBorrowCollateralized
2726
+ * view
2727
+ */
2728
+ async isBorrowCollateralized(account: `0x${string}`): Promise<boolean> {
2729
+ return this.contract.read.isBorrowCollateralized([account] as const) as Promise<boolean>;
2730
+ }
2731
+
2732
+ /**
2733
+ * isBorrowersTransferPaused
2734
+ * view
2735
+ */
2736
+ async isBorrowersTransferPaused(): Promise<boolean> {
2737
+ return this.contract.read.isBorrowersTransferPaused() as Promise<boolean>;
2738
+ }
2739
+
2740
+ /**
2741
+ * isBorrowersWithdrawPaused
2742
+ * view
2743
+ */
2744
+ async isBorrowersWithdrawPaused(): Promise<boolean> {
2745
+ return this.contract.read.isBorrowersWithdrawPaused() as Promise<boolean>;
2746
+ }
2747
+
2748
+ /**
2749
+ * isBuyPaused
2750
+ * view
2751
+ */
2752
+ async isBuyPaused(): Promise<boolean> {
2753
+ return this.contract.read.isBuyPaused() as Promise<boolean>;
2754
+ }
2755
+
2756
+ /**
2757
+ * isCollateralAssetSupplyPaused
2758
+ * view
2759
+ */
2760
+ async isCollateralAssetSupplyPaused(assetIndex: bigint): Promise<boolean> {
2761
+ return this.contract.read.isCollateralAssetSupplyPaused([assetIndex] as const) as Promise<boolean>;
2762
+ }
2763
+
2764
+ /**
2765
+ * isCollateralAssetTransferPaused
2766
+ * view
2767
+ */
2768
+ async isCollateralAssetTransferPaused(assetIndex: bigint): Promise<boolean> {
2769
+ return this.contract.read.isCollateralAssetTransferPaused([assetIndex] as const) as Promise<boolean>;
2770
+ }
2771
+
2772
+ /**
2773
+ * isCollateralAssetWithdrawPaused
2774
+ * view
2775
+ */
2776
+ async isCollateralAssetWithdrawPaused(assetIndex: bigint): Promise<boolean> {
2777
+ return this.contract.read.isCollateralAssetWithdrawPaused([assetIndex] as const) as Promise<boolean>;
2778
+ }
2779
+
2780
+ /**
2781
+ * isCollateralDeactivated
2782
+ * view
2783
+ */
2784
+ async isCollateralDeactivated(assetIndex: bigint): Promise<boolean> {
2785
+ return this.contract.read.isCollateralDeactivated([assetIndex] as const) as Promise<boolean>;
2786
+ }
2787
+
2788
+ /**
2789
+ * isCollateralSupplyPaused
2790
+ * view
2791
+ */
2792
+ async isCollateralSupplyPaused(): Promise<boolean> {
2793
+ return this.contract.read.isCollateralSupplyPaused() as Promise<boolean>;
2794
+ }
2795
+
2796
+ /**
2797
+ * isCollateralTransferPaused
2798
+ * view
2799
+ */
2800
+ async isCollateralTransferPaused(): Promise<boolean> {
2801
+ return this.contract.read.isCollateralTransferPaused() as Promise<boolean>;
2802
+ }
2803
+
2804
+ /**
2805
+ * isCollateralWithdrawPaused
2806
+ * view
2807
+ */
2808
+ async isCollateralWithdrawPaused(): Promise<boolean> {
2809
+ return this.contract.read.isCollateralWithdrawPaused() as Promise<boolean>;
2810
+ }
2811
+
2812
+ /**
2813
+ * isLendersTransferPaused
2814
+ * view
2815
+ */
2816
+ async isLendersTransferPaused(): Promise<boolean> {
2817
+ return this.contract.read.isLendersTransferPaused() as Promise<boolean>;
2818
+ }
2819
+
2820
+ /**
2821
+ * isLendersWithdrawPaused
2822
+ * view
2823
+ */
2824
+ async isLendersWithdrawPaused(): Promise<boolean> {
2825
+ return this.contract.read.isLendersWithdrawPaused() as Promise<boolean>;
2826
+ }
2827
+
2828
+ /**
2829
+ * isLiquidatable
2830
+ * view
2831
+ */
2832
+ async isLiquidatable(account: `0x${string}`): Promise<boolean> {
2833
+ return this.contract.read.isLiquidatable([account] as const) as Promise<boolean>;
2834
+ }
2835
+
2836
+ /**
2837
+ * isSupplyPaused
2838
+ * view
2839
+ */
2840
+ async isSupplyPaused(): Promise<boolean> {
2841
+ return this.contract.read.isSupplyPaused() as Promise<boolean>;
2842
+ }
2843
+
2844
+ /**
2845
+ * isTransferPaused
2846
+ * view
2847
+ */
2848
+ async isTransferPaused(): Promise<boolean> {
2849
+ return this.contract.read.isTransferPaused() as Promise<boolean>;
2850
+ }
2851
+
2852
+ /**
2853
+ * isWithdrawPaused
2854
+ * view
2855
+ */
2856
+ async isWithdrawPaused(): Promise<boolean> {
2857
+ return this.contract.read.isWithdrawPaused() as Promise<boolean>;
2858
+ }
2859
+
2860
+ /**
2861
+ * liquidatorPoints
2862
+ * view
2863
+ */
2864
+ async liquidatorPoints(arg0: `0x${string}`): Promise<[bigint, bigint, bigint, bigint]> {
2865
+ return this.contract.read.liquidatorPoints([arg0] as const) as Promise<[bigint, bigint, bigint, bigint]>;
2866
+ }
2867
+
2868
+ /**
2869
+ * numAssets
2870
+ * view
2871
+ */
2872
+ async numAssets(): Promise<bigint> {
2873
+ return this.contract.read.numAssets() as Promise<bigint>;
2874
+ }
2875
+
2876
+ /**
2877
+ * pauseGuardian
2878
+ * view
2879
+ */
2880
+ async pauseGuardian(): Promise<`0x${string}`> {
2881
+ return this.contract.read.pauseGuardian() as Promise<`0x${string}`>;
2882
+ }
2883
+
2884
+ /**
2885
+ * quoteCollateral
2886
+ * view
2887
+ */
2888
+ async quoteCollateral(asset: `0x${string}`, baseAmount: bigint): Promise<bigint> {
2889
+ return this.contract.read.quoteCollateral([asset, baseAmount] as const) as Promise<bigint>;
2890
+ }
2891
+
2892
+ /**
2893
+ * storeFrontPriceFactor
2894
+ * view
2895
+ */
2896
+ async storeFrontPriceFactor(): Promise<bigint> {
2897
+ return this.contract.read.storeFrontPriceFactor() as Promise<bigint>;
2898
+ }
2899
+
2900
+ /**
2901
+ * supplyKink
2902
+ * view
2903
+ */
2904
+ async supplyKink(): Promise<bigint> {
2905
+ return this.contract.read.supplyKink() as Promise<bigint>;
2906
+ }
2907
+
2908
+ /**
2909
+ * supplyPerSecondInterestRateBase
2910
+ * view
2911
+ */
2912
+ async supplyPerSecondInterestRateBase(): Promise<bigint> {
2913
+ return this.contract.read.supplyPerSecondInterestRateBase() as Promise<bigint>;
2914
+ }
2915
+
2916
+ /**
2917
+ * supplyPerSecondInterestRateSlopeHigh
2918
+ * view
2919
+ */
2920
+ async supplyPerSecondInterestRateSlopeHigh(): Promise<bigint> {
2921
+ return this.contract.read.supplyPerSecondInterestRateSlopeHigh() as Promise<bigint>;
2922
+ }
2923
+
2924
+ /**
2925
+ * supplyPerSecondInterestRateSlopeLow
2926
+ * view
2927
+ */
2928
+ async supplyPerSecondInterestRateSlopeLow(): Promise<bigint> {
2929
+ return this.contract.read.supplyPerSecondInterestRateSlopeLow() as Promise<bigint>;
2930
+ }
2931
+
2932
+ /**
2933
+ * targetReserves
2934
+ * view
2935
+ */
2936
+ async targetReserves(): Promise<bigint> {
2937
+ return this.contract.read.targetReserves() as Promise<bigint>;
2938
+ }
2939
+
2940
+ /**
2941
+ * totalBorrow
2942
+ * view
2943
+ */
2944
+ async totalBorrow(): Promise<bigint> {
2945
+ return this.contract.read.totalBorrow() as Promise<bigint>;
2946
+ }
2947
+
2948
+ /**
2949
+ * totalSupply
2950
+ * view
2951
+ */
2952
+ async totalSupply(): Promise<bigint> {
2953
+ return this.contract.read.totalSupply() as Promise<bigint>;
2954
+ }
2955
+
2956
+ /**
2957
+ * totalsCollateral
2958
+ * view
2959
+ */
2960
+ async totalsCollateral(arg0: `0x${string}`): Promise<[bigint, bigint]> {
2961
+ return this.contract.read.totalsCollateral([arg0] as const) as Promise<[bigint, bigint]>;
2962
+ }
2963
+
2964
+ /**
2965
+ * trackingIndexScale
2966
+ * view
2967
+ */
2968
+ async trackingIndexScale(): Promise<bigint> {
2969
+ return this.contract.read.trackingIndexScale() as Promise<bigint>;
2970
+ }
2971
+
2972
+ /**
2973
+ * userBasic
2974
+ * view
2975
+ */
2976
+ async userBasic(arg0: `0x${string}`): Promise<[bigint, bigint, bigint, bigint, bigint]> {
2977
+ return this.contract.read.userBasic([arg0] as const) as Promise<[bigint, bigint, bigint, bigint, bigint]>;
2978
+ }
2979
+
2980
+ /**
2981
+ * userCollateral
2982
+ * view
2983
+ */
2984
+ async userCollateral(arg0: `0x${string}`, arg1: `0x${string}`): Promise<[bigint, bigint]> {
2985
+ return this.contract.read.userCollateral([arg0, arg1] as const) as Promise<[bigint, bigint]>;
2986
+ }
2987
+
2988
+ /**
2989
+ * userNonce
2990
+ * view
2991
+ */
2992
+ async userNonce(arg0: `0x${string}`): Promise<bigint> {
2993
+ return this.contract.read.userNonce([arg0] as const) as Promise<bigint>;
2994
+ }
2995
+
2996
+ /**
2997
+ * absorb
2998
+ * nonpayable
2999
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3000
+ */
3001
+ async absorb(absorber: `0x${string}`, accounts: `0x${string}`[], options?: {
3002
+ accessList?: import('viem').AccessList;
3003
+ authorizationList?: import('viem').AuthorizationList;
3004
+ chain?: import('viem').Chain | null;
3005
+ dataSuffix?: `0x${string}`;
3006
+ gas?: bigint;
3007
+ gasPrice?: bigint;
3008
+ maxFeePerGas?: bigint;
3009
+ maxPriorityFeePerGas?: bigint;
3010
+ nonce?: number;
3011
+ value?: bigint;
3012
+ }): Promise<`0x${string}`> {
3013
+ if (!this.contract.write) {
3014
+ throw new Error('Wallet client is required for write operations');
3015
+ }
3016
+ return this.contract.write.absorb([absorber, accounts] as const, options) as Promise<`0x${string}`>;
3017
+ }
3018
+
3019
+ /**
3020
+ * accrueAccount
3021
+ * nonpayable
3022
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3023
+ */
3024
+ async accrueAccount(account: `0x${string}`, options?: {
3025
+ accessList?: import('viem').AccessList;
3026
+ authorizationList?: import('viem').AuthorizationList;
3027
+ chain?: import('viem').Chain | null;
3028
+ dataSuffix?: `0x${string}`;
3029
+ gas?: bigint;
3030
+ gasPrice?: bigint;
3031
+ maxFeePerGas?: bigint;
3032
+ maxPriorityFeePerGas?: bigint;
3033
+ nonce?: number;
3034
+ value?: bigint;
3035
+ }): Promise<`0x${string}`> {
3036
+ if (!this.contract.write) {
3037
+ throw new Error('Wallet client is required for write operations');
3038
+ }
3039
+ return this.contract.write.accrueAccount([account] as const, options) as Promise<`0x${string}`>;
3040
+ }
3041
+
3042
+ /**
3043
+ * approveThis
3044
+ * nonpayable
3045
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3046
+ */
3047
+ async approveThis(manager: `0x${string}`, asset: `0x${string}`, amount: bigint, options?: {
3048
+ accessList?: import('viem').AccessList;
3049
+ authorizationList?: import('viem').AuthorizationList;
3050
+ chain?: import('viem').Chain | null;
3051
+ dataSuffix?: `0x${string}`;
3052
+ gas?: bigint;
3053
+ gasPrice?: bigint;
3054
+ maxFeePerGas?: bigint;
3055
+ maxPriorityFeePerGas?: bigint;
3056
+ nonce?: number;
3057
+ value?: bigint;
3058
+ }): Promise<`0x${string}`> {
3059
+ if (!this.contract.write) {
3060
+ throw new Error('Wallet client is required for write operations');
3061
+ }
3062
+ return this.contract.write.approveThis([manager, asset, amount] as const, options) as Promise<`0x${string}`>;
3063
+ }
3064
+
3065
+ /**
3066
+ * buyCollateral
3067
+ * nonpayable
3068
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3069
+ */
3070
+ async buyCollateral(asset: `0x${string}`, minAmount: bigint, baseAmount: bigint, recipient: `0x${string}`, options?: {
3071
+ accessList?: import('viem').AccessList;
3072
+ authorizationList?: import('viem').AuthorizationList;
3073
+ chain?: import('viem').Chain | null;
3074
+ dataSuffix?: `0x${string}`;
3075
+ gas?: bigint;
3076
+ gasPrice?: bigint;
3077
+ maxFeePerGas?: bigint;
3078
+ maxPriorityFeePerGas?: bigint;
3079
+ nonce?: number;
3080
+ value?: bigint;
3081
+ }): Promise<`0x${string}`> {
3082
+ if (!this.contract.write) {
3083
+ throw new Error('Wallet client is required for write operations');
3084
+ }
3085
+ return this.contract.write.buyCollateral([asset, minAmount, baseAmount, recipient] as const, options) as Promise<`0x${string}`>;
3086
+ }
3087
+
3088
+ /**
3089
+ * initializeStorage
3090
+ * nonpayable
3091
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3092
+ */
3093
+ async initializeStorage(options?: {
3094
+ accessList?: import('viem').AccessList;
3095
+ authorizationList?: import('viem').AuthorizationList;
3096
+ chain?: import('viem').Chain | null;
3097
+ dataSuffix?: `0x${string}`;
3098
+ gas?: bigint;
3099
+ gasPrice?: bigint;
3100
+ maxFeePerGas?: bigint;
3101
+ maxPriorityFeePerGas?: bigint;
3102
+ nonce?: number;
3103
+ value?: bigint;
3104
+ }): Promise<`0x${string}`> {
3105
+ if (!this.contract.write) {
3106
+ throw new Error('Wallet client is required for write operations');
3107
+ }
3108
+ return this.contract.write.initializeStorage(options) as Promise<`0x${string}`>;
3109
+ }
3110
+
3111
+ /**
3112
+ * pause
3113
+ * nonpayable
3114
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3115
+ */
3116
+ async pause(supplyPaused: boolean, transferPaused: boolean, withdrawPaused: boolean, absorbPaused: boolean, buyPaused: boolean, options?: {
3117
+ accessList?: import('viem').AccessList;
3118
+ authorizationList?: import('viem').AuthorizationList;
3119
+ chain?: import('viem').Chain | null;
3120
+ dataSuffix?: `0x${string}`;
3121
+ gas?: bigint;
3122
+ gasPrice?: bigint;
3123
+ maxFeePerGas?: bigint;
3124
+ maxPriorityFeePerGas?: bigint;
3125
+ nonce?: number;
3126
+ value?: bigint;
3127
+ }): Promise<`0x${string}`> {
3128
+ if (!this.contract.write) {
3129
+ throw new Error('Wallet client is required for write operations');
3130
+ }
3131
+ return this.contract.write.pause([supplyPaused, transferPaused, withdrawPaused, absorbPaused, buyPaused] as const, options) as Promise<`0x${string}`>;
3132
+ }
3133
+
3134
+ /**
3135
+ * supply
3136
+ * nonpayable
3137
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3138
+ */
3139
+ async supply(asset: `0x${string}`, amount: bigint, options?: {
3140
+ accessList?: import('viem').AccessList;
3141
+ authorizationList?: import('viem').AuthorizationList;
3142
+ chain?: import('viem').Chain | null;
3143
+ dataSuffix?: `0x${string}`;
3144
+ gas?: bigint;
3145
+ gasPrice?: bigint;
3146
+ maxFeePerGas?: bigint;
3147
+ maxPriorityFeePerGas?: bigint;
3148
+ nonce?: number;
3149
+ value?: bigint;
3150
+ }): Promise<`0x${string}`> {
3151
+ if (!this.contract.write) {
3152
+ throw new Error('Wallet client is required for write operations');
3153
+ }
3154
+ return this.contract.write.supply([asset, amount] as const, options) as Promise<`0x${string}`>;
3155
+ }
3156
+
3157
+ /**
3158
+ * supplyFrom
3159
+ * nonpayable
3160
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3161
+ */
3162
+ async supplyFrom(from: `0x${string}`, dst: `0x${string}`, asset: `0x${string}`, amount: bigint, options?: {
3163
+ accessList?: import('viem').AccessList;
3164
+ authorizationList?: import('viem').AuthorizationList;
3165
+ chain?: import('viem').Chain | null;
3166
+ dataSuffix?: `0x${string}`;
3167
+ gas?: bigint;
3168
+ gasPrice?: bigint;
3169
+ maxFeePerGas?: bigint;
3170
+ maxPriorityFeePerGas?: bigint;
3171
+ nonce?: number;
3172
+ value?: bigint;
3173
+ }): Promise<`0x${string}`> {
3174
+ if (!this.contract.write) {
3175
+ throw new Error('Wallet client is required for write operations');
3176
+ }
3177
+ return this.contract.write.supplyFrom([from, dst, asset, amount] as const, options) as Promise<`0x${string}`>;
3178
+ }
3179
+
3180
+ /**
3181
+ * supplyTo
3182
+ * nonpayable
3183
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3184
+ */
3185
+ async supplyTo(dst: `0x${string}`, asset: `0x${string}`, amount: bigint, options?: {
3186
+ accessList?: import('viem').AccessList;
3187
+ authorizationList?: import('viem').AuthorizationList;
3188
+ chain?: import('viem').Chain | null;
3189
+ dataSuffix?: `0x${string}`;
3190
+ gas?: bigint;
3191
+ gasPrice?: bigint;
3192
+ maxFeePerGas?: bigint;
3193
+ maxPriorityFeePerGas?: bigint;
3194
+ nonce?: number;
3195
+ value?: bigint;
3196
+ }): Promise<`0x${string}`> {
3197
+ if (!this.contract.write) {
3198
+ throw new Error('Wallet client is required for write operations');
3199
+ }
3200
+ return this.contract.write.supplyTo([dst, asset, amount] as const, options) as Promise<`0x${string}`>;
3201
+ }
3202
+
3203
+ /**
3204
+ * transfer
3205
+ * nonpayable
3206
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3207
+ */
3208
+ async transfer(dst: `0x${string}`, amount: bigint, options?: {
3209
+ accessList?: import('viem').AccessList;
3210
+ authorizationList?: import('viem').AuthorizationList;
3211
+ chain?: import('viem').Chain | null;
3212
+ dataSuffix?: `0x${string}`;
3213
+ gas?: bigint;
3214
+ gasPrice?: bigint;
3215
+ maxFeePerGas?: bigint;
3216
+ maxPriorityFeePerGas?: bigint;
3217
+ nonce?: number;
3218
+ value?: bigint;
3219
+ }): Promise<`0x${string}`> {
3220
+ if (!this.contract.write) {
3221
+ throw new Error('Wallet client is required for write operations');
3222
+ }
3223
+ return this.contract.write.transfer([dst, amount] as const, options) as Promise<`0x${string}`>;
3224
+ }
3225
+
3226
+ /**
3227
+ * transferAsset
3228
+ * nonpayable
3229
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3230
+ */
3231
+ async transferAsset(dst: `0x${string}`, asset: `0x${string}`, amount: bigint, options?: {
3232
+ accessList?: import('viem').AccessList;
3233
+ authorizationList?: import('viem').AuthorizationList;
3234
+ chain?: import('viem').Chain | null;
3235
+ dataSuffix?: `0x${string}`;
3236
+ gas?: bigint;
3237
+ gasPrice?: bigint;
3238
+ maxFeePerGas?: bigint;
3239
+ maxPriorityFeePerGas?: bigint;
3240
+ nonce?: number;
3241
+ value?: bigint;
3242
+ }): Promise<`0x${string}`> {
3243
+ if (!this.contract.write) {
3244
+ throw new Error('Wallet client is required for write operations');
3245
+ }
3246
+ return this.contract.write.transferAsset([dst, asset, amount] as const, options) as Promise<`0x${string}`>;
3247
+ }
3248
+
3249
+ /**
3250
+ * transferAssetFrom
3251
+ * nonpayable
3252
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3253
+ */
3254
+ async transferAssetFrom(src: `0x${string}`, dst: `0x${string}`, asset: `0x${string}`, amount: bigint, options?: {
3255
+ accessList?: import('viem').AccessList;
3256
+ authorizationList?: import('viem').AuthorizationList;
3257
+ chain?: import('viem').Chain | null;
3258
+ dataSuffix?: `0x${string}`;
3259
+ gas?: bigint;
3260
+ gasPrice?: bigint;
3261
+ maxFeePerGas?: bigint;
3262
+ maxPriorityFeePerGas?: bigint;
3263
+ nonce?: number;
3264
+ value?: bigint;
3265
+ }): Promise<`0x${string}`> {
3266
+ if (!this.contract.write) {
3267
+ throw new Error('Wallet client is required for write operations');
3268
+ }
3269
+ return this.contract.write.transferAssetFrom([src, dst, asset, amount] as const, options) as Promise<`0x${string}`>;
3270
+ }
3271
+
3272
+ /**
3273
+ * transferFrom
3274
+ * nonpayable
3275
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3276
+ */
3277
+ async transferFrom(src: `0x${string}`, dst: `0x${string}`, amount: bigint, options?: {
3278
+ accessList?: import('viem').AccessList;
3279
+ authorizationList?: import('viem').AuthorizationList;
3280
+ chain?: import('viem').Chain | null;
3281
+ dataSuffix?: `0x${string}`;
3282
+ gas?: bigint;
3283
+ gasPrice?: bigint;
3284
+ maxFeePerGas?: bigint;
3285
+ maxPriorityFeePerGas?: bigint;
3286
+ nonce?: number;
3287
+ value?: bigint;
3288
+ }): Promise<`0x${string}`> {
3289
+ if (!this.contract.write) {
3290
+ throw new Error('Wallet client is required for write operations');
3291
+ }
3292
+ return this.contract.write.transferFrom([src, dst, amount] as const, options) as Promise<`0x${string}`>;
3293
+ }
3294
+
3295
+ /**
3296
+ * withdraw
3297
+ * nonpayable
3298
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3299
+ */
3300
+ async withdraw(asset: `0x${string}`, amount: bigint, options?: {
3301
+ accessList?: import('viem').AccessList;
3302
+ authorizationList?: import('viem').AuthorizationList;
3303
+ chain?: import('viem').Chain | null;
3304
+ dataSuffix?: `0x${string}`;
3305
+ gas?: bigint;
3306
+ gasPrice?: bigint;
3307
+ maxFeePerGas?: bigint;
3308
+ maxPriorityFeePerGas?: bigint;
3309
+ nonce?: number;
3310
+ value?: bigint;
3311
+ }): Promise<`0x${string}`> {
3312
+ if (!this.contract.write) {
3313
+ throw new Error('Wallet client is required for write operations');
3314
+ }
3315
+ return this.contract.write.withdraw([asset, amount] as const, options) as Promise<`0x${string}`>;
3316
+ }
3317
+
3318
+ /**
3319
+ * withdrawFrom
3320
+ * nonpayable
3321
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3322
+ */
3323
+ async withdrawFrom(src: `0x${string}`, to: `0x${string}`, asset: `0x${string}`, amount: bigint, options?: {
3324
+ accessList?: import('viem').AccessList;
3325
+ authorizationList?: import('viem').AuthorizationList;
3326
+ chain?: import('viem').Chain | null;
3327
+ dataSuffix?: `0x${string}`;
3328
+ gas?: bigint;
3329
+ gasPrice?: bigint;
3330
+ maxFeePerGas?: bigint;
3331
+ maxPriorityFeePerGas?: bigint;
3332
+ nonce?: number;
3333
+ value?: bigint;
3334
+ }): Promise<`0x${string}`> {
3335
+ if (!this.contract.write) {
3336
+ throw new Error('Wallet client is required for write operations');
3337
+ }
3338
+ return this.contract.write.withdrawFrom([src, to, asset, amount] as const, options) as Promise<`0x${string}`>;
3339
+ }
3340
+
3341
+ /**
3342
+ * withdrawReserves
3343
+ * nonpayable
3344
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3345
+ */
3346
+ async withdrawReserves(to: `0x${string}`, amount: bigint, options?: {
3347
+ accessList?: import('viem').AccessList;
3348
+ authorizationList?: import('viem').AuthorizationList;
3349
+ chain?: import('viem').Chain | null;
3350
+ dataSuffix?: `0x${string}`;
3351
+ gas?: bigint;
3352
+ gasPrice?: bigint;
3353
+ maxFeePerGas?: bigint;
3354
+ maxPriorityFeePerGas?: bigint;
3355
+ nonce?: number;
3356
+ value?: bigint;
3357
+ }): Promise<`0x${string}`> {
3358
+ if (!this.contract.write) {
3359
+ throw new Error('Wallet client is required for write operations');
3360
+ }
3361
+ return this.contract.write.withdrawReserves([to, amount] as const, options) as Promise<`0x${string}`>;
3362
+ }
3363
+
3364
+ /**
3365
+ * withdrawTo
3366
+ * nonpayable
3367
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3368
+ */
3369
+ async withdrawTo(to: `0x${string}`, asset: `0x${string}`, amount: bigint, options?: {
3370
+ accessList?: import('viem').AccessList;
3371
+ authorizationList?: import('viem').AuthorizationList;
3372
+ chain?: import('viem').Chain | null;
3373
+ dataSuffix?: `0x${string}`;
3374
+ gas?: bigint;
3375
+ gasPrice?: bigint;
3376
+ maxFeePerGas?: bigint;
3377
+ maxPriorityFeePerGas?: bigint;
3378
+ nonce?: number;
3379
+ value?: bigint;
3380
+ }): Promise<`0x${string}`> {
3381
+ if (!this.contract.write) {
3382
+ throw new Error('Wallet client is required for write operations');
3383
+ }
3384
+ return this.contract.write.withdrawTo([to, asset, amount] as const, options) as Promise<`0x${string}`>;
3385
+ }
3386
+
3387
+
3388
+
3389
+ /**
3390
+ * Simulate contract write operations (dry-run without sending transaction)
3391
+ *
3392
+ * @example
3393
+ * const result = await contract.simulate.transfer('0x...', 1000n);
3394
+ * console.log('Gas estimate:', result.request.gas);
3395
+ * console.log('Would succeed:', result.result);
3396
+ */
3397
+ get simulate() {
3398
+ const contract = this.contract;
3399
+ if (!contract.simulate) {
3400
+ throw new Error('Public client is required for simulation');
3401
+ }
3402
+ return {
3403
+ /**
3404
+ * Simulate absorb
3405
+ * Returns gas estimate and result without sending transaction
3406
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3407
+ */
3408
+ async absorb(absorber: `0x${string}`, accounts: `0x${string}`[], options?: {
3409
+ accessList?: import('viem').AccessList;
3410
+ authorizationList?: import('viem').AuthorizationList;
3411
+ chain?: import('viem').Chain | null;
3412
+ dataSuffix?: `0x${string}`;
3413
+ gas?: bigint;
3414
+ gasPrice?: bigint;
3415
+ maxFeePerGas?: bigint;
3416
+ maxPriorityFeePerGas?: bigint;
3417
+ nonce?: number;
3418
+ value?: bigint;
3419
+ }): Promise<void> {
3420
+ return contract.simulate.absorb([absorber, accounts] as const, options) as Promise<void>;
3421
+ },
3422
+ /**
3423
+ * Simulate accrueAccount
3424
+ * Returns gas estimate and result without sending transaction
3425
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3426
+ */
3427
+ async accrueAccount(account: `0x${string}`, options?: {
3428
+ accessList?: import('viem').AccessList;
3429
+ authorizationList?: import('viem').AuthorizationList;
3430
+ chain?: import('viem').Chain | null;
3431
+ dataSuffix?: `0x${string}`;
3432
+ gas?: bigint;
3433
+ gasPrice?: bigint;
3434
+ maxFeePerGas?: bigint;
3435
+ maxPriorityFeePerGas?: bigint;
3436
+ nonce?: number;
3437
+ value?: bigint;
3438
+ }): Promise<void> {
3439
+ return contract.simulate.accrueAccount([account] as const, options) as Promise<void>;
3440
+ },
3441
+ /**
3442
+ * Simulate approveThis
3443
+ * Returns gas estimate and result without sending transaction
3444
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3445
+ */
3446
+ async approveThis(manager: `0x${string}`, asset: `0x${string}`, amount: bigint, options?: {
3447
+ accessList?: import('viem').AccessList;
3448
+ authorizationList?: import('viem').AuthorizationList;
3449
+ chain?: import('viem').Chain | null;
3450
+ dataSuffix?: `0x${string}`;
3451
+ gas?: bigint;
3452
+ gasPrice?: bigint;
3453
+ maxFeePerGas?: bigint;
3454
+ maxPriorityFeePerGas?: bigint;
3455
+ nonce?: number;
3456
+ value?: bigint;
3457
+ }): Promise<void> {
3458
+ return contract.simulate.approveThis([manager, asset, amount] as const, options) as Promise<void>;
3459
+ },
3460
+ /**
3461
+ * Simulate buyCollateral
3462
+ * Returns gas estimate and result without sending transaction
3463
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3464
+ */
3465
+ async buyCollateral(asset: `0x${string}`, minAmount: bigint, baseAmount: bigint, recipient: `0x${string}`, options?: {
3466
+ accessList?: import('viem').AccessList;
3467
+ authorizationList?: import('viem').AuthorizationList;
3468
+ chain?: import('viem').Chain | null;
3469
+ dataSuffix?: `0x${string}`;
3470
+ gas?: bigint;
3471
+ gasPrice?: bigint;
3472
+ maxFeePerGas?: bigint;
3473
+ maxPriorityFeePerGas?: bigint;
3474
+ nonce?: number;
3475
+ value?: bigint;
3476
+ }): Promise<void> {
3477
+ return contract.simulate.buyCollateral([asset, minAmount, baseAmount, recipient] as const, options) as Promise<void>;
3478
+ },
3479
+ /**
3480
+ * Simulate initializeStorage
3481
+ * Returns gas estimate and result without sending transaction
3482
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3483
+ */
3484
+ async initializeStorage(options?: {
3485
+ accessList?: import('viem').AccessList;
3486
+ authorizationList?: import('viem').AuthorizationList;
3487
+ chain?: import('viem').Chain | null;
3488
+ dataSuffix?: `0x${string}`;
3489
+ gas?: bigint;
3490
+ gasPrice?: bigint;
3491
+ maxFeePerGas?: bigint;
3492
+ maxPriorityFeePerGas?: bigint;
3493
+ nonce?: number;
3494
+ value?: bigint;
3495
+ }): Promise<void> {
3496
+ return contract.simulate.initializeStorage(options) as Promise<void>;
3497
+ },
3498
+ /**
3499
+ * Simulate pause
3500
+ * Returns gas estimate and result without sending transaction
3501
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3502
+ */
3503
+ async pause(supplyPaused: boolean, transferPaused: boolean, withdrawPaused: boolean, absorbPaused: boolean, buyPaused: boolean, options?: {
3504
+ accessList?: import('viem').AccessList;
3505
+ authorizationList?: import('viem').AuthorizationList;
3506
+ chain?: import('viem').Chain | null;
3507
+ dataSuffix?: `0x${string}`;
3508
+ gas?: bigint;
3509
+ gasPrice?: bigint;
3510
+ maxFeePerGas?: bigint;
3511
+ maxPriorityFeePerGas?: bigint;
3512
+ nonce?: number;
3513
+ value?: bigint;
3514
+ }): Promise<void> {
3515
+ return contract.simulate.pause([supplyPaused, transferPaused, withdrawPaused, absorbPaused, buyPaused] as const, options) as Promise<void>;
3516
+ },
3517
+ /**
3518
+ * Simulate supply
3519
+ * Returns gas estimate and result without sending transaction
3520
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3521
+ */
3522
+ async supply(asset: `0x${string}`, amount: bigint, options?: {
3523
+ accessList?: import('viem').AccessList;
3524
+ authorizationList?: import('viem').AuthorizationList;
3525
+ chain?: import('viem').Chain | null;
3526
+ dataSuffix?: `0x${string}`;
3527
+ gas?: bigint;
3528
+ gasPrice?: bigint;
3529
+ maxFeePerGas?: bigint;
3530
+ maxPriorityFeePerGas?: bigint;
3531
+ nonce?: number;
3532
+ value?: bigint;
3533
+ }): Promise<void> {
3534
+ return contract.simulate.supply([asset, amount] as const, options) as Promise<void>;
3535
+ },
3536
+ /**
3537
+ * Simulate supplyFrom
3538
+ * Returns gas estimate and result without sending transaction
3539
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3540
+ */
3541
+ async supplyFrom(from: `0x${string}`, dst: `0x${string}`, asset: `0x${string}`, amount: bigint, options?: {
3542
+ accessList?: import('viem').AccessList;
3543
+ authorizationList?: import('viem').AuthorizationList;
3544
+ chain?: import('viem').Chain | null;
3545
+ dataSuffix?: `0x${string}`;
3546
+ gas?: bigint;
3547
+ gasPrice?: bigint;
3548
+ maxFeePerGas?: bigint;
3549
+ maxPriorityFeePerGas?: bigint;
3550
+ nonce?: number;
3551
+ value?: bigint;
3552
+ }): Promise<void> {
3553
+ return contract.simulate.supplyFrom([from, dst, asset, amount] as const, options) as Promise<void>;
3554
+ },
3555
+ /**
3556
+ * Simulate supplyTo
3557
+ * Returns gas estimate and result without sending transaction
3558
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3559
+ */
3560
+ async supplyTo(dst: `0x${string}`, asset: `0x${string}`, amount: bigint, options?: {
3561
+ accessList?: import('viem').AccessList;
3562
+ authorizationList?: import('viem').AuthorizationList;
3563
+ chain?: import('viem').Chain | null;
3564
+ dataSuffix?: `0x${string}`;
3565
+ gas?: bigint;
3566
+ gasPrice?: bigint;
3567
+ maxFeePerGas?: bigint;
3568
+ maxPriorityFeePerGas?: bigint;
3569
+ nonce?: number;
3570
+ value?: bigint;
3571
+ }): Promise<void> {
3572
+ return contract.simulate.supplyTo([dst, asset, amount] as const, options) as Promise<void>;
3573
+ },
3574
+ /**
3575
+ * Simulate transfer
3576
+ * Returns gas estimate and result without sending transaction
3577
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3578
+ */
3579
+ async transfer(dst: `0x${string}`, amount: bigint, options?: {
3580
+ accessList?: import('viem').AccessList;
3581
+ authorizationList?: import('viem').AuthorizationList;
3582
+ chain?: import('viem').Chain | null;
3583
+ dataSuffix?: `0x${string}`;
3584
+ gas?: bigint;
3585
+ gasPrice?: bigint;
3586
+ maxFeePerGas?: bigint;
3587
+ maxPriorityFeePerGas?: bigint;
3588
+ nonce?: number;
3589
+ value?: bigint;
3590
+ }): Promise<boolean> {
3591
+ return contract.simulate.transfer([dst, amount] as const, options) as Promise<boolean>;
3592
+ },
3593
+ /**
3594
+ * Simulate transferAsset
3595
+ * Returns gas estimate and result without sending transaction
3596
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3597
+ */
3598
+ async transferAsset(dst: `0x${string}`, asset: `0x${string}`, amount: bigint, options?: {
3599
+ accessList?: import('viem').AccessList;
3600
+ authorizationList?: import('viem').AuthorizationList;
3601
+ chain?: import('viem').Chain | null;
3602
+ dataSuffix?: `0x${string}`;
3603
+ gas?: bigint;
3604
+ gasPrice?: bigint;
3605
+ maxFeePerGas?: bigint;
3606
+ maxPriorityFeePerGas?: bigint;
3607
+ nonce?: number;
3608
+ value?: bigint;
3609
+ }): Promise<void> {
3610
+ return contract.simulate.transferAsset([dst, asset, amount] as const, options) as Promise<void>;
3611
+ },
3612
+ /**
3613
+ * Simulate transferAssetFrom
3614
+ * Returns gas estimate and result without sending transaction
3615
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3616
+ */
3617
+ async transferAssetFrom(src: `0x${string}`, dst: `0x${string}`, asset: `0x${string}`, amount: bigint, options?: {
3618
+ accessList?: import('viem').AccessList;
3619
+ authorizationList?: import('viem').AuthorizationList;
3620
+ chain?: import('viem').Chain | null;
3621
+ dataSuffix?: `0x${string}`;
3622
+ gas?: bigint;
3623
+ gasPrice?: bigint;
3624
+ maxFeePerGas?: bigint;
3625
+ maxPriorityFeePerGas?: bigint;
3626
+ nonce?: number;
3627
+ value?: bigint;
3628
+ }): Promise<void> {
3629
+ return contract.simulate.transferAssetFrom([src, dst, asset, amount] as const, options) as Promise<void>;
3630
+ },
3631
+ /**
3632
+ * Simulate transferFrom
3633
+ * Returns gas estimate and result without sending transaction
3634
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3635
+ */
3636
+ async transferFrom(src: `0x${string}`, dst: `0x${string}`, amount: bigint, options?: {
3637
+ accessList?: import('viem').AccessList;
3638
+ authorizationList?: import('viem').AuthorizationList;
3639
+ chain?: import('viem').Chain | null;
3640
+ dataSuffix?: `0x${string}`;
3641
+ gas?: bigint;
3642
+ gasPrice?: bigint;
3643
+ maxFeePerGas?: bigint;
3644
+ maxPriorityFeePerGas?: bigint;
3645
+ nonce?: number;
3646
+ value?: bigint;
3647
+ }): Promise<boolean> {
3648
+ return contract.simulate.transferFrom([src, dst, amount] as const, options) as Promise<boolean>;
3649
+ },
3650
+ /**
3651
+ * Simulate withdraw
3652
+ * Returns gas estimate and result without sending transaction
3653
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3654
+ */
3655
+ async withdraw(asset: `0x${string}`, amount: bigint, options?: {
3656
+ accessList?: import('viem').AccessList;
3657
+ authorizationList?: import('viem').AuthorizationList;
3658
+ chain?: import('viem').Chain | null;
3659
+ dataSuffix?: `0x${string}`;
3660
+ gas?: bigint;
3661
+ gasPrice?: bigint;
3662
+ maxFeePerGas?: bigint;
3663
+ maxPriorityFeePerGas?: bigint;
3664
+ nonce?: number;
3665
+ value?: bigint;
3666
+ }): Promise<void> {
3667
+ return contract.simulate.withdraw([asset, amount] as const, options) as Promise<void>;
3668
+ },
3669
+ /**
3670
+ * Simulate withdrawFrom
3671
+ * Returns gas estimate and result without sending transaction
3672
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3673
+ */
3674
+ async withdrawFrom(src: `0x${string}`, to: `0x${string}`, asset: `0x${string}`, amount: bigint, options?: {
3675
+ accessList?: import('viem').AccessList;
3676
+ authorizationList?: import('viem').AuthorizationList;
3677
+ chain?: import('viem').Chain | null;
3678
+ dataSuffix?: `0x${string}`;
3679
+ gas?: bigint;
3680
+ gasPrice?: bigint;
3681
+ maxFeePerGas?: bigint;
3682
+ maxPriorityFeePerGas?: bigint;
3683
+ nonce?: number;
3684
+ value?: bigint;
3685
+ }): Promise<void> {
3686
+ return contract.simulate.withdrawFrom([src, to, asset, amount] as const, options) as Promise<void>;
3687
+ },
3688
+ /**
3689
+ * Simulate withdrawReserves
3690
+ * Returns gas estimate and result without sending transaction
3691
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3692
+ */
3693
+ async withdrawReserves(to: `0x${string}`, amount: bigint, options?: {
3694
+ accessList?: import('viem').AccessList;
3695
+ authorizationList?: import('viem').AuthorizationList;
3696
+ chain?: import('viem').Chain | null;
3697
+ dataSuffix?: `0x${string}`;
3698
+ gas?: bigint;
3699
+ gasPrice?: bigint;
3700
+ maxFeePerGas?: bigint;
3701
+ maxPriorityFeePerGas?: bigint;
3702
+ nonce?: number;
3703
+ value?: bigint;
3704
+ }): Promise<void> {
3705
+ return contract.simulate.withdrawReserves([to, amount] as const, options) as Promise<void>;
3706
+ },
3707
+ /**
3708
+ * Simulate withdrawTo
3709
+ * Returns gas estimate and result without sending transaction
3710
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
3711
+ */
3712
+ async withdrawTo(to: `0x${string}`, asset: `0x${string}`, amount: bigint, options?: {
3713
+ accessList?: import('viem').AccessList;
3714
+ authorizationList?: import('viem').AuthorizationList;
3715
+ chain?: import('viem').Chain | null;
3716
+ dataSuffix?: `0x${string}`;
3717
+ gas?: bigint;
3718
+ gasPrice?: bigint;
3719
+ maxFeePerGas?: bigint;
3720
+ maxPriorityFeePerGas?: bigint;
3721
+ nonce?: number;
3722
+ value?: bigint;
3723
+ }): Promise<void> {
3724
+ return contract.simulate.withdrawTo([to, asset, amount] as const, options) as Promise<void>;
3725
+ }
3726
+ };
3727
+ }
3728
+
3729
+ /**
3730
+ * Watch contract events
3731
+ *
3732
+ * @example
3733
+ * // Watch all Transfer events
3734
+ * const unwatch = contract.watch.Transfer((event) => {
3735
+ * console.log('Transfer:', event);
3736
+ * });
3737
+ *
3738
+ * // Stop watching
3739
+ * unwatch();
3740
+ */
3741
+ get watch() {
3742
+ return {
3743
+ /**
3744
+ * Watch AbsorbCollateral events
3745
+ * @param callback Function to call when event is emitted
3746
+ * @param filter Optional filter for indexed parameters
3747
+ * @returns Unwatch function to stop listening
3748
+ */
3749
+ AbsorbCollateral: (callback: (event: { absorber: `0x${string}`; borrower: `0x${string}`; asset: `0x${string}`; collateralAbsorbed: bigint; usdValue: bigint }) => void, filter?: { absorber: `0x${string}`; borrower: `0x${string}`; asset: `0x${string}` }) => {
3750
+ return this.publicClient.watchContractEvent({
3751
+ address: this.contractAddress,
3752
+ abi: InstitutionalComet_jsonAbi,
3753
+ eventName: 'AbsorbCollateral',
3754
+ args: filter,
3755
+ onLogs: (logs: any[]) => {
3756
+ logs.forEach((log: any) => {
3757
+ callback(log.args as any);
3758
+ });
3759
+ },
3760
+ }) as () => void;
3761
+ },
3762
+ /**
3763
+ * Watch AbsorbDebt events
3764
+ * @param callback Function to call when event is emitted
3765
+ * @param filter Optional filter for indexed parameters
3766
+ * @returns Unwatch function to stop listening
3767
+ */
3768
+ AbsorbDebt: (callback: (event: { absorber: `0x${string}`; borrower: `0x${string}`; basePaidOut: bigint; usdValue: bigint }) => void, filter?: { absorber: `0x${string}`; borrower: `0x${string}` }) => {
3769
+ return this.publicClient.watchContractEvent({
3770
+ address: this.contractAddress,
3771
+ abi: InstitutionalComet_jsonAbi,
3772
+ eventName: 'AbsorbDebt',
3773
+ args: filter,
3774
+ onLogs: (logs: any[]) => {
3775
+ logs.forEach((log: any) => {
3776
+ callback(log.args as any);
3777
+ });
3778
+ },
3779
+ }) as () => void;
3780
+ },
3781
+ /**
3782
+ * Watch BuyCollateral events
3783
+ * @param callback Function to call when event is emitted
3784
+ * @param filter Optional filter for indexed parameters
3785
+ * @returns Unwatch function to stop listening
3786
+ */
3787
+ BuyCollateral: (callback: (event: { buyer: `0x${string}`; asset: `0x${string}`; baseAmount: bigint; collateralAmount: bigint }) => void, filter?: { buyer: `0x${string}`; asset: `0x${string}` }) => {
3788
+ return this.publicClient.watchContractEvent({
3789
+ address: this.contractAddress,
3790
+ abi: InstitutionalComet_jsonAbi,
3791
+ eventName: 'BuyCollateral',
3792
+ args: filter,
3793
+ onLogs: (logs: any[]) => {
3794
+ logs.forEach((log: any) => {
3795
+ callback(log.args as any);
3796
+ });
3797
+ },
3798
+ }) as () => void;
3799
+ },
3800
+ /**
3801
+ * Watch PauseAction events
3802
+ * @param callback Function to call when event is emitted
3803
+ * @param filter Optional filter for indexed parameters
3804
+ * @returns Unwatch function to stop listening
3805
+ */
3806
+ PauseAction: (callback: (event: { supplyPaused: boolean; transferPaused: boolean; withdrawPaused: boolean; absorbPaused: boolean; buyPaused: boolean }) => void) => {
3807
+ return this.publicClient.watchContractEvent({
3808
+ address: this.contractAddress,
3809
+ abi: InstitutionalComet_jsonAbi,
3810
+ eventName: 'PauseAction',
3811
+
3812
+ onLogs: (logs: any[]) => {
3813
+ logs.forEach((log: any) => {
3814
+ callback(log.args as any);
3815
+ });
3816
+ },
3817
+ }) as () => void;
3818
+ },
3819
+ /**
3820
+ * Watch Supply events
3821
+ * @param callback Function to call when event is emitted
3822
+ * @param filter Optional filter for indexed parameters
3823
+ * @returns Unwatch function to stop listening
3824
+ */
3825
+ Supply: (callback: (event: { from: `0x${string}`; dst: `0x${string}`; amount: bigint }) => void, filter?: { from: `0x${string}`; dst: `0x${string}` }) => {
3826
+ return this.publicClient.watchContractEvent({
3827
+ address: this.contractAddress,
3828
+ abi: InstitutionalComet_jsonAbi,
3829
+ eventName: 'Supply',
3830
+ args: filter,
3831
+ onLogs: (logs: any[]) => {
3832
+ logs.forEach((log: any) => {
3833
+ callback(log.args as any);
3834
+ });
3835
+ },
3836
+ }) as () => void;
3837
+ },
3838
+ /**
3839
+ * Watch SupplyCollateral events
3840
+ * @param callback Function to call when event is emitted
3841
+ * @param filter Optional filter for indexed parameters
3842
+ * @returns Unwatch function to stop listening
3843
+ */
3844
+ SupplyCollateral: (callback: (event: { from: `0x${string}`; dst: `0x${string}`; asset: `0x${string}`; amount: bigint }) => void, filter?: { from: `0x${string}`; dst: `0x${string}`; asset: `0x${string}` }) => {
3845
+ return this.publicClient.watchContractEvent({
3846
+ address: this.contractAddress,
3847
+ abi: InstitutionalComet_jsonAbi,
3848
+ eventName: 'SupplyCollateral',
3849
+ args: filter,
3850
+ onLogs: (logs: any[]) => {
3851
+ logs.forEach((log: any) => {
3852
+ callback(log.args as any);
3853
+ });
3854
+ },
3855
+ }) as () => void;
3856
+ },
3857
+ /**
3858
+ * Watch Transfer events
3859
+ * @param callback Function to call when event is emitted
3860
+ * @param filter Optional filter for indexed parameters
3861
+ * @returns Unwatch function to stop listening
3862
+ */
3863
+ Transfer: (callback: (event: { from: `0x${string}`; to: `0x${string}`; amount: bigint }) => void, filter?: { from: `0x${string}`; to: `0x${string}` }) => {
3864
+ return this.publicClient.watchContractEvent({
3865
+ address: this.contractAddress,
3866
+ abi: InstitutionalComet_jsonAbi,
3867
+ eventName: 'Transfer',
3868
+ args: filter,
3869
+ onLogs: (logs: any[]) => {
3870
+ logs.forEach((log: any) => {
3871
+ callback(log.args as any);
3872
+ });
3873
+ },
3874
+ }) as () => void;
3875
+ },
3876
+ /**
3877
+ * Watch TransferCollateral events
3878
+ * @param callback Function to call when event is emitted
3879
+ * @param filter Optional filter for indexed parameters
3880
+ * @returns Unwatch function to stop listening
3881
+ */
3882
+ TransferCollateral: (callback: (event: { from: `0x${string}`; to: `0x${string}`; asset: `0x${string}`; amount: bigint }) => void, filter?: { from: `0x${string}`; to: `0x${string}`; asset: `0x${string}` }) => {
3883
+ return this.publicClient.watchContractEvent({
3884
+ address: this.contractAddress,
3885
+ abi: InstitutionalComet_jsonAbi,
3886
+ eventName: 'TransferCollateral',
3887
+ args: filter,
3888
+ onLogs: (logs: any[]) => {
3889
+ logs.forEach((log: any) => {
3890
+ callback(log.args as any);
3891
+ });
3892
+ },
3893
+ }) as () => void;
3894
+ },
3895
+ /**
3896
+ * Watch Withdraw events
3897
+ * @param callback Function to call when event is emitted
3898
+ * @param filter Optional filter for indexed parameters
3899
+ * @returns Unwatch function to stop listening
3900
+ */
3901
+ Withdraw: (callback: (event: { src: `0x${string}`; to: `0x${string}`; amount: bigint }) => void, filter?: { src: `0x${string}`; to: `0x${string}` }) => {
3902
+ return this.publicClient.watchContractEvent({
3903
+ address: this.contractAddress,
3904
+ abi: InstitutionalComet_jsonAbi,
3905
+ eventName: 'Withdraw',
3906
+ args: filter,
3907
+ onLogs: (logs: any[]) => {
3908
+ logs.forEach((log: any) => {
3909
+ callback(log.args as any);
3910
+ });
3911
+ },
3912
+ }) as () => void;
3913
+ },
3914
+ /**
3915
+ * Watch WithdrawCollateral events
3916
+ * @param callback Function to call when event is emitted
3917
+ * @param filter Optional filter for indexed parameters
3918
+ * @returns Unwatch function to stop listening
3919
+ */
3920
+ WithdrawCollateral: (callback: (event: { src: `0x${string}`; to: `0x${string}`; asset: `0x${string}`; amount: bigint }) => void, filter?: { src: `0x${string}`; to: `0x${string}`; asset: `0x${string}` }) => {
3921
+ return this.publicClient.watchContractEvent({
3922
+ address: this.contractAddress,
3923
+ abi: InstitutionalComet_jsonAbi,
3924
+ eventName: 'WithdrawCollateral',
3925
+ args: filter,
3926
+ onLogs: (logs: any[]) => {
3927
+ logs.forEach((log: any) => {
3928
+ callback(log.args as any);
3929
+ });
3930
+ },
3931
+ }) as () => void;
3932
+ },
3933
+ /**
3934
+ * Watch WithdrawReserves events
3935
+ * @param callback Function to call when event is emitted
3936
+ * @param filter Optional filter for indexed parameters
3937
+ * @returns Unwatch function to stop listening
3938
+ */
3939
+ WithdrawReserves: (callback: (event: { to: `0x${string}`; amount: bigint }) => void, filter?: { to: `0x${string}` }) => {
3940
+ return this.publicClient.watchContractEvent({
3941
+ address: this.contractAddress,
3942
+ abi: InstitutionalComet_jsonAbi,
3943
+ eventName: 'WithdrawReserves',
3944
+ args: filter,
3945
+ onLogs: (logs: any[]) => {
3946
+ logs.forEach((log: any) => {
3947
+ callback(log.args as any);
3948
+ });
3949
+ },
3950
+ }) as () => void;
3951
+ }
3952
+ };
3953
+ }
3954
+ }