@underscore-finance/sdk 1.1.2 → 1.2.2

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 (181) hide show
  1. package/dist/contracts/AaveV3.d.ts +126 -13
  2. package/dist/contracts/AaveV3.d.ts.map +1 -1
  3. package/dist/contracts/AaveV3.js +159 -13
  4. package/dist/contracts/AeroClassic.d.ts +85 -0
  5. package/dist/contracts/AeroClassic.d.ts.map +1 -1
  6. package/dist/contracts/AeroClassic.js +109 -1
  7. package/dist/contracts/AeroSlipstream.d.ts +119 -0
  8. package/dist/contracts/AeroSlipstream.d.ts.map +1 -1
  9. package/dist/contracts/AeroSlipstream.js +151 -1
  10. package/dist/contracts/AgentSenderGeneric.d.ts +4027 -0
  11. package/dist/contracts/AgentSenderGeneric.d.ts.map +1 -0
  12. package/dist/contracts/AgentSenderGeneric.js +5280 -0
  13. package/dist/contracts/AgentSenderSpecial.d.ts +1968 -0
  14. package/dist/contracts/AgentSenderSpecial.d.ts.map +1 -0
  15. package/dist/contracts/AgentSenderSpecial.js +2509 -0
  16. package/dist/contracts/AgentWrapper.d.ts +170 -1462
  17. package/dist/contracts/AgentWrapper.d.ts.map +1 -1
  18. package/dist/contracts/AgentWrapper.js +262 -1869
  19. package/dist/contracts/AgentWrapperV1.d.ts +3760 -0
  20. package/dist/contracts/AgentWrapperV1.d.ts.map +1 -0
  21. package/dist/contracts/AgentWrapperV1.js +4922 -0
  22. package/dist/contracts/Appraiser.d.ts +18 -459
  23. package/dist/contracts/Appraiser.d.ts.map +1 -1
  24. package/dist/contracts/Appraiser.js +75 -649
  25. package/dist/contracts/Avantis.d.ts +2565 -0
  26. package/dist/contracts/Avantis.d.ts.map +1 -0
  27. package/dist/contracts/Avantis.js +3256 -0
  28. package/dist/contracts/Billing.d.ts +4 -68
  29. package/dist/contracts/Billing.d.ts.map +1 -1
  30. package/dist/contracts/Billing.js +5 -82
  31. package/dist/contracts/ChequeBook.d.ts +52 -1
  32. package/dist/contracts/ChequeBook.d.ts.map +1 -1
  33. package/dist/contracts/ChequeBook.js +53 -1
  34. package/dist/contracts/CompoundV3.d.ts +126 -13
  35. package/dist/contracts/CompoundV3.d.ts.map +1 -1
  36. package/dist/contracts/CompoundV3.js +159 -13
  37. package/dist/contracts/ConvertVaultToken.d.ts +63 -0
  38. package/dist/contracts/ConvertVaultToken.d.ts.map +1 -0
  39. package/dist/contracts/ConvertVaultToken.js +75 -0
  40. package/dist/contracts/Curve.d.ts +14 -0
  41. package/dist/contracts/Curve.d.ts.map +1 -1
  42. package/dist/contracts/Curve.js +19 -1
  43. package/dist/contracts/DefaultsBase.d.ts +45 -56
  44. package/dist/contracts/DefaultsBase.d.ts.map +1 -1
  45. package/dist/contracts/DefaultsBase.js +45 -59
  46. package/dist/contracts/EarnVault.d.ts +1680 -0
  47. package/dist/contracts/EarnVault.d.ts.map +1 -0
  48. package/dist/contracts/EarnVault.js +2206 -0
  49. package/dist/contracts/EarnVaultAgent.d.ts +1004 -0
  50. package/dist/contracts/EarnVaultAgent.d.ts.map +1 -0
  51. package/dist/contracts/EarnVaultAgent.js +1273 -0
  52. package/dist/contracts/EarnVaultAgentSigHelper.d.ts +904 -0
  53. package/dist/contracts/EarnVaultAgentSigHelper.d.ts.map +1 -0
  54. package/dist/contracts/EarnVaultAgentSigHelper.js +1198 -0
  55. package/dist/contracts/Euler.d.ts +131 -14
  56. package/dist/contracts/Euler.d.ts.map +1 -1
  57. package/dist/contracts/Euler.js +164 -13
  58. package/dist/contracts/Fluid.d.ts +159 -14
  59. package/dist/contracts/Fluid.d.ts.map +1 -1
  60. package/dist/contracts/Fluid.js +200 -13
  61. package/dist/contracts/FortyAcres.d.ts +145 -14
  62. package/dist/contracts/FortyAcres.d.ts.map +1 -1
  63. package/dist/contracts/FortyAcres.js +182 -13
  64. package/dist/contracts/Hatchery.d.ts +6 -176
  65. package/dist/contracts/Hatchery.d.ts.map +1 -1
  66. package/dist/contracts/Hatchery.js +5 -225
  67. package/dist/contracts/HighCommand.d.ts +237 -1
  68. package/dist/contracts/HighCommand.d.ts.map +1 -1
  69. package/dist/contracts/HighCommand.js +259 -1
  70. package/dist/contracts/Kernel.d.ts +8 -0
  71. package/dist/contracts/Kernel.d.ts.map +1 -1
  72. package/dist/contracts/Kernel.js +9 -1
  73. package/dist/contracts/LegoBook.js +1 -1
  74. package/dist/contracts/LegoTools.js +1 -1
  75. package/dist/contracts/LevgVaultHelper.d.ts +1070 -0
  76. package/dist/contracts/LevgVaultHelper.d.ts.map +1 -0
  77. package/dist/contracts/LevgVaultHelper.js +1414 -0
  78. package/dist/contracts/LootDistributor.d.ts +49 -131
  79. package/dist/contracts/LootDistributor.d.ts.map +1 -1
  80. package/dist/contracts/LootDistributor.js +58 -157
  81. package/dist/contracts/Migrator.d.ts +4 -0
  82. package/dist/contracts/Migrator.d.ts.map +1 -1
  83. package/dist/contracts/Migrator.js +5 -1
  84. package/dist/contracts/MissionControl.d.ts +211 -295
  85. package/dist/contracts/MissionControl.d.ts.map +1 -1
  86. package/dist/contracts/MissionControl.js +216 -305
  87. package/dist/contracts/Moonwell.d.ts +131 -14
  88. package/dist/contracts/Moonwell.d.ts.map +1 -1
  89. package/dist/contracts/Moonwell.js +164 -13
  90. package/dist/contracts/Morpho.d.ts +131 -14
  91. package/dist/contracts/Morpho.d.ts.map +1 -1
  92. package/dist/contracts/Morpho.js +164 -13
  93. package/dist/contracts/Paymaster.d.ts +4 -0
  94. package/dist/contracts/Paymaster.d.ts.map +1 -1
  95. package/dist/contracts/Paymaster.js +5 -1
  96. package/dist/contracts/RipeLego.d.ts +267 -81
  97. package/dist/contracts/RipeLego.d.ts.map +1 -1
  98. package/dist/contracts/RipeLego.js +322 -87
  99. package/dist/contracts/Sentinel.d.ts +275 -7
  100. package/dist/contracts/Sentinel.d.ts.map +1 -1
  101. package/dist/contracts/Sentinel.js +331 -7
  102. package/dist/contracts/SkyPsm.d.ts +2622 -0
  103. package/dist/contracts/SkyPsm.d.ts.map +1 -0
  104. package/dist/contracts/SkyPsm.js +3329 -0
  105. package/dist/contracts/Switchboard.d.ts +7 -0
  106. package/dist/contracts/Switchboard.d.ts.map +1 -1
  107. package/dist/contracts/Switchboard.js +9 -1
  108. package/dist/contracts/SwitchboardAlpha.d.ts +499 -264
  109. package/dist/contracts/SwitchboardAlpha.d.ts.map +1 -1
  110. package/dist/contracts/SwitchboardAlpha.js +566 -282
  111. package/dist/contracts/SwitchboardBravo.d.ts +4 -24
  112. package/dist/contracts/SwitchboardBravo.d.ts.map +1 -1
  113. package/dist/contracts/SwitchboardBravo.js +5 -32
  114. package/dist/contracts/SwitchboardCharlie.d.ts +1796 -343
  115. package/dist/contracts/SwitchboardCharlie.d.ts.map +1 -1
  116. package/dist/contracts/SwitchboardCharlie.js +2178 -368
  117. package/dist/contracts/UnderscoreLego.d.ts +129 -15
  118. package/dist/contracts/UnderscoreLego.d.ts.map +1 -1
  119. package/dist/contracts/UnderscoreLego.js +161 -14
  120. package/dist/contracts/UndyAero.d.ts +1680 -0
  121. package/dist/contracts/UndyAero.d.ts.map +1 -0
  122. package/dist/contracts/UndyAero.js +2206 -0
  123. package/dist/contracts/UndyBtc.d.ts +209 -16
  124. package/dist/contracts/UndyBtc.d.ts.map +1 -1
  125. package/dist/contracts/UndyBtc.js +267 -16
  126. package/dist/contracts/UndyCbeth.d.ts +1680 -0
  127. package/dist/contracts/UndyCbeth.d.ts.map +1 -0
  128. package/dist/contracts/UndyCbeth.js +2206 -0
  129. package/dist/contracts/UndyEth.d.ts +209 -16
  130. package/dist/contracts/UndyEth.d.ts.map +1 -1
  131. package/dist/contracts/UndyEth.js +267 -16
  132. package/dist/contracts/UndyEurc.d.ts +1680 -0
  133. package/dist/contracts/UndyEurc.d.ts.map +1 -0
  134. package/dist/contracts/UndyEurc.js +2206 -0
  135. package/dist/contracts/UndyGho.d.ts +1680 -0
  136. package/dist/contracts/UndyGho.d.ts.map +1 -0
  137. package/dist/contracts/UndyGho.js +2206 -0
  138. package/dist/contracts/UndyUsd.d.ts +209 -16
  139. package/dist/contracts/UndyUsd.d.ts.map +1 -1
  140. package/dist/contracts/UndyUsd.js +267 -16
  141. package/dist/contracts/UndyUsds.d.ts +1680 -0
  142. package/dist/contracts/UndyUsds.d.ts.map +1 -0
  143. package/dist/contracts/UndyUsds.js +2206 -0
  144. package/dist/contracts/UniswapV2.d.ts +85 -0
  145. package/dist/contracts/UniswapV2.d.ts.map +1 -1
  146. package/dist/contracts/UniswapV2.js +109 -1
  147. package/dist/contracts/UniswapV3.d.ts +119 -0
  148. package/dist/contracts/UniswapV3.d.ts.map +1 -1
  149. package/dist/contracts/UniswapV3.js +151 -1
  150. package/dist/contracts/UserWallet.d.ts +12 -8
  151. package/dist/contracts/UserWallet.d.ts.map +1 -1
  152. package/dist/contracts/UserWallet.js +13 -9
  153. package/dist/contracts/UserWalletConfig.d.ts +198 -56
  154. package/dist/contracts/UserWalletConfig.d.ts.map +1 -1
  155. package/dist/contracts/UserWalletConfig.js +225 -72
  156. package/dist/contracts/UserWalletConfigV1.d.ts +3655 -0
  157. package/dist/contracts/UserWalletConfigV1.d.ts.map +1 -0
  158. package/dist/contracts/UserWalletConfigV1.js +4251 -0
  159. package/dist/contracts/UserWalletV1.d.ts +2633 -0
  160. package/dist/contracts/UserWalletV1.d.ts.map +1 -0
  161. package/dist/contracts/UserWalletV1.js +3500 -0
  162. package/dist/contracts/VaultRegistry.d.ts +848 -85
  163. package/dist/contracts/VaultRegistry.d.ts.map +1 -1
  164. package/dist/contracts/VaultRegistry.js +1078 -83
  165. package/dist/contracts/WalletBackpack.d.ts +4 -0
  166. package/dist/contracts/WalletBackpack.d.ts.map +1 -1
  167. package/dist/contracts/WalletBackpack.js +5 -1
  168. package/dist/contracts/Wasabi.d.ts +2579 -0
  169. package/dist/contracts/Wasabi.d.ts.map +1 -0
  170. package/dist/contracts/Wasabi.js +3274 -0
  171. package/dist/contracts/index.d.ts +18 -1
  172. package/dist/contracts/index.d.ts.map +1 -1
  173. package/dist/contracts/index.js +18 -1
  174. package/dist/contracts/sdk.d.ts +36 -2
  175. package/dist/contracts/sdk.d.ts.map +1 -1
  176. package/dist/contracts/sdk.js +36 -2
  177. package/dist/getSwapInstructions.js +1 -1
  178. package/dist/index.d.ts +95 -8
  179. package/dist/index.d.ts.map +1 -1
  180. package/dist/index.js +45 -7
  181. package/package.json +3 -3
@@ -258,6 +258,53 @@ export const abi = [
258
258
  anonymous: false,
259
259
  type: 'event',
260
260
  },
261
+ {
262
+ name: 'RipeEndaomentPsmSwap',
263
+ inputs: [
264
+ {
265
+ name: 'sender',
266
+ type: 'address',
267
+ indexed: true,
268
+ },
269
+ {
270
+ name: 'tokenIn',
271
+ type: 'address',
272
+ indexed: true,
273
+ },
274
+ {
275
+ name: 'tokenOut',
276
+ type: 'address',
277
+ indexed: true,
278
+ },
279
+ {
280
+ name: 'amountIn',
281
+ type: 'uint256',
282
+ indexed: false,
283
+ },
284
+ {
285
+ name: 'amountOut',
286
+ type: 'uint256',
287
+ indexed: false,
288
+ },
289
+ {
290
+ name: 'usdValue',
291
+ type: 'uint256',
292
+ indexed: false,
293
+ },
294
+ {
295
+ name: 'numTokens',
296
+ type: 'uint256',
297
+ indexed: false,
298
+ },
299
+ {
300
+ name: 'recipient',
301
+ type: 'address',
302
+ indexed: false,
303
+ },
304
+ ],
305
+ anonymous: false,
306
+ type: 'event',
307
+ },
261
308
  {
262
309
  name: 'LegoPauseModified',
263
310
  inputs: [
@@ -371,6 +418,11 @@ export const abi = [
371
418
  type: 'uint256',
372
419
  indexed: false,
373
420
  },
421
+ {
422
+ name: 'lastAveragePricePerShare',
423
+ type: 'uint256',
424
+ indexed: false,
425
+ },
374
426
  ],
375
427
  anonymous: false,
376
428
  type: 'event',
@@ -1266,45 +1318,58 @@ export const abi = [
1266
1318
  {
1267
1319
  stateMutability: 'view',
1268
1320
  type: 'function',
1269
- name: 'isEligibleVaultForTrialFunds',
1321
+ name: 'totalAssets',
1270
1322
  inputs: [
1271
1323
  {
1272
1324
  name: '_vaultToken',
1273
1325
  type: 'address',
1274
1326
  },
1327
+ ],
1328
+ outputs: [
1275
1329
  {
1276
- name: '_underlyingAsset',
1330
+ name: '',
1331
+ type: 'uint256',
1332
+ },
1333
+ ],
1334
+ },
1335
+ {
1336
+ stateMutability: 'view',
1337
+ type: 'function',
1338
+ name: 'totalBorrows',
1339
+ inputs: [
1340
+ {
1341
+ name: '_vaultToken',
1277
1342
  type: 'address',
1278
1343
  },
1279
1344
  ],
1280
1345
  outputs: [
1281
1346
  {
1282
1347
  name: '',
1283
- type: 'bool',
1348
+ type: 'uint256',
1284
1349
  },
1285
1350
  ],
1286
1351
  },
1287
1352
  {
1288
1353
  stateMutability: 'view',
1289
1354
  type: 'function',
1290
- name: 'isEligibleForYieldBonus',
1355
+ name: 'getAvailLiquidity',
1291
1356
  inputs: [
1292
1357
  {
1293
- name: '_asset',
1358
+ name: '_vaultToken',
1294
1359
  type: 'address',
1295
1360
  },
1296
1361
  ],
1297
1362
  outputs: [
1298
1363
  {
1299
1364
  name: '',
1300
- type: 'bool',
1365
+ type: 'uint256',
1301
1366
  },
1302
1367
  ],
1303
1368
  },
1304
1369
  {
1305
1370
  stateMutability: 'view',
1306
1371
  type: 'function',
1307
- name: 'totalAssets',
1372
+ name: 'getUtilizationRatio',
1308
1373
  inputs: [
1309
1374
  {
1310
1375
  name: '_vaultToken',
@@ -1321,12 +1386,33 @@ export const abi = [
1321
1386
  {
1322
1387
  stateMutability: 'view',
1323
1388
  type: 'function',
1324
- name: 'totalBorrows',
1389
+ name: 'isEligibleForYieldBonus',
1390
+ inputs: [
1391
+ {
1392
+ name: '_asset',
1393
+ type: 'address',
1394
+ },
1395
+ ],
1396
+ outputs: [
1397
+ {
1398
+ name: '',
1399
+ type: 'bool',
1400
+ },
1401
+ ],
1402
+ },
1403
+ {
1404
+ stateMutability: 'view',
1405
+ type: 'function',
1406
+ name: 'getWithdrawalFees',
1325
1407
  inputs: [
1326
1408
  {
1327
1409
  name: '_vaultToken',
1328
1410
  type: 'address',
1329
1411
  },
1412
+ {
1413
+ name: '_vaultTokenAmount',
1414
+ type: 'uint256',
1415
+ },
1330
1416
  ],
1331
1417
  outputs: [
1332
1418
  {
@@ -1643,19 +1729,23 @@ export const abi = [
1643
1729
  {
1644
1730
  stateMutability: 'nonpayable',
1645
1731
  type: 'function',
1646
- name: 'addCollateral',
1732
+ name: 'swapTokens',
1647
1733
  inputs: [
1648
1734
  {
1649
- name: '_asset',
1650
- type: 'address',
1735
+ name: '_amountIn',
1736
+ type: 'uint256',
1651
1737
  },
1652
1738
  {
1653
- name: '_amount',
1739
+ name: '_minAmountOut',
1654
1740
  type: 'uint256',
1655
1741
  },
1656
1742
  {
1657
- name: '_extraData',
1658
- type: 'bytes32',
1743
+ name: '_tokenPath',
1744
+ type: 'address[]',
1745
+ },
1746
+ {
1747
+ name: '_poolPath',
1748
+ type: 'address[]',
1659
1749
  },
1660
1750
  {
1661
1751
  name: '_recipient',
@@ -1671,24 +1761,32 @@ export const abi = [
1671
1761
  name: '',
1672
1762
  type: 'uint256',
1673
1763
  },
1764
+ {
1765
+ name: '',
1766
+ type: 'uint256',
1767
+ },
1674
1768
  ],
1675
1769
  },
1676
1770
  {
1677
1771
  stateMutability: 'nonpayable',
1678
1772
  type: 'function',
1679
- name: 'addCollateral',
1773
+ name: 'swapTokens',
1680
1774
  inputs: [
1681
1775
  {
1682
- name: '_asset',
1683
- type: 'address',
1776
+ name: '_amountIn',
1777
+ type: 'uint256',
1684
1778
  },
1685
1779
  {
1686
- name: '_amount',
1780
+ name: '_minAmountOut',
1687
1781
  type: 'uint256',
1688
1782
  },
1689
1783
  {
1690
- name: '_extraData',
1691
- type: 'bytes32',
1784
+ name: '_tokenPath',
1785
+ type: 'address[]',
1786
+ },
1787
+ {
1788
+ name: '_poolPath',
1789
+ type: 'address[]',
1692
1790
  },
1693
1791
  {
1694
1792
  name: '_recipient',
@@ -1726,12 +1824,16 @@ export const abi = [
1726
1824
  name: '',
1727
1825
  type: 'uint256',
1728
1826
  },
1827
+ {
1828
+ name: '',
1829
+ type: 'uint256',
1830
+ },
1729
1831
  ],
1730
1832
  },
1731
1833
  {
1732
1834
  stateMutability: 'nonpayable',
1733
1835
  type: 'function',
1734
- name: 'removeCollateral',
1836
+ name: 'addCollateral',
1735
1837
  inputs: [
1736
1838
  {
1737
1839
  name: '_asset',
@@ -1764,7 +1866,7 @@ export const abi = [
1764
1866
  {
1765
1867
  stateMutability: 'nonpayable',
1766
1868
  type: 'function',
1767
- name: 'removeCollateral',
1869
+ name: 'addCollateral',
1768
1870
  inputs: [
1769
1871
  {
1770
1872
  name: '_asset',
@@ -1819,10 +1921,10 @@ export const abi = [
1819
1921
  {
1820
1922
  stateMutability: 'nonpayable',
1821
1923
  type: 'function',
1822
- name: 'borrow',
1924
+ name: 'removeCollateral',
1823
1925
  inputs: [
1824
1926
  {
1825
- name: '_borrowAsset',
1927
+ name: '_asset',
1826
1928
  type: 'address',
1827
1929
  },
1828
1930
  {
@@ -1852,10 +1954,10 @@ export const abi = [
1852
1954
  {
1853
1955
  stateMutability: 'nonpayable',
1854
1956
  type: 'function',
1855
- name: 'borrow',
1957
+ name: 'removeCollateral',
1856
1958
  inputs: [
1857
1959
  {
1858
- name: '_borrowAsset',
1960
+ name: '_asset',
1859
1961
  type: 'address',
1860
1962
  },
1861
1963
  {
@@ -1907,14 +2009,14 @@ export const abi = [
1907
2009
  {
1908
2010
  stateMutability: 'nonpayable',
1909
2011
  type: 'function',
1910
- name: 'repayDebt',
2012
+ name: 'borrow',
1911
2013
  inputs: [
1912
2014
  {
1913
- name: '_paymentAsset',
2015
+ name: '_borrowAsset',
1914
2016
  type: 'address',
1915
2017
  },
1916
2018
  {
1917
- name: '_paymentAmount',
2019
+ name: '_amount',
1918
2020
  type: 'uint256',
1919
2021
  },
1920
2022
  {
@@ -1940,14 +2042,14 @@ export const abi = [
1940
2042
  {
1941
2043
  stateMutability: 'nonpayable',
1942
2044
  type: 'function',
1943
- name: 'repayDebt',
2045
+ name: 'borrow',
1944
2046
  inputs: [
1945
2047
  {
1946
- name: '_paymentAsset',
2048
+ name: '_borrowAsset',
1947
2049
  type: 'address',
1948
2050
  },
1949
2051
  {
1950
- name: '_paymentAmount',
2052
+ name: '_amount',
1951
2053
  type: 'uint256',
1952
2054
  },
1953
2055
  {
@@ -1995,24 +2097,24 @@ export const abi = [
1995
2097
  {
1996
2098
  stateMutability: 'nonpayable',
1997
2099
  type: 'function',
1998
- name: 'claimRewards',
2100
+ name: 'repayDebt',
1999
2101
  inputs: [
2000
2102
  {
2001
- name: '_user',
2002
- type: 'address',
2003
- },
2004
- {
2005
- name: '_rewardToken',
2103
+ name: '_paymentAsset',
2006
2104
  type: 'address',
2007
2105
  },
2008
2106
  {
2009
- name: '_rewardAmount',
2107
+ name: '_paymentAmount',
2010
2108
  type: 'uint256',
2011
2109
  },
2012
2110
  {
2013
2111
  name: '_extraData',
2014
2112
  type: 'bytes32',
2015
2113
  },
2114
+ {
2115
+ name: '_recipient',
2116
+ type: 'address',
2117
+ },
2016
2118
  ],
2017
2119
  outputs: [
2018
2120
  {
@@ -2028,24 +2130,24 @@ export const abi = [
2028
2130
  {
2029
2131
  stateMutability: 'nonpayable',
2030
2132
  type: 'function',
2031
- name: 'claimRewards',
2133
+ name: 'repayDebt',
2032
2134
  inputs: [
2033
2135
  {
2034
- name: '_user',
2035
- type: 'address',
2036
- },
2037
- {
2038
- name: '_rewardToken',
2136
+ name: '_paymentAsset',
2039
2137
  type: 'address',
2040
2138
  },
2041
2139
  {
2042
- name: '_rewardAmount',
2140
+ name: '_paymentAmount',
2043
2141
  type: 'uint256',
2044
2142
  },
2045
2143
  {
2046
2144
  name: '_extraData',
2047
2145
  type: 'bytes32',
2048
2146
  },
2147
+ {
2148
+ name: '_recipient',
2149
+ type: 'address',
2150
+ },
2049
2151
  {
2050
2152
  name: '_miniAddys',
2051
2153
  type: 'tuple',
@@ -2081,10 +2183,28 @@ export const abi = [
2081
2183
  ],
2082
2184
  },
2083
2185
  {
2084
- stateMutability: 'view',
2186
+ stateMutability: 'nonpayable',
2085
2187
  type: 'function',
2086
- name: 'hasClaimableRewards',
2188
+ name: 'deleverageWithSpecificAssets',
2087
2189
  inputs: [
2190
+ {
2191
+ name: '_assets',
2192
+ type: 'tuple[]',
2193
+ components: [
2194
+ {
2195
+ name: 'vaultId',
2196
+ type: 'uint256',
2197
+ },
2198
+ {
2199
+ name: 'asset',
2200
+ type: 'address',
2201
+ },
2202
+ {
2203
+ name: 'targetRepayAmount',
2204
+ type: 'uint256',
2205
+ },
2206
+ ],
2207
+ },
2088
2208
  {
2089
2209
  name: '_user',
2090
2210
  type: 'address',
@@ -2093,32 +2213,36 @@ export const abi = [
2093
2213
  outputs: [
2094
2214
  {
2095
2215
  name: '',
2096
- type: 'bool',
2216
+ type: 'uint256',
2097
2217
  },
2098
2218
  ],
2099
2219
  },
2100
2220
  {
2101
- stateMutability: 'view',
2221
+ stateMutability: 'nonpayable',
2102
2222
  type: 'function',
2103
- name: 'getAccessForLego',
2223
+ name: 'claimIncentives',
2104
2224
  inputs: [
2105
2225
  {
2106
2226
  name: '_user',
2107
2227
  type: 'address',
2108
2228
  },
2109
2229
  {
2110
- name: '_action',
2230
+ name: '_rewardToken',
2231
+ type: 'address',
2232
+ },
2233
+ {
2234
+ name: '_rewardAmount',
2111
2235
  type: 'uint256',
2112
2236
  },
2113
- ],
2114
- outputs: [
2115
2237
  {
2116
- name: '',
2117
- type: 'address',
2238
+ name: '_proofs',
2239
+ type: 'bytes32[]',
2118
2240
  },
2241
+ ],
2242
+ outputs: [
2119
2243
  {
2120
2244
  name: '',
2121
- type: 'string',
2245
+ type: 'uint256',
2122
2246
  },
2123
2247
  {
2124
2248
  name: '',
@@ -2129,27 +2253,45 @@ export const abi = [
2129
2253
  {
2130
2254
  stateMutability: 'nonpayable',
2131
2255
  type: 'function',
2132
- name: 'swapTokens',
2256
+ name: 'claimIncentives',
2133
2257
  inputs: [
2134
2258
  {
2135
- name: '_amountIn',
2136
- type: 'uint256',
2259
+ name: '_user',
2260
+ type: 'address',
2137
2261
  },
2138
2262
  {
2139
- name: '_minAmountOut',
2140
- type: 'uint256',
2263
+ name: '_rewardToken',
2264
+ type: 'address',
2141
2265
  },
2142
2266
  {
2143
- name: '_tokenPath',
2144
- type: 'address[]',
2267
+ name: '_rewardAmount',
2268
+ type: 'uint256',
2145
2269
  },
2146
2270
  {
2147
- name: '_poolPath',
2148
- type: 'address[]',
2271
+ name: '_proofs',
2272
+ type: 'bytes32[]',
2149
2273
  },
2150
2274
  {
2151
- name: '_recipient',
2152
- type: 'address',
2275
+ name: '_miniAddys',
2276
+ type: 'tuple',
2277
+ components: [
2278
+ {
2279
+ name: 'ledger',
2280
+ type: 'address',
2281
+ },
2282
+ {
2283
+ name: 'missionControl',
2284
+ type: 'address',
2285
+ },
2286
+ {
2287
+ name: 'legoBook',
2288
+ type: 'address',
2289
+ },
2290
+ {
2291
+ name: 'appraiser',
2292
+ type: 'address',
2293
+ },
2294
+ ],
2153
2295
  },
2154
2296
  ],
2155
2297
  outputs: [
@@ -2161,37 +2303,62 @@ export const abi = [
2161
2303
  name: '',
2162
2304
  type: 'uint256',
2163
2305
  },
2164
- {
2165
- name: '',
2166
- type: 'uint256',
2167
- },
2168
2306
  ],
2169
2307
  },
2170
2308
  {
2171
2309
  stateMutability: 'nonpayable',
2172
2310
  type: 'function',
2173
- name: 'swapTokens',
2311
+ name: 'claimRewards',
2174
2312
  inputs: [
2175
2313
  {
2176
- name: '_amountIn',
2314
+ name: '_user',
2315
+ type: 'address',
2316
+ },
2317
+ {
2318
+ name: '_rewardToken',
2319
+ type: 'address',
2320
+ },
2321
+ {
2322
+ name: '_rewardAmount',
2177
2323
  type: 'uint256',
2178
2324
  },
2179
2325
  {
2180
- name: '_minAmountOut',
2326
+ name: '_extraData',
2327
+ type: 'bytes32',
2328
+ },
2329
+ ],
2330
+ outputs: [
2331
+ {
2332
+ name: '',
2181
2333
  type: 'uint256',
2182
2334
  },
2183
2335
  {
2184
- name: '_tokenPath',
2185
- type: 'address[]',
2336
+ name: '',
2337
+ type: 'uint256',
2186
2338
  },
2339
+ ],
2340
+ },
2341
+ {
2342
+ stateMutability: 'nonpayable',
2343
+ type: 'function',
2344
+ name: 'claimRewards',
2345
+ inputs: [
2187
2346
  {
2188
- name: '_poolPath',
2189
- type: 'address[]',
2347
+ name: '_user',
2348
+ type: 'address',
2190
2349
  },
2191
2350
  {
2192
- name: '_recipient',
2351
+ name: '_rewardToken',
2193
2352
  type: 'address',
2194
2353
  },
2354
+ {
2355
+ name: '_rewardAmount',
2356
+ type: 'uint256',
2357
+ },
2358
+ {
2359
+ name: '_extraData',
2360
+ type: 'bytes32',
2361
+ },
2195
2362
  {
2196
2363
  name: '_miniAddys',
2197
2364
  type: 'tuple',
@@ -2224,6 +2391,48 @@ export const abi = [
2224
2391
  name: '',
2225
2392
  type: 'uint256',
2226
2393
  },
2394
+ ],
2395
+ },
2396
+ {
2397
+ stateMutability: 'view',
2398
+ type: 'function',
2399
+ name: 'hasClaimableRewards',
2400
+ inputs: [
2401
+ {
2402
+ name: '_user',
2403
+ type: 'address',
2404
+ },
2405
+ ],
2406
+ outputs: [
2407
+ {
2408
+ name: '',
2409
+ type: 'bool',
2410
+ },
2411
+ ],
2412
+ },
2413
+ {
2414
+ stateMutability: 'view',
2415
+ type: 'function',
2416
+ name: 'getAccessForLego',
2417
+ inputs: [
2418
+ {
2419
+ name: '_user',
2420
+ type: 'address',
2421
+ },
2422
+ {
2423
+ name: '_action',
2424
+ type: 'uint256',
2425
+ },
2426
+ ],
2427
+ outputs: [
2428
+ {
2429
+ name: '',
2430
+ type: 'address',
2431
+ },
2432
+ {
2433
+ name: '',
2434
+ type: 'string',
2435
+ },
2227
2436
  {
2228
2437
  name: '',
2229
2438
  type: 'uint256',
@@ -3118,6 +3327,18 @@ export const abi = [
3118
3327
  },
3119
3328
  ],
3120
3329
  },
3330
+ {
3331
+ stateMutability: 'view',
3332
+ type: 'function',
3333
+ name: 'USDC',
3334
+ inputs: [],
3335
+ outputs: [
3336
+ {
3337
+ name: '',
3338
+ type: 'address',
3339
+ },
3340
+ ],
3341
+ },
3121
3342
  {
3122
3343
  stateMutability: 'nonpayable',
3123
3344
  type: 'constructor',
@@ -3130,11 +3351,15 @@ export const abi = [
3130
3351
  name: '_ripeRegistry',
3131
3352
  type: 'address',
3132
3353
  },
3354
+ {
3355
+ name: '_usdc',
3356
+ type: 'address',
3357
+ },
3133
3358
  ],
3134
3359
  outputs: [],
3135
3360
  },
3136
3361
  ];
3137
- export const deployAddress = '0xAFb801435960932B563Ab1047b8eb0d9C77FFb9B';
3362
+ export const deployAddress = '0x272812fC816a6a8C1A2988b24D06878493459A54';
3138
3363
  function getRequest(method, args, contractAddressOrOptions) {
3139
3364
  const address = typeof contractAddressOrOptions === 'string' ? contractAddressOrOptions : contractAddressOrOptions?.contractAddress;
3140
3365
  const defaultValue = typeof contractAddressOrOptions === 'string' ? undefined : contractAddressOrOptions?.defaultValue;
@@ -3197,10 +3422,12 @@ export const call = {
3197
3422
  isRebasing: (...args) => getRequest('isRebasing', args),
3198
3423
  getPricePerShare: (...args) => getRequest('getPricePerShare', args),
3199
3424
  getVaultTokenAmount: (...args) => getRequest('getVaultTokenAmount', args),
3200
- isEligibleVaultForTrialFunds: (...args) => getRequest('isEligibleVaultForTrialFunds', args),
3201
- isEligibleForYieldBonus: (...args) => getRequest('isEligibleForYieldBonus', args),
3202
3425
  totalAssets: (...args) => getRequest('totalAssets', args),
3203
3426
  totalBorrows: (...args) => getRequest('totalBorrows', args),
3427
+ getAvailLiquidity: (...args) => getRequest('getAvailLiquidity', args),
3428
+ getUtilizationRatio: (...args) => getRequest('getUtilizationRatio', args),
3429
+ isEligibleForYieldBonus: (...args) => getRequest('isEligibleForYieldBonus', args),
3430
+ getWithdrawalFees: (...args) => getRequest('getWithdrawalFees', args),
3204
3431
  canRegisterVaultToken: (...args) => getRequest('canRegisterVaultToken', args),
3205
3432
  hasClaimableRewards: (...args) => getRequest('hasClaimableRewards', args),
3206
3433
  getAccessForLego: (...args) => getRequest('getAccessForLego', args),
@@ -3208,6 +3435,7 @@ export const call = {
3208
3435
  RIPE_GREEN_TOKEN: (...args) => getRequest('RIPE_GREEN_TOKEN', args),
3209
3436
  RIPE_SAVINGS_GREEN: (...args) => getRequest('RIPE_SAVINGS_GREEN', args),
3210
3437
  RIPE_TOKEN: (...args) => getRequest('RIPE_TOKEN', args),
3438
+ USDC: (...args) => getRequest('USDC', args),
3211
3439
  };
3212
3440
  function getMutation(functionName) {
3213
3441
  return {
@@ -3228,12 +3456,14 @@ export const mutation = {
3228
3456
  addPriceSnapshot: getMutation('addPriceSnapshot'),
3229
3457
  depositForYield: getMutation('depositForYield'),
3230
3458
  withdrawFromYield: getMutation('withdrawFromYield'),
3459
+ swapTokens: getMutation('swapTokens'),
3231
3460
  addCollateral: getMutation('addCollateral'),
3232
3461
  removeCollateral: getMutation('removeCollateral'),
3233
3462
  borrow: getMutation('borrow'),
3234
3463
  repayDebt: getMutation('repayDebt'),
3464
+ deleverageWithSpecificAssets: getMutation('deleverageWithSpecificAssets'),
3465
+ claimIncentives: getMutation('claimIncentives'),
3235
3466
  claimRewards: getMutation('claimRewards'),
3236
- swapTokens: getMutation('swapTokens'),
3237
3467
  mintOrRedeemAsset: getMutation('mintOrRedeemAsset'),
3238
3468
  confirmMintOrRedeemAsset: getMutation('confirmMintOrRedeemAsset'),
3239
3469
  addLiquidity: getMutation('addLiquidity'),
@@ -3280,10 +3510,12 @@ export function toSdk(publicClient, walletClient) {
3280
3510
  isRebasing: (...args) => singleQuery(publicClient, call.isRebasing(...args)),
3281
3511
  getPricePerShare: (...args) => singleQuery(publicClient, call.getPricePerShare(...args)),
3282
3512
  getVaultTokenAmount: (...args) => singleQuery(publicClient, call.getVaultTokenAmount(...args)),
3283
- isEligibleVaultForTrialFunds: (...args) => singleQuery(publicClient, call.isEligibleVaultForTrialFunds(...args)),
3284
- isEligibleForYieldBonus: (...args) => singleQuery(publicClient, call.isEligibleForYieldBonus(...args)),
3285
3513
  totalAssets: (...args) => singleQuery(publicClient, call.totalAssets(...args)),
3286
3514
  totalBorrows: (...args) => singleQuery(publicClient, call.totalBorrows(...args)),
3515
+ getAvailLiquidity: (...args) => singleQuery(publicClient, call.getAvailLiquidity(...args)),
3516
+ getUtilizationRatio: (...args) => singleQuery(publicClient, call.getUtilizationRatio(...args)),
3517
+ isEligibleForYieldBonus: (...args) => singleQuery(publicClient, call.isEligibleForYieldBonus(...args)),
3518
+ getWithdrawalFees: (...args) => singleQuery(publicClient, call.getWithdrawalFees(...args)),
3287
3519
  canRegisterVaultToken: (...args) => singleQuery(publicClient, call.canRegisterVaultToken(...args)),
3288
3520
  hasClaimableRewards: (...args) => singleQuery(publicClient, call.hasClaimableRewards(...args)),
3289
3521
  getAccessForLego: (...args) => singleQuery(publicClient, call.getAccessForLego(...args)),
@@ -3291,6 +3523,7 @@ export function toSdk(publicClient, walletClient) {
3291
3523
  RIPE_GREEN_TOKEN: (...args) => singleQuery(publicClient, call.RIPE_GREEN_TOKEN(...args)),
3292
3524
  RIPE_SAVINGS_GREEN: (...args) => singleQuery(publicClient, call.RIPE_SAVINGS_GREEN(...args)),
3293
3525
  RIPE_TOKEN: (...args) => singleQuery(publicClient, call.RIPE_TOKEN(...args)),
3526
+ USDC: (...args) => singleQuery(publicClient, call.USDC(...args)),
3294
3527
  // Mutations
3295
3528
  pause: (...args) => mutate(walletClient, mutation.pause)(...args),
3296
3529
  recoverFunds: (...args) => mutate(walletClient, mutation.recoverFunds)(...args),
@@ -3301,12 +3534,14 @@ export function toSdk(publicClient, walletClient) {
3301
3534
  addPriceSnapshot: (...args) => mutate(walletClient, mutation.addPriceSnapshot)(...args),
3302
3535
  depositForYield: (...args) => mutate(walletClient, mutation.depositForYield)(...args),
3303
3536
  withdrawFromYield: (...args) => mutate(walletClient, mutation.withdrawFromYield)(...args),
3537
+ swapTokens: (...args) => mutate(walletClient, mutation.swapTokens)(...args),
3304
3538
  addCollateral: (...args) => mutate(walletClient, mutation.addCollateral)(...args),
3305
3539
  removeCollateral: (...args) => mutate(walletClient, mutation.removeCollateral)(...args),
3306
3540
  borrow: (...args) => mutate(walletClient, mutation.borrow)(...args),
3307
3541
  repayDebt: (...args) => mutate(walletClient, mutation.repayDebt)(...args),
3542
+ deleverageWithSpecificAssets: (...args) => mutate(walletClient, mutation.deleverageWithSpecificAssets)(...args),
3543
+ claimIncentives: (...args) => mutate(walletClient, mutation.claimIncentives)(...args),
3308
3544
  claimRewards: (...args) => mutate(walletClient, mutation.claimRewards)(...args),
3309
- swapTokens: (...args) => mutate(walletClient, mutation.swapTokens)(...args),
3310
3545
  mintOrRedeemAsset: (...args) => mutate(walletClient, mutation.mintOrRedeemAsset)(...args),
3311
3546
  confirmMintOrRedeemAsset: (...args) => mutate(walletClient, mutation.confirmMintOrRedeemAsset)(...args),
3312
3547
  addLiquidity: (...args) => mutate(walletClient, mutation.addLiquidity)(...args),