@underscore-finance/sdk 1.2.12 → 1.2.13

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,2525 @@
1
+ /* Autogenerated file. Do not edit manually. */
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /* @ts-nocheck */
5
+ import { singleQuery } from '@dappql/async';
6
+ export const abi = [
7
+ {
8
+ stateMutability: 'view',
9
+ type: 'function',
10
+ name: 'getAddys',
11
+ inputs: [],
12
+ outputs: [
13
+ {
14
+ name: '',
15
+ type: 'tuple',
16
+ components: [
17
+ {
18
+ name: 'hq',
19
+ type: 'address',
20
+ },
21
+ {
22
+ name: 'undyToken',
23
+ type: 'address',
24
+ },
25
+ {
26
+ name: 'ledger',
27
+ type: 'address',
28
+ },
29
+ {
30
+ name: 'missionControl',
31
+ type: 'address',
32
+ },
33
+ {
34
+ name: 'legoBook',
35
+ type: 'address',
36
+ },
37
+ {
38
+ name: 'switchboard',
39
+ type: 'address',
40
+ },
41
+ {
42
+ name: 'hatchery',
43
+ type: 'address',
44
+ },
45
+ {
46
+ name: 'lootDistributor',
47
+ type: 'address',
48
+ },
49
+ {
50
+ name: 'appraiser',
51
+ type: 'address',
52
+ },
53
+ {
54
+ name: 'walletBackpack',
55
+ type: 'address',
56
+ },
57
+ {
58
+ name: 'billing',
59
+ type: 'address',
60
+ },
61
+ {
62
+ name: 'vaultRegistry',
63
+ type: 'address',
64
+ },
65
+ ],
66
+ },
67
+ ],
68
+ },
69
+ {
70
+ stateMutability: 'view',
71
+ type: 'function',
72
+ name: 'getUndyHq',
73
+ inputs: [],
74
+ outputs: [
75
+ {
76
+ name: '',
77
+ type: 'address',
78
+ },
79
+ ],
80
+ },
81
+ {
82
+ stateMutability: 'view',
83
+ type: 'function',
84
+ name: 'getTotalUnderlyingAmount',
85
+ inputs: [
86
+ {
87
+ name: '_levgVault',
88
+ type: 'address',
89
+ },
90
+ {
91
+ name: '_isCollateralAsset',
92
+ type: 'bool',
93
+ },
94
+ {
95
+ name: '_shouldGetMax',
96
+ type: 'bool',
97
+ },
98
+ ],
99
+ outputs: [
100
+ {
101
+ name: '',
102
+ type: 'uint256',
103
+ },
104
+ ],
105
+ },
106
+ {
107
+ stateMutability: 'view',
108
+ type: 'function',
109
+ name: 'getTotalUnderlyingAmount',
110
+ inputs: [
111
+ {
112
+ name: '_levgVault',
113
+ type: 'address',
114
+ },
115
+ {
116
+ name: '_isCollateralAsset',
117
+ type: 'bool',
118
+ },
119
+ {
120
+ name: '_shouldGetMax',
121
+ type: 'bool',
122
+ },
123
+ {
124
+ name: '_legoBook',
125
+ type: 'address',
126
+ },
127
+ ],
128
+ outputs: [
129
+ {
130
+ name: '',
131
+ type: 'uint256',
132
+ },
133
+ ],
134
+ },
135
+ {
136
+ stateMutability: 'view',
137
+ type: 'function',
138
+ name: 'getTotalUnderlyingAmount',
139
+ inputs: [
140
+ {
141
+ name: '_levgVault',
142
+ type: 'address',
143
+ },
144
+ {
145
+ name: '_isCollateralAsset',
146
+ type: 'bool',
147
+ },
148
+ {
149
+ name: '_shouldGetMax',
150
+ type: 'bool',
151
+ },
152
+ {
153
+ name: '_legoBook',
154
+ type: 'address',
155
+ },
156
+ {
157
+ name: '_ripeVaultBook',
158
+ type: 'address',
159
+ },
160
+ ],
161
+ outputs: [
162
+ {
163
+ name: '',
164
+ type: 'uint256',
165
+ },
166
+ ],
167
+ },
168
+ {
169
+ stateMutability: 'view',
170
+ type: 'function',
171
+ name: 'getTotalUnderlyingAmount',
172
+ inputs: [
173
+ {
174
+ name: '_levgVault',
175
+ type: 'address',
176
+ },
177
+ {
178
+ name: '_isCollateralAsset',
179
+ type: 'bool',
180
+ },
181
+ {
182
+ name: '_shouldGetMax',
183
+ type: 'bool',
184
+ },
185
+ {
186
+ name: '_legoBook',
187
+ type: 'address',
188
+ },
189
+ {
190
+ name: '_ripeVaultBook',
191
+ type: 'address',
192
+ },
193
+ {
194
+ name: '_ripeMissionControl',
195
+ type: 'address',
196
+ },
197
+ ],
198
+ outputs: [
199
+ {
200
+ name: '',
201
+ type: 'uint256',
202
+ },
203
+ ],
204
+ },
205
+ {
206
+ stateMutability: 'view',
207
+ type: 'function',
208
+ name: 'getTotalUnderlyingAmount',
209
+ inputs: [
210
+ {
211
+ name: '_levgVault',
212
+ type: 'address',
213
+ },
214
+ {
215
+ name: '_isCollateralAsset',
216
+ type: 'bool',
217
+ },
218
+ {
219
+ name: '_shouldGetMax',
220
+ type: 'bool',
221
+ },
222
+ {
223
+ name: '_legoBook',
224
+ type: 'address',
225
+ },
226
+ {
227
+ name: '_ripeVaultBook',
228
+ type: 'address',
229
+ },
230
+ {
231
+ name: '_ripeMissionControl',
232
+ type: 'address',
233
+ },
234
+ {
235
+ name: '_ripeHq',
236
+ type: 'address',
237
+ },
238
+ ],
239
+ outputs: [
240
+ {
241
+ name: '',
242
+ type: 'uint256',
243
+ },
244
+ ],
245
+ },
246
+ {
247
+ stateMutability: 'view',
248
+ type: 'function',
249
+ name: 'getAmountForAsset',
250
+ inputs: [
251
+ {
252
+ name: '_levgVault',
253
+ type: 'address',
254
+ },
255
+ {
256
+ name: '_asset',
257
+ type: 'address',
258
+ },
259
+ ],
260
+ outputs: [
261
+ {
262
+ name: '',
263
+ type: 'uint256',
264
+ },
265
+ ],
266
+ },
267
+ {
268
+ stateMutability: 'view',
269
+ type: 'function',
270
+ name: 'getAmountForAsset',
271
+ inputs: [
272
+ {
273
+ name: '_levgVault',
274
+ type: 'address',
275
+ },
276
+ {
277
+ name: '_asset',
278
+ type: 'address',
279
+ },
280
+ {
281
+ name: '_ripeVaultId',
282
+ type: 'uint256',
283
+ },
284
+ ],
285
+ outputs: [
286
+ {
287
+ name: '',
288
+ type: 'uint256',
289
+ },
290
+ ],
291
+ },
292
+ {
293
+ stateMutability: 'view',
294
+ type: 'function',
295
+ name: 'getAmountForAsset',
296
+ inputs: [
297
+ {
298
+ name: '_levgVault',
299
+ type: 'address',
300
+ },
301
+ {
302
+ name: '_asset',
303
+ type: 'address',
304
+ },
305
+ {
306
+ name: '_ripeVaultId',
307
+ type: 'uint256',
308
+ },
309
+ {
310
+ name: '_ripeVaultBook',
311
+ type: 'address',
312
+ },
313
+ ],
314
+ outputs: [
315
+ {
316
+ name: '',
317
+ type: 'uint256',
318
+ },
319
+ ],
320
+ },
321
+ {
322
+ stateMutability: 'view',
323
+ type: 'function',
324
+ name: 'getAmountForAsset',
325
+ inputs: [
326
+ {
327
+ name: '_levgVault',
328
+ type: 'address',
329
+ },
330
+ {
331
+ name: '_asset',
332
+ type: 'address',
333
+ },
334
+ {
335
+ name: '_ripeVaultId',
336
+ type: 'uint256',
337
+ },
338
+ {
339
+ name: '_ripeVaultBook',
340
+ type: 'address',
341
+ },
342
+ {
343
+ name: '_ripeMissionControl',
344
+ type: 'address',
345
+ },
346
+ ],
347
+ outputs: [
348
+ {
349
+ name: '',
350
+ type: 'uint256',
351
+ },
352
+ ],
353
+ },
354
+ {
355
+ stateMutability: 'view',
356
+ type: 'function',
357
+ name: 'getAmountForAsset',
358
+ inputs: [
359
+ {
360
+ name: '_levgVault',
361
+ type: 'address',
362
+ },
363
+ {
364
+ name: '_asset',
365
+ type: 'address',
366
+ },
367
+ {
368
+ name: '_ripeVaultId',
369
+ type: 'uint256',
370
+ },
371
+ {
372
+ name: '_ripeVaultBook',
373
+ type: 'address',
374
+ },
375
+ {
376
+ name: '_ripeMissionControl',
377
+ type: 'address',
378
+ },
379
+ {
380
+ name: '_ripeHq',
381
+ type: 'address',
382
+ },
383
+ ],
384
+ outputs: [
385
+ {
386
+ name: '',
387
+ type: 'uint256',
388
+ },
389
+ ],
390
+ },
391
+ {
392
+ stateMutability: 'view',
393
+ type: 'function',
394
+ name: 'getUnderlyingAmountForVaultToken',
395
+ inputs: [
396
+ {
397
+ name: '_levgVault',
398
+ type: 'address',
399
+ },
400
+ {
401
+ name: '_isCollateralAsset',
402
+ type: 'bool',
403
+ },
404
+ {
405
+ name: '_shouldGetMax',
406
+ type: 'bool',
407
+ },
408
+ ],
409
+ outputs: [
410
+ {
411
+ name: '',
412
+ type: 'uint256',
413
+ },
414
+ ],
415
+ },
416
+ {
417
+ stateMutability: 'view',
418
+ type: 'function',
419
+ name: 'getUnderlyingAmountForVaultToken',
420
+ inputs: [
421
+ {
422
+ name: '_levgVault',
423
+ type: 'address',
424
+ },
425
+ {
426
+ name: '_isCollateralAsset',
427
+ type: 'bool',
428
+ },
429
+ {
430
+ name: '_shouldGetMax',
431
+ type: 'bool',
432
+ },
433
+ {
434
+ name: '_legoBook',
435
+ type: 'address',
436
+ },
437
+ ],
438
+ outputs: [
439
+ {
440
+ name: '',
441
+ type: 'uint256',
442
+ },
443
+ ],
444
+ },
445
+ {
446
+ stateMutability: 'view',
447
+ type: 'function',
448
+ name: 'getUnderlyingAmountForVaultToken',
449
+ inputs: [
450
+ {
451
+ name: '_levgVault',
452
+ type: 'address',
453
+ },
454
+ {
455
+ name: '_isCollateralAsset',
456
+ type: 'bool',
457
+ },
458
+ {
459
+ name: '_shouldGetMax',
460
+ type: 'bool',
461
+ },
462
+ {
463
+ name: '_legoBook',
464
+ type: 'address',
465
+ },
466
+ {
467
+ name: '_ripeVaultBook',
468
+ type: 'address',
469
+ },
470
+ ],
471
+ outputs: [
472
+ {
473
+ name: '',
474
+ type: 'uint256',
475
+ },
476
+ ],
477
+ },
478
+ {
479
+ stateMutability: 'view',
480
+ type: 'function',
481
+ name: 'getUnderlyingAmountForVaultToken',
482
+ inputs: [
483
+ {
484
+ name: '_levgVault',
485
+ type: 'address',
486
+ },
487
+ {
488
+ name: '_isCollateralAsset',
489
+ type: 'bool',
490
+ },
491
+ {
492
+ name: '_shouldGetMax',
493
+ type: 'bool',
494
+ },
495
+ {
496
+ name: '_legoBook',
497
+ type: 'address',
498
+ },
499
+ {
500
+ name: '_ripeVaultBook',
501
+ type: 'address',
502
+ },
503
+ {
504
+ name: '_ripeMissionControl',
505
+ type: 'address',
506
+ },
507
+ ],
508
+ outputs: [
509
+ {
510
+ name: '',
511
+ type: 'uint256',
512
+ },
513
+ ],
514
+ },
515
+ {
516
+ stateMutability: 'view',
517
+ type: 'function',
518
+ name: 'getUnderlyingAmountForVaultToken',
519
+ inputs: [
520
+ {
521
+ name: '_levgVault',
522
+ type: 'address',
523
+ },
524
+ {
525
+ name: '_isCollateralAsset',
526
+ type: 'bool',
527
+ },
528
+ {
529
+ name: '_shouldGetMax',
530
+ type: 'bool',
531
+ },
532
+ {
533
+ name: '_legoBook',
534
+ type: 'address',
535
+ },
536
+ {
537
+ name: '_ripeVaultBook',
538
+ type: 'address',
539
+ },
540
+ {
541
+ name: '_ripeMissionControl',
542
+ type: 'address',
543
+ },
544
+ {
545
+ name: '_ripeHq',
546
+ type: 'address',
547
+ },
548
+ ],
549
+ outputs: [
550
+ {
551
+ name: '',
552
+ type: 'uint256',
553
+ },
554
+ ],
555
+ },
556
+ {
557
+ stateMutability: 'view',
558
+ type: 'function',
559
+ name: 'getRipeCollateralBalance',
560
+ inputs: [
561
+ {
562
+ name: '_levgVault',
563
+ type: 'address',
564
+ },
565
+ {
566
+ name: '_asset',
567
+ type: 'address',
568
+ },
569
+ ],
570
+ outputs: [
571
+ {
572
+ name: '',
573
+ type: 'uint256',
574
+ },
575
+ ],
576
+ },
577
+ {
578
+ stateMutability: 'view',
579
+ type: 'function',
580
+ name: 'getRipeCollateralBalance',
581
+ inputs: [
582
+ {
583
+ name: '_levgVault',
584
+ type: 'address',
585
+ },
586
+ {
587
+ name: '_asset',
588
+ type: 'address',
589
+ },
590
+ {
591
+ name: '_ripeVaultId',
592
+ type: 'uint256',
593
+ },
594
+ ],
595
+ outputs: [
596
+ {
597
+ name: '',
598
+ type: 'uint256',
599
+ },
600
+ ],
601
+ },
602
+ {
603
+ stateMutability: 'view',
604
+ type: 'function',
605
+ name: 'getRipeCollateralBalance',
606
+ inputs: [
607
+ {
608
+ name: '_levgVault',
609
+ type: 'address',
610
+ },
611
+ {
612
+ name: '_asset',
613
+ type: 'address',
614
+ },
615
+ {
616
+ name: '_ripeVaultId',
617
+ type: 'uint256',
618
+ },
619
+ {
620
+ name: '_ripeVaultBook',
621
+ type: 'address',
622
+ },
623
+ ],
624
+ outputs: [
625
+ {
626
+ name: '',
627
+ type: 'uint256',
628
+ },
629
+ ],
630
+ },
631
+ {
632
+ stateMutability: 'view',
633
+ type: 'function',
634
+ name: 'getRipeCollateralBalance',
635
+ inputs: [
636
+ {
637
+ name: '_levgVault',
638
+ type: 'address',
639
+ },
640
+ {
641
+ name: '_asset',
642
+ type: 'address',
643
+ },
644
+ {
645
+ name: '_ripeVaultId',
646
+ type: 'uint256',
647
+ },
648
+ {
649
+ name: '_ripeVaultBook',
650
+ type: 'address',
651
+ },
652
+ {
653
+ name: '_ripeMissionControl',
654
+ type: 'address',
655
+ },
656
+ ],
657
+ outputs: [
658
+ {
659
+ name: '',
660
+ type: 'uint256',
661
+ },
662
+ ],
663
+ },
664
+ {
665
+ stateMutability: 'view',
666
+ type: 'function',
667
+ name: 'getRipeCollateralBalance',
668
+ inputs: [
669
+ {
670
+ name: '_levgVault',
671
+ type: 'address',
672
+ },
673
+ {
674
+ name: '_asset',
675
+ type: 'address',
676
+ },
677
+ {
678
+ name: '_ripeVaultId',
679
+ type: 'uint256',
680
+ },
681
+ {
682
+ name: '_ripeVaultBook',
683
+ type: 'address',
684
+ },
685
+ {
686
+ name: '_ripeMissionControl',
687
+ type: 'address',
688
+ },
689
+ {
690
+ name: '_ripeHq',
691
+ type: 'address',
692
+ },
693
+ ],
694
+ outputs: [
695
+ {
696
+ name: '',
697
+ type: 'uint256',
698
+ },
699
+ ],
700
+ },
701
+ {
702
+ stateMutability: 'view',
703
+ type: 'function',
704
+ name: 'getUnderlyingGreenAmount',
705
+ inputs: [
706
+ {
707
+ name: '_levgVault',
708
+ type: 'address',
709
+ },
710
+ ],
711
+ outputs: [
712
+ {
713
+ name: '',
714
+ type: 'uint256',
715
+ },
716
+ ],
717
+ },
718
+ {
719
+ stateMutability: 'view',
720
+ type: 'function',
721
+ name: 'getUnderlyingGreenAmount',
722
+ inputs: [
723
+ {
724
+ name: '_levgVault',
725
+ type: 'address',
726
+ },
727
+ {
728
+ name: '_green',
729
+ type: 'address',
730
+ },
731
+ ],
732
+ outputs: [
733
+ {
734
+ name: '',
735
+ type: 'uint256',
736
+ },
737
+ ],
738
+ },
739
+ {
740
+ stateMutability: 'view',
741
+ type: 'function',
742
+ name: 'getUnderlyingGreenAmount',
743
+ inputs: [
744
+ {
745
+ name: '_levgVault',
746
+ type: 'address',
747
+ },
748
+ {
749
+ name: '_green',
750
+ type: 'address',
751
+ },
752
+ {
753
+ name: '_savingsGreen',
754
+ type: 'address',
755
+ },
756
+ ],
757
+ outputs: [
758
+ {
759
+ name: '',
760
+ type: 'uint256',
761
+ },
762
+ ],
763
+ },
764
+ {
765
+ stateMutability: 'view',
766
+ type: 'function',
767
+ name: 'getUnderlyingGreenAmount',
768
+ inputs: [
769
+ {
770
+ name: '_levgVault',
771
+ type: 'address',
772
+ },
773
+ {
774
+ name: '_green',
775
+ type: 'address',
776
+ },
777
+ {
778
+ name: '_savingsGreen',
779
+ type: 'address',
780
+ },
781
+ {
782
+ name: '_ripeVaultBook',
783
+ type: 'address',
784
+ },
785
+ ],
786
+ outputs: [
787
+ {
788
+ name: '',
789
+ type: 'uint256',
790
+ },
791
+ ],
792
+ },
793
+ {
794
+ stateMutability: 'view',
795
+ type: 'function',
796
+ name: 'getUnderlyingGreenAmount',
797
+ inputs: [
798
+ {
799
+ name: '_levgVault',
800
+ type: 'address',
801
+ },
802
+ {
803
+ name: '_green',
804
+ type: 'address',
805
+ },
806
+ {
807
+ name: '_savingsGreen',
808
+ type: 'address',
809
+ },
810
+ {
811
+ name: '_ripeVaultBook',
812
+ type: 'address',
813
+ },
814
+ {
815
+ name: '_ripeMissionControl',
816
+ type: 'address',
817
+ },
818
+ ],
819
+ outputs: [
820
+ {
821
+ name: '',
822
+ type: 'uint256',
823
+ },
824
+ ],
825
+ },
826
+ {
827
+ stateMutability: 'view',
828
+ type: 'function',
829
+ name: 'getUnderlyingGreenAmount',
830
+ inputs: [
831
+ {
832
+ name: '_levgVault',
833
+ type: 'address',
834
+ },
835
+ {
836
+ name: '_green',
837
+ type: 'address',
838
+ },
839
+ {
840
+ name: '_savingsGreen',
841
+ type: 'address',
842
+ },
843
+ {
844
+ name: '_ripeVaultBook',
845
+ type: 'address',
846
+ },
847
+ {
848
+ name: '_ripeMissionControl',
849
+ type: 'address',
850
+ },
851
+ {
852
+ name: '_ripeHq',
853
+ type: 'address',
854
+ },
855
+ ],
856
+ outputs: [
857
+ {
858
+ name: '',
859
+ type: 'uint256',
860
+ },
861
+ ],
862
+ },
863
+ {
864
+ stateMutability: 'view',
865
+ type: 'function',
866
+ name: 'getSwappableUsdcAmount',
867
+ inputs: [
868
+ {
869
+ name: '_levgVault',
870
+ type: 'address',
871
+ },
872
+ ],
873
+ outputs: [
874
+ {
875
+ name: '',
876
+ type: 'uint256',
877
+ },
878
+ ],
879
+ },
880
+ {
881
+ stateMutability: 'view',
882
+ type: 'function',
883
+ name: 'getSwappableUsdcAmount',
884
+ inputs: [
885
+ {
886
+ name: '_levgVault',
887
+ type: 'address',
888
+ },
889
+ {
890
+ name: '_leverageVaultToken',
891
+ type: 'address',
892
+ },
893
+ ],
894
+ outputs: [
895
+ {
896
+ name: '',
897
+ type: 'uint256',
898
+ },
899
+ ],
900
+ },
901
+ {
902
+ stateMutability: 'view',
903
+ type: 'function',
904
+ name: 'getSwappableUsdcAmount',
905
+ inputs: [
906
+ {
907
+ name: '_levgVault',
908
+ type: 'address',
909
+ },
910
+ {
911
+ name: '_leverageVaultToken',
912
+ type: 'address',
913
+ },
914
+ {
915
+ name: '_leverageVaultTokenRipeVaultId',
916
+ type: 'uint256',
917
+ },
918
+ ],
919
+ outputs: [
920
+ {
921
+ name: '',
922
+ type: 'uint256',
923
+ },
924
+ ],
925
+ },
926
+ {
927
+ stateMutability: 'view',
928
+ type: 'function',
929
+ name: 'getSwappableUsdcAmount',
930
+ inputs: [
931
+ {
932
+ name: '_levgVault',
933
+ type: 'address',
934
+ },
935
+ {
936
+ name: '_leverageVaultToken',
937
+ type: 'address',
938
+ },
939
+ {
940
+ name: '_leverageVaultTokenRipeVaultId',
941
+ type: 'uint256',
942
+ },
943
+ {
944
+ name: '_usdc',
945
+ type: 'address',
946
+ },
947
+ ],
948
+ outputs: [
949
+ {
950
+ name: '',
951
+ type: 'uint256',
952
+ },
953
+ ],
954
+ },
955
+ {
956
+ stateMutability: 'view',
957
+ type: 'function',
958
+ name: 'getSwappableUsdcAmount',
959
+ inputs: [
960
+ {
961
+ name: '_levgVault',
962
+ type: 'address',
963
+ },
964
+ {
965
+ name: '_leverageVaultToken',
966
+ type: 'address',
967
+ },
968
+ {
969
+ name: '_leverageVaultTokenRipeVaultId',
970
+ type: 'uint256',
971
+ },
972
+ {
973
+ name: '_usdc',
974
+ type: 'address',
975
+ },
976
+ {
977
+ name: '_green',
978
+ type: 'address',
979
+ },
980
+ ],
981
+ outputs: [
982
+ {
983
+ name: '',
984
+ type: 'uint256',
985
+ },
986
+ ],
987
+ },
988
+ {
989
+ stateMutability: 'view',
990
+ type: 'function',
991
+ name: 'getSwappableUsdcAmount',
992
+ inputs: [
993
+ {
994
+ name: '_levgVault',
995
+ type: 'address',
996
+ },
997
+ {
998
+ name: '_leverageVaultToken',
999
+ type: 'address',
1000
+ },
1001
+ {
1002
+ name: '_leverageVaultTokenRipeVaultId',
1003
+ type: 'uint256',
1004
+ },
1005
+ {
1006
+ name: '_usdc',
1007
+ type: 'address',
1008
+ },
1009
+ {
1010
+ name: '_green',
1011
+ type: 'address',
1012
+ },
1013
+ {
1014
+ name: '_savingsGreen',
1015
+ type: 'address',
1016
+ },
1017
+ ],
1018
+ outputs: [
1019
+ {
1020
+ name: '',
1021
+ type: 'uint256',
1022
+ },
1023
+ ],
1024
+ },
1025
+ {
1026
+ stateMutability: 'view',
1027
+ type: 'function',
1028
+ name: 'getSwappableUsdcAmount',
1029
+ inputs: [
1030
+ {
1031
+ name: '_levgVault',
1032
+ type: 'address',
1033
+ },
1034
+ {
1035
+ name: '_leverageVaultToken',
1036
+ type: 'address',
1037
+ },
1038
+ {
1039
+ name: '_leverageVaultTokenRipeVaultId',
1040
+ type: 'uint256',
1041
+ },
1042
+ {
1043
+ name: '_usdc',
1044
+ type: 'address',
1045
+ },
1046
+ {
1047
+ name: '_green',
1048
+ type: 'address',
1049
+ },
1050
+ {
1051
+ name: '_savingsGreen',
1052
+ type: 'address',
1053
+ },
1054
+ {
1055
+ name: '_legoBook',
1056
+ type: 'address',
1057
+ },
1058
+ ],
1059
+ outputs: [
1060
+ {
1061
+ name: '',
1062
+ type: 'uint256',
1063
+ },
1064
+ ],
1065
+ },
1066
+ {
1067
+ stateMutability: 'view',
1068
+ type: 'function',
1069
+ name: 'getSwappableUsdcAmount',
1070
+ inputs: [
1071
+ {
1072
+ name: '_levgVault',
1073
+ type: 'address',
1074
+ },
1075
+ {
1076
+ name: '_leverageVaultToken',
1077
+ type: 'address',
1078
+ },
1079
+ {
1080
+ name: '_leverageVaultTokenRipeVaultId',
1081
+ type: 'uint256',
1082
+ },
1083
+ {
1084
+ name: '_usdc',
1085
+ type: 'address',
1086
+ },
1087
+ {
1088
+ name: '_green',
1089
+ type: 'address',
1090
+ },
1091
+ {
1092
+ name: '_savingsGreen',
1093
+ type: 'address',
1094
+ },
1095
+ {
1096
+ name: '_legoBook',
1097
+ type: 'address',
1098
+ },
1099
+ {
1100
+ name: '_ripeVaultBook',
1101
+ type: 'address',
1102
+ },
1103
+ ],
1104
+ outputs: [
1105
+ {
1106
+ name: '',
1107
+ type: 'uint256',
1108
+ },
1109
+ ],
1110
+ },
1111
+ {
1112
+ stateMutability: 'view',
1113
+ type: 'function',
1114
+ name: 'getSwappableUsdcAmount',
1115
+ inputs: [
1116
+ {
1117
+ name: '_levgVault',
1118
+ type: 'address',
1119
+ },
1120
+ {
1121
+ name: '_leverageVaultToken',
1122
+ type: 'address',
1123
+ },
1124
+ {
1125
+ name: '_leverageVaultTokenRipeVaultId',
1126
+ type: 'uint256',
1127
+ },
1128
+ {
1129
+ name: '_usdc',
1130
+ type: 'address',
1131
+ },
1132
+ {
1133
+ name: '_green',
1134
+ type: 'address',
1135
+ },
1136
+ {
1137
+ name: '_savingsGreen',
1138
+ type: 'address',
1139
+ },
1140
+ {
1141
+ name: '_legoBook',
1142
+ type: 'address',
1143
+ },
1144
+ {
1145
+ name: '_ripeVaultBook',
1146
+ type: 'address',
1147
+ },
1148
+ {
1149
+ name: '_ripeMissionControl',
1150
+ type: 'address',
1151
+ },
1152
+ ],
1153
+ outputs: [
1154
+ {
1155
+ name: '',
1156
+ type: 'uint256',
1157
+ },
1158
+ ],
1159
+ },
1160
+ {
1161
+ stateMutability: 'view',
1162
+ type: 'function',
1163
+ name: 'getSwappableUsdcAmount',
1164
+ inputs: [
1165
+ {
1166
+ name: '_levgVault',
1167
+ type: 'address',
1168
+ },
1169
+ {
1170
+ name: '_leverageVaultToken',
1171
+ type: 'address',
1172
+ },
1173
+ {
1174
+ name: '_leverageVaultTokenRipeVaultId',
1175
+ type: 'uint256',
1176
+ },
1177
+ {
1178
+ name: '_usdc',
1179
+ type: 'address',
1180
+ },
1181
+ {
1182
+ name: '_green',
1183
+ type: 'address',
1184
+ },
1185
+ {
1186
+ name: '_savingsGreen',
1187
+ type: 'address',
1188
+ },
1189
+ {
1190
+ name: '_legoBook',
1191
+ type: 'address',
1192
+ },
1193
+ {
1194
+ name: '_ripeVaultBook',
1195
+ type: 'address',
1196
+ },
1197
+ {
1198
+ name: '_ripeMissionControl',
1199
+ type: 'address',
1200
+ },
1201
+ {
1202
+ name: '_ripeHq',
1203
+ type: 'address',
1204
+ },
1205
+ ],
1206
+ outputs: [
1207
+ {
1208
+ name: '',
1209
+ type: 'uint256',
1210
+ },
1211
+ ],
1212
+ },
1213
+ {
1214
+ stateMutability: 'view',
1215
+ type: 'function',
1216
+ name: 'getBorrowRate',
1217
+ inputs: [
1218
+ {
1219
+ name: '_levgVault',
1220
+ type: 'address',
1221
+ },
1222
+ ],
1223
+ outputs: [
1224
+ {
1225
+ name: '',
1226
+ type: 'uint256',
1227
+ },
1228
+ ],
1229
+ },
1230
+ {
1231
+ stateMutability: 'view',
1232
+ type: 'function',
1233
+ name: 'getBorrowRate',
1234
+ inputs: [
1235
+ {
1236
+ name: '_levgVault',
1237
+ type: 'address',
1238
+ },
1239
+ {
1240
+ name: '_ripeHq',
1241
+ type: 'address',
1242
+ },
1243
+ ],
1244
+ outputs: [
1245
+ {
1246
+ name: '',
1247
+ type: 'uint256',
1248
+ },
1249
+ ],
1250
+ },
1251
+ {
1252
+ stateMutability: 'view',
1253
+ type: 'function',
1254
+ name: 'getDebtAmount',
1255
+ inputs: [
1256
+ {
1257
+ name: '_levgVault',
1258
+ type: 'address',
1259
+ },
1260
+ ],
1261
+ outputs: [
1262
+ {
1263
+ name: '',
1264
+ type: 'uint256',
1265
+ },
1266
+ ],
1267
+ },
1268
+ {
1269
+ stateMutability: 'view',
1270
+ type: 'function',
1271
+ name: 'getDebtAmount',
1272
+ inputs: [
1273
+ {
1274
+ name: '_levgVault',
1275
+ type: 'address',
1276
+ },
1277
+ {
1278
+ name: '_ripeHq',
1279
+ type: 'address',
1280
+ },
1281
+ ],
1282
+ outputs: [
1283
+ {
1284
+ name: '',
1285
+ type: 'uint256',
1286
+ },
1287
+ ],
1288
+ },
1289
+ {
1290
+ stateMutability: 'view',
1291
+ type: 'function',
1292
+ name: 'getTrueMaxBorrowAmount',
1293
+ inputs: [
1294
+ {
1295
+ name: '_levgVault',
1296
+ type: 'address',
1297
+ },
1298
+ ],
1299
+ outputs: [
1300
+ {
1301
+ name: '',
1302
+ type: 'uint256',
1303
+ },
1304
+ ],
1305
+ },
1306
+ {
1307
+ stateMutability: 'view',
1308
+ type: 'function',
1309
+ name: 'getTrueMaxBorrowAmount',
1310
+ inputs: [
1311
+ {
1312
+ name: '_levgVault',
1313
+ type: 'address',
1314
+ },
1315
+ {
1316
+ name: '_ripeHq',
1317
+ type: 'address',
1318
+ },
1319
+ ],
1320
+ outputs: [
1321
+ {
1322
+ name: '',
1323
+ type: 'uint256',
1324
+ },
1325
+ ],
1326
+ },
1327
+ {
1328
+ stateMutability: 'view',
1329
+ type: 'function',
1330
+ name: 'getMaxBorrowAmountByMaxDebtRatio',
1331
+ inputs: [
1332
+ {
1333
+ name: '_levgVault',
1334
+ type: 'address',
1335
+ },
1336
+ ],
1337
+ outputs: [
1338
+ {
1339
+ name: '',
1340
+ type: 'uint256',
1341
+ },
1342
+ ],
1343
+ },
1344
+ {
1345
+ stateMutability: 'view',
1346
+ type: 'function',
1347
+ name: 'getMaxBorrowAmountByMaxDebtRatio',
1348
+ inputs: [
1349
+ {
1350
+ name: '_levgVault',
1351
+ type: 'address',
1352
+ },
1353
+ {
1354
+ name: '_underlyingAsset',
1355
+ type: 'address',
1356
+ },
1357
+ ],
1358
+ outputs: [
1359
+ {
1360
+ name: '',
1361
+ type: 'uint256',
1362
+ },
1363
+ ],
1364
+ },
1365
+ {
1366
+ stateMutability: 'view',
1367
+ type: 'function',
1368
+ name: 'getMaxBorrowAmountByMaxDebtRatio',
1369
+ inputs: [
1370
+ {
1371
+ name: '_levgVault',
1372
+ type: 'address',
1373
+ },
1374
+ {
1375
+ name: '_underlyingAsset',
1376
+ type: 'address',
1377
+ },
1378
+ {
1379
+ name: '_collateralVaultToken',
1380
+ type: 'address',
1381
+ },
1382
+ ],
1383
+ outputs: [
1384
+ {
1385
+ name: '',
1386
+ type: 'uint256',
1387
+ },
1388
+ ],
1389
+ },
1390
+ {
1391
+ stateMutability: 'view',
1392
+ type: 'function',
1393
+ name: 'getMaxBorrowAmountByMaxDebtRatio',
1394
+ inputs: [
1395
+ {
1396
+ name: '_levgVault',
1397
+ type: 'address',
1398
+ },
1399
+ {
1400
+ name: '_underlyingAsset',
1401
+ type: 'address',
1402
+ },
1403
+ {
1404
+ name: '_collateralVaultToken',
1405
+ type: 'address',
1406
+ },
1407
+ {
1408
+ name: '_collateralVaultTokenRipeVaultId',
1409
+ type: 'uint256',
1410
+ },
1411
+ ],
1412
+ outputs: [
1413
+ {
1414
+ name: '',
1415
+ type: 'uint256',
1416
+ },
1417
+ ],
1418
+ },
1419
+ {
1420
+ stateMutability: 'view',
1421
+ type: 'function',
1422
+ name: 'getMaxBorrowAmountByMaxDebtRatio',
1423
+ inputs: [
1424
+ {
1425
+ name: '_levgVault',
1426
+ type: 'address',
1427
+ },
1428
+ {
1429
+ name: '_underlyingAsset',
1430
+ type: 'address',
1431
+ },
1432
+ {
1433
+ name: '_collateralVaultToken',
1434
+ type: 'address',
1435
+ },
1436
+ {
1437
+ name: '_collateralVaultTokenRipeVaultId',
1438
+ type: 'uint256',
1439
+ },
1440
+ {
1441
+ name: '_leverageVaultToken',
1442
+ type: 'address',
1443
+ },
1444
+ ],
1445
+ outputs: [
1446
+ {
1447
+ name: '',
1448
+ type: 'uint256',
1449
+ },
1450
+ ],
1451
+ },
1452
+ {
1453
+ stateMutability: 'view',
1454
+ type: 'function',
1455
+ name: 'getMaxBorrowAmountByMaxDebtRatio',
1456
+ inputs: [
1457
+ {
1458
+ name: '_levgVault',
1459
+ type: 'address',
1460
+ },
1461
+ {
1462
+ name: '_underlyingAsset',
1463
+ type: 'address',
1464
+ },
1465
+ {
1466
+ name: '_collateralVaultToken',
1467
+ type: 'address',
1468
+ },
1469
+ {
1470
+ name: '_collateralVaultTokenRipeVaultId',
1471
+ type: 'uint256',
1472
+ },
1473
+ {
1474
+ name: '_leverageVaultToken',
1475
+ type: 'address',
1476
+ },
1477
+ {
1478
+ name: '_netUserCapital',
1479
+ type: 'uint256',
1480
+ },
1481
+ ],
1482
+ outputs: [
1483
+ {
1484
+ name: '',
1485
+ type: 'uint256',
1486
+ },
1487
+ ],
1488
+ },
1489
+ {
1490
+ stateMutability: 'view',
1491
+ type: 'function',
1492
+ name: 'getMaxBorrowAmountByMaxDebtRatio',
1493
+ inputs: [
1494
+ {
1495
+ name: '_levgVault',
1496
+ type: 'address',
1497
+ },
1498
+ {
1499
+ name: '_underlyingAsset',
1500
+ type: 'address',
1501
+ },
1502
+ {
1503
+ name: '_collateralVaultToken',
1504
+ type: 'address',
1505
+ },
1506
+ {
1507
+ name: '_collateralVaultTokenRipeVaultId',
1508
+ type: 'uint256',
1509
+ },
1510
+ {
1511
+ name: '_leverageVaultToken',
1512
+ type: 'address',
1513
+ },
1514
+ {
1515
+ name: '_netUserCapital',
1516
+ type: 'uint256',
1517
+ },
1518
+ {
1519
+ name: '_maxDebtRatio',
1520
+ type: 'uint256',
1521
+ },
1522
+ ],
1523
+ outputs: [
1524
+ {
1525
+ name: '',
1526
+ type: 'uint256',
1527
+ },
1528
+ ],
1529
+ },
1530
+ {
1531
+ stateMutability: 'view',
1532
+ type: 'function',
1533
+ name: 'getMaxBorrowAmountByMaxDebtRatio',
1534
+ inputs: [
1535
+ {
1536
+ name: '_levgVault',
1537
+ type: 'address',
1538
+ },
1539
+ {
1540
+ name: '_underlyingAsset',
1541
+ type: 'address',
1542
+ },
1543
+ {
1544
+ name: '_collateralVaultToken',
1545
+ type: 'address',
1546
+ },
1547
+ {
1548
+ name: '_collateralVaultTokenRipeVaultId',
1549
+ type: 'uint256',
1550
+ },
1551
+ {
1552
+ name: '_leverageVaultToken',
1553
+ type: 'address',
1554
+ },
1555
+ {
1556
+ name: '_netUserCapital',
1557
+ type: 'uint256',
1558
+ },
1559
+ {
1560
+ name: '_maxDebtRatio',
1561
+ type: 'uint256',
1562
+ },
1563
+ {
1564
+ name: '_legoBook',
1565
+ type: 'address',
1566
+ },
1567
+ ],
1568
+ outputs: [
1569
+ {
1570
+ name: '',
1571
+ type: 'uint256',
1572
+ },
1573
+ ],
1574
+ },
1575
+ {
1576
+ stateMutability: 'view',
1577
+ type: 'function',
1578
+ name: 'getMaxBorrowAmountByMaxDebtRatio',
1579
+ inputs: [
1580
+ {
1581
+ name: '_levgVault',
1582
+ type: 'address',
1583
+ },
1584
+ {
1585
+ name: '_underlyingAsset',
1586
+ type: 'address',
1587
+ },
1588
+ {
1589
+ name: '_collateralVaultToken',
1590
+ type: 'address',
1591
+ },
1592
+ {
1593
+ name: '_collateralVaultTokenRipeVaultId',
1594
+ type: 'uint256',
1595
+ },
1596
+ {
1597
+ name: '_leverageVaultToken',
1598
+ type: 'address',
1599
+ },
1600
+ {
1601
+ name: '_netUserCapital',
1602
+ type: 'uint256',
1603
+ },
1604
+ {
1605
+ name: '_maxDebtRatio',
1606
+ type: 'uint256',
1607
+ },
1608
+ {
1609
+ name: '_legoBook',
1610
+ type: 'address',
1611
+ },
1612
+ {
1613
+ name: '_ripeVaultBook',
1614
+ type: 'address',
1615
+ },
1616
+ ],
1617
+ outputs: [
1618
+ {
1619
+ name: '',
1620
+ type: 'uint256',
1621
+ },
1622
+ ],
1623
+ },
1624
+ {
1625
+ stateMutability: 'view',
1626
+ type: 'function',
1627
+ name: 'getMaxBorrowAmountByMaxDebtRatio',
1628
+ inputs: [
1629
+ {
1630
+ name: '_levgVault',
1631
+ type: 'address',
1632
+ },
1633
+ {
1634
+ name: '_underlyingAsset',
1635
+ type: 'address',
1636
+ },
1637
+ {
1638
+ name: '_collateralVaultToken',
1639
+ type: 'address',
1640
+ },
1641
+ {
1642
+ name: '_collateralVaultTokenRipeVaultId',
1643
+ type: 'uint256',
1644
+ },
1645
+ {
1646
+ name: '_leverageVaultToken',
1647
+ type: 'address',
1648
+ },
1649
+ {
1650
+ name: '_netUserCapital',
1651
+ type: 'uint256',
1652
+ },
1653
+ {
1654
+ name: '_maxDebtRatio',
1655
+ type: 'uint256',
1656
+ },
1657
+ {
1658
+ name: '_legoBook',
1659
+ type: 'address',
1660
+ },
1661
+ {
1662
+ name: '_ripeVaultBook',
1663
+ type: 'address',
1664
+ },
1665
+ {
1666
+ name: '_ripeMissionControl',
1667
+ type: 'address',
1668
+ },
1669
+ ],
1670
+ outputs: [
1671
+ {
1672
+ name: '',
1673
+ type: 'uint256',
1674
+ },
1675
+ ],
1676
+ },
1677
+ {
1678
+ stateMutability: 'view',
1679
+ type: 'function',
1680
+ name: 'getMaxBorrowAmountByMaxDebtRatio',
1681
+ inputs: [
1682
+ {
1683
+ name: '_levgVault',
1684
+ type: 'address',
1685
+ },
1686
+ {
1687
+ name: '_underlyingAsset',
1688
+ type: 'address',
1689
+ },
1690
+ {
1691
+ name: '_collateralVaultToken',
1692
+ type: 'address',
1693
+ },
1694
+ {
1695
+ name: '_collateralVaultTokenRipeVaultId',
1696
+ type: 'uint256',
1697
+ },
1698
+ {
1699
+ name: '_leverageVaultToken',
1700
+ type: 'address',
1701
+ },
1702
+ {
1703
+ name: '_netUserCapital',
1704
+ type: 'uint256',
1705
+ },
1706
+ {
1707
+ name: '_maxDebtRatio',
1708
+ type: 'uint256',
1709
+ },
1710
+ {
1711
+ name: '_legoBook',
1712
+ type: 'address',
1713
+ },
1714
+ {
1715
+ name: '_ripeVaultBook',
1716
+ type: 'address',
1717
+ },
1718
+ {
1719
+ name: '_ripeMissionControl',
1720
+ type: 'address',
1721
+ },
1722
+ {
1723
+ name: '_ripeHq',
1724
+ type: 'address',
1725
+ },
1726
+ ],
1727
+ outputs: [
1728
+ {
1729
+ name: '',
1730
+ type: 'uint256',
1731
+ },
1732
+ ],
1733
+ },
1734
+ {
1735
+ stateMutability: 'view',
1736
+ type: 'function',
1737
+ name: 'getMaxBorrowAmountByRipeLtv',
1738
+ inputs: [
1739
+ {
1740
+ name: '_levgVault',
1741
+ type: 'address',
1742
+ },
1743
+ ],
1744
+ outputs: [
1745
+ {
1746
+ name: '',
1747
+ type: 'uint256',
1748
+ },
1749
+ ],
1750
+ },
1751
+ {
1752
+ stateMutability: 'view',
1753
+ type: 'function',
1754
+ name: 'getMaxBorrowAmountByRipeLtv',
1755
+ inputs: [
1756
+ {
1757
+ name: '_levgVault',
1758
+ type: 'address',
1759
+ },
1760
+ {
1761
+ name: '_creditEngine',
1762
+ type: 'address',
1763
+ },
1764
+ ],
1765
+ outputs: [
1766
+ {
1767
+ name: '',
1768
+ type: 'uint256',
1769
+ },
1770
+ ],
1771
+ },
1772
+ {
1773
+ stateMutability: 'view',
1774
+ type: 'function',
1775
+ name: 'getMaxBorrowAmountByRipeLtv',
1776
+ inputs: [
1777
+ {
1778
+ name: '_levgVault',
1779
+ type: 'address',
1780
+ },
1781
+ {
1782
+ name: '_creditEngine',
1783
+ type: 'address',
1784
+ },
1785
+ {
1786
+ name: '_ripeHq',
1787
+ type: 'address',
1788
+ },
1789
+ ],
1790
+ outputs: [
1791
+ {
1792
+ name: '',
1793
+ type: 'uint256',
1794
+ },
1795
+ ],
1796
+ },
1797
+ {
1798
+ stateMutability: 'view',
1799
+ type: 'function',
1800
+ name: 'getVaultTokenAmounts',
1801
+ inputs: [
1802
+ {
1803
+ name: '_levgVault',
1804
+ type: 'address',
1805
+ },
1806
+ {
1807
+ name: '_isCollateralAsset',
1808
+ type: 'bool',
1809
+ },
1810
+ ],
1811
+ outputs: [
1812
+ {
1813
+ name: '',
1814
+ type: 'uint256',
1815
+ },
1816
+ {
1817
+ name: '',
1818
+ type: 'uint256',
1819
+ },
1820
+ ],
1821
+ },
1822
+ {
1823
+ stateMutability: 'view',
1824
+ type: 'function',
1825
+ name: 'getVaultTokenAmounts',
1826
+ inputs: [
1827
+ {
1828
+ name: '_levgVault',
1829
+ type: 'address',
1830
+ },
1831
+ {
1832
+ name: '_isCollateralAsset',
1833
+ type: 'bool',
1834
+ },
1835
+ {
1836
+ name: '_ripeVaultBook',
1837
+ type: 'address',
1838
+ },
1839
+ ],
1840
+ outputs: [
1841
+ {
1842
+ name: '',
1843
+ type: 'uint256',
1844
+ },
1845
+ {
1846
+ name: '',
1847
+ type: 'uint256',
1848
+ },
1849
+ ],
1850
+ },
1851
+ {
1852
+ stateMutability: 'view',
1853
+ type: 'function',
1854
+ name: 'getVaultTokenAmounts',
1855
+ inputs: [
1856
+ {
1857
+ name: '_levgVault',
1858
+ type: 'address',
1859
+ },
1860
+ {
1861
+ name: '_isCollateralAsset',
1862
+ type: 'bool',
1863
+ },
1864
+ {
1865
+ name: '_ripeVaultBook',
1866
+ type: 'address',
1867
+ },
1868
+ {
1869
+ name: '_ripeMissionControl',
1870
+ type: 'address',
1871
+ },
1872
+ ],
1873
+ outputs: [
1874
+ {
1875
+ name: '',
1876
+ type: 'uint256',
1877
+ },
1878
+ {
1879
+ name: '',
1880
+ type: 'uint256',
1881
+ },
1882
+ ],
1883
+ },
1884
+ {
1885
+ stateMutability: 'view',
1886
+ type: 'function',
1887
+ name: 'getVaultTokenAmounts',
1888
+ inputs: [
1889
+ {
1890
+ name: '_levgVault',
1891
+ type: 'address',
1892
+ },
1893
+ {
1894
+ name: '_isCollateralAsset',
1895
+ type: 'bool',
1896
+ },
1897
+ {
1898
+ name: '_ripeVaultBook',
1899
+ type: 'address',
1900
+ },
1901
+ {
1902
+ name: '_ripeMissionControl',
1903
+ type: 'address',
1904
+ },
1905
+ {
1906
+ name: '_ripeHq',
1907
+ type: 'address',
1908
+ },
1909
+ ],
1910
+ outputs: [
1911
+ {
1912
+ name: '',
1913
+ type: 'uint256',
1914
+ },
1915
+ {
1916
+ name: '',
1917
+ type: 'uint256',
1918
+ },
1919
+ ],
1920
+ },
1921
+ {
1922
+ stateMutability: 'view',
1923
+ type: 'function',
1924
+ name: 'getUnderlyingAmounts',
1925
+ inputs: [
1926
+ {
1927
+ name: '_levgVault',
1928
+ type: 'address',
1929
+ },
1930
+ {
1931
+ name: '_isCollateralAsset',
1932
+ type: 'bool',
1933
+ },
1934
+ {
1935
+ name: '_shouldGetMax',
1936
+ type: 'bool',
1937
+ },
1938
+ ],
1939
+ outputs: [
1940
+ {
1941
+ name: '',
1942
+ type: 'uint256',
1943
+ },
1944
+ {
1945
+ name: '',
1946
+ type: 'uint256',
1947
+ },
1948
+ {
1949
+ name: '',
1950
+ type: 'uint256',
1951
+ },
1952
+ {
1953
+ name: '',
1954
+ type: 'uint256',
1955
+ },
1956
+ ],
1957
+ },
1958
+ {
1959
+ stateMutability: 'view',
1960
+ type: 'function',
1961
+ name: 'getUnderlyingAmounts',
1962
+ inputs: [
1963
+ {
1964
+ name: '_levgVault',
1965
+ type: 'address',
1966
+ },
1967
+ {
1968
+ name: '_isCollateralAsset',
1969
+ type: 'bool',
1970
+ },
1971
+ {
1972
+ name: '_shouldGetMax',
1973
+ type: 'bool',
1974
+ },
1975
+ {
1976
+ name: '_legoBook',
1977
+ type: 'address',
1978
+ },
1979
+ ],
1980
+ outputs: [
1981
+ {
1982
+ name: '',
1983
+ type: 'uint256',
1984
+ },
1985
+ {
1986
+ name: '',
1987
+ type: 'uint256',
1988
+ },
1989
+ {
1990
+ name: '',
1991
+ type: 'uint256',
1992
+ },
1993
+ {
1994
+ name: '',
1995
+ type: 'uint256',
1996
+ },
1997
+ ],
1998
+ },
1999
+ {
2000
+ stateMutability: 'view',
2001
+ type: 'function',
2002
+ name: 'getUnderlyingAmounts',
2003
+ inputs: [
2004
+ {
2005
+ name: '_levgVault',
2006
+ type: 'address',
2007
+ },
2008
+ {
2009
+ name: '_isCollateralAsset',
2010
+ type: 'bool',
2011
+ },
2012
+ {
2013
+ name: '_shouldGetMax',
2014
+ type: 'bool',
2015
+ },
2016
+ {
2017
+ name: '_legoBook',
2018
+ type: 'address',
2019
+ },
2020
+ {
2021
+ name: '_ripeVaultBook',
2022
+ type: 'address',
2023
+ },
2024
+ ],
2025
+ outputs: [
2026
+ {
2027
+ name: '',
2028
+ type: 'uint256',
2029
+ },
2030
+ {
2031
+ name: '',
2032
+ type: 'uint256',
2033
+ },
2034
+ {
2035
+ name: '',
2036
+ type: 'uint256',
2037
+ },
2038
+ {
2039
+ name: '',
2040
+ type: 'uint256',
2041
+ },
2042
+ ],
2043
+ },
2044
+ {
2045
+ stateMutability: 'view',
2046
+ type: 'function',
2047
+ name: 'getUnderlyingAmounts',
2048
+ inputs: [
2049
+ {
2050
+ name: '_levgVault',
2051
+ type: 'address',
2052
+ },
2053
+ {
2054
+ name: '_isCollateralAsset',
2055
+ type: 'bool',
2056
+ },
2057
+ {
2058
+ name: '_shouldGetMax',
2059
+ type: 'bool',
2060
+ },
2061
+ {
2062
+ name: '_legoBook',
2063
+ type: 'address',
2064
+ },
2065
+ {
2066
+ name: '_ripeVaultBook',
2067
+ type: 'address',
2068
+ },
2069
+ {
2070
+ name: '_ripeMissionControl',
2071
+ type: 'address',
2072
+ },
2073
+ ],
2074
+ outputs: [
2075
+ {
2076
+ name: '',
2077
+ type: 'uint256',
2078
+ },
2079
+ {
2080
+ name: '',
2081
+ type: 'uint256',
2082
+ },
2083
+ {
2084
+ name: '',
2085
+ type: 'uint256',
2086
+ },
2087
+ {
2088
+ name: '',
2089
+ type: 'uint256',
2090
+ },
2091
+ ],
2092
+ },
2093
+ {
2094
+ stateMutability: 'view',
2095
+ type: 'function',
2096
+ name: 'getUnderlyingAmounts',
2097
+ inputs: [
2098
+ {
2099
+ name: '_levgVault',
2100
+ type: 'address',
2101
+ },
2102
+ {
2103
+ name: '_isCollateralAsset',
2104
+ type: 'bool',
2105
+ },
2106
+ {
2107
+ name: '_shouldGetMax',
2108
+ type: 'bool',
2109
+ },
2110
+ {
2111
+ name: '_legoBook',
2112
+ type: 'address',
2113
+ },
2114
+ {
2115
+ name: '_ripeVaultBook',
2116
+ type: 'address',
2117
+ },
2118
+ {
2119
+ name: '_ripeMissionControl',
2120
+ type: 'address',
2121
+ },
2122
+ {
2123
+ name: '_ripeHq',
2124
+ type: 'address',
2125
+ },
2126
+ ],
2127
+ outputs: [
2128
+ {
2129
+ name: '',
2130
+ type: 'uint256',
2131
+ },
2132
+ {
2133
+ name: '',
2134
+ type: 'uint256',
2135
+ },
2136
+ {
2137
+ name: '',
2138
+ type: 'uint256',
2139
+ },
2140
+ {
2141
+ name: '',
2142
+ type: 'uint256',
2143
+ },
2144
+ ],
2145
+ },
2146
+ {
2147
+ stateMutability: 'view',
2148
+ type: 'function',
2149
+ name: 'getGreenAmounts',
2150
+ inputs: [
2151
+ {
2152
+ name: '_levgVault',
2153
+ type: 'address',
2154
+ },
2155
+ ],
2156
+ outputs: [
2157
+ {
2158
+ name: '',
2159
+ type: 'uint256',
2160
+ },
2161
+ {
2162
+ name: '',
2163
+ type: 'uint256',
2164
+ },
2165
+ {
2166
+ name: '',
2167
+ type: 'uint256',
2168
+ },
2169
+ {
2170
+ name: '',
2171
+ type: 'uint256',
2172
+ },
2173
+ ],
2174
+ },
2175
+ {
2176
+ stateMutability: 'view',
2177
+ type: 'function',
2178
+ name: 'getGreenAmounts',
2179
+ inputs: [
2180
+ {
2181
+ name: '_levgVault',
2182
+ type: 'address',
2183
+ },
2184
+ {
2185
+ name: '_green',
2186
+ type: 'address',
2187
+ },
2188
+ ],
2189
+ outputs: [
2190
+ {
2191
+ name: '',
2192
+ type: 'uint256',
2193
+ },
2194
+ {
2195
+ name: '',
2196
+ type: 'uint256',
2197
+ },
2198
+ {
2199
+ name: '',
2200
+ type: 'uint256',
2201
+ },
2202
+ {
2203
+ name: '',
2204
+ type: 'uint256',
2205
+ },
2206
+ ],
2207
+ },
2208
+ {
2209
+ stateMutability: 'view',
2210
+ type: 'function',
2211
+ name: 'getGreenAmounts',
2212
+ inputs: [
2213
+ {
2214
+ name: '_levgVault',
2215
+ type: 'address',
2216
+ },
2217
+ {
2218
+ name: '_green',
2219
+ type: 'address',
2220
+ },
2221
+ {
2222
+ name: '_savingsGreen',
2223
+ type: 'address',
2224
+ },
2225
+ ],
2226
+ outputs: [
2227
+ {
2228
+ name: '',
2229
+ type: 'uint256',
2230
+ },
2231
+ {
2232
+ name: '',
2233
+ type: 'uint256',
2234
+ },
2235
+ {
2236
+ name: '',
2237
+ type: 'uint256',
2238
+ },
2239
+ {
2240
+ name: '',
2241
+ type: 'uint256',
2242
+ },
2243
+ ],
2244
+ },
2245
+ {
2246
+ stateMutability: 'view',
2247
+ type: 'function',
2248
+ name: 'getGreenAmounts',
2249
+ inputs: [
2250
+ {
2251
+ name: '_levgVault',
2252
+ type: 'address',
2253
+ },
2254
+ {
2255
+ name: '_green',
2256
+ type: 'address',
2257
+ },
2258
+ {
2259
+ name: '_savingsGreen',
2260
+ type: 'address',
2261
+ },
2262
+ {
2263
+ name: '_ripeVaultBook',
2264
+ type: 'address',
2265
+ },
2266
+ ],
2267
+ outputs: [
2268
+ {
2269
+ name: '',
2270
+ type: 'uint256',
2271
+ },
2272
+ {
2273
+ name: '',
2274
+ type: 'uint256',
2275
+ },
2276
+ {
2277
+ name: '',
2278
+ type: 'uint256',
2279
+ },
2280
+ {
2281
+ name: '',
2282
+ type: 'uint256',
2283
+ },
2284
+ ],
2285
+ },
2286
+ {
2287
+ stateMutability: 'view',
2288
+ type: 'function',
2289
+ name: 'getGreenAmounts',
2290
+ inputs: [
2291
+ {
2292
+ name: '_levgVault',
2293
+ type: 'address',
2294
+ },
2295
+ {
2296
+ name: '_green',
2297
+ type: 'address',
2298
+ },
2299
+ {
2300
+ name: '_savingsGreen',
2301
+ type: 'address',
2302
+ },
2303
+ {
2304
+ name: '_ripeVaultBook',
2305
+ type: 'address',
2306
+ },
2307
+ {
2308
+ name: '_ripeMissionControl',
2309
+ type: 'address',
2310
+ },
2311
+ ],
2312
+ outputs: [
2313
+ {
2314
+ name: '',
2315
+ type: 'uint256',
2316
+ },
2317
+ {
2318
+ name: '',
2319
+ type: 'uint256',
2320
+ },
2321
+ {
2322
+ name: '',
2323
+ type: 'uint256',
2324
+ },
2325
+ {
2326
+ name: '',
2327
+ type: 'uint256',
2328
+ },
2329
+ ],
2330
+ },
2331
+ {
2332
+ stateMutability: 'view',
2333
+ type: 'function',
2334
+ name: 'getGreenAmounts',
2335
+ inputs: [
2336
+ {
2337
+ name: '_levgVault',
2338
+ type: 'address',
2339
+ },
2340
+ {
2341
+ name: '_green',
2342
+ type: 'address',
2343
+ },
2344
+ {
2345
+ name: '_savingsGreen',
2346
+ type: 'address',
2347
+ },
2348
+ {
2349
+ name: '_ripeVaultBook',
2350
+ type: 'address',
2351
+ },
2352
+ {
2353
+ name: '_ripeMissionControl',
2354
+ type: 'address',
2355
+ },
2356
+ {
2357
+ name: '_ripeHq',
2358
+ type: 'address',
2359
+ },
2360
+ ],
2361
+ outputs: [
2362
+ {
2363
+ name: '',
2364
+ type: 'uint256',
2365
+ },
2366
+ {
2367
+ name: '',
2368
+ type: 'uint256',
2369
+ },
2370
+ {
2371
+ name: '',
2372
+ type: 'uint256',
2373
+ },
2374
+ {
2375
+ name: '',
2376
+ type: 'uint256',
2377
+ },
2378
+ ],
2379
+ },
2380
+ {
2381
+ stateMutability: 'view',
2382
+ type: 'function',
2383
+ name: 'RIPE_REGISTRY',
2384
+ inputs: [],
2385
+ outputs: [
2386
+ {
2387
+ name: '',
2388
+ type: 'address',
2389
+ },
2390
+ ],
2391
+ },
2392
+ {
2393
+ stateMutability: 'view',
2394
+ type: 'function',
2395
+ name: 'GREEN_TOKEN',
2396
+ inputs: [],
2397
+ outputs: [
2398
+ {
2399
+ name: '',
2400
+ type: 'address',
2401
+ },
2402
+ ],
2403
+ },
2404
+ {
2405
+ stateMutability: 'view',
2406
+ type: 'function',
2407
+ name: 'SAVINGS_GREEN',
2408
+ inputs: [],
2409
+ outputs: [
2410
+ {
2411
+ name: '',
2412
+ type: 'address',
2413
+ },
2414
+ ],
2415
+ },
2416
+ {
2417
+ stateMutability: 'view',
2418
+ type: 'function',
2419
+ name: 'USDC',
2420
+ inputs: [],
2421
+ outputs: [
2422
+ {
2423
+ name: '',
2424
+ type: 'address',
2425
+ },
2426
+ ],
2427
+ },
2428
+ {
2429
+ stateMutability: 'nonpayable',
2430
+ type: 'constructor',
2431
+ inputs: [
2432
+ {
2433
+ name: '_undyHq',
2434
+ type: 'address',
2435
+ },
2436
+ {
2437
+ name: '_ripeRegistry',
2438
+ type: 'address',
2439
+ },
2440
+ {
2441
+ name: '_usdc',
2442
+ type: 'address',
2443
+ },
2444
+ ],
2445
+ outputs: [],
2446
+ },
2447
+ ];
2448
+ export const deployAddress = '0xbCfC93bbF48423fd033af30573afce75bDc6C3f4';
2449
+ function getRequest(method, args, contractAddressOrOptions) {
2450
+ const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
2451
+ const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
2452
+ const call = {
2453
+ contractName: 'LevgVaultTools',
2454
+ method,
2455
+ args,
2456
+ address,
2457
+ deployAddress,
2458
+ defaultValue,
2459
+ getAbi: () => abi,
2460
+ with: (options) => {
2461
+ call.address = options.contractAddress;
2462
+ call.defaultValue = options.defaultValue;
2463
+ return call;
2464
+ },
2465
+ defaultTo: (defaultValue) => {
2466
+ call.defaultValue = defaultValue;
2467
+ return call;
2468
+ },
2469
+ at: (address) => {
2470
+ call.address = address;
2471
+ return call;
2472
+ },
2473
+ };
2474
+ return call;
2475
+ }
2476
+ export const call = {
2477
+ getAddys: (...args) => getRequest('getAddys', args),
2478
+ getUndyHq: (...args) => getRequest('getUndyHq', args),
2479
+ getTotalUnderlyingAmount: (...args) => getRequest('getTotalUnderlyingAmount', args),
2480
+ getAmountForAsset: (...args) => getRequest('getAmountForAsset', args),
2481
+ getUnderlyingAmountForVaultToken: (...args) => getRequest('getUnderlyingAmountForVaultToken', args),
2482
+ getRipeCollateralBalance: (...args) => getRequest('getRipeCollateralBalance', args),
2483
+ getUnderlyingGreenAmount: (...args) => getRequest('getUnderlyingGreenAmount', args),
2484
+ getSwappableUsdcAmount: (...args) => getRequest('getSwappableUsdcAmount', args),
2485
+ getBorrowRate: (...args) => getRequest('getBorrowRate', args),
2486
+ getDebtAmount: (...args) => getRequest('getDebtAmount', args),
2487
+ getTrueMaxBorrowAmount: (...args) => getRequest('getTrueMaxBorrowAmount', args),
2488
+ getMaxBorrowAmountByMaxDebtRatio: (...args) => getRequest('getMaxBorrowAmountByMaxDebtRatio', args),
2489
+ getMaxBorrowAmountByRipeLtv: (...args) => getRequest('getMaxBorrowAmountByRipeLtv', args),
2490
+ getVaultTokenAmounts: (...args) => getRequest('getVaultTokenAmounts', args),
2491
+ getUnderlyingAmounts: (...args) => getRequest('getUnderlyingAmounts', args),
2492
+ getGreenAmounts: (...args) => getRequest('getGreenAmounts', args),
2493
+ RIPE_REGISTRY: (...args) => getRequest('RIPE_REGISTRY', args),
2494
+ GREEN_TOKEN: (...args) => getRequest('GREEN_TOKEN', args),
2495
+ SAVINGS_GREEN: (...args) => getRequest('SAVINGS_GREEN', args),
2496
+ USDC: (...args) => getRequest('USDC', args),
2497
+ };
2498
+ export function toSdk(publicClient, walletClient, addressResolver) {
2499
+ return {
2500
+ deployAddress,
2501
+ abi,
2502
+ // Queries
2503
+ getAddys: (...args) => singleQuery(publicClient, call.getAddys(...args), {}, addressResolver),
2504
+ getUndyHq: (...args) => singleQuery(publicClient, call.getUndyHq(...args), {}, addressResolver),
2505
+ getTotalUnderlyingAmount: (...args) => singleQuery(publicClient, call.getTotalUnderlyingAmount(...args), {}, addressResolver),
2506
+ getAmountForAsset: (...args) => singleQuery(publicClient, call.getAmountForAsset(...args), {}, addressResolver),
2507
+ getUnderlyingAmountForVaultToken: (...args) => singleQuery(publicClient, call.getUnderlyingAmountForVaultToken(...args), {}, addressResolver),
2508
+ getRipeCollateralBalance: (...args) => singleQuery(publicClient, call.getRipeCollateralBalance(...args), {}, addressResolver),
2509
+ getUnderlyingGreenAmount: (...args) => singleQuery(publicClient, call.getUnderlyingGreenAmount(...args), {}, addressResolver),
2510
+ getSwappableUsdcAmount: (...args) => singleQuery(publicClient, call.getSwappableUsdcAmount(...args), {}, addressResolver),
2511
+ getBorrowRate: (...args) => singleQuery(publicClient, call.getBorrowRate(...args), {}, addressResolver),
2512
+ getDebtAmount: (...args) => singleQuery(publicClient, call.getDebtAmount(...args), {}, addressResolver),
2513
+ getTrueMaxBorrowAmount: (...args) => singleQuery(publicClient, call.getTrueMaxBorrowAmount(...args), {}, addressResolver),
2514
+ getMaxBorrowAmountByMaxDebtRatio: (...args) => singleQuery(publicClient, call.getMaxBorrowAmountByMaxDebtRatio(...args), {}, addressResolver),
2515
+ getMaxBorrowAmountByRipeLtv: (...args) => singleQuery(publicClient, call.getMaxBorrowAmountByRipeLtv(...args), {}, addressResolver),
2516
+ getVaultTokenAmounts: (...args) => singleQuery(publicClient, call.getVaultTokenAmounts(...args), {}, addressResolver),
2517
+ getUnderlyingAmounts: (...args) => singleQuery(publicClient, call.getUnderlyingAmounts(...args), {}, addressResolver),
2518
+ getGreenAmounts: (...args) => singleQuery(publicClient, call.getGreenAmounts(...args), {}, addressResolver),
2519
+ RIPE_REGISTRY: (...args) => singleQuery(publicClient, call.RIPE_REGISTRY(...args), {}, addressResolver),
2520
+ GREEN_TOKEN: (...args) => singleQuery(publicClient, call.GREEN_TOKEN(...args), {}, addressResolver),
2521
+ SAVINGS_GREEN: (...args) => singleQuery(publicClient, call.SAVINGS_GREEN(...args), {}, addressResolver),
2522
+ USDC: (...args) => singleQuery(publicClient, call.USDC(...args), {}, addressResolver),
2523
+ // Mutations
2524
+ };
2525
+ }