defi-state-querier 0.0.6__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 (61) 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/abis/lending/radiant_v2/__init__.py +0 -0
  10. defi_services/abis/lending/radiant_v2/radiant_v2_incentive_abi.py +1016 -0
  11. defi_services/abis/lending/wepiggy/__init__.py +0 -0
  12. defi_services/abis/lending/wepiggy/wepiggy_distribution_abi.py +1047 -0
  13. defi_services/constants/chain_constant.py +1 -0
  14. defi_services/constants/entities/lending_constant.py +26 -0
  15. defi_services/constants/entities/lending_services.py +85 -0
  16. defi_services/constants/query_constant.py +1 -0
  17. defi_services/constants/token_constant.py +2 -0
  18. defi_services/jobs/processors/__init__.py +0 -0
  19. defi_services/jobs/processors/solana_state_processor.py +101 -0
  20. defi_services/jobs/{state_processor.py → processors/state_processor.py} +9 -4
  21. defi_services/jobs/processors/substrate_state_processor.py +97 -0
  22. defi_services/jobs/queriers/__init__.py +0 -0
  23. defi_services/jobs/queriers/solana_state_querier.py +83 -0
  24. defi_services/jobs/{state_querier.py → queriers/state_querier.py} +3 -2
  25. defi_services/jobs/queriers/substrate_state_querier.py +84 -0
  26. defi_services/services/lending/aave_v2_services.py +8 -7
  27. defi_services/services/lending/aave_v3_services.py +12 -9
  28. defi_services/services/lending/compound_service.py +29 -10
  29. defi_services/services/lending/cream_services.py +5 -4
  30. defi_services/services/lending/flux_services.py +34 -27
  31. defi_services/services/lending/geist_services.py +4 -3
  32. defi_services/services/lending/granary_v1_services.py +6 -7
  33. defi_services/services/lending/iron_bank_service.py +20 -13
  34. defi_services/services/lending/lending_info/aave_v2_services.py +2 -2
  35. defi_services/services/lending/lending_info/ethereum/morpho_aave_v2_eth.py +53 -0
  36. defi_services/services/lending/lending_info/ethereum/morpho_aave_v3_eth.py +51 -0
  37. defi_services/services/lending/lending_info/ethereum/morpho_compound_eth.py +44 -0
  38. defi_services/services/lending/lending_info/ethereum/wepiggy_eth.py +41 -0
  39. defi_services/services/lending/liqee_service.py +5 -26
  40. defi_services/services/lending/morpho_aave_v2_services.py +89 -0
  41. defi_services/services/lending/morpho_aave_v3_services.py +159 -0
  42. defi_services/services/lending/morpho_compound_services.py +233 -0
  43. defi_services/services/lending/onyx_service.py +32 -13
  44. defi_services/services/lending/radiant_v2_services.py +30 -3
  45. defi_services/services/lending/strike_service.py +29 -10
  46. defi_services/services/lending/trava_services.py +8 -7
  47. defi_services/services/lending/uwu_services.py +8 -7
  48. defi_services/services/lending/valas_services.py +6 -5
  49. defi_services/services/lending/venus_services.py +28 -8
  50. defi_services/services/lending/wepiggy_services.py +519 -0
  51. defi_services/services/nft_services.py +1 -1
  52. defi_services/services/solana_token_services.py +46 -0
  53. defi_services/services/substrate_token_services.py +70 -0
  54. defi_services/services/token_services.py +1 -3
  55. defi_services/utils/init_services.py +3 -3
  56. {defi_state_querier-0.0.6.dist-info → defi_state_querier-0.0.9.dist-info}/METADATA +3 -3
  57. {defi_state_querier-0.0.6.dist-info → defi_state_querier-0.0.9.dist-info}/RECORD +60 -32
  58. defi_services/constants/entities/lending.py +0 -97
  59. {defi_state_querier-0.0.6.dist-info → defi_state_querier-0.0.9.dist-info}/LICENSE +0 -0
  60. {defi_state_querier-0.0.6.dist-info → defi_state_querier-0.0.9.dist-info}/WHEEL +0 -0
  61. {defi_state_querier-0.0.6.dist-info → defi_state_querier-0.0.9.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1208 @@
1
+ import json
2
+
3
+ MORPHO_AAVE_V2_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": "DEFAULT_LIQUIDATION_CLOSE_FACTOR",
19
+ "outputs": [
20
+ {
21
+ "internalType": "uint16",
22
+ "name": "",
23
+ "type": "uint16"
24
+ }
25
+ ],
26
+ "stateMutability": "view",
27
+ "type": "function"
28
+ },
29
+ {
30
+ "inputs": [],
31
+ "name": "HEALTH_FACTOR_LIQUIDATION_THRESHOLD",
32
+ "outputs": [
33
+ {
34
+ "internalType": "uint256",
35
+ "name": "",
36
+ "type": "uint256"
37
+ }
38
+ ],
39
+ "stateMutability": "view",
40
+ "type": "function"
41
+ },
42
+ {
43
+ "inputs": [],
44
+ "name": "ST_ETH",
45
+ "outputs": [
46
+ {
47
+ "internalType": "address",
48
+ "name": "",
49
+ "type": "address"
50
+ }
51
+ ],
52
+ "stateMutability": "view",
53
+ "type": "function"
54
+ },
55
+ {
56
+ "inputs": [],
57
+ "name": "ST_ETH_BASE_REBASE_INDEX",
58
+ "outputs": [
59
+ {
60
+ "internalType": "uint256",
61
+ "name": "",
62
+ "type": "uint256"
63
+ }
64
+ ],
65
+ "stateMutability": "view",
66
+ "type": "function"
67
+ },
68
+ {
69
+ "inputs": [],
70
+ "name": "addressesProvider",
71
+ "outputs": [
72
+ {
73
+ "internalType": "contract ILendingPoolAddressesProvider",
74
+ "name": "",
75
+ "type": "address"
76
+ }
77
+ ],
78
+ "stateMutability": "view",
79
+ "type": "function"
80
+ },
81
+ {
82
+ "inputs": [
83
+ {
84
+ "internalType": "address",
85
+ "name": "_user",
86
+ "type": "address"
87
+ },
88
+ {
89
+ "internalType": "address",
90
+ "name": "_poolTokenBorrowed",
91
+ "type": "address"
92
+ },
93
+ {
94
+ "internalType": "address",
95
+ "name": "_poolTokenCollateral",
96
+ "type": "address"
97
+ }
98
+ ],
99
+ "name": "computeLiquidationRepayAmount",
100
+ "outputs": [
101
+ {
102
+ "internalType": "uint256",
103
+ "name": "",
104
+ "type": "uint256"
105
+ }
106
+ ],
107
+ "stateMutability": "view",
108
+ "type": "function"
109
+ },
110
+ {
111
+ "inputs": [
112
+ {
113
+ "internalType": "address",
114
+ "name": "_poolToken",
115
+ "type": "address"
116
+ }
117
+ ],
118
+ "name": "getAdvancedMarketData",
119
+ "outputs": [
120
+ {
121
+ "components": [
122
+ {
123
+ "internalType": "uint256",
124
+ "name": "p2pSupplyIndex",
125
+ "type": "uint256"
126
+ },
127
+ {
128
+ "internalType": "uint256",
129
+ "name": "p2pBorrowIndex",
130
+ "type": "uint256"
131
+ },
132
+ {
133
+ "internalType": "uint256",
134
+ "name": "poolSupplyIndex",
135
+ "type": "uint256"
136
+ },
137
+ {
138
+ "internalType": "uint256",
139
+ "name": "poolBorrowIndex",
140
+ "type": "uint256"
141
+ }
142
+ ],
143
+ "internalType": "struct Types.Indexes",
144
+ "name": "indexes",
145
+ "type": "tuple"
146
+ },
147
+ {
148
+ "internalType": "uint32",
149
+ "name": "lastUpdateTimestamp",
150
+ "type": "uint32"
151
+ },
152
+ {
153
+ "internalType": "uint256",
154
+ "name": "p2pSupplyDelta",
155
+ "type": "uint256"
156
+ },
157
+ {
158
+ "internalType": "uint256",
159
+ "name": "p2pBorrowDelta",
160
+ "type": "uint256"
161
+ }
162
+ ],
163
+ "stateMutability": "view",
164
+ "type": "function"
165
+ },
166
+ {
167
+ "inputs": [],
168
+ "name": "getAllMarkets",
169
+ "outputs": [
170
+ {
171
+ "internalType": "address[]",
172
+ "name": "marketsCreated",
173
+ "type": "address[]"
174
+ }
175
+ ],
176
+ "stateMutability": "view",
177
+ "type": "function"
178
+ },
179
+ {
180
+ "inputs": [
181
+ {
182
+ "internalType": "address",
183
+ "name": "_poolToken",
184
+ "type": "address"
185
+ }
186
+ ],
187
+ "name": "getAverageBorrowRatePerYear",
188
+ "outputs": [
189
+ {
190
+ "internalType": "uint256",
191
+ "name": "avgBorrowRatePerYear",
192
+ "type": "uint256"
193
+ },
194
+ {
195
+ "internalType": "uint256",
196
+ "name": "p2pBorrowAmount",
197
+ "type": "uint256"
198
+ },
199
+ {
200
+ "internalType": "uint256",
201
+ "name": "poolBorrowAmount",
202
+ "type": "uint256"
203
+ }
204
+ ],
205
+ "stateMutability": "view",
206
+ "type": "function"
207
+ },
208
+ {
209
+ "inputs": [
210
+ {
211
+ "internalType": "address",
212
+ "name": "_poolToken",
213
+ "type": "address"
214
+ }
215
+ ],
216
+ "name": "getAverageSupplyRatePerYear",
217
+ "outputs": [
218
+ {
219
+ "internalType": "uint256",
220
+ "name": "avgSupplyRatePerYear",
221
+ "type": "uint256"
222
+ },
223
+ {
224
+ "internalType": "uint256",
225
+ "name": "p2pSupplyAmount",
226
+ "type": "uint256"
227
+ },
228
+ {
229
+ "internalType": "uint256",
230
+ "name": "poolSupplyAmount",
231
+ "type": "uint256"
232
+ }
233
+ ],
234
+ "stateMutability": "view",
235
+ "type": "function"
236
+ },
237
+ {
238
+ "inputs": [
239
+ {
240
+ "internalType": "address",
241
+ "name": "_poolToken",
242
+ "type": "address"
243
+ },
244
+ {
245
+ "internalType": "address",
246
+ "name": "_user",
247
+ "type": "address"
248
+ }
249
+ ],
250
+ "name": "getCurrentBorrowBalanceInOf",
251
+ "outputs": [
252
+ {
253
+ "internalType": "uint256",
254
+ "name": "balanceInP2P",
255
+ "type": "uint256"
256
+ },
257
+ {
258
+ "internalType": "uint256",
259
+ "name": "balanceOnPool",
260
+ "type": "uint256"
261
+ },
262
+ {
263
+ "internalType": "uint256",
264
+ "name": "totalBalance",
265
+ "type": "uint256"
266
+ }
267
+ ],
268
+ "stateMutability": "view",
269
+ "type": "function"
270
+ },
271
+ {
272
+ "inputs": [
273
+ {
274
+ "internalType": "address",
275
+ "name": "_poolToken",
276
+ "type": "address"
277
+ }
278
+ ],
279
+ "name": "getCurrentP2PBorrowIndex",
280
+ "outputs": [
281
+ {
282
+ "internalType": "uint256",
283
+ "name": "p2pBorrowIndex",
284
+ "type": "uint256"
285
+ }
286
+ ],
287
+ "stateMutability": "view",
288
+ "type": "function"
289
+ },
290
+ {
291
+ "inputs": [
292
+ {
293
+ "internalType": "address",
294
+ "name": "_poolToken",
295
+ "type": "address"
296
+ }
297
+ ],
298
+ "name": "getCurrentP2PSupplyIndex",
299
+ "outputs": [
300
+ {
301
+ "internalType": "uint256",
302
+ "name": "p2pSupplyIndex",
303
+ "type": "uint256"
304
+ }
305
+ ],
306
+ "stateMutability": "view",
307
+ "type": "function"
308
+ },
309
+ {
310
+ "inputs": [
311
+ {
312
+ "internalType": "address",
313
+ "name": "_poolToken",
314
+ "type": "address"
315
+ },
316
+ {
317
+ "internalType": "address",
318
+ "name": "_user",
319
+ "type": "address"
320
+ }
321
+ ],
322
+ "name": "getCurrentSupplyBalanceInOf",
323
+ "outputs": [
324
+ {
325
+ "internalType": "uint256",
326
+ "name": "balanceInP2P",
327
+ "type": "uint256"
328
+ },
329
+ {
330
+ "internalType": "uint256",
331
+ "name": "balanceOnPool",
332
+ "type": "uint256"
333
+ },
334
+ {
335
+ "internalType": "uint256",
336
+ "name": "totalBalance",
337
+ "type": "uint256"
338
+ }
339
+ ],
340
+ "stateMutability": "view",
341
+ "type": "function"
342
+ },
343
+ {
344
+ "inputs": [
345
+ {
346
+ "internalType": "address",
347
+ "name": "_poolToken",
348
+ "type": "address"
349
+ },
350
+ {
351
+ "internalType": "address",
352
+ "name": "_user",
353
+ "type": "address"
354
+ }
355
+ ],
356
+ "name": "getCurrentUserBorrowRatePerYear",
357
+ "outputs": [
358
+ {
359
+ "internalType": "uint256",
360
+ "name": "borrowRatePerYear",
361
+ "type": "uint256"
362
+ }
363
+ ],
364
+ "stateMutability": "view",
365
+ "type": "function"
366
+ },
367
+ {
368
+ "inputs": [
369
+ {
370
+ "internalType": "address",
371
+ "name": "_poolToken",
372
+ "type": "address"
373
+ },
374
+ {
375
+ "internalType": "address",
376
+ "name": "_user",
377
+ "type": "address"
378
+ }
379
+ ],
380
+ "name": "getCurrentUserSupplyRatePerYear",
381
+ "outputs": [
382
+ {
383
+ "internalType": "uint256",
384
+ "name": "supplyRatePerYear",
385
+ "type": "uint256"
386
+ }
387
+ ],
388
+ "stateMutability": "view",
389
+ "type": "function"
390
+ },
391
+ {
392
+ "inputs": [
393
+ {
394
+ "internalType": "address",
395
+ "name": "_user",
396
+ "type": "address"
397
+ }
398
+ ],
399
+ "name": "getEnteredMarkets",
400
+ "outputs": [
401
+ {
402
+ "internalType": "address[]",
403
+ "name": "enteredMarkets",
404
+ "type": "address[]"
405
+ }
406
+ ],
407
+ "stateMutability": "view",
408
+ "type": "function"
409
+ },
410
+ {
411
+ "inputs": [
412
+ {
413
+ "internalType": "address",
414
+ "name": "_poolToken",
415
+ "type": "address"
416
+ }
417
+ ],
418
+ "name": "getIndexes",
419
+ "outputs": [
420
+ {
421
+ "components": [
422
+ {
423
+ "internalType": "uint256",
424
+ "name": "p2pSupplyIndex",
425
+ "type": "uint256"
426
+ },
427
+ {
428
+ "internalType": "uint256",
429
+ "name": "p2pBorrowIndex",
430
+ "type": "uint256"
431
+ },
432
+ {
433
+ "internalType": "uint256",
434
+ "name": "poolSupplyIndex",
435
+ "type": "uint256"
436
+ },
437
+ {
438
+ "internalType": "uint256",
439
+ "name": "poolBorrowIndex",
440
+ "type": "uint256"
441
+ }
442
+ ],
443
+ "internalType": "struct Types.Indexes",
444
+ "name": "indexes",
445
+ "type": "tuple"
446
+ }
447
+ ],
448
+ "stateMutability": "view",
449
+ "type": "function"
450
+ },
451
+ {
452
+ "inputs": [
453
+ {
454
+ "internalType": "address",
455
+ "name": "_poolToken",
456
+ "type": "address"
457
+ }
458
+ ],
459
+ "name": "getMainMarketData",
460
+ "outputs": [
461
+ {
462
+ "internalType": "uint256",
463
+ "name": "avgSupplyRatePerYear",
464
+ "type": "uint256"
465
+ },
466
+ {
467
+ "internalType": "uint256",
468
+ "name": "avgBorrowRatePerYear",
469
+ "type": "uint256"
470
+ },
471
+ {
472
+ "internalType": "uint256",
473
+ "name": "p2pSupplyAmount",
474
+ "type": "uint256"
475
+ },
476
+ {
477
+ "internalType": "uint256",
478
+ "name": "p2pBorrowAmount",
479
+ "type": "uint256"
480
+ },
481
+ {
482
+ "internalType": "uint256",
483
+ "name": "poolSupplyAmount",
484
+ "type": "uint256"
485
+ },
486
+ {
487
+ "internalType": "uint256",
488
+ "name": "poolBorrowAmount",
489
+ "type": "uint256"
490
+ }
491
+ ],
492
+ "stateMutability": "view",
493
+ "type": "function"
494
+ },
495
+ {
496
+ "inputs": [
497
+ {
498
+ "internalType": "address",
499
+ "name": "_poolToken",
500
+ "type": "address"
501
+ }
502
+ ],
503
+ "name": "getMarketConfiguration",
504
+ "outputs": [
505
+ {
506
+ "internalType": "address",
507
+ "name": "underlying",
508
+ "type": "address"
509
+ },
510
+ {
511
+ "internalType": "bool",
512
+ "name": "isCreated",
513
+ "type": "bool"
514
+ },
515
+ {
516
+ "internalType": "bool",
517
+ "name": "isP2PDisabled",
518
+ "type": "bool"
519
+ },
520
+ {
521
+ "internalType": "bool",
522
+ "name": "isPaused",
523
+ "type": "bool"
524
+ },
525
+ {
526
+ "internalType": "bool",
527
+ "name": "isPartiallyPaused",
528
+ "type": "bool"
529
+ },
530
+ {
531
+ "internalType": "uint16",
532
+ "name": "reserveFactor",
533
+ "type": "uint16"
534
+ },
535
+ {
536
+ "internalType": "uint16",
537
+ "name": "p2pIndexCursor",
538
+ "type": "uint16"
539
+ },
540
+ {
541
+ "internalType": "uint256",
542
+ "name": "loanToValue",
543
+ "type": "uint256"
544
+ },
545
+ {
546
+ "internalType": "uint256",
547
+ "name": "liquidationThreshold",
548
+ "type": "uint256"
549
+ },
550
+ {
551
+ "internalType": "uint256",
552
+ "name": "liquidationBonus",
553
+ "type": "uint256"
554
+ },
555
+ {
556
+ "internalType": "uint256",
557
+ "name": "decimals",
558
+ "type": "uint256"
559
+ }
560
+ ],
561
+ "stateMutability": "view",
562
+ "type": "function"
563
+ },
564
+ {
565
+ "inputs": [
566
+ {
567
+ "internalType": "address",
568
+ "name": "_poolToken",
569
+ "type": "address"
570
+ }
571
+ ],
572
+ "name": "getMarketPauseStatus",
573
+ "outputs": [
574
+ {
575
+ "components": [
576
+ {
577
+ "internalType": "bool",
578
+ "name": "isSupplyPaused",
579
+ "type": "bool"
580
+ },
581
+ {
582
+ "internalType": "bool",
583
+ "name": "isBorrowPaused",
584
+ "type": "bool"
585
+ },
586
+ {
587
+ "internalType": "bool",
588
+ "name": "isWithdrawPaused",
589
+ "type": "bool"
590
+ },
591
+ {
592
+ "internalType": "bool",
593
+ "name": "isRepayPaused",
594
+ "type": "bool"
595
+ },
596
+ {
597
+ "internalType": "bool",
598
+ "name": "isLiquidateCollateralPaused",
599
+ "type": "bool"
600
+ },
601
+ {
602
+ "internalType": "bool",
603
+ "name": "isLiquidateBorrowPaused",
604
+ "type": "bool"
605
+ },
606
+ {
607
+ "internalType": "bool",
608
+ "name": "isDeprecated",
609
+ "type": "bool"
610
+ }
611
+ ],
612
+ "internalType": "struct Types.MarketPauseStatus",
613
+ "name": "",
614
+ "type": "tuple"
615
+ }
616
+ ],
617
+ "stateMutability": "view",
618
+ "type": "function"
619
+ },
620
+ {
621
+ "inputs": [
622
+ {
623
+ "internalType": "address",
624
+ "name": "_poolToken",
625
+ "type": "address"
626
+ },
627
+ {
628
+ "internalType": "address",
629
+ "name": "_user",
630
+ "type": "address"
631
+ },
632
+ {
633
+ "internalType": "uint256",
634
+ "name": "_amount",
635
+ "type": "uint256"
636
+ }
637
+ ],
638
+ "name": "getNextUserBorrowRatePerYear",
639
+ "outputs": [
640
+ {
641
+ "internalType": "uint256",
642
+ "name": "nextBorrowRatePerYear",
643
+ "type": "uint256"
644
+ },
645
+ {
646
+ "internalType": "uint256",
647
+ "name": "balanceInP2P",
648
+ "type": "uint256"
649
+ },
650
+ {
651
+ "internalType": "uint256",
652
+ "name": "balanceOnPool",
653
+ "type": "uint256"
654
+ },
655
+ {
656
+ "internalType": "uint256",
657
+ "name": "totalBalance",
658
+ "type": "uint256"
659
+ }
660
+ ],
661
+ "stateMutability": "view",
662
+ "type": "function"
663
+ },
664
+ {
665
+ "inputs": [
666
+ {
667
+ "internalType": "address",
668
+ "name": "_poolToken",
669
+ "type": "address"
670
+ },
671
+ {
672
+ "internalType": "address",
673
+ "name": "_user",
674
+ "type": "address"
675
+ },
676
+ {
677
+ "internalType": "uint256",
678
+ "name": "_amount",
679
+ "type": "uint256"
680
+ }
681
+ ],
682
+ "name": "getNextUserSupplyRatePerYear",
683
+ "outputs": [
684
+ {
685
+ "internalType": "uint256",
686
+ "name": "nextSupplyRatePerYear",
687
+ "type": "uint256"
688
+ },
689
+ {
690
+ "internalType": "uint256",
691
+ "name": "balanceInP2P",
692
+ "type": "uint256"
693
+ },
694
+ {
695
+ "internalType": "uint256",
696
+ "name": "balanceOnPool",
697
+ "type": "uint256"
698
+ },
699
+ {
700
+ "internalType": "uint256",
701
+ "name": "totalBalance",
702
+ "type": "uint256"
703
+ }
704
+ ],
705
+ "stateMutability": "view",
706
+ "type": "function"
707
+ },
708
+ {
709
+ "inputs": [
710
+ {
711
+ "internalType": "address",
712
+ "name": "_poolToken",
713
+ "type": "address"
714
+ }
715
+ ],
716
+ "name": "getRatesPerYear",
717
+ "outputs": [
718
+ {
719
+ "internalType": "uint256",
720
+ "name": "p2pSupplyRate",
721
+ "type": "uint256"
722
+ },
723
+ {
724
+ "internalType": "uint256",
725
+ "name": "p2pBorrowRate",
726
+ "type": "uint256"
727
+ },
728
+ {
729
+ "internalType": "uint256",
730
+ "name": "poolSupplyRate",
731
+ "type": "uint256"
732
+ },
733
+ {
734
+ "internalType": "uint256",
735
+ "name": "poolBorrowRate",
736
+ "type": "uint256"
737
+ }
738
+ ],
739
+ "stateMutability": "view",
740
+ "type": "function"
741
+ },
742
+ {
743
+ "inputs": [],
744
+ "name": "getTotalBorrow",
745
+ "outputs": [
746
+ {
747
+ "internalType": "uint256",
748
+ "name": "p2pBorrowAmount",
749
+ "type": "uint256"
750
+ },
751
+ {
752
+ "internalType": "uint256",
753
+ "name": "poolBorrowAmount",
754
+ "type": "uint256"
755
+ },
756
+ {
757
+ "internalType": "uint256",
758
+ "name": "totalBorrowAmount",
759
+ "type": "uint256"
760
+ }
761
+ ],
762
+ "stateMutability": "view",
763
+ "type": "function"
764
+ },
765
+ {
766
+ "inputs": [
767
+ {
768
+ "internalType": "address",
769
+ "name": "_poolToken",
770
+ "type": "address"
771
+ }
772
+ ],
773
+ "name": "getTotalMarketBorrow",
774
+ "outputs": [
775
+ {
776
+ "internalType": "uint256",
777
+ "name": "p2pBorrowAmount",
778
+ "type": "uint256"
779
+ },
780
+ {
781
+ "internalType": "uint256",
782
+ "name": "poolBorrowAmount",
783
+ "type": "uint256"
784
+ }
785
+ ],
786
+ "stateMutability": "view",
787
+ "type": "function"
788
+ },
789
+ {
790
+ "inputs": [
791
+ {
792
+ "internalType": "address",
793
+ "name": "_poolToken",
794
+ "type": "address"
795
+ }
796
+ ],
797
+ "name": "getTotalMarketSupply",
798
+ "outputs": [
799
+ {
800
+ "internalType": "uint256",
801
+ "name": "p2pSupplyAmount",
802
+ "type": "uint256"
803
+ },
804
+ {
805
+ "internalType": "uint256",
806
+ "name": "poolSupplyAmount",
807
+ "type": "uint256"
808
+ }
809
+ ],
810
+ "stateMutability": "view",
811
+ "type": "function"
812
+ },
813
+ {
814
+ "inputs": [],
815
+ "name": "getTotalSupply",
816
+ "outputs": [
817
+ {
818
+ "internalType": "uint256",
819
+ "name": "p2pSupplyAmount",
820
+ "type": "uint256"
821
+ },
822
+ {
823
+ "internalType": "uint256",
824
+ "name": "poolSupplyAmount",
825
+ "type": "uint256"
826
+ },
827
+ {
828
+ "internalType": "uint256",
829
+ "name": "totalSupplyAmount",
830
+ "type": "uint256"
831
+ }
832
+ ],
833
+ "stateMutability": "view",
834
+ "type": "function"
835
+ },
836
+ {
837
+ "inputs": [
838
+ {
839
+ "internalType": "address",
840
+ "name": "_user",
841
+ "type": "address"
842
+ }
843
+ ],
844
+ "name": "getUserBalanceStates",
845
+ "outputs": [
846
+ {
847
+ "components": [
848
+ {
849
+ "internalType": "uint256",
850
+ "name": "collateralEth",
851
+ "type": "uint256"
852
+ },
853
+ {
854
+ "internalType": "uint256",
855
+ "name": "borrowableEth",
856
+ "type": "uint256"
857
+ },
858
+ {
859
+ "internalType": "uint256",
860
+ "name": "maxDebtEth",
861
+ "type": "uint256"
862
+ },
863
+ {
864
+ "internalType": "uint256",
865
+ "name": "debtEth",
866
+ "type": "uint256"
867
+ }
868
+ ],
869
+ "internalType": "struct Types.LiquidityData",
870
+ "name": "",
871
+ "type": "tuple"
872
+ }
873
+ ],
874
+ "stateMutability": "view",
875
+ "type": "function"
876
+ },
877
+ {
878
+ "inputs": [
879
+ {
880
+ "internalType": "address",
881
+ "name": "_user",
882
+ "type": "address"
883
+ }
884
+ ],
885
+ "name": "getUserHealthFactor",
886
+ "outputs": [
887
+ {
888
+ "internalType": "uint256",
889
+ "name": "",
890
+ "type": "uint256"
891
+ }
892
+ ],
893
+ "stateMutability": "view",
894
+ "type": "function"
895
+ },
896
+ {
897
+ "inputs": [
898
+ {
899
+ "internalType": "address",
900
+ "name": "_user",
901
+ "type": "address"
902
+ },
903
+ {
904
+ "internalType": "address",
905
+ "name": "_poolToken",
906
+ "type": "address"
907
+ },
908
+ {
909
+ "internalType": "uint256",
910
+ "name": "_withdrawnAmount",
911
+ "type": "uint256"
912
+ },
913
+ {
914
+ "internalType": "uint256",
915
+ "name": "_borrowedAmount",
916
+ "type": "uint256"
917
+ }
918
+ ],
919
+ "name": "getUserHypotheticalBalanceStates",
920
+ "outputs": [
921
+ {
922
+ "components": [
923
+ {
924
+ "internalType": "uint256",
925
+ "name": "collateralEth",
926
+ "type": "uint256"
927
+ },
928
+ {
929
+ "internalType": "uint256",
930
+ "name": "borrowableEth",
931
+ "type": "uint256"
932
+ },
933
+ {
934
+ "internalType": "uint256",
935
+ "name": "maxDebtEth",
936
+ "type": "uint256"
937
+ },
938
+ {
939
+ "internalType": "uint256",
940
+ "name": "debtEth",
941
+ "type": "uint256"
942
+ }
943
+ ],
944
+ "internalType": "struct Types.LiquidityData",
945
+ "name": "liquidityData",
946
+ "type": "tuple"
947
+ }
948
+ ],
949
+ "stateMutability": "view",
950
+ "type": "function"
951
+ },
952
+ {
953
+ "inputs": [
954
+ {
955
+ "internalType": "address",
956
+ "name": "_user",
957
+ "type": "address"
958
+ },
959
+ {
960
+ "internalType": "address",
961
+ "name": "_poolToken",
962
+ "type": "address"
963
+ },
964
+ {
965
+ "internalType": "uint256",
966
+ "name": "_withdrawnAmount",
967
+ "type": "uint256"
968
+ },
969
+ {
970
+ "internalType": "uint256",
971
+ "name": "_borrowedAmount",
972
+ "type": "uint256"
973
+ }
974
+ ],
975
+ "name": "getUserHypotheticalHealthFactor",
976
+ "outputs": [
977
+ {
978
+ "internalType": "uint256",
979
+ "name": "healthFactor",
980
+ "type": "uint256"
981
+ }
982
+ ],
983
+ "stateMutability": "view",
984
+ "type": "function"
985
+ },
986
+ {
987
+ "inputs": [
988
+ {
989
+ "internalType": "address",
990
+ "name": "_user",
991
+ "type": "address"
992
+ },
993
+ {
994
+ "internalType": "address",
995
+ "name": "_poolToken",
996
+ "type": "address"
997
+ },
998
+ {
999
+ "internalType": "contract IPriceOracleGetter",
1000
+ "name": "_oracle",
1001
+ "type": "address"
1002
+ }
1003
+ ],
1004
+ "name": "getUserLiquidityDataForAsset",
1005
+ "outputs": [
1006
+ {
1007
+ "components": [
1008
+ {
1009
+ "internalType": "uint256",
1010
+ "name": "decimals",
1011
+ "type": "uint256"
1012
+ },
1013
+ {
1014
+ "internalType": "uint256",
1015
+ "name": "tokenUnit",
1016
+ "type": "uint256"
1017
+ },
1018
+ {
1019
+ "internalType": "uint256",
1020
+ "name": "liquidationThreshold",
1021
+ "type": "uint256"
1022
+ },
1023
+ {
1024
+ "internalType": "uint256",
1025
+ "name": "ltv",
1026
+ "type": "uint256"
1027
+ },
1028
+ {
1029
+ "internalType": "uint256",
1030
+ "name": "underlyingPrice",
1031
+ "type": "uint256"
1032
+ },
1033
+ {
1034
+ "internalType": "uint256",
1035
+ "name": "collateralEth",
1036
+ "type": "uint256"
1037
+ },
1038
+ {
1039
+ "internalType": "uint256",
1040
+ "name": "debtEth",
1041
+ "type": "uint256"
1042
+ }
1043
+ ],
1044
+ "internalType": "struct Types.AssetLiquidityData",
1045
+ "name": "",
1046
+ "type": "tuple"
1047
+ }
1048
+ ],
1049
+ "stateMutability": "view",
1050
+ "type": "function"
1051
+ },
1052
+ {
1053
+ "inputs": [
1054
+ {
1055
+ "internalType": "address",
1056
+ "name": "_user",
1057
+ "type": "address"
1058
+ },
1059
+ {
1060
+ "internalType": "address",
1061
+ "name": "_poolToken",
1062
+ "type": "address"
1063
+ }
1064
+ ],
1065
+ "name": "getUserMaxCapacitiesForAsset",
1066
+ "outputs": [
1067
+ {
1068
+ "internalType": "uint256",
1069
+ "name": "withdrawable",
1070
+ "type": "uint256"
1071
+ },
1072
+ {
1073
+ "internalType": "uint256",
1074
+ "name": "borrowable",
1075
+ "type": "uint256"
1076
+ }
1077
+ ],
1078
+ "stateMutability": "view",
1079
+ "type": "function"
1080
+ },
1081
+ {
1082
+ "inputs": [
1083
+ {
1084
+ "internalType": "address",
1085
+ "name": "_user",
1086
+ "type": "address"
1087
+ }
1088
+ ],
1089
+ "name": "isLiquidatable",
1090
+ "outputs": [
1091
+ {
1092
+ "internalType": "bool",
1093
+ "name": "",
1094
+ "type": "bool"
1095
+ }
1096
+ ],
1097
+ "stateMutability": "view",
1098
+ "type": "function"
1099
+ },
1100
+ {
1101
+ "inputs": [
1102
+ {
1103
+ "internalType": "address",
1104
+ "name": "_user",
1105
+ "type": "address"
1106
+ },
1107
+ {
1108
+ "internalType": "address",
1109
+ "name": "_poolToken",
1110
+ "type": "address"
1111
+ }
1112
+ ],
1113
+ "name": "isLiquidatable",
1114
+ "outputs": [
1115
+ {
1116
+ "internalType": "bool",
1117
+ "name": "",
1118
+ "type": "bool"
1119
+ }
1120
+ ],
1121
+ "stateMutability": "view",
1122
+ "type": "function"
1123
+ },
1124
+ {
1125
+ "inputs": [
1126
+ {
1127
+ "internalType": "address",
1128
+ "name": "_poolToken",
1129
+ "type": "address"
1130
+ }
1131
+ ],
1132
+ "name": "isMarketCreated",
1133
+ "outputs": [
1134
+ {
1135
+ "internalType": "bool",
1136
+ "name": "",
1137
+ "type": "bool"
1138
+ }
1139
+ ],
1140
+ "stateMutability": "view",
1141
+ "type": "function"
1142
+ },
1143
+ {
1144
+ "inputs": [
1145
+ {
1146
+ "internalType": "address",
1147
+ "name": "",
1148
+ "type": "address"
1149
+ }
1150
+ ],
1151
+ "name": "isMarketCreatedAndNotPaused",
1152
+ "outputs": [
1153
+ {
1154
+ "internalType": "bool",
1155
+ "name": "",
1156
+ "type": "bool"
1157
+ }
1158
+ ],
1159
+ "stateMutability": "pure",
1160
+ "type": "function"
1161
+ },
1162
+ {
1163
+ "inputs": [
1164
+ {
1165
+ "internalType": "address",
1166
+ "name": "",
1167
+ "type": "address"
1168
+ }
1169
+ ],
1170
+ "name": "isMarketCreatedAndNotPausedNorPartiallyPaused",
1171
+ "outputs": [
1172
+ {
1173
+ "internalType": "bool",
1174
+ "name": "",
1175
+ "type": "bool"
1176
+ }
1177
+ ],
1178
+ "stateMutability": "pure",
1179
+ "type": "function"
1180
+ },
1181
+ {
1182
+ "inputs": [],
1183
+ "name": "morpho",
1184
+ "outputs": [
1185
+ {
1186
+ "internalType": "contract IMorpho",
1187
+ "name": "",
1188
+ "type": "address"
1189
+ }
1190
+ ],
1191
+ "stateMutability": "view",
1192
+ "type": "function"
1193
+ },
1194
+ {
1195
+ "inputs": [],
1196
+ "name": "pool",
1197
+ "outputs": [
1198
+ {
1199
+ "internalType": "contract ILendingPool",
1200
+ "name": "",
1201
+ "type": "address"
1202
+ }
1203
+ ],
1204
+ "stateMutability": "view",
1205
+ "type": "function"
1206
+ }
1207
+ ]
1208
+ ''')