defi-state-querier 0.0.7__py3-none-any.whl → 0.0.9__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. defi_services/__init__.py +1 -1
  2. defi_services/abis/lending/morpho/__init__.py +0 -0
  3. defi_services/abis/lending/morpho/morpho_aave_v2_comptroller_abi.py +2301 -0
  4. defi_services/abis/lending/morpho/morpho_aave_v2_lens_abi.py +1208 -0
  5. defi_services/abis/lending/morpho/morpho_aave_v3_comptroller_abi.py +2994 -0
  6. defi_services/abis/lending/morpho/morpho_compound_comptroller_abi.py +2301 -0
  7. defi_services/abis/lending/morpho/morpho_compound_lens_abi.py +1402 -0
  8. defi_services/abis/lending/morpho/morpho_compound_reward_manager_abi.py +307 -0
  9. defi_services/constants/entities/lending_constant.py +6 -1
  10. defi_services/constants/entities/lending_services.py +7 -1
  11. defi_services/constants/query_constant.py +1 -0
  12. defi_services/jobs/processors/substrate_state_processor.py +97 -0
  13. defi_services/jobs/queriers/substrate_state_querier.py +84 -0
  14. defi_services/services/lending/aave_v3_services.py +4 -2
  15. defi_services/services/lending/compound_service.py +20 -2
  16. defi_services/services/lending/flux_services.py +30 -22
  17. defi_services/services/lending/iron_bank_service.py +19 -10
  18. defi_services/services/lending/lending_info/aave_v2_services.py +1 -1
  19. defi_services/services/lending/lending_info/ethereum/morpho_aave_v2_eth.py +53 -0
  20. defi_services/services/lending/lending_info/ethereum/morpho_aave_v3_eth.py +51 -0
  21. defi_services/services/lending/lending_info/ethereum/morpho_compound_eth.py +44 -0
  22. defi_services/services/lending/morpho_aave_v2_services.py +89 -0
  23. defi_services/services/lending/morpho_aave_v3_services.py +159 -0
  24. defi_services/services/lending/morpho_compound_services.py +233 -0
  25. defi_services/services/lending/onyx_service.py +23 -3
  26. defi_services/services/lending/strike_service.py +22 -3
  27. defi_services/services/lending/venus_services.py +19 -0
  28. defi_services/services/substrate_token_services.py +70 -0
  29. {defi_state_querier-0.0.7.dist-info → defi_state_querier-0.0.9.dist-info}/METADATA +1 -1
  30. {defi_state_querier-0.0.7.dist-info → defi_state_querier-0.0.9.dist-info}/RECORD +33 -17
  31. {defi_state_querier-0.0.7.dist-info → defi_state_querier-0.0.9.dist-info}/LICENSE +0 -0
  32. {defi_state_querier-0.0.7.dist-info → defi_state_querier-0.0.9.dist-info}/WHEEL +0 -0
  33. {defi_state_querier-0.0.7.dist-info → defi_state_querier-0.0.9.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1402 @@
1
+ import json
2
+
3
+ MORPHO_COMPOUND_LENS_ABI = json.loads('''
4
+ [
5
+ {
6
+ "inputs": [
7
+ {
8
+ "internalType": "address",
9
+ "name": "_morpho",
10
+ "type": "address"
11
+ }
12
+ ],
13
+ "stateMutability": "nonpayable",
14
+ "type": "constructor"
15
+ },
16
+ {
17
+ "inputs": [],
18
+ "name": "CompoundOracleFailed",
19
+ "type": "error"
20
+ },
21
+ {
22
+ "inputs": [],
23
+ "name": "InvalidPoolToken",
24
+ "type": "error"
25
+ },
26
+ {
27
+ "inputs": [],
28
+ "name": "MAX_BASIS_POINTS",
29
+ "outputs": [
30
+ {
31
+ "internalType": "uint256",
32
+ "name": "",
33
+ "type": "uint256"
34
+ }
35
+ ],
36
+ "stateMutability": "view",
37
+ "type": "function"
38
+ },
39
+ {
40
+ "inputs": [],
41
+ "name": "WAD",
42
+ "outputs": [
43
+ {
44
+ "internalType": "uint256",
45
+ "name": "",
46
+ "type": "uint256"
47
+ }
48
+ ],
49
+ "stateMutability": "view",
50
+ "type": "function"
51
+ },
52
+ {
53
+ "inputs": [
54
+ {
55
+ "internalType": "address",
56
+ "name": "_user",
57
+ "type": "address"
58
+ },
59
+ {
60
+ "internalType": "address",
61
+ "name": "_poolToken",
62
+ "type": "address"
63
+ },
64
+ {
65
+ "internalType": "bool",
66
+ "name": "_getUpdatedIndexes",
67
+ "type": "bool"
68
+ },
69
+ {
70
+ "internalType": "contract ICompoundOracle",
71
+ "name": "_oracle",
72
+ "type": "address"
73
+ },
74
+ {
75
+ "internalType": "uint256",
76
+ "name": "_withdrawnAmount",
77
+ "type": "uint256"
78
+ },
79
+ {
80
+ "internalType": "uint256",
81
+ "name": "_borrowedAmount",
82
+ "type": "uint256"
83
+ }
84
+ ],
85
+ "name": "_getUserHypotheticalLiquidityDataForAsset",
86
+ "outputs": [
87
+ {
88
+ "components": [
89
+ {
90
+ "internalType": "uint256",
91
+ "name": "collateralValue",
92
+ "type": "uint256"
93
+ },
94
+ {
95
+ "internalType": "uint256",
96
+ "name": "maxDebtValue",
97
+ "type": "uint256"
98
+ },
99
+ {
100
+ "internalType": "uint256",
101
+ "name": "debtValue",
102
+ "type": "uint256"
103
+ },
104
+ {
105
+ "internalType": "uint256",
106
+ "name": "underlyingPrice",
107
+ "type": "uint256"
108
+ },
109
+ {
110
+ "internalType": "uint256",
111
+ "name": "collateralFactor",
112
+ "type": "uint256"
113
+ }
114
+ ],
115
+ "internalType": "struct Types.AssetLiquidityData",
116
+ "name": "assetData",
117
+ "type": "tuple"
118
+ }
119
+ ],
120
+ "stateMutability": "view",
121
+ "type": "function"
122
+ },
123
+ {
124
+ "inputs": [],
125
+ "name": "comptroller",
126
+ "outputs": [
127
+ {
128
+ "internalType": "contract IComptroller",
129
+ "name": "",
130
+ "type": "address"
131
+ }
132
+ ],
133
+ "stateMutability": "view",
134
+ "type": "function"
135
+ },
136
+ {
137
+ "inputs": [
138
+ {
139
+ "internalType": "address",
140
+ "name": "_user",
141
+ "type": "address"
142
+ },
143
+ {
144
+ "internalType": "address",
145
+ "name": "_poolTokenBorrowed",
146
+ "type": "address"
147
+ },
148
+ {
149
+ "internalType": "address",
150
+ "name": "_poolTokenCollateral",
151
+ "type": "address"
152
+ },
153
+ {
154
+ "internalType": "address[]",
155
+ "name": "_updatedMarkets",
156
+ "type": "address[]"
157
+ }
158
+ ],
159
+ "name": "computeLiquidationRepayAmount",
160
+ "outputs": [
161
+ {
162
+ "internalType": "uint256",
163
+ "name": "toRepay",
164
+ "type": "uint256"
165
+ }
166
+ ],
167
+ "stateMutability": "view",
168
+ "type": "function"
169
+ },
170
+ {
171
+ "inputs": [
172
+ {
173
+ "internalType": "address",
174
+ "name": "_borrower",
175
+ "type": "address"
176
+ },
177
+ {
178
+ "internalType": "address",
179
+ "name": "_poolToken",
180
+ "type": "address"
181
+ }
182
+ ],
183
+ "name": "getAccruedBorrowerComp",
184
+ "outputs": [
185
+ {
186
+ "internalType": "uint256",
187
+ "name": "",
188
+ "type": "uint256"
189
+ }
190
+ ],
191
+ "stateMutability": "view",
192
+ "type": "function"
193
+ },
194
+ {
195
+ "inputs": [
196
+ {
197
+ "internalType": "address",
198
+ "name": "_borrower",
199
+ "type": "address"
200
+ },
201
+ {
202
+ "internalType": "address",
203
+ "name": "_poolToken",
204
+ "type": "address"
205
+ },
206
+ {
207
+ "internalType": "uint256",
208
+ "name": "_balance",
209
+ "type": "uint256"
210
+ }
211
+ ],
212
+ "name": "getAccruedBorrowerComp",
213
+ "outputs": [
214
+ {
215
+ "internalType": "uint256",
216
+ "name": "",
217
+ "type": "uint256"
218
+ }
219
+ ],
220
+ "stateMutability": "view",
221
+ "type": "function"
222
+ },
223
+ {
224
+ "inputs": [
225
+ {
226
+ "internalType": "address",
227
+ "name": "_supplier",
228
+ "type": "address"
229
+ },
230
+ {
231
+ "internalType": "address",
232
+ "name": "_poolToken",
233
+ "type": "address"
234
+ }
235
+ ],
236
+ "name": "getAccruedSupplierComp",
237
+ "outputs": [
238
+ {
239
+ "internalType": "uint256",
240
+ "name": "",
241
+ "type": "uint256"
242
+ }
243
+ ],
244
+ "stateMutability": "view",
245
+ "type": "function"
246
+ },
247
+ {
248
+ "inputs": [
249
+ {
250
+ "internalType": "address",
251
+ "name": "_supplier",
252
+ "type": "address"
253
+ },
254
+ {
255
+ "internalType": "address",
256
+ "name": "_poolToken",
257
+ "type": "address"
258
+ },
259
+ {
260
+ "internalType": "uint256",
261
+ "name": "_balance",
262
+ "type": "uint256"
263
+ }
264
+ ],
265
+ "name": "getAccruedSupplierComp",
266
+ "outputs": [
267
+ {
268
+ "internalType": "uint256",
269
+ "name": "",
270
+ "type": "uint256"
271
+ }
272
+ ],
273
+ "stateMutability": "view",
274
+ "type": "function"
275
+ },
276
+ {
277
+ "inputs": [
278
+ {
279
+ "internalType": "address",
280
+ "name": "_poolToken",
281
+ "type": "address"
282
+ }
283
+ ],
284
+ "name": "getAdvancedMarketData",
285
+ "outputs": [
286
+ {
287
+ "components": [
288
+ {
289
+ "internalType": "uint256",
290
+ "name": "p2pSupplyIndex",
291
+ "type": "uint256"
292
+ },
293
+ {
294
+ "internalType": "uint256",
295
+ "name": "p2pBorrowIndex",
296
+ "type": "uint256"
297
+ },
298
+ {
299
+ "internalType": "uint256",
300
+ "name": "poolSupplyIndex",
301
+ "type": "uint256"
302
+ },
303
+ {
304
+ "internalType": "uint256",
305
+ "name": "poolBorrowIndex",
306
+ "type": "uint256"
307
+ }
308
+ ],
309
+ "internalType": "struct Types.Indexes",
310
+ "name": "indexes",
311
+ "type": "tuple"
312
+ },
313
+ {
314
+ "internalType": "uint32",
315
+ "name": "lastUpdateBlockNumber",
316
+ "type": "uint32"
317
+ },
318
+ {
319
+ "internalType": "uint256",
320
+ "name": "p2pSupplyDelta",
321
+ "type": "uint256"
322
+ },
323
+ {
324
+ "internalType": "uint256",
325
+ "name": "p2pBorrowDelta",
326
+ "type": "uint256"
327
+ }
328
+ ],
329
+ "stateMutability": "view",
330
+ "type": "function"
331
+ },
332
+ {
333
+ "inputs": [],
334
+ "name": "getAllMarkets",
335
+ "outputs": [
336
+ {
337
+ "internalType": "address[]",
338
+ "name": "marketsCreated",
339
+ "type": "address[]"
340
+ }
341
+ ],
342
+ "stateMutability": "view",
343
+ "type": "function"
344
+ },
345
+ {
346
+ "inputs": [
347
+ {
348
+ "internalType": "address",
349
+ "name": "_poolToken",
350
+ "type": "address"
351
+ }
352
+ ],
353
+ "name": "getAverageBorrowRatePerBlock",
354
+ "outputs": [
355
+ {
356
+ "internalType": "uint256",
357
+ "name": "avgBorrowRatePerBlock",
358
+ "type": "uint256"
359
+ },
360
+ {
361
+ "internalType": "uint256",
362
+ "name": "p2pBorrowAmount",
363
+ "type": "uint256"
364
+ },
365
+ {
366
+ "internalType": "uint256",
367
+ "name": "poolBorrowAmount",
368
+ "type": "uint256"
369
+ }
370
+ ],
371
+ "stateMutability": "view",
372
+ "type": "function"
373
+ },
374
+ {
375
+ "inputs": [
376
+ {
377
+ "internalType": "address",
378
+ "name": "_poolToken",
379
+ "type": "address"
380
+ }
381
+ ],
382
+ "name": "getAverageSupplyRatePerBlock",
383
+ "outputs": [
384
+ {
385
+ "internalType": "uint256",
386
+ "name": "avgSupplyRatePerBlock",
387
+ "type": "uint256"
388
+ },
389
+ {
390
+ "internalType": "uint256",
391
+ "name": "p2pSupplyAmount",
392
+ "type": "uint256"
393
+ },
394
+ {
395
+ "internalType": "uint256",
396
+ "name": "poolSupplyAmount",
397
+ "type": "uint256"
398
+ }
399
+ ],
400
+ "stateMutability": "view",
401
+ "type": "function"
402
+ },
403
+ {
404
+ "inputs": [
405
+ {
406
+ "internalType": "address",
407
+ "name": "_poolToken",
408
+ "type": "address"
409
+ },
410
+ {
411
+ "internalType": "address",
412
+ "name": "_user",
413
+ "type": "address"
414
+ }
415
+ ],
416
+ "name": "getCurrentBorrowBalanceInOf",
417
+ "outputs": [
418
+ {
419
+ "internalType": "uint256",
420
+ "name": "balanceOnPool",
421
+ "type": "uint256"
422
+ },
423
+ {
424
+ "internalType": "uint256",
425
+ "name": "balanceInP2P",
426
+ "type": "uint256"
427
+ },
428
+ {
429
+ "internalType": "uint256",
430
+ "name": "totalBalance",
431
+ "type": "uint256"
432
+ }
433
+ ],
434
+ "stateMutability": "view",
435
+ "type": "function"
436
+ },
437
+ {
438
+ "inputs": [
439
+ {
440
+ "internalType": "address",
441
+ "name": "_poolToken",
442
+ "type": "address"
443
+ }
444
+ ],
445
+ "name": "getCurrentCompBorrowIndex",
446
+ "outputs": [
447
+ {
448
+ "internalType": "uint256",
449
+ "name": "",
450
+ "type": "uint256"
451
+ }
452
+ ],
453
+ "stateMutability": "view",
454
+ "type": "function"
455
+ },
456
+ {
457
+ "inputs": [
458
+ {
459
+ "internalType": "address",
460
+ "name": "_poolToken",
461
+ "type": "address"
462
+ }
463
+ ],
464
+ "name": "getCurrentCompSupplyIndex",
465
+ "outputs": [
466
+ {
467
+ "internalType": "uint256",
468
+ "name": "",
469
+ "type": "uint256"
470
+ }
471
+ ],
472
+ "stateMutability": "view",
473
+ "type": "function"
474
+ },
475
+ {
476
+ "inputs": [
477
+ {
478
+ "internalType": "address",
479
+ "name": "_poolToken",
480
+ "type": "address"
481
+ }
482
+ ],
483
+ "name": "getCurrentP2PBorrowIndex",
484
+ "outputs": [
485
+ {
486
+ "internalType": "uint256",
487
+ "name": "p2pBorrowIndex",
488
+ "type": "uint256"
489
+ }
490
+ ],
491
+ "stateMutability": "view",
492
+ "type": "function"
493
+ },
494
+ {
495
+ "inputs": [
496
+ {
497
+ "internalType": "address",
498
+ "name": "_poolToken",
499
+ "type": "address"
500
+ }
501
+ ],
502
+ "name": "getCurrentP2PSupplyIndex",
503
+ "outputs": [
504
+ {
505
+ "internalType": "uint256",
506
+ "name": "p2pSupplyIndex",
507
+ "type": "uint256"
508
+ }
509
+ ],
510
+ "stateMutability": "view",
511
+ "type": "function"
512
+ },
513
+ {
514
+ "inputs": [
515
+ {
516
+ "internalType": "address",
517
+ "name": "_poolToken",
518
+ "type": "address"
519
+ }
520
+ ],
521
+ "name": "getCurrentPoolIndexes",
522
+ "outputs": [
523
+ {
524
+ "internalType": "uint256",
525
+ "name": "poolSupplyIndex",
526
+ "type": "uint256"
527
+ },
528
+ {
529
+ "internalType": "uint256",
530
+ "name": "poolBorrowIndex",
531
+ "type": "uint256"
532
+ }
533
+ ],
534
+ "stateMutability": "view",
535
+ "type": "function"
536
+ },
537
+ {
538
+ "inputs": [
539
+ {
540
+ "internalType": "address",
541
+ "name": "_poolToken",
542
+ "type": "address"
543
+ },
544
+ {
545
+ "internalType": "address",
546
+ "name": "_user",
547
+ "type": "address"
548
+ }
549
+ ],
550
+ "name": "getCurrentSupplyBalanceInOf",
551
+ "outputs": [
552
+ {
553
+ "internalType": "uint256",
554
+ "name": "balanceOnPool",
555
+ "type": "uint256"
556
+ },
557
+ {
558
+ "internalType": "uint256",
559
+ "name": "balanceInP2P",
560
+ "type": "uint256"
561
+ },
562
+ {
563
+ "internalType": "uint256",
564
+ "name": "totalBalance",
565
+ "type": "uint256"
566
+ }
567
+ ],
568
+ "stateMutability": "view",
569
+ "type": "function"
570
+ },
571
+ {
572
+ "inputs": [
573
+ {
574
+ "internalType": "address",
575
+ "name": "_poolToken",
576
+ "type": "address"
577
+ },
578
+ {
579
+ "internalType": "address",
580
+ "name": "_user",
581
+ "type": "address"
582
+ }
583
+ ],
584
+ "name": "getCurrentUserBorrowRatePerBlock",
585
+ "outputs": [
586
+ {
587
+ "internalType": "uint256",
588
+ "name": "borrowRatePerBlock",
589
+ "type": "uint256"
590
+ }
591
+ ],
592
+ "stateMutability": "view",
593
+ "type": "function"
594
+ },
595
+ {
596
+ "inputs": [
597
+ {
598
+ "internalType": "address",
599
+ "name": "_poolToken",
600
+ "type": "address"
601
+ },
602
+ {
603
+ "internalType": "address",
604
+ "name": "_user",
605
+ "type": "address"
606
+ }
607
+ ],
608
+ "name": "getCurrentUserSupplyRatePerBlock",
609
+ "outputs": [
610
+ {
611
+ "internalType": "uint256",
612
+ "name": "supplyRatePerBlock",
613
+ "type": "uint256"
614
+ }
615
+ ],
616
+ "stateMutability": "view",
617
+ "type": "function"
618
+ },
619
+ {
620
+ "inputs": [
621
+ {
622
+ "internalType": "address",
623
+ "name": "_user",
624
+ "type": "address"
625
+ }
626
+ ],
627
+ "name": "getEnteredMarkets",
628
+ "outputs": [
629
+ {
630
+ "internalType": "address[]",
631
+ "name": "enteredMarkets",
632
+ "type": "address[]"
633
+ }
634
+ ],
635
+ "stateMutability": "view",
636
+ "type": "function"
637
+ },
638
+ {
639
+ "inputs": [
640
+ {
641
+ "internalType": "address",
642
+ "name": "_poolToken",
643
+ "type": "address"
644
+ },
645
+ {
646
+ "internalType": "bool",
647
+ "name": "_updated",
648
+ "type": "bool"
649
+ }
650
+ ],
651
+ "name": "getIndexes",
652
+ "outputs": [
653
+ {
654
+ "components": [
655
+ {
656
+ "internalType": "uint256",
657
+ "name": "p2pSupplyIndex",
658
+ "type": "uint256"
659
+ },
660
+ {
661
+ "internalType": "uint256",
662
+ "name": "p2pBorrowIndex",
663
+ "type": "uint256"
664
+ },
665
+ {
666
+ "internalType": "uint256",
667
+ "name": "poolSupplyIndex",
668
+ "type": "uint256"
669
+ },
670
+ {
671
+ "internalType": "uint256",
672
+ "name": "poolBorrowIndex",
673
+ "type": "uint256"
674
+ }
675
+ ],
676
+ "internalType": "struct Types.Indexes",
677
+ "name": "indexes",
678
+ "type": "tuple"
679
+ }
680
+ ],
681
+ "stateMutability": "view",
682
+ "type": "function"
683
+ },
684
+ {
685
+ "inputs": [
686
+ {
687
+ "internalType": "address",
688
+ "name": "_poolToken",
689
+ "type": "address"
690
+ }
691
+ ],
692
+ "name": "getMainMarketData",
693
+ "outputs": [
694
+ {
695
+ "internalType": "uint256",
696
+ "name": "avgSupplyRatePerBlock",
697
+ "type": "uint256"
698
+ },
699
+ {
700
+ "internalType": "uint256",
701
+ "name": "avgBorrowRatePerBlock",
702
+ "type": "uint256"
703
+ },
704
+ {
705
+ "internalType": "uint256",
706
+ "name": "p2pSupplyAmount",
707
+ "type": "uint256"
708
+ },
709
+ {
710
+ "internalType": "uint256",
711
+ "name": "p2pBorrowAmount",
712
+ "type": "uint256"
713
+ },
714
+ {
715
+ "internalType": "uint256",
716
+ "name": "poolSupplyAmount",
717
+ "type": "uint256"
718
+ },
719
+ {
720
+ "internalType": "uint256",
721
+ "name": "poolBorrowAmount",
722
+ "type": "uint256"
723
+ }
724
+ ],
725
+ "stateMutability": "view",
726
+ "type": "function"
727
+ },
728
+ {
729
+ "inputs": [
730
+ {
731
+ "internalType": "address",
732
+ "name": "_poolToken",
733
+ "type": "address"
734
+ }
735
+ ],
736
+ "name": "getMarketConfiguration",
737
+ "outputs": [
738
+ {
739
+ "internalType": "address",
740
+ "name": "underlying",
741
+ "type": "address"
742
+ },
743
+ {
744
+ "internalType": "bool",
745
+ "name": "isCreated",
746
+ "type": "bool"
747
+ },
748
+ {
749
+ "internalType": "bool",
750
+ "name": "p2pDisabled",
751
+ "type": "bool"
752
+ },
753
+ {
754
+ "internalType": "bool",
755
+ "name": "isPaused",
756
+ "type": "bool"
757
+ },
758
+ {
759
+ "internalType": "bool",
760
+ "name": "isPartiallyPaused",
761
+ "type": "bool"
762
+ },
763
+ {
764
+ "internalType": "uint16",
765
+ "name": "reserveFactor",
766
+ "type": "uint16"
767
+ },
768
+ {
769
+ "internalType": "uint16",
770
+ "name": "p2pIndexCursor",
771
+ "type": "uint16"
772
+ },
773
+ {
774
+ "internalType": "uint256",
775
+ "name": "collateralFactor",
776
+ "type": "uint256"
777
+ }
778
+ ],
779
+ "stateMutability": "view",
780
+ "type": "function"
781
+ },
782
+ {
783
+ "inputs": [
784
+ {
785
+ "internalType": "address",
786
+ "name": "_poolToken",
787
+ "type": "address"
788
+ }
789
+ ],
790
+ "name": "getMarketPauseStatus",
791
+ "outputs": [
792
+ {
793
+ "components": [
794
+ {
795
+ "internalType": "bool",
796
+ "name": "isSupplyPaused",
797
+ "type": "bool"
798
+ },
799
+ {
800
+ "internalType": "bool",
801
+ "name": "isBorrowPaused",
802
+ "type": "bool"
803
+ },
804
+ {
805
+ "internalType": "bool",
806
+ "name": "isWithdrawPaused",
807
+ "type": "bool"
808
+ },
809
+ {
810
+ "internalType": "bool",
811
+ "name": "isRepayPaused",
812
+ "type": "bool"
813
+ },
814
+ {
815
+ "internalType": "bool",
816
+ "name": "isLiquidateCollateralPaused",
817
+ "type": "bool"
818
+ },
819
+ {
820
+ "internalType": "bool",
821
+ "name": "isLiquidateBorrowPaused",
822
+ "type": "bool"
823
+ },
824
+ {
825
+ "internalType": "bool",
826
+ "name": "isDeprecated",
827
+ "type": "bool"
828
+ }
829
+ ],
830
+ "internalType": "struct Types.MarketPauseStatus",
831
+ "name": "",
832
+ "type": "tuple"
833
+ }
834
+ ],
835
+ "stateMutability": "view",
836
+ "type": "function"
837
+ },
838
+ {
839
+ "inputs": [
840
+ {
841
+ "internalType": "address",
842
+ "name": "_poolToken",
843
+ "type": "address"
844
+ },
845
+ {
846
+ "internalType": "address",
847
+ "name": "_user",
848
+ "type": "address"
849
+ },
850
+ {
851
+ "internalType": "uint256",
852
+ "name": "_amount",
853
+ "type": "uint256"
854
+ }
855
+ ],
856
+ "name": "getNextUserBorrowRatePerBlock",
857
+ "outputs": [
858
+ {
859
+ "internalType": "uint256",
860
+ "name": "nextBorrowRatePerBlock",
861
+ "type": "uint256"
862
+ },
863
+ {
864
+ "internalType": "uint256",
865
+ "name": "balanceOnPool",
866
+ "type": "uint256"
867
+ },
868
+ {
869
+ "internalType": "uint256",
870
+ "name": "balanceInP2P",
871
+ "type": "uint256"
872
+ },
873
+ {
874
+ "internalType": "uint256",
875
+ "name": "totalBalance",
876
+ "type": "uint256"
877
+ }
878
+ ],
879
+ "stateMutability": "view",
880
+ "type": "function"
881
+ },
882
+ {
883
+ "inputs": [
884
+ {
885
+ "internalType": "address",
886
+ "name": "_poolToken",
887
+ "type": "address"
888
+ },
889
+ {
890
+ "internalType": "address",
891
+ "name": "_user",
892
+ "type": "address"
893
+ },
894
+ {
895
+ "internalType": "uint256",
896
+ "name": "_amount",
897
+ "type": "uint256"
898
+ }
899
+ ],
900
+ "name": "getNextUserSupplyRatePerBlock",
901
+ "outputs": [
902
+ {
903
+ "internalType": "uint256",
904
+ "name": "nextSupplyRatePerBlock",
905
+ "type": "uint256"
906
+ },
907
+ {
908
+ "internalType": "uint256",
909
+ "name": "balanceOnPool",
910
+ "type": "uint256"
911
+ },
912
+ {
913
+ "internalType": "uint256",
914
+ "name": "balanceInP2P",
915
+ "type": "uint256"
916
+ },
917
+ {
918
+ "internalType": "uint256",
919
+ "name": "totalBalance",
920
+ "type": "uint256"
921
+ }
922
+ ],
923
+ "stateMutability": "view",
924
+ "type": "function"
925
+ },
926
+ {
927
+ "inputs": [
928
+ {
929
+ "internalType": "address",
930
+ "name": "_poolToken",
931
+ "type": "address"
932
+ }
933
+ ],
934
+ "name": "getRatesPerBlock",
935
+ "outputs": [
936
+ {
937
+ "internalType": "uint256",
938
+ "name": "p2pSupplyRate",
939
+ "type": "uint256"
940
+ },
941
+ {
942
+ "internalType": "uint256",
943
+ "name": "p2pBorrowRate",
944
+ "type": "uint256"
945
+ },
946
+ {
947
+ "internalType": "uint256",
948
+ "name": "poolSupplyRate",
949
+ "type": "uint256"
950
+ },
951
+ {
952
+ "internalType": "uint256",
953
+ "name": "poolBorrowRate",
954
+ "type": "uint256"
955
+ }
956
+ ],
957
+ "stateMutability": "view",
958
+ "type": "function"
959
+ },
960
+ {
961
+ "inputs": [],
962
+ "name": "getTotalBorrow",
963
+ "outputs": [
964
+ {
965
+ "internalType": "uint256",
966
+ "name": "p2pBorrowAmount",
967
+ "type": "uint256"
968
+ },
969
+ {
970
+ "internalType": "uint256",
971
+ "name": "poolBorrowAmount",
972
+ "type": "uint256"
973
+ },
974
+ {
975
+ "internalType": "uint256",
976
+ "name": "totalBorrowAmount",
977
+ "type": "uint256"
978
+ }
979
+ ],
980
+ "stateMutability": "view",
981
+ "type": "function"
982
+ },
983
+ {
984
+ "inputs": [
985
+ {
986
+ "internalType": "address",
987
+ "name": "_poolToken",
988
+ "type": "address"
989
+ }
990
+ ],
991
+ "name": "getTotalMarketBorrow",
992
+ "outputs": [
993
+ {
994
+ "internalType": "uint256",
995
+ "name": "p2pBorrowAmount",
996
+ "type": "uint256"
997
+ },
998
+ {
999
+ "internalType": "uint256",
1000
+ "name": "poolBorrowAmount",
1001
+ "type": "uint256"
1002
+ }
1003
+ ],
1004
+ "stateMutability": "view",
1005
+ "type": "function"
1006
+ },
1007
+ {
1008
+ "inputs": [
1009
+ {
1010
+ "internalType": "address",
1011
+ "name": "_poolToken",
1012
+ "type": "address"
1013
+ }
1014
+ ],
1015
+ "name": "getTotalMarketSupply",
1016
+ "outputs": [
1017
+ {
1018
+ "internalType": "uint256",
1019
+ "name": "p2pSupplyAmount",
1020
+ "type": "uint256"
1021
+ },
1022
+ {
1023
+ "internalType": "uint256",
1024
+ "name": "poolSupplyAmount",
1025
+ "type": "uint256"
1026
+ }
1027
+ ],
1028
+ "stateMutability": "view",
1029
+ "type": "function"
1030
+ },
1031
+ {
1032
+ "inputs": [],
1033
+ "name": "getTotalSupply",
1034
+ "outputs": [
1035
+ {
1036
+ "internalType": "uint256",
1037
+ "name": "p2pSupplyAmount",
1038
+ "type": "uint256"
1039
+ },
1040
+ {
1041
+ "internalType": "uint256",
1042
+ "name": "poolSupplyAmount",
1043
+ "type": "uint256"
1044
+ },
1045
+ {
1046
+ "internalType": "uint256",
1047
+ "name": "totalSupplyAmount",
1048
+ "type": "uint256"
1049
+ }
1050
+ ],
1051
+ "stateMutability": "view",
1052
+ "type": "function"
1053
+ },
1054
+ {
1055
+ "inputs": [
1056
+ {
1057
+ "internalType": "address",
1058
+ "name": "_user",
1059
+ "type": "address"
1060
+ },
1061
+ {
1062
+ "internalType": "address[]",
1063
+ "name": "_updatedMarkets",
1064
+ "type": "address[]"
1065
+ }
1066
+ ],
1067
+ "name": "getUserBalanceStates",
1068
+ "outputs": [
1069
+ {
1070
+ "internalType": "uint256",
1071
+ "name": "collateralValue",
1072
+ "type": "uint256"
1073
+ },
1074
+ {
1075
+ "internalType": "uint256",
1076
+ "name": "debtValue",
1077
+ "type": "uint256"
1078
+ },
1079
+ {
1080
+ "internalType": "uint256",
1081
+ "name": "maxDebtValue",
1082
+ "type": "uint256"
1083
+ }
1084
+ ],
1085
+ "stateMutability": "view",
1086
+ "type": "function"
1087
+ },
1088
+ {
1089
+ "inputs": [
1090
+ {
1091
+ "internalType": "address",
1092
+ "name": "_user",
1093
+ "type": "address"
1094
+ },
1095
+ {
1096
+ "internalType": "address[]",
1097
+ "name": "_updatedMarkets",
1098
+ "type": "address[]"
1099
+ }
1100
+ ],
1101
+ "name": "getUserHealthFactor",
1102
+ "outputs": [
1103
+ {
1104
+ "internalType": "uint256",
1105
+ "name": "",
1106
+ "type": "uint256"
1107
+ }
1108
+ ],
1109
+ "stateMutability": "view",
1110
+ "type": "function"
1111
+ },
1112
+ {
1113
+ "inputs": [
1114
+ {
1115
+ "internalType": "address",
1116
+ "name": "_user",
1117
+ "type": "address"
1118
+ },
1119
+ {
1120
+ "internalType": "address",
1121
+ "name": "_poolToken",
1122
+ "type": "address"
1123
+ },
1124
+ {
1125
+ "internalType": "uint256",
1126
+ "name": "_withdrawnAmount",
1127
+ "type": "uint256"
1128
+ },
1129
+ {
1130
+ "internalType": "uint256",
1131
+ "name": "_borrowedAmount",
1132
+ "type": "uint256"
1133
+ }
1134
+ ],
1135
+ "name": "getUserHypotheticalBalanceStates",
1136
+ "outputs": [
1137
+ {
1138
+ "internalType": "uint256",
1139
+ "name": "debtValue",
1140
+ "type": "uint256"
1141
+ },
1142
+ {
1143
+ "internalType": "uint256",
1144
+ "name": "maxDebtValue",
1145
+ "type": "uint256"
1146
+ }
1147
+ ],
1148
+ "stateMutability": "view",
1149
+ "type": "function"
1150
+ },
1151
+ {
1152
+ "inputs": [
1153
+ {
1154
+ "internalType": "address",
1155
+ "name": "_user",
1156
+ "type": "address"
1157
+ },
1158
+ {
1159
+ "internalType": "address",
1160
+ "name": "_poolToken",
1161
+ "type": "address"
1162
+ },
1163
+ {
1164
+ "internalType": "bool",
1165
+ "name": "_getUpdatedIndexes",
1166
+ "type": "bool"
1167
+ },
1168
+ {
1169
+ "internalType": "contract ICompoundOracle",
1170
+ "name": "_oracle",
1171
+ "type": "address"
1172
+ }
1173
+ ],
1174
+ "name": "getUserLiquidityDataForAsset",
1175
+ "outputs": [
1176
+ {
1177
+ "components": [
1178
+ {
1179
+ "internalType": "uint256",
1180
+ "name": "collateralValue",
1181
+ "type": "uint256"
1182
+ },
1183
+ {
1184
+ "internalType": "uint256",
1185
+ "name": "maxDebtValue",
1186
+ "type": "uint256"
1187
+ },
1188
+ {
1189
+ "internalType": "uint256",
1190
+ "name": "debtValue",
1191
+ "type": "uint256"
1192
+ },
1193
+ {
1194
+ "internalType": "uint256",
1195
+ "name": "underlyingPrice",
1196
+ "type": "uint256"
1197
+ },
1198
+ {
1199
+ "internalType": "uint256",
1200
+ "name": "collateralFactor",
1201
+ "type": "uint256"
1202
+ }
1203
+ ],
1204
+ "internalType": "struct Types.AssetLiquidityData",
1205
+ "name": "",
1206
+ "type": "tuple"
1207
+ }
1208
+ ],
1209
+ "stateMutability": "view",
1210
+ "type": "function"
1211
+ },
1212
+ {
1213
+ "inputs": [
1214
+ {
1215
+ "internalType": "address",
1216
+ "name": "_user",
1217
+ "type": "address"
1218
+ },
1219
+ {
1220
+ "internalType": "address",
1221
+ "name": "_poolToken",
1222
+ "type": "address"
1223
+ }
1224
+ ],
1225
+ "name": "getUserMaxCapacitiesForAsset",
1226
+ "outputs": [
1227
+ {
1228
+ "internalType": "uint256",
1229
+ "name": "withdrawable",
1230
+ "type": "uint256"
1231
+ },
1232
+ {
1233
+ "internalType": "uint256",
1234
+ "name": "borrowable",
1235
+ "type": "uint256"
1236
+ }
1237
+ ],
1238
+ "stateMutability": "view",
1239
+ "type": "function"
1240
+ },
1241
+ {
1242
+ "inputs": [
1243
+ {
1244
+ "internalType": "address[]",
1245
+ "name": "_poolTokens",
1246
+ "type": "address[]"
1247
+ },
1248
+ {
1249
+ "internalType": "address",
1250
+ "name": "_user",
1251
+ "type": "address"
1252
+ }
1253
+ ],
1254
+ "name": "getUserUnclaimedRewards",
1255
+ "outputs": [
1256
+ {
1257
+ "internalType": "uint256",
1258
+ "name": "unclaimedRewards",
1259
+ "type": "uint256"
1260
+ }
1261
+ ],
1262
+ "stateMutability": "view",
1263
+ "type": "function"
1264
+ },
1265
+ {
1266
+ "inputs": [
1267
+ {
1268
+ "internalType": "address",
1269
+ "name": "_user",
1270
+ "type": "address"
1271
+ },
1272
+ {
1273
+ "internalType": "address",
1274
+ "name": "_poolToken",
1275
+ "type": "address"
1276
+ },
1277
+ {
1278
+ "internalType": "address[]",
1279
+ "name": "_updatedMarkets",
1280
+ "type": "address[]"
1281
+ }
1282
+ ],
1283
+ "name": "isLiquidatable",
1284
+ "outputs": [
1285
+ {
1286
+ "internalType": "bool",
1287
+ "name": "",
1288
+ "type": "bool"
1289
+ }
1290
+ ],
1291
+ "stateMutability": "view",
1292
+ "type": "function"
1293
+ },
1294
+ {
1295
+ "inputs": [
1296
+ {
1297
+ "internalType": "address",
1298
+ "name": "_user",
1299
+ "type": "address"
1300
+ },
1301
+ {
1302
+ "internalType": "address[]",
1303
+ "name": "_updatedMarkets",
1304
+ "type": "address[]"
1305
+ }
1306
+ ],
1307
+ "name": "isLiquidatable",
1308
+ "outputs": [
1309
+ {
1310
+ "internalType": "bool",
1311
+ "name": "",
1312
+ "type": "bool"
1313
+ }
1314
+ ],
1315
+ "stateMutability": "view",
1316
+ "type": "function"
1317
+ },
1318
+ {
1319
+ "inputs": [
1320
+ {
1321
+ "internalType": "address",
1322
+ "name": "_poolToken",
1323
+ "type": "address"
1324
+ }
1325
+ ],
1326
+ "name": "isMarketCreated",
1327
+ "outputs": [
1328
+ {
1329
+ "internalType": "bool",
1330
+ "name": "",
1331
+ "type": "bool"
1332
+ }
1333
+ ],
1334
+ "stateMutability": "view",
1335
+ "type": "function"
1336
+ },
1337
+ {
1338
+ "inputs": [
1339
+ {
1340
+ "internalType": "address",
1341
+ "name": "",
1342
+ "type": "address"
1343
+ }
1344
+ ],
1345
+ "name": "isMarketCreatedAndNotPaused",
1346
+ "outputs": [
1347
+ {
1348
+ "internalType": "bool",
1349
+ "name": "",
1350
+ "type": "bool"
1351
+ }
1352
+ ],
1353
+ "stateMutability": "pure",
1354
+ "type": "function"
1355
+ },
1356
+ {
1357
+ "inputs": [
1358
+ {
1359
+ "internalType": "address",
1360
+ "name": "",
1361
+ "type": "address"
1362
+ }
1363
+ ],
1364
+ "name": "isMarketCreatedAndNotPausedNorPartiallyPaused",
1365
+ "outputs": [
1366
+ {
1367
+ "internalType": "bool",
1368
+ "name": "",
1369
+ "type": "bool"
1370
+ }
1371
+ ],
1372
+ "stateMutability": "pure",
1373
+ "type": "function"
1374
+ },
1375
+ {
1376
+ "inputs": [],
1377
+ "name": "morpho",
1378
+ "outputs": [
1379
+ {
1380
+ "internalType": "contract IMorpho",
1381
+ "name": "",
1382
+ "type": "address"
1383
+ }
1384
+ ],
1385
+ "stateMutability": "view",
1386
+ "type": "function"
1387
+ },
1388
+ {
1389
+ "inputs": [],
1390
+ "name": "rewardsManager",
1391
+ "outputs": [
1392
+ {
1393
+ "internalType": "contract IRewardsManager",
1394
+ "name": "",
1395
+ "type": "address"
1396
+ }
1397
+ ],
1398
+ "stateMutability": "view",
1399
+ "type": "function"
1400
+ }
1401
+ ]
1402
+ ''')