@curvefi/llamalend-api 2.0.2 → 2.0.3

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,1891 @@
1
+ [
2
+ {
3
+ "name": "SetView",
4
+ "inputs": [
5
+ {
6
+ "name": "view",
7
+ "type": "address",
8
+ "indexed": false
9
+ }
10
+ ],
11
+ "anonymous": false,
12
+ "type": "event"
13
+ },
14
+ {
15
+ "name": "UserState",
16
+ "inputs": [
17
+ {
18
+ "name": "user",
19
+ "type": "address",
20
+ "indexed": false
21
+ },
22
+ {
23
+ "name": "collateral",
24
+ "type": "uint256",
25
+ "indexed": false
26
+ },
27
+ {
28
+ "name": "borrowed",
29
+ "type": "uint256",
30
+ "indexed": false
31
+ },
32
+ {
33
+ "name": "debt",
34
+ "type": "uint256",
35
+ "indexed": false
36
+ },
37
+ {
38
+ "name": "n1",
39
+ "type": "int256",
40
+ "indexed": false
41
+ },
42
+ {
43
+ "name": "n2",
44
+ "type": "int256",
45
+ "indexed": false
46
+ },
47
+ {
48
+ "name": "liquidation_discount",
49
+ "type": "uint256",
50
+ "indexed": false
51
+ }
52
+ ],
53
+ "anonymous": false,
54
+ "type": "event"
55
+ },
56
+ {
57
+ "name": "Borrow",
58
+ "inputs": [
59
+ {
60
+ "name": "user",
61
+ "type": "address",
62
+ "indexed": false
63
+ },
64
+ {
65
+ "name": "collateral_increase",
66
+ "type": "uint256",
67
+ "indexed": false
68
+ },
69
+ {
70
+ "name": "loan_increase",
71
+ "type": "uint256",
72
+ "indexed": false
73
+ }
74
+ ],
75
+ "anonymous": false,
76
+ "type": "event"
77
+ },
78
+ {
79
+ "name": "RemoveCollateral",
80
+ "inputs": [
81
+ {
82
+ "name": "user",
83
+ "type": "address",
84
+ "indexed": false
85
+ },
86
+ {
87
+ "name": "collateral_decrease",
88
+ "type": "uint256",
89
+ "indexed": false
90
+ }
91
+ ],
92
+ "anonymous": false,
93
+ "type": "event"
94
+ },
95
+ {
96
+ "name": "Approval",
97
+ "inputs": [
98
+ {
99
+ "name": "owner",
100
+ "type": "address",
101
+ "indexed": false
102
+ },
103
+ {
104
+ "name": "spender",
105
+ "type": "address",
106
+ "indexed": false
107
+ },
108
+ {
109
+ "name": "allow",
110
+ "type": "bool",
111
+ "indexed": false
112
+ }
113
+ ],
114
+ "anonymous": false,
115
+ "type": "event"
116
+ },
117
+ {
118
+ "name": "Repay",
119
+ "inputs": [
120
+ {
121
+ "name": "user",
122
+ "type": "address",
123
+ "indexed": false
124
+ },
125
+ {
126
+ "name": "collateral_decrease",
127
+ "type": "uint256",
128
+ "indexed": false
129
+ },
130
+ {
131
+ "name": "loan_decrease",
132
+ "type": "uint256",
133
+ "indexed": false
134
+ }
135
+ ],
136
+ "anonymous": false,
137
+ "type": "event"
138
+ },
139
+ {
140
+ "name": "SetExtraHealth",
141
+ "inputs": [
142
+ {
143
+ "name": "user",
144
+ "type": "address",
145
+ "indexed": false
146
+ },
147
+ {
148
+ "name": "health",
149
+ "type": "uint256",
150
+ "indexed": false
151
+ }
152
+ ],
153
+ "anonymous": false,
154
+ "type": "event"
155
+ },
156
+ {
157
+ "name": "Liquidate",
158
+ "inputs": [
159
+ {
160
+ "name": "liquidator",
161
+ "type": "address",
162
+ "indexed": false
163
+ },
164
+ {
165
+ "name": "user",
166
+ "type": "address",
167
+ "indexed": false
168
+ },
169
+ {
170
+ "name": "collateral_received",
171
+ "type": "uint256",
172
+ "indexed": false
173
+ },
174
+ {
175
+ "name": "borrowed_received",
176
+ "type": "uint256",
177
+ "indexed": false
178
+ },
179
+ {
180
+ "name": "debt",
181
+ "type": "uint256",
182
+ "indexed": false
183
+ }
184
+ ],
185
+ "anonymous": false,
186
+ "type": "event"
187
+ },
188
+ {
189
+ "name": "CollectFees",
190
+ "inputs": [
191
+ {
192
+ "name": "amount",
193
+ "type": "uint256",
194
+ "indexed": false
195
+ },
196
+ {
197
+ "name": "new_supply",
198
+ "type": "uint256",
199
+ "indexed": false
200
+ }
201
+ ],
202
+ "anonymous": false,
203
+ "type": "event"
204
+ },
205
+ {
206
+ "name": "SetBorrowingDiscounts",
207
+ "inputs": [
208
+ {
209
+ "name": "loan_discount",
210
+ "type": "uint256",
211
+ "indexed": false
212
+ },
213
+ {
214
+ "name": "liquidation_discount",
215
+ "type": "uint256",
216
+ "indexed": false
217
+ }
218
+ ],
219
+ "anonymous": false,
220
+ "type": "event"
221
+ },
222
+ {
223
+ "name": "SetLMCallback",
224
+ "inputs": [
225
+ {
226
+ "name": "callback",
227
+ "type": "address",
228
+ "indexed": false
229
+ }
230
+ ],
231
+ "anonymous": false,
232
+ "type": "event"
233
+ },
234
+ {
235
+ "name": "SetMonetaryPolicy",
236
+ "inputs": [
237
+ {
238
+ "name": "monetary_policy",
239
+ "type": "address",
240
+ "indexed": false
241
+ }
242
+ ],
243
+ "anonymous": false,
244
+ "type": "event"
245
+ },
246
+ {
247
+ "name": "SetBorrowCap",
248
+ "inputs": [
249
+ {
250
+ "name": "borrow_cap",
251
+ "type": "uint256",
252
+ "indexed": false
253
+ }
254
+ ],
255
+ "anonymous": false,
256
+ "type": "event"
257
+ },
258
+ {
259
+ "name": "SetAdminPercentage",
260
+ "inputs": [
261
+ {
262
+ "name": "admin_percentage",
263
+ "type": "uint256",
264
+ "indexed": false
265
+ }
266
+ ],
267
+ "anonymous": false,
268
+ "type": "event"
269
+ },
270
+ {
271
+ "stateMutability": "nonpayable",
272
+ "type": "function",
273
+ "name": "create_loan",
274
+ "inputs": [
275
+ {
276
+ "name": "_collateral",
277
+ "type": "uint256"
278
+ },
279
+ {
280
+ "name": "_debt",
281
+ "type": "uint256"
282
+ },
283
+ {
284
+ "name": "_N",
285
+ "type": "uint256"
286
+ }
287
+ ],
288
+ "outputs": []
289
+ },
290
+ {
291
+ "stateMutability": "nonpayable",
292
+ "type": "function",
293
+ "name": "create_loan",
294
+ "inputs": [
295
+ {
296
+ "name": "_collateral",
297
+ "type": "uint256"
298
+ },
299
+ {
300
+ "name": "_debt",
301
+ "type": "uint256"
302
+ },
303
+ {
304
+ "name": "_N",
305
+ "type": "uint256"
306
+ },
307
+ {
308
+ "name": "_for",
309
+ "type": "address"
310
+ }
311
+ ],
312
+ "outputs": []
313
+ },
314
+ {
315
+ "stateMutability": "nonpayable",
316
+ "type": "function",
317
+ "name": "create_loan",
318
+ "inputs": [
319
+ {
320
+ "name": "_collateral",
321
+ "type": "uint256"
322
+ },
323
+ {
324
+ "name": "_debt",
325
+ "type": "uint256"
326
+ },
327
+ {
328
+ "name": "_N",
329
+ "type": "uint256"
330
+ },
331
+ {
332
+ "name": "_for",
333
+ "type": "address"
334
+ },
335
+ {
336
+ "name": "_callbacker",
337
+ "type": "address"
338
+ }
339
+ ],
340
+ "outputs": []
341
+ },
342
+ {
343
+ "stateMutability": "nonpayable",
344
+ "type": "function",
345
+ "name": "create_loan",
346
+ "inputs": [
347
+ {
348
+ "name": "_collateral",
349
+ "type": "uint256"
350
+ },
351
+ {
352
+ "name": "_debt",
353
+ "type": "uint256"
354
+ },
355
+ {
356
+ "name": "_N",
357
+ "type": "uint256"
358
+ },
359
+ {
360
+ "name": "_for",
361
+ "type": "address"
362
+ },
363
+ {
364
+ "name": "_callbacker",
365
+ "type": "address"
366
+ },
367
+ {
368
+ "name": "_calldata",
369
+ "type": "bytes"
370
+ }
371
+ ],
372
+ "outputs": []
373
+ },
374
+ {
375
+ "stateMutability": "nonpayable",
376
+ "type": "function",
377
+ "name": "borrow_more",
378
+ "inputs": [
379
+ {
380
+ "name": "_collateral",
381
+ "type": "uint256"
382
+ },
383
+ {
384
+ "name": "_debt",
385
+ "type": "uint256"
386
+ }
387
+ ],
388
+ "outputs": []
389
+ },
390
+ {
391
+ "stateMutability": "nonpayable",
392
+ "type": "function",
393
+ "name": "borrow_more",
394
+ "inputs": [
395
+ {
396
+ "name": "_collateral",
397
+ "type": "uint256"
398
+ },
399
+ {
400
+ "name": "_debt",
401
+ "type": "uint256"
402
+ },
403
+ {
404
+ "name": "_for",
405
+ "type": "address"
406
+ }
407
+ ],
408
+ "outputs": []
409
+ },
410
+ {
411
+ "stateMutability": "nonpayable",
412
+ "type": "function",
413
+ "name": "borrow_more",
414
+ "inputs": [
415
+ {
416
+ "name": "_collateral",
417
+ "type": "uint256"
418
+ },
419
+ {
420
+ "name": "_debt",
421
+ "type": "uint256"
422
+ },
423
+ {
424
+ "name": "_for",
425
+ "type": "address"
426
+ },
427
+ {
428
+ "name": "_callbacker",
429
+ "type": "address"
430
+ }
431
+ ],
432
+ "outputs": []
433
+ },
434
+ {
435
+ "stateMutability": "nonpayable",
436
+ "type": "function",
437
+ "name": "borrow_more",
438
+ "inputs": [
439
+ {
440
+ "name": "_collateral",
441
+ "type": "uint256"
442
+ },
443
+ {
444
+ "name": "_debt",
445
+ "type": "uint256"
446
+ },
447
+ {
448
+ "name": "_for",
449
+ "type": "address"
450
+ },
451
+ {
452
+ "name": "_callbacker",
453
+ "type": "address"
454
+ },
455
+ {
456
+ "name": "_calldata",
457
+ "type": "bytes"
458
+ }
459
+ ],
460
+ "outputs": []
461
+ },
462
+ {
463
+ "stateMutability": "nonpayable",
464
+ "type": "function",
465
+ "name": "add_collateral",
466
+ "inputs": [
467
+ {
468
+ "name": "_collateral",
469
+ "type": "uint256"
470
+ }
471
+ ],
472
+ "outputs": []
473
+ },
474
+ {
475
+ "stateMutability": "nonpayable",
476
+ "type": "function",
477
+ "name": "add_collateral",
478
+ "inputs": [
479
+ {
480
+ "name": "_collateral",
481
+ "type": "uint256"
482
+ },
483
+ {
484
+ "name": "_for",
485
+ "type": "address"
486
+ }
487
+ ],
488
+ "outputs": []
489
+ },
490
+ {
491
+ "stateMutability": "nonpayable",
492
+ "type": "function",
493
+ "name": "approve",
494
+ "inputs": [
495
+ {
496
+ "name": "_spender",
497
+ "type": "address"
498
+ },
499
+ {
500
+ "name": "_allow",
501
+ "type": "bool"
502
+ }
503
+ ],
504
+ "outputs": []
505
+ },
506
+ {
507
+ "stateMutability": "nonpayable",
508
+ "type": "function",
509
+ "name": "remove_collateral",
510
+ "inputs": [
511
+ {
512
+ "name": "_collateral",
513
+ "type": "uint256"
514
+ }
515
+ ],
516
+ "outputs": []
517
+ },
518
+ {
519
+ "stateMutability": "nonpayable",
520
+ "type": "function",
521
+ "name": "remove_collateral",
522
+ "inputs": [
523
+ {
524
+ "name": "_collateral",
525
+ "type": "uint256"
526
+ },
527
+ {
528
+ "name": "_for",
529
+ "type": "address"
530
+ }
531
+ ],
532
+ "outputs": []
533
+ },
534
+ {
535
+ "stateMutability": "nonpayable",
536
+ "type": "function",
537
+ "name": "repay",
538
+ "inputs": [
539
+ {
540
+ "name": "_wallet_d_debt",
541
+ "type": "uint256"
542
+ }
543
+ ],
544
+ "outputs": []
545
+ },
546
+ {
547
+ "stateMutability": "nonpayable",
548
+ "type": "function",
549
+ "name": "repay",
550
+ "inputs": [
551
+ {
552
+ "name": "_wallet_d_debt",
553
+ "type": "uint256"
554
+ },
555
+ {
556
+ "name": "_for",
557
+ "type": "address"
558
+ }
559
+ ],
560
+ "outputs": []
561
+ },
562
+ {
563
+ "stateMutability": "nonpayable",
564
+ "type": "function",
565
+ "name": "repay",
566
+ "inputs": [
567
+ {
568
+ "name": "_wallet_d_debt",
569
+ "type": "uint256"
570
+ },
571
+ {
572
+ "name": "_for",
573
+ "type": "address"
574
+ },
575
+ {
576
+ "name": "_max_active_band",
577
+ "type": "int256"
578
+ }
579
+ ],
580
+ "outputs": []
581
+ },
582
+ {
583
+ "stateMutability": "nonpayable",
584
+ "type": "function",
585
+ "name": "repay",
586
+ "inputs": [
587
+ {
588
+ "name": "_wallet_d_debt",
589
+ "type": "uint256"
590
+ },
591
+ {
592
+ "name": "_for",
593
+ "type": "address"
594
+ },
595
+ {
596
+ "name": "_max_active_band",
597
+ "type": "int256"
598
+ },
599
+ {
600
+ "name": "_callbacker",
601
+ "type": "address"
602
+ }
603
+ ],
604
+ "outputs": []
605
+ },
606
+ {
607
+ "stateMutability": "nonpayable",
608
+ "type": "function",
609
+ "name": "repay",
610
+ "inputs": [
611
+ {
612
+ "name": "_wallet_d_debt",
613
+ "type": "uint256"
614
+ },
615
+ {
616
+ "name": "_for",
617
+ "type": "address"
618
+ },
619
+ {
620
+ "name": "_max_active_band",
621
+ "type": "int256"
622
+ },
623
+ {
624
+ "name": "_callbacker",
625
+ "type": "address"
626
+ },
627
+ {
628
+ "name": "_calldata",
629
+ "type": "bytes"
630
+ }
631
+ ],
632
+ "outputs": []
633
+ },
634
+ {
635
+ "stateMutability": "nonpayable",
636
+ "type": "function",
637
+ "name": "repay",
638
+ "inputs": [
639
+ {
640
+ "name": "_wallet_d_debt",
641
+ "type": "uint256"
642
+ },
643
+ {
644
+ "name": "_for",
645
+ "type": "address"
646
+ },
647
+ {
648
+ "name": "_max_active_band",
649
+ "type": "int256"
650
+ },
651
+ {
652
+ "name": "_callbacker",
653
+ "type": "address"
654
+ },
655
+ {
656
+ "name": "_calldata",
657
+ "type": "bytes"
658
+ },
659
+ {
660
+ "name": "_shrink",
661
+ "type": "bool"
662
+ }
663
+ ],
664
+ "outputs": []
665
+ },
666
+ {
667
+ "stateMutability": "nonpayable",
668
+ "type": "function",
669
+ "name": "set_extra_health",
670
+ "inputs": [
671
+ {
672
+ "name": "_value",
673
+ "type": "uint256"
674
+ }
675
+ ],
676
+ "outputs": []
677
+ },
678
+ {
679
+ "stateMutability": "nonpayable",
680
+ "type": "function",
681
+ "name": "liquidate",
682
+ "inputs": [
683
+ {
684
+ "name": "_user",
685
+ "type": "address"
686
+ },
687
+ {
688
+ "name": "_min_x",
689
+ "type": "uint256"
690
+ }
691
+ ],
692
+ "outputs": []
693
+ },
694
+ {
695
+ "stateMutability": "nonpayable",
696
+ "type": "function",
697
+ "name": "liquidate",
698
+ "inputs": [
699
+ {
700
+ "name": "_user",
701
+ "type": "address"
702
+ },
703
+ {
704
+ "name": "_min_x",
705
+ "type": "uint256"
706
+ },
707
+ {
708
+ "name": "_frac",
709
+ "type": "uint256"
710
+ }
711
+ ],
712
+ "outputs": []
713
+ },
714
+ {
715
+ "stateMutability": "nonpayable",
716
+ "type": "function",
717
+ "name": "liquidate",
718
+ "inputs": [
719
+ {
720
+ "name": "_user",
721
+ "type": "address"
722
+ },
723
+ {
724
+ "name": "_min_x",
725
+ "type": "uint256"
726
+ },
727
+ {
728
+ "name": "_frac",
729
+ "type": "uint256"
730
+ },
731
+ {
732
+ "name": "_callbacker",
733
+ "type": "address"
734
+ }
735
+ ],
736
+ "outputs": []
737
+ },
738
+ {
739
+ "stateMutability": "nonpayable",
740
+ "type": "function",
741
+ "name": "liquidate",
742
+ "inputs": [
743
+ {
744
+ "name": "_user",
745
+ "type": "address"
746
+ },
747
+ {
748
+ "name": "_min_x",
749
+ "type": "uint256"
750
+ },
751
+ {
752
+ "name": "_frac",
753
+ "type": "uint256"
754
+ },
755
+ {
756
+ "name": "_callbacker",
757
+ "type": "address"
758
+ },
759
+ {
760
+ "name": "_calldata",
761
+ "type": "bytes"
762
+ }
763
+ ],
764
+ "outputs": []
765
+ },
766
+ {
767
+ "stateMutability": "nonpayable",
768
+ "type": "function",
769
+ "name": "save_rate",
770
+ "inputs": [],
771
+ "outputs": []
772
+ },
773
+ {
774
+ "stateMutability": "nonpayable",
775
+ "type": "function",
776
+ "name": "collect_fees",
777
+ "inputs": [],
778
+ "outputs": [
779
+ {
780
+ "name": "",
781
+ "type": "uint256"
782
+ }
783
+ ]
784
+ },
785
+ {
786
+ "stateMutability": "view",
787
+ "type": "function",
788
+ "name": "amm",
789
+ "inputs": [],
790
+ "outputs": [
791
+ {
792
+ "name": "",
793
+ "type": "address"
794
+ }
795
+ ]
796
+ },
797
+ {
798
+ "stateMutability": "view",
799
+ "type": "function",
800
+ "name": "amm_price",
801
+ "inputs": [],
802
+ "outputs": [
803
+ {
804
+ "name": "",
805
+ "type": "uint256"
806
+ }
807
+ ]
808
+ },
809
+ {
810
+ "stateMutability": "view",
811
+ "type": "function",
812
+ "name": "approval",
813
+ "inputs": [
814
+ {
815
+ "name": "arg0",
816
+ "type": "address"
817
+ },
818
+ {
819
+ "name": "arg1",
820
+ "type": "address"
821
+ }
822
+ ],
823
+ "outputs": [
824
+ {
825
+ "name": "",
826
+ "type": "bool"
827
+ }
828
+ ]
829
+ },
830
+ {
831
+ "stateMutability": "view",
832
+ "type": "function",
833
+ "name": "borrowed_token",
834
+ "inputs": [],
835
+ "outputs": [
836
+ {
837
+ "name": "",
838
+ "type": "address"
839
+ }
840
+ ]
841
+ },
842
+ {
843
+ "stateMutability": "view",
844
+ "type": "function",
845
+ "name": "calculate_debt_n1",
846
+ "inputs": [
847
+ {
848
+ "name": "_collateral",
849
+ "type": "uint256"
850
+ },
851
+ {
852
+ "name": "_debt",
853
+ "type": "uint256"
854
+ },
855
+ {
856
+ "name": "_N",
857
+ "type": "uint256"
858
+ }
859
+ ],
860
+ "outputs": [
861
+ {
862
+ "name": "",
863
+ "type": "int256"
864
+ }
865
+ ]
866
+ },
867
+ {
868
+ "stateMutability": "view",
869
+ "type": "function",
870
+ "name": "calculate_debt_n1",
871
+ "inputs": [
872
+ {
873
+ "name": "_collateral",
874
+ "type": "uint256"
875
+ },
876
+ {
877
+ "name": "_debt",
878
+ "type": "uint256"
879
+ },
880
+ {
881
+ "name": "_N",
882
+ "type": "uint256"
883
+ },
884
+ {
885
+ "name": "_user",
886
+ "type": "address"
887
+ }
888
+ ],
889
+ "outputs": [
890
+ {
891
+ "name": "",
892
+ "type": "int256"
893
+ }
894
+ ]
895
+ },
896
+ {
897
+ "stateMutability": "view",
898
+ "type": "function",
899
+ "name": "collateral_token",
900
+ "inputs": [],
901
+ "outputs": [
902
+ {
903
+ "name": "",
904
+ "type": "address"
905
+ }
906
+ ]
907
+ },
908
+ {
909
+ "stateMutability": "view",
910
+ "type": "function",
911
+ "name": "debt",
912
+ "inputs": [
913
+ {
914
+ "name": "_user",
915
+ "type": "address"
916
+ }
917
+ ],
918
+ "outputs": [
919
+ {
920
+ "name": "",
921
+ "type": "uint256"
922
+ }
923
+ ]
924
+ },
925
+ {
926
+ "stateMutability": "view",
927
+ "type": "function",
928
+ "name": "extra_health",
929
+ "inputs": [
930
+ {
931
+ "name": "arg0",
932
+ "type": "address"
933
+ }
934
+ ],
935
+ "outputs": [
936
+ {
937
+ "name": "",
938
+ "type": "uint256"
939
+ }
940
+ ]
941
+ },
942
+ {
943
+ "stateMutability": "view",
944
+ "type": "function",
945
+ "name": "health",
946
+ "inputs": [
947
+ {
948
+ "name": "_user",
949
+ "type": "address"
950
+ }
951
+ ],
952
+ "outputs": [
953
+ {
954
+ "name": "",
955
+ "type": "int256"
956
+ }
957
+ ]
958
+ },
959
+ {
960
+ "stateMutability": "view",
961
+ "type": "function",
962
+ "name": "health",
963
+ "inputs": [
964
+ {
965
+ "name": "_user",
966
+ "type": "address"
967
+ },
968
+ {
969
+ "name": "_full",
970
+ "type": "bool"
971
+ }
972
+ ],
973
+ "outputs": [
974
+ {
975
+ "name": "",
976
+ "type": "int256"
977
+ }
978
+ ]
979
+ },
980
+ {
981
+ "stateMutability": "view",
982
+ "type": "function",
983
+ "name": "create_loan_health_preview",
984
+ "inputs": [
985
+ {
986
+ "name": "_collateral",
987
+ "type": "uint256"
988
+ },
989
+ {
990
+ "name": "_debt",
991
+ "type": "uint256"
992
+ },
993
+ {
994
+ "name": "_N",
995
+ "type": "uint256"
996
+ },
997
+ {
998
+ "name": "_full",
999
+ "type": "bool"
1000
+ }
1001
+ ],
1002
+ "outputs": [
1003
+ {
1004
+ "name": "",
1005
+ "type": "int256"
1006
+ }
1007
+ ]
1008
+ },
1009
+ {
1010
+ "stateMutability": "view",
1011
+ "type": "function",
1012
+ "name": "add_collateral_health_preview",
1013
+ "inputs": [
1014
+ {
1015
+ "name": "_collateral",
1016
+ "type": "uint256"
1017
+ },
1018
+ {
1019
+ "name": "_for",
1020
+ "type": "address"
1021
+ },
1022
+ {
1023
+ "name": "_caller",
1024
+ "type": "address"
1025
+ },
1026
+ {
1027
+ "name": "_full",
1028
+ "type": "bool"
1029
+ }
1030
+ ],
1031
+ "outputs": [
1032
+ {
1033
+ "name": "",
1034
+ "type": "int256"
1035
+ }
1036
+ ]
1037
+ },
1038
+ {
1039
+ "stateMutability": "view",
1040
+ "type": "function",
1041
+ "name": "remove_collateral_health_preview",
1042
+ "inputs": [
1043
+ {
1044
+ "name": "_collateral",
1045
+ "type": "uint256"
1046
+ },
1047
+ {
1048
+ "name": "_for",
1049
+ "type": "address"
1050
+ },
1051
+ {
1052
+ "name": "_full",
1053
+ "type": "bool"
1054
+ }
1055
+ ],
1056
+ "outputs": [
1057
+ {
1058
+ "name": "",
1059
+ "type": "int256"
1060
+ }
1061
+ ]
1062
+ },
1063
+ {
1064
+ "stateMutability": "view",
1065
+ "type": "function",
1066
+ "name": "borrow_more_health_preview",
1067
+ "inputs": [
1068
+ {
1069
+ "name": "_collateral",
1070
+ "type": "uint256"
1071
+ },
1072
+ {
1073
+ "name": "_debt",
1074
+ "type": "uint256"
1075
+ },
1076
+ {
1077
+ "name": "_for",
1078
+ "type": "address"
1079
+ },
1080
+ {
1081
+ "name": "_full",
1082
+ "type": "bool"
1083
+ }
1084
+ ],
1085
+ "outputs": [
1086
+ {
1087
+ "name": "",
1088
+ "type": "int256"
1089
+ }
1090
+ ]
1091
+ },
1092
+ {
1093
+ "stateMutability": "view",
1094
+ "type": "function",
1095
+ "name": "repay_health_preview",
1096
+ "inputs": [
1097
+ {
1098
+ "name": "_d_collateral",
1099
+ "type": "uint256"
1100
+ },
1101
+ {
1102
+ "name": "_d_debt",
1103
+ "type": "uint256"
1104
+ },
1105
+ {
1106
+ "name": "_for",
1107
+ "type": "address"
1108
+ },
1109
+ {
1110
+ "name": "_caller",
1111
+ "type": "address"
1112
+ },
1113
+ {
1114
+ "name": "_shrink",
1115
+ "type": "bool"
1116
+ },
1117
+ {
1118
+ "name": "_full",
1119
+ "type": "bool"
1120
+ }
1121
+ ],
1122
+ "outputs": [
1123
+ {
1124
+ "name": "",
1125
+ "type": "int256"
1126
+ }
1127
+ ]
1128
+ },
1129
+ {
1130
+ "stateMutability": "view",
1131
+ "type": "function",
1132
+ "name": "liquidate_health_preview",
1133
+ "inputs": [
1134
+ {
1135
+ "name": "_user",
1136
+ "type": "address"
1137
+ },
1138
+ {
1139
+ "name": "_caller",
1140
+ "type": "address"
1141
+ },
1142
+ {
1143
+ "name": "_frac",
1144
+ "type": "uint256"
1145
+ },
1146
+ {
1147
+ "name": "_full",
1148
+ "type": "bool"
1149
+ }
1150
+ ],
1151
+ "outputs": [
1152
+ {
1153
+ "name": "",
1154
+ "type": "int256"
1155
+ }
1156
+ ]
1157
+ },
1158
+ {
1159
+ "stateMutability": "view",
1160
+ "type": "function",
1161
+ "name": "liquidation_discount",
1162
+ "inputs": [],
1163
+ "outputs": [
1164
+ {
1165
+ "name": "",
1166
+ "type": "uint256"
1167
+ }
1168
+ ]
1169
+ },
1170
+ {
1171
+ "stateMutability": "view",
1172
+ "type": "function",
1173
+ "name": "liquidation_discounts",
1174
+ "inputs": [
1175
+ {
1176
+ "name": "arg0",
1177
+ "type": "address"
1178
+ }
1179
+ ],
1180
+ "outputs": [
1181
+ {
1182
+ "name": "",
1183
+ "type": "uint256"
1184
+ }
1185
+ ]
1186
+ },
1187
+ {
1188
+ "stateMutability": "view",
1189
+ "type": "function",
1190
+ "name": "loan_discount",
1191
+ "inputs": [],
1192
+ "outputs": [
1193
+ {
1194
+ "name": "",
1195
+ "type": "uint256"
1196
+ }
1197
+ ]
1198
+ },
1199
+ {
1200
+ "stateMutability": "view",
1201
+ "type": "function",
1202
+ "name": "loan_exists",
1203
+ "inputs": [
1204
+ {
1205
+ "name": "_user",
1206
+ "type": "address"
1207
+ }
1208
+ ],
1209
+ "outputs": [
1210
+ {
1211
+ "name": "",
1212
+ "type": "bool"
1213
+ }
1214
+ ]
1215
+ },
1216
+ {
1217
+ "stateMutability": "view",
1218
+ "type": "function",
1219
+ "name": "loan_ix",
1220
+ "inputs": [
1221
+ {
1222
+ "name": "arg0",
1223
+ "type": "address"
1224
+ }
1225
+ ],
1226
+ "outputs": [
1227
+ {
1228
+ "name": "",
1229
+ "type": "uint256"
1230
+ }
1231
+ ]
1232
+ },
1233
+ {
1234
+ "stateMutability": "view",
1235
+ "type": "function",
1236
+ "name": "loans",
1237
+ "inputs": [
1238
+ {
1239
+ "name": "arg0",
1240
+ "type": "uint256"
1241
+ }
1242
+ ],
1243
+ "outputs": [
1244
+ {
1245
+ "name": "",
1246
+ "type": "address"
1247
+ }
1248
+ ]
1249
+ },
1250
+ {
1251
+ "stateMutability": "view",
1252
+ "type": "function",
1253
+ "name": "monetary_policy",
1254
+ "inputs": [],
1255
+ "outputs": [
1256
+ {
1257
+ "name": "",
1258
+ "type": "address"
1259
+ }
1260
+ ]
1261
+ },
1262
+ {
1263
+ "stateMutability": "view",
1264
+ "type": "function",
1265
+ "name": "n_loans",
1266
+ "inputs": [],
1267
+ "outputs": [
1268
+ {
1269
+ "name": "",
1270
+ "type": "uint256"
1271
+ }
1272
+ ]
1273
+ },
1274
+ {
1275
+ "stateMutability": "view",
1276
+ "type": "function",
1277
+ "name": "tokens_to_liquidate",
1278
+ "inputs": [
1279
+ {
1280
+ "name": "_user",
1281
+ "type": "address"
1282
+ }
1283
+ ],
1284
+ "outputs": [
1285
+ {
1286
+ "name": "",
1287
+ "type": "uint256"
1288
+ }
1289
+ ]
1290
+ },
1291
+ {
1292
+ "stateMutability": "view",
1293
+ "type": "function",
1294
+ "name": "tokens_to_liquidate",
1295
+ "inputs": [
1296
+ {
1297
+ "name": "_user",
1298
+ "type": "address"
1299
+ },
1300
+ {
1301
+ "name": "_frac",
1302
+ "type": "uint256"
1303
+ }
1304
+ ],
1305
+ "outputs": [
1306
+ {
1307
+ "name": "",
1308
+ "type": "uint256"
1309
+ }
1310
+ ]
1311
+ },
1312
+ {
1313
+ "stateMutability": "view",
1314
+ "type": "function",
1315
+ "name": "tokens_to_shrink",
1316
+ "inputs": [
1317
+ {
1318
+ "name": "_user",
1319
+ "type": "address"
1320
+ }
1321
+ ],
1322
+ "outputs": [
1323
+ {
1324
+ "name": "",
1325
+ "type": "uint256"
1326
+ }
1327
+ ]
1328
+ },
1329
+ {
1330
+ "stateMutability": "view",
1331
+ "type": "function",
1332
+ "name": "total_debt",
1333
+ "inputs": [],
1334
+ "outputs": [
1335
+ {
1336
+ "name": "",
1337
+ "type": "uint256"
1338
+ }
1339
+ ]
1340
+ },
1341
+ {
1342
+ "stateMutability": "view",
1343
+ "type": "function",
1344
+ "name": "factory",
1345
+ "inputs": [],
1346
+ "outputs": [
1347
+ {
1348
+ "name": "",
1349
+ "type": "address"
1350
+ }
1351
+ ]
1352
+ },
1353
+ {
1354
+ "stateMutability": "view",
1355
+ "type": "function",
1356
+ "name": "admin_fees",
1357
+ "inputs": [],
1358
+ "outputs": [
1359
+ {
1360
+ "name": "",
1361
+ "type": "uint256"
1362
+ }
1363
+ ]
1364
+ },
1365
+ {
1366
+ "stateMutability": "view",
1367
+ "type": "function",
1368
+ "name": "admin_percentage",
1369
+ "inputs": [],
1370
+ "outputs": [
1371
+ {
1372
+ "name": "",
1373
+ "type": "uint256"
1374
+ }
1375
+ ]
1376
+ },
1377
+ {
1378
+ "stateMutability": "nonpayable",
1379
+ "type": "function",
1380
+ "name": "set_view",
1381
+ "inputs": [
1382
+ {
1383
+ "name": "_view_impl",
1384
+ "type": "address"
1385
+ }
1386
+ ],
1387
+ "outputs": []
1388
+ },
1389
+ {
1390
+ "stateMutability": "nonpayable",
1391
+ "type": "function",
1392
+ "name": "set_amm_fee",
1393
+ "inputs": [
1394
+ {
1395
+ "name": "_fee",
1396
+ "type": "uint256"
1397
+ }
1398
+ ],
1399
+ "outputs": []
1400
+ },
1401
+ {
1402
+ "stateMutability": "nonpayable",
1403
+ "type": "function",
1404
+ "name": "set_borrowing_discounts",
1405
+ "inputs": [
1406
+ {
1407
+ "name": "_loan_discount",
1408
+ "type": "uint256"
1409
+ },
1410
+ {
1411
+ "name": "_liquidation_discount",
1412
+ "type": "uint256"
1413
+ }
1414
+ ],
1415
+ "outputs": []
1416
+ },
1417
+ {
1418
+ "stateMutability": "nonpayable",
1419
+ "type": "function",
1420
+ "name": "set_callback",
1421
+ "inputs": [
1422
+ {
1423
+ "name": "_cb",
1424
+ "type": "address"
1425
+ }
1426
+ ],
1427
+ "outputs": []
1428
+ },
1429
+ {
1430
+ "stateMutability": "nonpayable",
1431
+ "type": "function",
1432
+ "name": "set_monetary_policy",
1433
+ "inputs": [
1434
+ {
1435
+ "name": "_monetary_policy",
1436
+ "type": "address"
1437
+ }
1438
+ ],
1439
+ "outputs": []
1440
+ },
1441
+ {
1442
+ "stateMutability": "nonpayable",
1443
+ "type": "function",
1444
+ "name": "set_price_oracle",
1445
+ "inputs": [
1446
+ {
1447
+ "name": "_price_oracle",
1448
+ "type": "address"
1449
+ },
1450
+ {
1451
+ "name": "_max_deviation",
1452
+ "type": "uint256"
1453
+ }
1454
+ ],
1455
+ "outputs": []
1456
+ },
1457
+ {
1458
+ "stateMutability": "view",
1459
+ "type": "function",
1460
+ "name": "user_prices",
1461
+ "inputs": [
1462
+ {
1463
+ "name": "_user",
1464
+ "type": "address"
1465
+ }
1466
+ ],
1467
+ "outputs": [
1468
+ {
1469
+ "name": "",
1470
+ "type": "uint256[2]"
1471
+ }
1472
+ ]
1473
+ },
1474
+ {
1475
+ "stateMutability": "view",
1476
+ "type": "function",
1477
+ "name": "user_state",
1478
+ "inputs": [
1479
+ {
1480
+ "name": "_user",
1481
+ "type": "address"
1482
+ }
1483
+ ],
1484
+ "outputs": [
1485
+ {
1486
+ "name": "",
1487
+ "type": "uint256[4]"
1488
+ }
1489
+ ]
1490
+ },
1491
+ {
1492
+ "stateMutability": "view",
1493
+ "type": "function",
1494
+ "name": "users_to_liquidate",
1495
+ "inputs": [],
1496
+ "outputs": [
1497
+ {
1498
+ "name": "",
1499
+ "type": "tuple[]",
1500
+ "components": [
1501
+ {
1502
+ "name": "user",
1503
+ "type": "address"
1504
+ },
1505
+ {
1506
+ "name": "x",
1507
+ "type": "uint256"
1508
+ },
1509
+ {
1510
+ "name": "y",
1511
+ "type": "uint256"
1512
+ },
1513
+ {
1514
+ "name": "debt",
1515
+ "type": "uint256"
1516
+ },
1517
+ {
1518
+ "name": "health",
1519
+ "type": "int256"
1520
+ }
1521
+ ]
1522
+ }
1523
+ ]
1524
+ },
1525
+ {
1526
+ "stateMutability": "view",
1527
+ "type": "function",
1528
+ "name": "users_to_liquidate",
1529
+ "inputs": [
1530
+ {
1531
+ "name": "_from",
1532
+ "type": "uint256"
1533
+ }
1534
+ ],
1535
+ "outputs": [
1536
+ {
1537
+ "name": "",
1538
+ "type": "tuple[]",
1539
+ "components": [
1540
+ {
1541
+ "name": "user",
1542
+ "type": "address"
1543
+ },
1544
+ {
1545
+ "name": "x",
1546
+ "type": "uint256"
1547
+ },
1548
+ {
1549
+ "name": "y",
1550
+ "type": "uint256"
1551
+ },
1552
+ {
1553
+ "name": "debt",
1554
+ "type": "uint256"
1555
+ },
1556
+ {
1557
+ "name": "health",
1558
+ "type": "int256"
1559
+ }
1560
+ ]
1561
+ }
1562
+ ]
1563
+ },
1564
+ {
1565
+ "stateMutability": "view",
1566
+ "type": "function",
1567
+ "name": "users_to_liquidate",
1568
+ "inputs": [
1569
+ {
1570
+ "name": "_from",
1571
+ "type": "uint256"
1572
+ },
1573
+ {
1574
+ "name": "_limit",
1575
+ "type": "uint256"
1576
+ }
1577
+ ],
1578
+ "outputs": [
1579
+ {
1580
+ "name": "",
1581
+ "type": "tuple[]",
1582
+ "components": [
1583
+ {
1584
+ "name": "user",
1585
+ "type": "address"
1586
+ },
1587
+ {
1588
+ "name": "x",
1589
+ "type": "uint256"
1590
+ },
1591
+ {
1592
+ "name": "y",
1593
+ "type": "uint256"
1594
+ },
1595
+ {
1596
+ "name": "debt",
1597
+ "type": "uint256"
1598
+ },
1599
+ {
1600
+ "name": "health",
1601
+ "type": "int256"
1602
+ }
1603
+ ]
1604
+ }
1605
+ ]
1606
+ },
1607
+ {
1608
+ "stateMutability": "view",
1609
+ "type": "function",
1610
+ "name": "min_collateral",
1611
+ "inputs": [
1612
+ {
1613
+ "name": "_debt",
1614
+ "type": "uint256"
1615
+ },
1616
+ {
1617
+ "name": "_N",
1618
+ "type": "uint256"
1619
+ }
1620
+ ],
1621
+ "outputs": [
1622
+ {
1623
+ "name": "",
1624
+ "type": "uint256"
1625
+ }
1626
+ ]
1627
+ },
1628
+ {
1629
+ "stateMutability": "view",
1630
+ "type": "function",
1631
+ "name": "min_collateral",
1632
+ "inputs": [
1633
+ {
1634
+ "name": "_debt",
1635
+ "type": "uint256"
1636
+ },
1637
+ {
1638
+ "name": "_N",
1639
+ "type": "uint256"
1640
+ },
1641
+ {
1642
+ "name": "_user",
1643
+ "type": "address"
1644
+ }
1645
+ ],
1646
+ "outputs": [
1647
+ {
1648
+ "name": "",
1649
+ "type": "uint256"
1650
+ }
1651
+ ]
1652
+ },
1653
+ {
1654
+ "stateMutability": "view",
1655
+ "type": "function",
1656
+ "name": "max_borrowable",
1657
+ "inputs": [
1658
+ {
1659
+ "name": "_collateral",
1660
+ "type": "uint256"
1661
+ },
1662
+ {
1663
+ "name": "_N",
1664
+ "type": "uint256"
1665
+ }
1666
+ ],
1667
+ "outputs": [
1668
+ {
1669
+ "name": "",
1670
+ "type": "uint256"
1671
+ }
1672
+ ]
1673
+ },
1674
+ {
1675
+ "stateMutability": "view",
1676
+ "type": "function",
1677
+ "name": "max_borrowable",
1678
+ "inputs": [
1679
+ {
1680
+ "name": "_collateral",
1681
+ "type": "uint256"
1682
+ },
1683
+ {
1684
+ "name": "_N",
1685
+ "type": "uint256"
1686
+ },
1687
+ {
1688
+ "name": "_current_debt",
1689
+ "type": "uint256"
1690
+ }
1691
+ ],
1692
+ "outputs": [
1693
+ {
1694
+ "name": "",
1695
+ "type": "uint256"
1696
+ }
1697
+ ]
1698
+ },
1699
+ {
1700
+ "stateMutability": "view",
1701
+ "type": "function",
1702
+ "name": "max_borrowable",
1703
+ "inputs": [
1704
+ {
1705
+ "name": "_collateral",
1706
+ "type": "uint256"
1707
+ },
1708
+ {
1709
+ "name": "_N",
1710
+ "type": "uint256"
1711
+ },
1712
+ {
1713
+ "name": "_current_debt",
1714
+ "type": "uint256"
1715
+ },
1716
+ {
1717
+ "name": "_user",
1718
+ "type": "address"
1719
+ }
1720
+ ],
1721
+ "outputs": [
1722
+ {
1723
+ "name": "",
1724
+ "type": "uint256"
1725
+ }
1726
+ ]
1727
+ },
1728
+ {
1729
+ "stateMutability": "view",
1730
+ "type": "function",
1731
+ "name": "vault",
1732
+ "inputs": [],
1733
+ "outputs": [
1734
+ {
1735
+ "name": "",
1736
+ "type": "address"
1737
+ }
1738
+ ]
1739
+ },
1740
+ {
1741
+ "stateMutability": "view",
1742
+ "type": "function",
1743
+ "name": "version",
1744
+ "inputs": [],
1745
+ "outputs": [
1746
+ {
1747
+ "name": "",
1748
+ "type": "string"
1749
+ }
1750
+ ]
1751
+ },
1752
+ {
1753
+ "stateMutability": "view",
1754
+ "type": "function",
1755
+ "name": "available_balance",
1756
+ "inputs": [],
1757
+ "outputs": [
1758
+ {
1759
+ "name": "",
1760
+ "type": "uint256"
1761
+ }
1762
+ ]
1763
+ },
1764
+ {
1765
+ "stateMutability": "nonpayable",
1766
+ "type": "function",
1767
+ "name": "set_borrow_cap",
1768
+ "inputs": [
1769
+ {
1770
+ "name": "_borrow_cap",
1771
+ "type": "uint256"
1772
+ }
1773
+ ],
1774
+ "outputs": []
1775
+ },
1776
+ {
1777
+ "stateMutability": "nonpayable",
1778
+ "type": "function",
1779
+ "name": "set_admin_percentage",
1780
+ "inputs": [
1781
+ {
1782
+ "name": "_admin_percentage",
1783
+ "type": "uint256"
1784
+ }
1785
+ ],
1786
+ "outputs": []
1787
+ },
1788
+ {
1789
+ "stateMutability": "nonpayable",
1790
+ "type": "function",
1791
+ "name": "_on_debt_increased",
1792
+ "inputs": [
1793
+ {
1794
+ "name": "_delta",
1795
+ "type": "uint256"
1796
+ },
1797
+ {
1798
+ "name": "_total_debt",
1799
+ "type": "uint256"
1800
+ }
1801
+ ],
1802
+ "outputs": []
1803
+ },
1804
+ {
1805
+ "stateMutability": "view",
1806
+ "type": "function",
1807
+ "name": "lent",
1808
+ "inputs": [],
1809
+ "outputs": [
1810
+ {
1811
+ "name": "",
1812
+ "type": "uint256"
1813
+ }
1814
+ ]
1815
+ },
1816
+ {
1817
+ "stateMutability": "view",
1818
+ "type": "function",
1819
+ "name": "repaid",
1820
+ "inputs": [],
1821
+ "outputs": [
1822
+ {
1823
+ "name": "",
1824
+ "type": "uint256"
1825
+ }
1826
+ ]
1827
+ },
1828
+ {
1829
+ "stateMutability": "view",
1830
+ "type": "function",
1831
+ "name": "collected",
1832
+ "inputs": [],
1833
+ "outputs": [
1834
+ {
1835
+ "name": "",
1836
+ "type": "uint256"
1837
+ }
1838
+ ]
1839
+ },
1840
+ {
1841
+ "stateMutability": "view",
1842
+ "type": "function",
1843
+ "name": "borrow_cap",
1844
+ "inputs": [],
1845
+ "outputs": [
1846
+ {
1847
+ "name": "",
1848
+ "type": "uint256"
1849
+ }
1850
+ ]
1851
+ },
1852
+ {
1853
+ "stateMutability": "nonpayable",
1854
+ "type": "constructor",
1855
+ "inputs": [
1856
+ {
1857
+ "name": "_vault",
1858
+ "type": "address"
1859
+ },
1860
+ {
1861
+ "name": "_amm",
1862
+ "type": "address"
1863
+ },
1864
+ {
1865
+ "name": "_borrowed_token",
1866
+ "type": "address"
1867
+ },
1868
+ {
1869
+ "name": "_collateral_token",
1870
+ "type": "address"
1871
+ },
1872
+ {
1873
+ "name": "_monetary_policy",
1874
+ "type": "address"
1875
+ },
1876
+ {
1877
+ "name": "_loan_discount",
1878
+ "type": "uint256"
1879
+ },
1880
+ {
1881
+ "name": "_liquidation_discount",
1882
+ "type": "uint256"
1883
+ },
1884
+ {
1885
+ "name": "_view_impl",
1886
+ "type": "address"
1887
+ }
1888
+ ],
1889
+ "outputs": []
1890
+ }
1891
+ ]