defi-state-querier 0.5.23__py3-none-any.whl → 0.5.25__py3-none-any.whl

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.
Files changed (28) hide show
  1. defi_services/__init__.py +1 -1
  2. defi_services/abis/lending/ionic/__init__.py +0 -0
  3. defi_services/abis/lending/ionic/ionic_ctoken_abi.py +1108 -0
  4. defi_services/abis/lending/moonwell/__init__.py +0 -0
  5. defi_services/abis/lending/moonwell/moonwell_comptroller_abi.py +1500 -0
  6. defi_services/abis/lending/moonwell/moonwell_ctoken_abi.py +1431 -0
  7. defi_services/abis/lending/radiant_v2/radiant_reward_converter.py +817 -0
  8. defi_services/constants/chain_constant.py +2 -1
  9. defi_services/constants/entities/lending_constant.py +10 -5
  10. defi_services/constants/entities/lending_services.py +9 -1
  11. defi_services/services/lending/granary_services.py +3 -1
  12. defi_services/services/lending/ionic_service.py +167 -0
  13. defi_services/services/lending/lending_info/base/granary_base.py +62 -0
  14. defi_services/services/lending/lending_info/base/ionic_base.py +173 -0
  15. defi_services/services/lending/lending_info/base/moonwell_base.py +79 -1
  16. defi_services/services/lending/lending_info/base/radiant_v2_base.py +57 -0
  17. defi_services/services/lending/lending_info/base/sonne_base.py +53 -0
  18. defi_services/services/lending/lending_info/base/zerolend_base.py +99 -99
  19. defi_services/services/lending/moonwell_service.py +120 -0
  20. defi_services/services/lending/radiant_v2_services.py +50 -10
  21. defi_services/services/lending/sonne_service.py +64 -0
  22. defi_services/services/lending/venus_services.py +9 -3
  23. defi_services/services/lending/zerolend_services.py +1 -1
  24. {defi_state_querier-0.5.23.dist-info → defi_state_querier-0.5.25.dist-info}/METADATA +1 -1
  25. {defi_state_querier-0.5.23.dist-info → defi_state_querier-0.5.25.dist-info}/RECORD +28 -15
  26. {defi_state_querier-0.5.23.dist-info → defi_state_querier-0.5.25.dist-info}/LICENSE +0 -0
  27. {defi_state_querier-0.5.23.dist-info → defi_state_querier-0.5.25.dist-info}/WHEEL +0 -0
  28. {defi_state_querier-0.5.23.dist-info → defi_state_querier-0.5.25.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,817 @@
1
+ import json
2
+
3
+ RADIANT_REWARD_CONVERTER_ABI = json.loads('''
4
+ [
5
+ {
6
+ "inputs": [],
7
+ "stateMutability": "nonpayable",
8
+ "type": "constructor"
9
+ },
10
+ {
11
+ "inputs": [],
12
+ "name": "AddressZero",
13
+ "type": "error"
14
+ },
15
+ {
16
+ "inputs": [],
17
+ "name": "ArrayLengthMismatch",
18
+ "type": "error"
19
+ },
20
+ {
21
+ "inputs": [],
22
+ "name": "InsufficientStakeAmount",
23
+ "type": "error"
24
+ },
25
+ {
26
+ "inputs": [],
27
+ "name": "InvalidCompoundFee",
28
+ "type": "error"
29
+ },
30
+ {
31
+ "inputs": [],
32
+ "name": "InvalidSlippage",
33
+ "type": "error"
34
+ },
35
+ {
36
+ "inputs": [],
37
+ "name": "NotBountyManager",
38
+ "type": "error"
39
+ },
40
+ {
41
+ "inputs": [],
42
+ "name": "NotEligible",
43
+ "type": "error"
44
+ },
45
+ {
46
+ "inputs": [
47
+ {
48
+ "internalType": "address",
49
+ "name": "asset",
50
+ "type": "address"
51
+ },
52
+ {
53
+ "internalType": "uint256",
54
+ "name": "amount",
55
+ "type": "uint256"
56
+ }
57
+ ],
58
+ "name": "SwapFailed",
59
+ "type": "error"
60
+ },
61
+ {
62
+ "inputs": [
63
+ {
64
+ "internalType": "address",
65
+ "name": "fromToken",
66
+ "type": "address"
67
+ },
68
+ {
69
+ "internalType": "address",
70
+ "name": "toToken",
71
+ "type": "address"
72
+ }
73
+ ],
74
+ "name": "WrongRoute",
75
+ "type": "error"
76
+ },
77
+ {
78
+ "anonymous": false,
79
+ "inputs": [
80
+ {
81
+ "indexed": true,
82
+ "internalType": "address",
83
+ "name": "_manager",
84
+ "type": "address"
85
+ }
86
+ ],
87
+ "name": "BountyManagerUpdated",
88
+ "type": "event"
89
+ },
90
+ {
91
+ "anonymous": false,
92
+ "inputs": [
93
+ {
94
+ "indexed": true,
95
+ "internalType": "uint256",
96
+ "name": "_compoundFee",
97
+ "type": "uint256"
98
+ }
99
+ ],
100
+ "name": "CompoundFeeUpdated",
101
+ "type": "event"
102
+ },
103
+ {
104
+ "anonymous": false,
105
+ "inputs": [
106
+ {
107
+ "indexed": false,
108
+ "internalType": "uint8",
109
+ "name": "version",
110
+ "type": "uint8"
111
+ }
112
+ ],
113
+ "name": "Initialized",
114
+ "type": "event"
115
+ },
116
+ {
117
+ "anonymous": false,
118
+ "inputs": [
119
+ {
120
+ "indexed": true,
121
+ "internalType": "address",
122
+ "name": "_lockZap",
123
+ "type": "address"
124
+ }
125
+ ],
126
+ "name": "LockZapUpdated",
127
+ "type": "event"
128
+ },
129
+ {
130
+ "anonymous": false,
131
+ "inputs": [
132
+ {
133
+ "indexed": true,
134
+ "internalType": "address",
135
+ "name": "previousOwner",
136
+ "type": "address"
137
+ },
138
+ {
139
+ "indexed": true,
140
+ "internalType": "address",
141
+ "name": "newOwner",
142
+ "type": "address"
143
+ }
144
+ ],
145
+ "name": "OwnershipTransferred",
146
+ "type": "event"
147
+ },
148
+ {
149
+ "anonymous": false,
150
+ "inputs": [
151
+ {
152
+ "indexed": false,
153
+ "internalType": "address",
154
+ "name": "account",
155
+ "type": "address"
156
+ }
157
+ ],
158
+ "name": "Paused",
159
+ "type": "event"
160
+ },
161
+ {
162
+ "anonymous": false,
163
+ "inputs": [
164
+ {
165
+ "indexed": true,
166
+ "internalType": "address",
167
+ "name": "_poolHelper",
168
+ "type": "address"
169
+ }
170
+ ],
171
+ "name": "PoolHelperUpdated",
172
+ "type": "event"
173
+ },
174
+ {
175
+ "anonymous": false,
176
+ "inputs": [
177
+ {
178
+ "indexed": true,
179
+ "internalType": "address",
180
+ "name": "_tokenIn",
181
+ "type": "address"
182
+ },
183
+ {
184
+ "indexed": true,
185
+ "internalType": "address",
186
+ "name": "_tokenOut",
187
+ "type": "address"
188
+ },
189
+ {
190
+ "indexed": false,
191
+ "internalType": "bytes",
192
+ "name": "_route",
193
+ "type": "bytes"
194
+ }
195
+ ],
196
+ "name": "RoutesUniV3Updated",
197
+ "type": "event"
198
+ },
199
+ {
200
+ "anonymous": false,
201
+ "inputs": [
202
+ {
203
+ "indexed": true,
204
+ "internalType": "address",
205
+ "name": "_uniRouter",
206
+ "type": "address"
207
+ }
208
+ ],
209
+ "name": "UniRouterUpdated",
210
+ "type": "event"
211
+ },
212
+ {
213
+ "anonymous": false,
214
+ "inputs": [
215
+ {
216
+ "indexed": false,
217
+ "internalType": "address",
218
+ "name": "account",
219
+ "type": "address"
220
+ }
221
+ ],
222
+ "name": "Unpaused",
223
+ "type": "event"
224
+ },
225
+ {
226
+ "inputs": [],
227
+ "name": "MAX_COMPOUND_FEE",
228
+ "outputs": [
229
+ {
230
+ "internalType": "uint256",
231
+ "name": "",
232
+ "type": "uint256"
233
+ }
234
+ ],
235
+ "stateMutability": "view",
236
+ "type": "function"
237
+ },
238
+ {
239
+ "inputs": [],
240
+ "name": "MAX_SLIPPAGE",
241
+ "outputs": [
242
+ {
243
+ "internalType": "uint256",
244
+ "name": "",
245
+ "type": "uint256"
246
+ }
247
+ ],
248
+ "stateMutability": "view",
249
+ "type": "function"
250
+ },
251
+ {
252
+ "inputs": [],
253
+ "name": "MIN_DELAY",
254
+ "outputs": [
255
+ {
256
+ "internalType": "uint256",
257
+ "name": "",
258
+ "type": "uint256"
259
+ }
260
+ ],
261
+ "stateMutability": "view",
262
+ "type": "function"
263
+ },
264
+ {
265
+ "inputs": [],
266
+ "name": "MIN_UNIV3_ROUTE_LENGTH",
267
+ "outputs": [
268
+ {
269
+ "internalType": "uint256",
270
+ "name": "",
271
+ "type": "uint256"
272
+ }
273
+ ],
274
+ "stateMutability": "view",
275
+ "type": "function"
276
+ },
277
+ {
278
+ "inputs": [],
279
+ "name": "PERCENT_DIVISOR",
280
+ "outputs": [
281
+ {
282
+ "internalType": "uint256",
283
+ "name": "",
284
+ "type": "uint256"
285
+ }
286
+ ],
287
+ "stateMutability": "view",
288
+ "type": "function"
289
+ },
290
+ {
291
+ "inputs": [],
292
+ "name": "UNIV3_NEXT_OFFSET",
293
+ "outputs": [
294
+ {
295
+ "internalType": "uint256",
296
+ "name": "",
297
+ "type": "uint256"
298
+ }
299
+ ],
300
+ "stateMutability": "view",
301
+ "type": "function"
302
+ },
303
+ {
304
+ "inputs": [],
305
+ "name": "addressProvider",
306
+ "outputs": [
307
+ {
308
+ "internalType": "address",
309
+ "name": "",
310
+ "type": "address"
311
+ }
312
+ ],
313
+ "stateMutability": "view",
314
+ "type": "function"
315
+ },
316
+ {
317
+ "inputs": [],
318
+ "name": "autocompoundThreshold",
319
+ "outputs": [
320
+ {
321
+ "internalType": "uint256",
322
+ "name": "minStakeAmtEth",
323
+ "type": "uint256"
324
+ }
325
+ ],
326
+ "stateMutability": "view",
327
+ "type": "function"
328
+ },
329
+ {
330
+ "inputs": [],
331
+ "name": "baseToken",
332
+ "outputs": [
333
+ {
334
+ "internalType": "address",
335
+ "name": "",
336
+ "type": "address"
337
+ }
338
+ ],
339
+ "stateMutability": "view",
340
+ "type": "function"
341
+ },
342
+ {
343
+ "inputs": [],
344
+ "name": "bountyManager",
345
+ "outputs": [
346
+ {
347
+ "internalType": "address",
348
+ "name": "",
349
+ "type": "address"
350
+ }
351
+ ],
352
+ "stateMutability": "view",
353
+ "type": "function"
354
+ },
355
+ {
356
+ "inputs": [
357
+ {
358
+ "internalType": "address",
359
+ "name": "_user",
360
+ "type": "address"
361
+ },
362
+ {
363
+ "internalType": "bool",
364
+ "name": "_execute",
365
+ "type": "bool"
366
+ },
367
+ {
368
+ "internalType": "uint256",
369
+ "name": "_slippage",
370
+ "type": "uint256"
371
+ }
372
+ ],
373
+ "name": "claimCompound",
374
+ "outputs": [
375
+ {
376
+ "internalType": "uint256",
377
+ "name": "fee",
378
+ "type": "uint256"
379
+ }
380
+ ],
381
+ "stateMutability": "nonpayable",
382
+ "type": "function"
383
+ },
384
+ {
385
+ "inputs": [],
386
+ "name": "compoundFee",
387
+ "outputs": [
388
+ {
389
+ "internalType": "uint256",
390
+ "name": "",
391
+ "type": "uint256"
392
+ }
393
+ ],
394
+ "stateMutability": "view",
395
+ "type": "function"
396
+ },
397
+ {
398
+ "inputs": [
399
+ {
400
+ "internalType": "address",
401
+ "name": "_tokenIn",
402
+ "type": "address"
403
+ },
404
+ {
405
+ "internalType": "address",
406
+ "name": "_tokenOut",
407
+ "type": "address"
408
+ }
409
+ ],
410
+ "name": "getUniV3Route",
411
+ "outputs": [
412
+ {
413
+ "internalType": "bytes",
414
+ "name": "",
415
+ "type": "bytes"
416
+ }
417
+ ],
418
+ "stateMutability": "view",
419
+ "type": "function"
420
+ },
421
+ {
422
+ "inputs": [
423
+ {
424
+ "internalType": "address",
425
+ "name": "_uniRouter",
426
+ "type": "address"
427
+ },
428
+ {
429
+ "internalType": "address",
430
+ "name": "_mfd",
431
+ "type": "address"
432
+ },
433
+ {
434
+ "internalType": "address",
435
+ "name": "_baseToken",
436
+ "type": "address"
437
+ },
438
+ {
439
+ "internalType": "address",
440
+ "name": "_addressProvider",
441
+ "type": "address"
442
+ },
443
+ {
444
+ "internalType": "address",
445
+ "name": "_lockZap",
446
+ "type": "address"
447
+ },
448
+ {
449
+ "internalType": "uint256",
450
+ "name": "_compoundFee",
451
+ "type": "uint256"
452
+ }
453
+ ],
454
+ "name": "initialize",
455
+ "outputs": [],
456
+ "stateMutability": "nonpayable",
457
+ "type": "function"
458
+ },
459
+ {
460
+ "inputs": [
461
+ {
462
+ "internalType": "address",
463
+ "name": "_user",
464
+ "type": "address"
465
+ },
466
+ {
467
+ "internalType": "uint256",
468
+ "name": "_pending",
469
+ "type": "uint256"
470
+ }
471
+ ],
472
+ "name": "isEligibleForAutoCompound",
473
+ "outputs": [
474
+ {
475
+ "internalType": "bool",
476
+ "name": "",
477
+ "type": "bool"
478
+ }
479
+ ],
480
+ "stateMutability": "view",
481
+ "type": "function"
482
+ },
483
+ {
484
+ "inputs": [
485
+ {
486
+ "internalType": "uint256",
487
+ "name": "_pending",
488
+ "type": "uint256"
489
+ }
490
+ ],
491
+ "name": "isEligibleForCompound",
492
+ "outputs": [
493
+ {
494
+ "internalType": "bool",
495
+ "name": "eligible",
496
+ "type": "bool"
497
+ }
498
+ ],
499
+ "stateMutability": "view",
500
+ "type": "function"
501
+ },
502
+ {
503
+ "inputs": [
504
+ {
505
+ "internalType": "address",
506
+ "name": "",
507
+ "type": "address"
508
+ }
509
+ ],
510
+ "name": "lastAutocompound",
511
+ "outputs": [
512
+ {
513
+ "internalType": "uint256",
514
+ "name": "",
515
+ "type": "uint256"
516
+ }
517
+ ],
518
+ "stateMutability": "view",
519
+ "type": "function"
520
+ },
521
+ {
522
+ "inputs": [],
523
+ "name": "lockZap",
524
+ "outputs": [
525
+ {
526
+ "internalType": "address",
527
+ "name": "",
528
+ "type": "address"
529
+ }
530
+ ],
531
+ "stateMutability": "view",
532
+ "type": "function"
533
+ },
534
+ {
535
+ "inputs": [],
536
+ "name": "multiFeeDistribution",
537
+ "outputs": [
538
+ {
539
+ "internalType": "address",
540
+ "name": "",
541
+ "type": "address"
542
+ }
543
+ ],
544
+ "stateMutability": "view",
545
+ "type": "function"
546
+ },
547
+ {
548
+ "inputs": [],
549
+ "name": "owner",
550
+ "outputs": [
551
+ {
552
+ "internalType": "address",
553
+ "name": "",
554
+ "type": "address"
555
+ }
556
+ ],
557
+ "stateMutability": "view",
558
+ "type": "function"
559
+ },
560
+ {
561
+ "inputs": [],
562
+ "name": "pause",
563
+ "outputs": [],
564
+ "stateMutability": "nonpayable",
565
+ "type": "function"
566
+ },
567
+ {
568
+ "inputs": [],
569
+ "name": "paused",
570
+ "outputs": [
571
+ {
572
+ "internalType": "bool",
573
+ "name": "",
574
+ "type": "bool"
575
+ }
576
+ ],
577
+ "stateMutability": "view",
578
+ "type": "function"
579
+ },
580
+ {
581
+ "inputs": [],
582
+ "name": "poolHelper",
583
+ "outputs": [
584
+ {
585
+ "internalType": "contract IPoolHelper",
586
+ "name": "",
587
+ "type": "address"
588
+ }
589
+ ],
590
+ "stateMutability": "view",
591
+ "type": "function"
592
+ },
593
+ {
594
+ "inputs": [],
595
+ "name": "priceProvider",
596
+ "outputs": [
597
+ {
598
+ "internalType": "address",
599
+ "name": "",
600
+ "type": "address"
601
+ }
602
+ ],
603
+ "stateMutability": "view",
604
+ "type": "function"
605
+ },
606
+ {
607
+ "inputs": [],
608
+ "name": "rdntToken",
609
+ "outputs": [
610
+ {
611
+ "internalType": "contract IMintableToken",
612
+ "name": "",
613
+ "type": "address"
614
+ }
615
+ ],
616
+ "stateMutability": "view",
617
+ "type": "function"
618
+ },
619
+ {
620
+ "inputs": [],
621
+ "name": "renounceOwnership",
622
+ "outputs": [],
623
+ "stateMutability": "nonpayable",
624
+ "type": "function"
625
+ },
626
+ {
627
+ "inputs": [
628
+ {
629
+ "internalType": "uint256",
630
+ "name": "_slippage",
631
+ "type": "uint256"
632
+ }
633
+ ],
634
+ "name": "selfCompound",
635
+ "outputs": [],
636
+ "stateMutability": "nonpayable",
637
+ "type": "function"
638
+ },
639
+ {
640
+ "inputs": [],
641
+ "name": "selfEligibleCompound",
642
+ "outputs": [
643
+ {
644
+ "internalType": "bool",
645
+ "name": "eligible",
646
+ "type": "bool"
647
+ }
648
+ ],
649
+ "stateMutability": "view",
650
+ "type": "function"
651
+ },
652
+ {
653
+ "inputs": [
654
+ {
655
+ "internalType": "address",
656
+ "name": "_manager",
657
+ "type": "address"
658
+ }
659
+ ],
660
+ "name": "setBountyManager",
661
+ "outputs": [],
662
+ "stateMutability": "nonpayable",
663
+ "type": "function"
664
+ },
665
+ {
666
+ "inputs": [
667
+ {
668
+ "internalType": "uint256",
669
+ "name": "_compoundFee",
670
+ "type": "uint256"
671
+ }
672
+ ],
673
+ "name": "setCompoundFee",
674
+ "outputs": [],
675
+ "stateMutability": "nonpayable",
676
+ "type": "function"
677
+ },
678
+ {
679
+ "inputs": [
680
+ {
681
+ "internalType": "address",
682
+ "name": "_lockZap",
683
+ "type": "address"
684
+ }
685
+ ],
686
+ "name": "setLockZap",
687
+ "outputs": [],
688
+ "stateMutability": "nonpayable",
689
+ "type": "function"
690
+ },
691
+ {
692
+ "inputs": [
693
+ {
694
+ "internalType": "address",
695
+ "name": "_poolHelper",
696
+ "type": "address"
697
+ }
698
+ ],
699
+ "name": "setPoolHelper",
700
+ "outputs": [],
701
+ "stateMutability": "nonpayable",
702
+ "type": "function"
703
+ },
704
+ {
705
+ "inputs": [
706
+ {
707
+ "internalType": "address",
708
+ "name": "_uniRouter",
709
+ "type": "address"
710
+ }
711
+ ],
712
+ "name": "setUniRouter",
713
+ "outputs": [],
714
+ "stateMutability": "nonpayable",
715
+ "type": "function"
716
+ },
717
+ {
718
+ "inputs": [
719
+ {
720
+ "internalType": "address",
721
+ "name": "_tokenIn",
722
+ "type": "address"
723
+ },
724
+ {
725
+ "internalType": "address",
726
+ "name": "_tokenOut",
727
+ "type": "address"
728
+ },
729
+ {
730
+ "internalType": "bytes",
731
+ "name": "_route",
732
+ "type": "bytes"
733
+ }
734
+ ],
735
+ "name": "setUniV3Route",
736
+ "outputs": [],
737
+ "stateMutability": "nonpayable",
738
+ "type": "function"
739
+ },
740
+ {
741
+ "inputs": [
742
+ {
743
+ "internalType": "address",
744
+ "name": "newOwner",
745
+ "type": "address"
746
+ }
747
+ ],
748
+ "name": "transferOwnership",
749
+ "outputs": [],
750
+ "stateMutability": "nonpayable",
751
+ "type": "function"
752
+ },
753
+ {
754
+ "inputs": [],
755
+ "name": "uniRouter",
756
+ "outputs": [
757
+ {
758
+ "internalType": "address",
759
+ "name": "",
760
+ "type": "address"
761
+ }
762
+ ],
763
+ "stateMutability": "view",
764
+ "type": "function"
765
+ },
766
+ {
767
+ "inputs": [],
768
+ "name": "unpause",
769
+ "outputs": [],
770
+ "stateMutability": "nonpayable",
771
+ "type": "function"
772
+ },
773
+ {
774
+ "inputs": [
775
+ {
776
+ "internalType": "address",
777
+ "name": "_user",
778
+ "type": "address"
779
+ }
780
+ ],
781
+ "name": "userEligibleForCompound",
782
+ "outputs": [
783
+ {
784
+ "internalType": "bool",
785
+ "name": "eligible",
786
+ "type": "bool"
787
+ }
788
+ ],
789
+ "stateMutability": "view",
790
+ "type": "function"
791
+ },
792
+ {
793
+ "inputs": [
794
+ {
795
+ "internalType": "address",
796
+ "name": "_user",
797
+ "type": "address"
798
+ }
799
+ ],
800
+ "name": "viewPendingRewards",
801
+ "outputs": [
802
+ {
803
+ "internalType": "address[]",
804
+ "name": "tokens",
805
+ "type": "address[]"
806
+ },
807
+ {
808
+ "internalType": "uint256[]",
809
+ "name": "amts",
810
+ "type": "uint256[]"
811
+ }
812
+ ],
813
+ "stateMutability": "view",
814
+ "type": "function"
815
+ }
816
+ ]
817
+ ''')