@defisaver/positions-sdk 0.0.166-dev → 0.0.166-dev10-liquity-v2

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 (158) hide show
  1. package/.mocharc.json +4 -4
  2. package/.nvmrc +1 -1
  3. package/README.md +69 -69
  4. package/cjs/config/contracts.d.ts +7 -45
  5. package/cjs/config/contracts.js +3 -3
  6. package/cjs/contracts.d.ts +1 -1
  7. package/cjs/contracts.js +2 -2
  8. package/cjs/helpers/index.d.ts +1 -1
  9. package/cjs/helpers/index.js +2 -2
  10. package/cjs/helpers/liquityV2Helpers/index.d.ts +12 -0
  11. package/cjs/helpers/liquityV2Helpers/index.js +63 -0
  12. package/cjs/index.d.ts +2 -2
  13. package/cjs/index.js +3 -3
  14. package/cjs/liquityV2/index.d.ts +16 -0
  15. package/cjs/liquityV2/index.js +139 -0
  16. package/cjs/markets/compound/marketsAssets.js +3 -3
  17. package/cjs/markets/index.d.ts +1 -1
  18. package/cjs/markets/index.js +3 -3
  19. package/cjs/markets/liquityV2/index.d.ts +8 -0
  20. package/cjs/markets/liquityV2/index.js +34 -0
  21. package/cjs/markets/morphoBlue/index.d.ts +4 -0
  22. package/cjs/markets/morphoBlue/index.js +36 -1
  23. package/cjs/markets/spark/marketAssets.js +1 -1
  24. package/cjs/moneymarket/moneymarketCommonService.js +1 -1
  25. package/cjs/services/utils.d.ts +0 -2
  26. package/cjs/services/utils.js +1 -4
  27. package/cjs/staking/staking.d.ts +1 -0
  28. package/cjs/staking/staking.js +31 -2
  29. package/cjs/types/contracts/generated/LiquityV2View.d.ts +240 -0
  30. package/cjs/types/contracts/generated/index.d.ts +1 -1
  31. package/cjs/types/index.d.ts +1 -1
  32. package/cjs/types/index.js +1 -1
  33. package/cjs/types/liquityV2.d.ts +90 -0
  34. package/cjs/types/liquityV2.js +8 -0
  35. package/cjs/types/morphoBlue.d.ts +3 -1
  36. package/cjs/types/morphoBlue.js +2 -0
  37. package/esm/config/contracts.d.ts +7 -45
  38. package/esm/config/contracts.js +3 -3
  39. package/esm/contracts.d.ts +1 -1
  40. package/esm/contracts.js +1 -1
  41. package/esm/helpers/index.d.ts +1 -1
  42. package/esm/helpers/index.js +1 -1
  43. package/esm/helpers/liquityV2Helpers/index.d.ts +12 -0
  44. package/esm/helpers/liquityV2Helpers/index.js +55 -0
  45. package/esm/index.d.ts +2 -2
  46. package/esm/index.js +2 -2
  47. package/esm/liquityV2/index.d.ts +16 -0
  48. package/esm/liquityV2/index.js +129 -0
  49. package/esm/markets/compound/marketsAssets.js +3 -3
  50. package/esm/markets/index.d.ts +1 -1
  51. package/esm/markets/index.js +1 -1
  52. package/esm/markets/liquityV2/index.d.ts +8 -0
  53. package/esm/markets/liquityV2/index.js +28 -0
  54. package/esm/markets/morphoBlue/index.d.ts +4 -0
  55. package/esm/markets/morphoBlue/index.js +33 -0
  56. package/esm/markets/spark/marketAssets.js +1 -1
  57. package/esm/moneymarket/moneymarketCommonService.js +1 -1
  58. package/esm/services/utils.d.ts +0 -2
  59. package/esm/services/utils.js +0 -2
  60. package/esm/staking/staking.d.ts +1 -0
  61. package/esm/staking/staking.js +29 -1
  62. package/esm/types/contracts/generated/LiquityV2View.d.ts +240 -0
  63. package/esm/types/contracts/generated/index.d.ts +1 -1
  64. package/esm/types/index.d.ts +1 -1
  65. package/esm/types/index.js +1 -1
  66. package/esm/types/liquityV2.d.ts +90 -0
  67. package/esm/types/liquityV2.js +5 -0
  68. package/esm/types/morphoBlue.d.ts +3 -1
  69. package/esm/types/morphoBlue.js +2 -0
  70. package/package.json +49 -44
  71. package/src/aaveV2/index.ts +227 -227
  72. package/src/aaveV3/index.ts +590 -590
  73. package/src/assets/index.ts +60 -60
  74. package/src/chickenBonds/index.ts +123 -123
  75. package/src/compoundV2/index.ts +219 -219
  76. package/src/compoundV3/index.ts +281 -281
  77. package/src/config/contracts.js +1040 -1040
  78. package/src/constants/index.ts +6 -6
  79. package/src/contracts.ts +130 -130
  80. package/src/curveUsd/index.ts +229 -229
  81. package/src/exchange/index.ts +17 -17
  82. package/src/helpers/aaveHelpers/index.ts +194 -194
  83. package/src/helpers/chickenBondsHelpers/index.ts +23 -23
  84. package/src/helpers/compoundHelpers/index.ts +246 -246
  85. package/src/helpers/curveUsdHelpers/index.ts +40 -40
  86. package/src/helpers/index.ts +9 -9
  87. package/src/helpers/liquityV2Helpers/index.ts +80 -0
  88. package/src/helpers/llamaLendHelpers/index.ts +53 -53
  89. package/src/helpers/makerHelpers/index.ts +94 -94
  90. package/src/helpers/morphoBlueHelpers/index.ts +115 -115
  91. package/src/helpers/sparkHelpers/index.ts +150 -150
  92. package/src/index.ts +48 -48
  93. package/src/liquity/index.ts +116 -116
  94. package/src/liquityV2/index.ts +159 -0
  95. package/src/llamaLend/index.ts +275 -275
  96. package/src/maker/index.ts +117 -117
  97. package/src/markets/aave/index.ts +152 -152
  98. package/src/markets/aave/marketAssets.ts +46 -46
  99. package/src/markets/compound/index.ts +173 -173
  100. package/src/markets/compound/marketsAssets.ts +64 -64
  101. package/src/markets/curveUsd/index.ts +69 -69
  102. package/src/markets/index.ts +23 -24
  103. package/src/markets/liquityV2/index.ts +31 -0
  104. package/src/markets/llamaLend/contractAddresses.ts +141 -141
  105. package/src/markets/llamaLend/index.ts +235 -235
  106. package/src/markets/morphoBlue/index.ts +728 -691
  107. package/src/markets/spark/index.ts +29 -29
  108. package/src/markets/spark/marketAssets.ts +10 -10
  109. package/src/moneymarket/moneymarketCommonService.ts +80 -80
  110. package/src/morphoAaveV2/index.ts +256 -256
  111. package/src/morphoAaveV3/index.ts +630 -630
  112. package/src/morphoBlue/index.ts +171 -171
  113. package/src/multicall/index.ts +22 -22
  114. package/src/services/dsrService.ts +15 -15
  115. package/src/services/priceService.ts +21 -21
  116. package/src/services/utils.ts +54 -57
  117. package/src/setup.ts +8 -8
  118. package/src/spark/index.ts +424 -424
  119. package/src/staking/staking.ts +218 -189
  120. package/src/types/aave.ts +262 -262
  121. package/src/types/chickenBonds.ts +45 -45
  122. package/src/types/common.ts +84 -84
  123. package/src/types/compound.ts +129 -129
  124. package/src/types/contracts/generated/LiquityV2View.ts +311 -0
  125. package/src/types/contracts/generated/index.ts +1 -1
  126. package/src/types/curveUsd.ts +118 -118
  127. package/src/types/index.ts +10 -10
  128. package/src/types/liquity.ts +30 -30
  129. package/src/types/liquityV2.ts +96 -0
  130. package/src/types/llamaLend.ts +155 -155
  131. package/src/types/maker.ts +50 -50
  132. package/src/types/morphoBlue.ts +146 -144
  133. package/src/types/spark.ts +127 -127
  134. package/cjs/eulerV2/index.d.ts +0 -40
  135. package/cjs/eulerV2/index.js +0 -207
  136. package/cjs/helpers/eulerHelpers/index.d.ts +0 -27
  137. package/cjs/helpers/eulerHelpers/index.js +0 -232
  138. package/cjs/markets/euler/index.d.ts +0 -10
  139. package/cjs/markets/euler/index.js +0 -41
  140. package/cjs/types/contracts/generated/EulerV2View.d.ts +0 -333
  141. package/cjs/types/euler.d.ts +0 -148
  142. package/cjs/types/euler.js +0 -15
  143. package/esm/eulerV2/index.d.ts +0 -40
  144. package/esm/eulerV2/index.js +0 -199
  145. package/esm/helpers/eulerHelpers/index.d.ts +0 -27
  146. package/esm/helpers/eulerHelpers/index.js +0 -219
  147. package/esm/markets/euler/index.d.ts +0 -10
  148. package/esm/markets/euler/index.js +0 -34
  149. package/esm/types/contracts/generated/EulerV2View.d.ts +0 -333
  150. package/esm/types/euler.d.ts +0 -148
  151. package/esm/types/euler.js +0 -12
  152. package/src/eulerV2/index.ts +0 -286
  153. package/src/helpers/eulerHelpers/index.ts +0 -231
  154. package/src/markets/euler/index.ts +0 -38
  155. package/src/types/contracts/generated/EulerV2View.ts +0 -434
  156. package/src/types/euler.ts +0 -171
  157. /package/cjs/types/contracts/generated/{EulerV2View.js → LiquityV2View.js} +0 -0
  158. /package/esm/types/contracts/generated/{EulerV2View.js → LiquityV2View.js} +0 -0
@@ -1030,10 +1030,10 @@ module.exports = {
1030
1030
  "abi": [{ "name": "UserState", "inputs": [{ "name": "user", "type": "address", "indexed": true }, { "name": "collateral", "type": "uint256", "indexed": false }, { "name": "debt", "type": "uint256", "indexed": false }, { "name": "n1", "type": "int256", "indexed": false }, { "name": "n2", "type": "int256", "indexed": false }, { "name": "liquidation_discount", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "Borrow", "inputs": [{ "name": "user", "type": "address", "indexed": true }, { "name": "collateral_increase", "type": "uint256", "indexed": false }, { "name": "loan_increase", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "Repay", "inputs": [{ "name": "user", "type": "address", "indexed": true }, { "name": "collateral_decrease", "type": "uint256", "indexed": false }, { "name": "loan_decrease", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "RemoveCollateral", "inputs": [{ "name": "user", "type": "address", "indexed": true }, { "name": "collateral_decrease", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "Liquidate", "inputs": [{ "name": "liquidator", "type": "address", "indexed": true }, { "name": "user", "type": "address", "indexed": true }, { "name": "collateral_received", "type": "uint256", "indexed": false }, { "name": "stablecoin_received", "type": "uint256", "indexed": false }, { "name": "debt", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "SetMonetaryPolicy", "inputs": [{ "name": "monetary_policy", "type": "address", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "SetBorrowingDiscounts", "inputs": [{ "name": "loan_discount", "type": "uint256", "indexed": false }, { "name": "liquidation_discount", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "name": "CollectFees", "inputs": [{ "name": "amount", "type": "uint256", "indexed": false }, { "name": "new_supply", "type": "uint256", "indexed": false }], "anonymous": false, "type": "event" }, { "stateMutability": "nonpayable", "type": "constructor", "inputs": [{ "name": "collateral_token", "type": "address" }, { "name": "monetary_policy", "type": "address" }, { "name": "loan_discount", "type": "uint256" }, { "name": "liquidation_discount", "type": "uint256" }, { "name": "amm", "type": "address" }], "outputs": [] }, { "stateMutability": "pure", "type": "function", "name": "factory", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "pure", "type": "function", "name": "amm", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "pure", "type": "function", "name": "collateral_token", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "pure", "type": "function", "name": "borrowed_token", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "save_rate", "inputs": [], "outputs": [] }, { "stateMutability": "view", "type": "function", "name": "debt", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "loan_exists", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "bool" }] }, { "stateMutability": "view", "type": "function", "name": "total_debt", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "max_borrowable", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "N", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "max_borrowable", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "N", "type": "uint256" }, { "name": "current_debt", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "min_collateral", "inputs": [{ "name": "debt", "type": "uint256" }, { "name": "N", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "calculate_debt_n1", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "debt", "type": "uint256" }, { "name": "N", "type": "uint256" }], "outputs": [{ "name": "", "type": "int256" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "create_loan", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "debt", "type": "uint256" }, { "name": "N", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "create_loan_extended", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "debt", "type": "uint256" }, { "name": "N", "type": "uint256" }, { "name": "callbacker", "type": "address" }, { "name": "callback_args", "type": "uint256[]" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "add_collateral", "inputs": [{ "name": "collateral", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "add_collateral", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "_for", "type": "address" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "remove_collateral", "inputs": [{ "name": "collateral", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "remove_collateral", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "use_eth", "type": "bool" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "borrow_more", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "debt", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "borrow_more_extended", "inputs": [{ "name": "collateral", "type": "uint256" }, { "name": "debt", "type": "uint256" }, { "name": "callbacker", "type": "address" }, { "name": "callback_args", "type": "uint256[]" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "repay", "inputs": [{ "name": "_d_debt", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "repay", "inputs": [{ "name": "_d_debt", "type": "uint256" }, { "name": "_for", "type": "address" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "repay", "inputs": [{ "name": "_d_debt", "type": "uint256" }, { "name": "_for", "type": "address" }, { "name": "max_active_band", "type": "int256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "repay", "inputs": [{ "name": "_d_debt", "type": "uint256" }, { "name": "_for", "type": "address" }, { "name": "max_active_band", "type": "int256" }, { "name": "use_eth", "type": "bool" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "repay_extended", "inputs": [{ "name": "callbacker", "type": "address" }, { "name": "callback_args", "type": "uint256[]" }], "outputs": [] }, { "stateMutability": "view", "type": "function", "name": "health_calculator", "inputs": [{ "name": "user", "type": "address" }, { "name": "d_collateral", "type": "int256" }, { "name": "d_debt", "type": "int256" }, { "name": "full", "type": "bool" }], "outputs": [{ "name": "", "type": "int256" }] }, { "stateMutability": "view", "type": "function", "name": "health_calculator", "inputs": [{ "name": "user", "type": "address" }, { "name": "d_collateral", "type": "int256" }, { "name": "d_debt", "type": "int256" }, { "name": "full", "type": "bool" }, { "name": "N", "type": "uint256" }], "outputs": [{ "name": "", "type": "int256" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "liquidate", "inputs": [{ "name": "user", "type": "address" }, { "name": "min_x", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "liquidate", "inputs": [{ "name": "user", "type": "address" }, { "name": "min_x", "type": "uint256" }, { "name": "use_eth", "type": "bool" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "liquidate_extended", "inputs": [{ "name": "user", "type": "address" }, { "name": "min_x", "type": "uint256" }, { "name": "frac", "type": "uint256" }, { "name": "use_eth", "type": "bool" }, { "name": "callbacker", "type": "address" }, { "name": "callback_args", "type": "uint256[]" }], "outputs": [] }, { "stateMutability": "view", "type": "function", "name": "tokens_to_liquidate", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "tokens_to_liquidate", "inputs": [{ "name": "user", "type": "address" }, { "name": "frac", "type": "uint256" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "health", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "int256" }] }, { "stateMutability": "view", "type": "function", "name": "health", "inputs": [{ "name": "user", "type": "address" }, { "name": "full", "type": "bool" }], "outputs": [{ "name": "", "type": "int256" }] }, { "stateMutability": "view", "type": "function", "name": "users_to_liquidate", "inputs": [], "outputs": [{ "name": "", "type": "tuple[]", "components": [{ "name": "user", "type": "address" }, { "name": "x", "type": "uint256" }, { "name": "y", "type": "uint256" }, { "name": "debt", "type": "uint256" }, { "name": "health", "type": "int256" }] }] }, { "stateMutability": "view", "type": "function", "name": "users_to_liquidate", "inputs": [{ "name": "_from", "type": "uint256" }], "outputs": [{ "name": "", "type": "tuple[]", "components": [{ "name": "user", "type": "address" }, { "name": "x", "type": "uint256" }, { "name": "y", "type": "uint256" }, { "name": "debt", "type": "uint256" }, { "name": "health", "type": "int256" }] }] }, { "stateMutability": "view", "type": "function", "name": "users_to_liquidate", "inputs": [{ "name": "_from", "type": "uint256" }, { "name": "_limit", "type": "uint256" }], "outputs": [{ "name": "", "type": "tuple[]", "components": [{ "name": "user", "type": "address" }, { "name": "x", "type": "uint256" }, { "name": "y", "type": "uint256" }, { "name": "debt", "type": "uint256" }, { "name": "health", "type": "int256" }] }] }, { "stateMutability": "view", "type": "function", "name": "amm_price", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "user_prices", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "uint256[2]" }] }, { "stateMutability": "view", "type": "function", "name": "user_state", "inputs": [{ "name": "user", "type": "address" }], "outputs": [{ "name": "", "type": "uint256[4]" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_amm_fee", "inputs": [{ "name": "fee", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_amm_admin_fee", "inputs": [{ "name": "fee", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_monetary_policy", "inputs": [{ "name": "monetary_policy", "type": "address" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_borrowing_discounts", "inputs": [{ "name": "loan_discount", "type": "uint256" }, { "name": "liquidation_discount", "type": "uint256" }], "outputs": [] }, { "stateMutability": "nonpayable", "type": "function", "name": "set_callback", "inputs": [{ "name": "cb", "type": "address" }], "outputs": [] }, { "stateMutability": "view", "type": "function", "name": "admin_fees", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "nonpayable", "type": "function", "name": "collect_fees", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "check_lock", "inputs": [], "outputs": [{ "name": "", "type": "bool" }] }, { "stateMutability": "view", "type": "function", "name": "liquidation_discounts", "inputs": [{ "name": "arg0", "type": "address" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "loans", "inputs": [{ "name": "arg0", "type": "uint256" }], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "view", "type": "function", "name": "loan_ix", "inputs": [{ "name": "arg0", "type": "address" }], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "n_loans", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "minted", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "redeemed", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "monetary_policy", "inputs": [], "outputs": [{ "name": "", "type": "address" }] }, { "stateMutability": "view", "type": "function", "name": "liquidation_discount", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }, { "stateMutability": "view", "type": "function", "name": "loan_discount", "inputs": [], "outputs": [{ "name": "", "type": "uint256" }] }],
1031
1031
  "networks": {}
1032
1032
  },
1033
- "EulerV2View": {
1034
- "abi": [{ "inputs": [], "name": "USD", "outputs": [{ "internalType": "address", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "feedRegistry", "outputs": [{ "internalType": "contract IFeedRegistry", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_account", "type": "address" }, { "internalType": "uint256", "name": "_page", "type": "uint256" }, { "internalType": "uint256", "name": "_perPage", "type": "uint256" }], "name": "fetchUsedAccounts", "outputs": [{ "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address[]", "name": "accounts", "type": "address[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getAaveTokenPriceInETH", "outputs": [{ "internalType": "uint256", "name": "price", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getAaveTokenPriceInUSD", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getAaveV3TokenPriceInETH", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getAaveV3TokenPriceInUSD", "outputs": [{ "internalType": "uint256", "name": "price", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }], "name": "getAddrForChainlinkOracle", "outputs": [{ "internalType": "address", "name": "tokenAddrForChainlinkUsage", "type": "address" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "address", "name": "vault", "type": "address" }, { "internalType": "bool", "name": "isBorrowOperation", "type": "bool" }, { "internalType": "uint256", "name": "liquidityAdded", "type": "uint256" }, { "internalType": "uint256", "name": "liquidityRemoved", "type": "uint256" }], "internalType": "struct EulerV2View.LiquidityChangeParams[]", "name": "params", "type": "tuple[]" }], "name": "getApyAfterValuesEstimation", "outputs": [{ "internalType": "uint256[]", "name": "estimatedBorrowRates", "type": "uint256[]" }], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }], "name": "getChainlinkPriceInETH", "outputs": [{ "internalType": "int256", "name": "chainlinkPriceInETH", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }, { "internalType": "bool", "name": "_useFallback", "type": "bool" }], "name": "getChainlinkPriceInUSD", "outputs": [{ "internalType": "int256", "name": "chainlinkPriceInUSD", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }], "name": "getPriceInETH", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }], "name": "getPriceInUSD", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }, { "internalType": "uint80", "name": "_roundId", "type": "uint80" }, { "internalType": "contract IAggregatorV3", "name": "aggregator", "type": "address" }], "name": "getRoundInfo", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "updateTimestamp", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_inputTokenAddr", "type": "address" }, { "internalType": "uint80", "name": "_roundId", "type": "uint80" }], "name": "getRoundInfo", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }, { "internalType": "uint256", "name": "updateTimestamp", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getSparkTokenPriceInETH", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_tokenAddr", "type": "address" }], "name": "getSparkTokenPriceInUSD", "outputs": [{ "internalType": "uint256", "name": "price", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }], "name": "getUserData", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "bool", "name": "inLockDownMode", "type": "bool" }, { "internalType": "bool", "name": "inPermitDisabledMode", "type": "bool" }, { "internalType": "address", "name": "borrowVault", "type": "address" }, { "internalType": "uint256", "name": "borrowAmountInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowAmountInAsset", "type": "uint256" }, { "components": [{ "internalType": "address", "name": "collateralVault", "type": "address" }, { "internalType": "bool", "name": "usedInBorrow", "type": "bool" }, { "internalType": "uint256", "name": "collateralAmountInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "collateralAmountInAsset", "type": "uint256" }, { "internalType": "uint256", "name": "collateralAmountInUSD", "type": "uint256" }], "internalType": "struct EulerV2View.UserCollateralInfo[]", "name": "collaterals", "type": "tuple[]" }], "internalType": "struct EulerV2View.UserData", "name": "data", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address[]", "name": "_users", "type": "address[]" }], "name": "getUsersData", "outputs": [{ "components": [{ "internalType": "address", "name": "user", "type": "address" }, { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "bool", "name": "inLockDownMode", "type": "bool" }, { "internalType": "bool", "name": "inPermitDisabledMode", "type": "bool" }, { "internalType": "address", "name": "borrowVault", "type": "address" }, { "internalType": "uint256", "name": "borrowAmountInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "borrowAmountInAsset", "type": "uint256" }, { "components": [{ "internalType": "address", "name": "collateralVault", "type": "address" }, { "internalType": "bool", "name": "usedInBorrow", "type": "bool" }, { "internalType": "uint256", "name": "collateralAmountInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "collateralAmountInAsset", "type": "uint256" }, { "internalType": "uint256", "name": "collateralAmountInUSD", "type": "uint256" }], "internalType": "struct EulerV2View.UserCollateralInfo[]", "name": "collaterals", "type": "tuple[]" }], "internalType": "struct EulerV2View.UserData[]", "name": "data", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_vault", "type": "address" }], "name": "getVaultCollaterals", "outputs": [{ "components": [{ "internalType": "address", "name": "vaultAddr", "type": "address" }, { "internalType": "address", "name": "assetAddr", "type": "address" }, { "internalType": "string", "name": "vaultSymbol", "type": "string" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "uint256", "name": "sharePriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "assetPriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "cash", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrows", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint16", "name": "borrowLTV", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationLTV", "type": "uint16" }, { "internalType": "uint16", "name": "initialLiquidationLTV", "type": "uint16" }, { "internalType": "uint48", "name": "targetTimestamp", "type": "uint48" }, { "internalType": "uint32", "name": "rampDuration", "type": "uint32" }, { "internalType": "uint256", "name": "interestFee", "type": "uint256" }, { "internalType": "uint256", "name": "interestRate", "type": "uint256" }], "internalType": "struct EulerV2View.CollateralInfo[]", "name": "collateralsInfo", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_vault", "type": "address" }], "name": "getVaultInfoFull", "outputs": [{ "components": [{ "internalType": "address", "name": "vaultAddr", "type": "address" }, { "internalType": "address", "name": "assetAddr", "type": "address" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "symbol", "type": "string" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplyShares", "type": "uint256" }, { "internalType": "uint256", "name": "cash", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrows", "type": "uint256" }, { "internalType": "uint256", "name": "totalAssets", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint256", "name": "borrowCap", "type": "uint256" }, { "components": [{ "internalType": "address", "name": "vaultAddr", "type": "address" }, { "internalType": "address", "name": "assetAddr", "type": "address" }, { "internalType": "string", "name": "vaultSymbol", "type": "string" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "uint256", "name": "sharePriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "assetPriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "cash", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrows", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint16", "name": "borrowLTV", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationLTV", "type": "uint16" }, { "internalType": "uint16", "name": "initialLiquidationLTV", "type": "uint16" }, { "internalType": "uint48", "name": "targetTimestamp", "type": "uint48" }, { "internalType": "uint32", "name": "rampDuration", "type": "uint32" }, { "internalType": "uint256", "name": "interestFee", "type": "uint256" }, { "internalType": "uint256", "name": "interestRate", "type": "uint256" }], "internalType": "struct EulerV2View.CollateralInfo[]", "name": "collaterals", "type": "tuple[]" }, { "internalType": "uint16", "name": "maxLiquidationDiscount", "type": "uint16" }, { "internalType": "uint256", "name": "liquidationCoolOffTime", "type": "uint256" }, { "internalType": "bool", "name": "badDebtSocializationEnabled", "type": "bool" }, { "internalType": "address", "name": "unitOfAccount", "type": "address" }, { "internalType": "uint256", "name": "unitOfAccountInUsd", "type": "uint256" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "uint256", "name": "assetPriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "sharePriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "interestRate", "type": "uint256" }, { "internalType": "address", "name": "irm", "type": "address" }, { "internalType": "address", "name": "balanceTrackerAddress", "type": "address" }, { "internalType": "address", "name": "creator", "type": "address" }, { "internalType": "address", "name": "governorAdmin", "type": "address" }, { "internalType": "uint256", "name": "interestFee", "type": "uint256" }], "internalType": "struct EulerV2View.VaultInfoFull", "name": "data", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address[]", "name": "_vaults", "type": "address[]" }], "name": "getVaultsInfosFull", "outputs": [{ "components": [{ "internalType": "address", "name": "vaultAddr", "type": "address" }, { "internalType": "address", "name": "assetAddr", "type": "address" }, { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "string", "name": "symbol", "type": "string" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "uint256", "name": "totalSupplyShares", "type": "uint256" }, { "internalType": "uint256", "name": "cash", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrows", "type": "uint256" }, { "internalType": "uint256", "name": "totalAssets", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint256", "name": "borrowCap", "type": "uint256" }, { "components": [{ "internalType": "address", "name": "vaultAddr", "type": "address" }, { "internalType": "address", "name": "assetAddr", "type": "address" }, { "internalType": "string", "name": "vaultSymbol", "type": "string" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" }, { "internalType": "uint256", "name": "sharePriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "assetPriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "cash", "type": "uint256" }, { "internalType": "uint256", "name": "totalBorrows", "type": "uint256" }, { "internalType": "uint256", "name": "supplyCap", "type": "uint256" }, { "internalType": "uint16", "name": "borrowLTV", "type": "uint16" }, { "internalType": "uint16", "name": "liquidationLTV", "type": "uint16" }, { "internalType": "uint16", "name": "initialLiquidationLTV", "type": "uint16" }, { "internalType": "uint48", "name": "targetTimestamp", "type": "uint48" }, { "internalType": "uint32", "name": "rampDuration", "type": "uint32" }, { "internalType": "uint256", "name": "interestFee", "type": "uint256" }, { "internalType": "uint256", "name": "interestRate", "type": "uint256" }], "internalType": "struct EulerV2View.CollateralInfo[]", "name": "collaterals", "type": "tuple[]" }, { "internalType": "uint16", "name": "maxLiquidationDiscount", "type": "uint16" }, { "internalType": "uint256", "name": "liquidationCoolOffTime", "type": "uint256" }, { "internalType": "bool", "name": "badDebtSocializationEnabled", "type": "bool" }, { "internalType": "address", "name": "unitOfAccount", "type": "address" }, { "internalType": "uint256", "name": "unitOfAccountInUsd", "type": "uint256" }, { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "uint256", "name": "assetPriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "sharePriceInUnit", "type": "uint256" }, { "internalType": "uint256", "name": "interestRate", "type": "uint256" }, { "internalType": "address", "name": "irm", "type": "address" }, { "internalType": "address", "name": "balanceTrackerAddress", "type": "address" }, { "internalType": "address", "name": "creator", "type": "address" }, { "internalType": "address", "name": "governorAdmin", "type": "address" }, { "internalType": "uint256", "name": "interestFee", "type": "uint256" }], "internalType": "struct EulerV2View.VaultInfoFull[]", "name": "data", "type": "tuple[]" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "int256", "name": "_btcPrice", "type": "int256" }], "name": "getWBtcPrice", "outputs": [{ "internalType": "int256", "name": "wBtcPrice", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "int256", "name": "_stEthPrice", "type": "int256" }], "name": "getWStEthPrice", "outputs": [{ "internalType": "int256", "name": "wStEthPrice", "type": "int256" }], "stateMutability": "view", "type": "function" }],
1033
+ "LiquityV2View": {
1034
+ "abi": [{ "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "uint256", "name": "_interestRate", "type": "uint256" }, { "internalType": "uint256", "name": "_prevId", "type": "uint256" }, { "internalType": "uint256", "name": "_nextId", "type": "uint256" }], "name": "findInsertPosition", "outputs": [{ "internalType": "uint256", "name": "prevId", "type": "uint256" }, { "internalType": "uint256", "name": "nextId", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "uint256", "name": "_collIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_interestRate", "type": "uint256" }, { "internalType": "uint256", "name": "_numTrials", "type": "uint256" }, { "internalType": "uint256", "name": "_inputRandomSeed", "type": "uint256" }], "name": "getApproxHint", "outputs": [{ "internalType": "uint256", "name": "hintId", "type": "uint256" }, { "internalType": "uint256", "name": "diff", "type": "uint256" }, { "internalType": "uint256", "name": "latestRandomSeed", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "uint256", "name": "_troveId", "type": "uint256" }, { "internalType": "uint256", "name": "_acc", "type": "uint256" }, { "internalType": "uint256", "name": "_iterations", "type": "uint256" }], "name": "getDebtInFront", "outputs": [{ "internalType": "uint256", "name": "next", "type": "uint256" }, { "internalType": "uint256", "name": "debt", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "uint256", "name": "_troveId", "type": "uint256" }, { "internalType": "uint256", "name": "_acc", "type": "uint256" }, { "internalType": "uint256", "name": "_iterations", "type": "uint256" }, { "internalType": "uint256", "name": "_targetIR", "type": "uint256" }], "name": "getDebtInFrontByInterestRate", "outputs": [{ "internalType": "uint256", "name": "next", "type": "uint256" }, { "internalType": "uint256", "name": "debt", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "uint256", "name": "_numTroves", "type": "uint256" }], "name": "getDebtInFrontByTroveNum", "outputs": [{ "internalType": "uint256", "name": "debt", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "address", "name": "_depositor", "type": "address" }], "name": "getDepositorInfo", "outputs": [{ "internalType": "uint256", "name": "compoundedBOLD", "type": "uint256" }, { "internalType": "uint256", "name": "collGain", "type": "uint256" }, { "internalType": "uint256", "name": "boldGain", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "uint256", "name": "_collIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_interestRate", "type": "uint256" }, { "internalType": "uint256", "name": "_numTrials", "type": "uint256" }, { "internalType": "uint256", "name": "_inputRandomSeed", "type": "uint256" }], "name": "getInsertPosition", "outputs": [{ "internalType": "uint256", "name": "prevId", "type": "uint256" }, { "internalType": "uint256", "name": "nextId", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }], "name": "getMarketData", "outputs": [{ "components": [{ "internalType": "address", "name": "market", "type": "address" }, { "internalType": "uint256", "name": "CCR", "type": "uint256" }, { "internalType": "uint256", "name": "MCR", "type": "uint256" }, { "internalType": "uint256", "name": "SCR", "type": "uint256" }, { "internalType": "uint256", "name": "LIQUIDATION_PENALTY_SP", "type": "uint256" }, { "internalType": "uint256", "name": "LIQUIDATION_PENALTY_REDISTRIBUTION", "type": "uint256" }, { "internalType": "uint256", "name": "entireSystemColl", "type": "uint256" }, { "internalType": "uint256", "name": "entireSystemDebt", "type": "uint256" }, { "internalType": "address", "name": "collToken", "type": "address" }, { "internalType": "address", "name": "troveNFT", "type": "address" }, { "internalType": "address", "name": "borrowerOperations", "type": "address" }, { "internalType": "address", "name": "troveManager", "type": "address" }, { "internalType": "address", "name": "stabilityPool", "type": "address" }, { "internalType": "address", "name": "sortedTroves", "type": "address" }, { "internalType": "address", "name": "collSurplusPool", "type": "address" }, { "internalType": "address", "name": "hintHelpers", "type": "address" }, { "internalType": "address", "name": "priceFeed", "type": "address" }, { "internalType": "uint256", "name": "collPrice", "type": "uint256" }, { "internalType": "bool", "name": "isShutDown", "type": "bool" }], "internalType": "struct LiquityV2View.MarketData", "name": "data", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "uint256", "name": "_troveId", "type": "uint256" }, { "internalType": "uint256", "name": "_iterations", "type": "uint256" }], "name": "getNumOfTrovesInFrontOfTrove", "outputs": [{ "internalType": "uint256", "name": "next", "type": "uint256" }, { "internalType": "uint256", "name": "numTroves", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "uint256", "name": "_troveId", "type": "uint256" }], "name": "getTroveInfo", "outputs": [{ "components": [{ "internalType": "uint256", "name": "troveId", "type": "uint256" }, { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "collToken", "type": "address" }, { "internalType": "enum ITroveManager.Status", "name": "status", "type": "uint8" }, { "internalType": "uint256", "name": "collAmount", "type": "uint256" }, { "internalType": "uint256", "name": "debtAmount", "type": "uint256" }, { "internalType": "uint256", "name": "collPrice", "type": "uint256" }, { "internalType": "uint256", "name": "TCRatio", "type": "uint256" }, { "internalType": "uint256", "name": "annualInterestRate", "type": "uint256" }, { "internalType": "address", "name": "interestBatchManager", "type": "address" }, { "internalType": "uint256", "name": "batchDebtShares", "type": "uint256" }], "internalType": "struct LiquityV2View.TroveData", "name": "trove", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "uint256", "name": "_collIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_troveId", "type": "uint256" }, { "internalType": "uint256", "name": "_numTrials", "type": "uint256" }, { "internalType": "uint256", "name": "_inputRandomSeed", "type": "uint256" }], "name": "getTrovePosition", "outputs": [{ "internalType": "uint256", "name": "prevId", "type": "uint256" }, { "internalType": "uint256", "name": "nextId", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_user", "type": "address" }, { "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "uint256", "name": "_startIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_endIndex", "type": "uint256" }], "name": "getUserTroves", "outputs": [{ "components": [{ "internalType": "uint256", "name": "troveId", "type": "uint256" }, { "internalType": "bool", "name": "ownedByUser", "type": "bool" }], "internalType": "struct LiquityV2View.ExistingTrove[]", "name": "troves", "type": "tuple[]" }, { "internalType": "int256", "name": "nextFreeTroveIndex", "type": "int256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }], "name": "isShutDown", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "_market", "type": "address" }, { "internalType": "uint256", "name": "_collIndex", "type": "uint256" }, { "internalType": "uint256", "name": "_troveId", "type": "uint256" }, { "internalType": "uint256", "name": "_debtIncrease", "type": "uint256" }], "name": "predictAdjustTroveUpfrontFee", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "view", "type": "function" }],
1035
1035
  "networks": {
1036
- "1": { "address": "0x25eCA04532C085F77Ea6CE92C94E9e69896686E6" }
1036
+ "1": { "address": "0x3113D2b6f712b163668ea9A68A84C6225d0B3c42" },
1037
1037
  }
1038
1038
  }
1039
1039
  };
@@ -45,4 +45,4 @@ export declare const USDCPriceFeedContract: (web3: Web3, network: NetworkNumber,
45
45
  export declare const FeedRegistryContract: (web3: Web3, network: NetworkNumber, block?: Blockish) => ContractTypes.FeedRegistry;
46
46
  export declare const MorphoBlueViewContract: (web3: Web3, network: NetworkNumber, block?: Blockish) => ContractTypes.MorphoBlueView;
47
47
  export declare const LlamaLendViewContract: (web3: Web3, network: NetworkNumber, block?: Blockish) => ContractTypes.LlamaLendView;
48
- export declare const EulerV2ViewContract: (web3: Web3, network: NetworkNumber, block?: Blockish) => ContractTypes.EulerV2View;
48
+ export declare const LiquityV2ViewContract: (web3: Web3, network: NetworkNumber, block?: Blockish) => ContractTypes.LiquityV2View;
package/esm/contracts.js CHANGED
@@ -77,4 +77,4 @@ export const USDCPriceFeedContract = createContractFromConfigFunc('USDCPriceFeed
77
77
  export const FeedRegistryContract = createContractFromConfigFunc('FeedRegistry');
78
78
  export const MorphoBlueViewContract = createContractFromConfigFunc('MorphoBlueView');
79
79
  export const LlamaLendViewContract = createContractFromConfigFunc('LlamaLendView');
80
- export const EulerV2ViewContract = createContractFromConfigFunc('EulerV2View');
80
+ export const LiquityV2ViewContract = createContractFromConfigFunc('LiquityV2View');
@@ -6,4 +6,4 @@ export * as makerHelpers from './makerHelpers';
6
6
  export * as chickenBondsHelpers from './chickenBondsHelpers';
7
7
  export * as morphoBlueHelpers from './morphoBlueHelpers';
8
8
  export * as llamaLendHelpers from './llamaLendHelpers';
9
- export * as eulerV2Helpers from './eulerHelpers';
9
+ export * as liquityV2Helpers from './liquityV2Helpers';
@@ -6,4 +6,4 @@ export * as makerHelpers from './makerHelpers';
6
6
  export * as chickenBondsHelpers from './chickenBondsHelpers';
7
7
  export * as morphoBlueHelpers from './morphoBlueHelpers';
8
8
  export * as llamaLendHelpers from './llamaLendHelpers';
9
- export * as eulerV2Helpers from './eulerHelpers';
9
+ export * as liquityV2Helpers from './liquityV2Helpers';
@@ -0,0 +1,12 @@
1
+ import { LiquityV2AggregatedTroveData, LiquityV2AssetsData, LiquityV2UsedAssets } from '../../types';
2
+ export declare const calculateNetApyLiquityV2: (usedAssets: LiquityV2UsedAssets, assetsData: LiquityV2AssetsData, interestRate: string) => {
3
+ netApy: string;
4
+ totalInterestUsd: string;
5
+ incentiveUsd: string;
6
+ };
7
+ export declare const getLiquityV2AggregatedPositionData: ({ usedAssets, assetsData, minCollRatio, interestRate, }: {
8
+ usedAssets: LiquityV2UsedAssets;
9
+ assetsData: LiquityV2AssetsData;
10
+ minCollRatio: string;
11
+ interestRate: string;
12
+ }) => LiquityV2AggregatedTroveData;
@@ -0,0 +1,55 @@
1
+ import Dec from 'decimal.js';
2
+ import { calcLeverageLiqPrice, getAssetsTotal, isLeveragedPos } from '../../moneymarket';
3
+ import { calculateInterestEarned } from '../../staking';
4
+ export const calculateNetApyLiquityV2 = (usedAssets, assetsData, interestRate) => {
5
+ const sumValues = Object.values(usedAssets).reduce((_acc, usedAsset) => {
6
+ const acc = Object.assign({}, _acc);
7
+ const assetData = assetsData[usedAsset.symbol];
8
+ if (usedAsset.suppliedUsd) {
9
+ const amount = usedAsset.suppliedUsd;
10
+ acc.suppliedUsd = new Dec(acc.suppliedUsd).add(amount).toString();
11
+ if (assetData.incentiveSupplyApy) {
12
+ const incentiveInterest = calculateInterestEarned(amount, assetData.incentiveSupplyApy, 'year', true);
13
+ acc.incentiveUsd = new Dec(acc.incentiveUsd).add(incentiveInterest).toString();
14
+ }
15
+ }
16
+ if (usedAsset.borrowedUsd) {
17
+ const amount = usedAsset.borrowedUsd;
18
+ acc.borrowedUsd = new Dec(acc.borrowedUsd).add(amount).toString();
19
+ const rate = interestRate;
20
+ const borrowInterest = calculateInterestEarned(amount, rate, 'year', true);
21
+ acc.borrowInterest = new Dec(acc.borrowInterest).sub(borrowInterest.toString()).toString();
22
+ }
23
+ return acc;
24
+ }, {
25
+ borrowInterest: '0', supplyInterest: '0', incentiveUsd: '0', borrowedUsd: '0', suppliedUsd: '0',
26
+ });
27
+ const { borrowedUsd, suppliedUsd, borrowInterest, supplyInterest, incentiveUsd, } = sumValues;
28
+ const totalInterestUsd = new Dec(borrowInterest).add(supplyInterest).add(incentiveUsd).toString();
29
+ const balance = new Dec(suppliedUsd).sub(borrowedUsd);
30
+ const netApy = new Dec(totalInterestUsd).div(balance).times(100).toString();
31
+ return { netApy, totalInterestUsd, incentiveUsd };
32
+ };
33
+ export const getLiquityV2AggregatedPositionData = ({ usedAssets, assetsData, minCollRatio, interestRate, }) => {
34
+ const payload = {};
35
+ payload.suppliedUsd = getAssetsTotal(usedAssets, (usedAsset) => usedAsset, ({ suppliedUsd }) => suppliedUsd);
36
+ payload.borrowedUsd = getAssetsTotal(usedAssets, (usedAsset) => usedAsset, ({ borrowedUsd }) => borrowedUsd);
37
+ payload.borrowLimitUsd = new Dec(payload.suppliedUsd).div(minCollRatio).mul(100).toString();
38
+ const leftToBorrowUsd = new Dec(payload.borrowLimitUsd).sub(payload.borrowedUsd);
39
+ payload.leftToBorrowUsd = leftToBorrowUsd.lte('0') ? '0' : leftToBorrowUsd.toString();
40
+ payload.ratio = +payload.suppliedUsd ? new Dec(payload.borrowLimitUsd).div(payload.borrowedUsd).mul(100).toString() : '0';
41
+ payload.collRatio = +payload.suppliedUsd ? new Dec(payload.suppliedUsd).div(payload.borrowedUsd).mul(100).toString() : '0';
42
+ const { netApy, incentiveUsd, totalInterestUsd } = calculateNetApyLiquityV2(usedAssets, assetsData, interestRate);
43
+ payload.netApy = netApy;
44
+ payload.incentiveUsd = incentiveUsd;
45
+ payload.totalInterestUsd = totalInterestUsd;
46
+ const { leveragedType, leveragedAsset } = isLeveragedPos(usedAssets);
47
+ payload.leveragedType = leveragedType;
48
+ payload.leveragedAsset = leveragedAsset;
49
+ payload.liquidationPrice = '';
50
+ if (leveragedType !== '') {
51
+ const assetPrice = assetsData[leveragedAsset].price;
52
+ payload.liquidationPrice = calcLeverageLiqPrice(leveragedType, assetPrice, payload.borrowedUsd, payload.borrowLimitUsd);
53
+ }
54
+ return payload;
55
+ };
package/esm/index.d.ts CHANGED
@@ -8,6 +8,7 @@ import * as compoundV2 from './compoundV2';
8
8
  import * as spark from './spark';
9
9
  import * as curveUsd from './curveUsd';
10
10
  import * as liquity from './liquity';
11
+ import * as liquityV2 from './liquityV2';
11
12
  import * as maker from './maker';
12
13
  import * as staking from './staking';
13
14
  import * as multicall from './multicall';
@@ -18,6 +19,5 @@ import * as chickenBonds from './chickenBonds';
18
19
  import * as exchange from './exchange';
19
20
  import * as morphoBlue from './morphoBlue';
20
21
  import * as llamaLend from './llamaLend';
21
- import * as eulerV2 from './eulerV2';
22
22
  export * from './types';
23
- export { aaveV2, aaveV3, morphoAaveV2, morphoAaveV3, compoundV2, compoundV3, spark, curveUsd, liquity, maker, chickenBonds, exchange, staking, multicall, moneymarket, markets, helpers, morphoBlue, llamaLend, eulerV2, };
23
+ export { aaveV2, aaveV3, morphoAaveV2, morphoAaveV3, compoundV2, compoundV3, spark, curveUsd, liquity, liquityV2, maker, chickenBonds, exchange, staking, multicall, moneymarket, markets, helpers, morphoBlue, llamaLend, };
package/esm/index.js CHANGED
@@ -8,6 +8,7 @@ import * as compoundV2 from './compoundV2';
8
8
  import * as spark from './spark';
9
9
  import * as curveUsd from './curveUsd';
10
10
  import * as liquity from './liquity';
11
+ import * as liquityV2 from './liquityV2';
11
12
  import * as maker from './maker';
12
13
  import * as staking from './staking';
13
14
  import * as multicall from './multicall';
@@ -18,6 +19,5 @@ import * as chickenBonds from './chickenBonds';
18
19
  import * as exchange from './exchange';
19
20
  import * as morphoBlue from './morphoBlue';
20
21
  import * as llamaLend from './llamaLend';
21
- import * as eulerV2 from './eulerV2';
22
22
  export * from './types';
23
- export { aaveV2, aaveV3, morphoAaveV2, morphoAaveV3, compoundV2, compoundV3, spark, curveUsd, liquity, maker, chickenBonds, exchange, staking, multicall, moneymarket, markets, helpers, morphoBlue, llamaLend, eulerV2, };
23
+ export { aaveV2, aaveV3, morphoAaveV2, morphoAaveV3, compoundV2, compoundV3, spark, curveUsd, liquity, liquityV2, maker, chickenBonds, exchange, staking, multicall, moneymarket, markets, helpers, morphoBlue, llamaLend, };
@@ -0,0 +1,16 @@
1
+ import Web3 from 'web3';
2
+ import { EthAddress, NetworkNumber } from '../types/common';
3
+ import { InnerLiquityV2MarketData, LiquityV2AssetsData, LiquityV2MarketData, LiquityV2MarketInfo, LiquityV2TroveData } from '../types';
4
+ import { LiquityV2View } from '../types/contracts/generated';
5
+ export declare const getLiquityV2MarketData: (web3: Web3, network: NetworkNumber, selectedMarket: LiquityV2MarketInfo, mainnetWeb3: Web3) => Promise<LiquityV2MarketData>;
6
+ export declare const getLiquityV2UserTroveIds: (web3: Web3, network: NetworkNumber, selectedMarket: LiquityV2MarketInfo, account: EthAddress) => Promise<{
7
+ troves: LiquityV2View.ExistingTroveStructOutput[];
8
+ nextFreeTroveIndex: string;
9
+ }>;
10
+ export declare const getDebtInFrontLiquityV2: (viewContract: any, marketAddress: EthAddress, troveId: string, accumulatedSum?: string, iterations?: number) => Promise<string>;
11
+ export declare const getLiquityV2TroveData: (web3: Web3, network: NetworkNumber, { selectedMarket, assetsData, marketData, troveId, }: {
12
+ selectedMarket: LiquityV2MarketInfo;
13
+ assetsData: LiquityV2AssetsData;
14
+ marketData: InnerLiquityV2MarketData;
15
+ troveId: string;
16
+ }) => Promise<LiquityV2TroveData>;
@@ -0,0 +1,129 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import Dec from 'decimal.js';
11
+ import { assetAmountInEth, getAssetInfo } from '@defisaver/tokens';
12
+ import { LiquityV2ViewContract } from '../contracts';
13
+ import { LIQUITY_TROVE_STATUS_ENUM, } from '../types';
14
+ import { getStakingApy, STAKING_ASSETS } from '../staking';
15
+ import { getLiquityV2AggregatedPositionData } from '../helpers/liquityV2Helpers';
16
+ import { ethToWeth } from '../services/utils';
17
+ export const getLiquityV2MarketData = (web3, network, selectedMarket, mainnetWeb3) => __awaiter(void 0, void 0, void 0, function* () {
18
+ const viewContract = LiquityV2ViewContract(web3, network);
19
+ const { marketAddress, debtToken, collateralToken } = selectedMarket;
20
+ const data = yield viewContract.methods.getMarketData(marketAddress).call();
21
+ const hintHelperAddress = data.hintHelpers;
22
+ const troveNFTAddress = data.troveNFT;
23
+ const borrowerOperationsAddress = data.borrowerOperations;
24
+ const troveManagerAddress = data.troveManager;
25
+ const stabilityPoolAddress = data.stabilityPool;
26
+ const collSurplusPoolAddress = data.collSurplusPool;
27
+ const assetsData = {};
28
+ assetsData[debtToken] = {
29
+ symbol: debtToken,
30
+ address: getAssetInfo(debtToken, network).address,
31
+ price: '1',
32
+ totalSupply: '0',
33
+ totalBorrow: assetAmountInEth(data.entireSystemDebt),
34
+ canBeSupplied: false,
35
+ canBeBorrowed: true,
36
+ };
37
+ assetsData[collateralToken] = {
38
+ symbol: collateralToken,
39
+ address: getAssetInfo(ethToWeth(collateralToken), network).address,
40
+ price: assetAmountInEth(data.collPrice),
41
+ totalSupply: assetAmountInEth(data.entireSystemColl),
42
+ totalBorrow: '0',
43
+ canBeSupplied: true,
44
+ canBeBorrowed: false,
45
+ };
46
+ if (STAKING_ASSETS.includes(collateralToken)) {
47
+ assetsData[collateralToken].incentiveSupplyApy = yield getStakingApy(collateralToken, mainnetWeb3);
48
+ assetsData[collateralToken].incentiveSupplyToken = collateralToken;
49
+ }
50
+ const minCollRatio = new Dec(data.MCR).div(1e16).toString();
51
+ return {
52
+ assetsData,
53
+ marketData: {
54
+ minCollRatio,
55
+ hintHelperAddress,
56
+ troveNFTAddress,
57
+ borrowerOperationsAddress,
58
+ troveManagerAddress,
59
+ stabilityPoolAddress,
60
+ collSurplusPoolAddress,
61
+ },
62
+ };
63
+ });
64
+ const _getUserTroves = (viewContract, account, marketAddress, startIndex = 0, endIndex = 100) => __awaiter(void 0, void 0, void 0, function* () { return viewContract.methods.getUserTroves(account, marketAddress, startIndex, endIndex).call(); });
65
+ const getUserTroves = (viewContract, account, marketAddress, startIndex = 0, endIndex = 100, troves = []) => __awaiter(void 0, void 0, void 0, function* () {
66
+ const result = yield _getUserTroves(viewContract, account, marketAddress, startIndex, endIndex);
67
+ const newStartIndex = endIndex + 1;
68
+ const nextFreeTroveIndex = result.nextFreeTroveIndex;
69
+ const existingTroves = [...troves, ...result.troves];
70
+ if (nextFreeTroveIndex !== '-1')
71
+ return { troves: existingTroves.filter((trove) => trove.ownedByUser), nextFreeTroveIndex };
72
+ return getUserTroves(viewContract, account, marketAddress, newStartIndex, newStartIndex + 100, existingTroves);
73
+ });
74
+ export const getLiquityV2UserTroveIds = (web3, network, selectedMarket, account) => __awaiter(void 0, void 0, void 0, function* () {
75
+ const viewContract = LiquityV2ViewContract(web3, network);
76
+ const { troves, nextFreeTroveIndex } = yield getUserTroves(viewContract, account, selectedMarket.marketAddress);
77
+ return { troves, nextFreeTroveIndex };
78
+ });
79
+ const _getDebtInFront = (viewContract, marketAddress, troveId, accumulatedSum = '0', iterations = 2000) => __awaiter(void 0, void 0, void 0, function* () { return viewContract.methods.getDebtInFront(marketAddress, troveId, accumulatedSum, iterations).call(); });
80
+ export const getDebtInFrontLiquityV2 = (viewContract, marketAddress, troveId, accumulatedSum = '0', iterations = 2000) => __awaiter(void 0, void 0, void 0, function* () {
81
+ const { debt, next } = yield _getDebtInFront(viewContract, marketAddress, troveId, accumulatedSum, iterations);
82
+ if (next === '0')
83
+ return assetAmountInEth(debt);
84
+ return getDebtInFrontLiquityV2(viewContract, marketAddress, next, debt, iterations);
85
+ });
86
+ export const getLiquityV2TroveData = (web3, network, { selectedMarket, assetsData, marketData, troveId, }) => __awaiter(void 0, void 0, void 0, function* () {
87
+ const viewContract = LiquityV2ViewContract(web3, network);
88
+ const { minCollRatio } = marketData;
89
+ const { collateralToken, marketAddress, debtToken } = selectedMarket;
90
+ const [data, debtInFront] = yield Promise.all([
91
+ viewContract.methods.getTroveInfo(marketAddress, troveId).call(),
92
+ getDebtInFrontLiquityV2(viewContract, marketAddress, troveId),
93
+ ]);
94
+ const usedAssets = {};
95
+ const debtAssetData = assetsData[debtToken];
96
+ const borrowed = assetAmountInEth(data.debtAmount);
97
+ usedAssets[debtToken] = {
98
+ symbol: debtToken,
99
+ supplied: '0',
100
+ suppliedUsd: '0',
101
+ borrowed,
102
+ borrowedUsd: new Dec(borrowed).mul(debtAssetData.price).toString(),
103
+ isBorrowed: true,
104
+ isSupplied: false,
105
+ };
106
+ const collAssetData = assetsData[collateralToken];
107
+ const suppliedColl = assetAmountInEth(data.collAmount);
108
+ usedAssets[collateralToken] = {
109
+ symbol: collateralToken,
110
+ supplied: suppliedColl,
111
+ suppliedUsd: new Dec(suppliedColl).mul(collAssetData.price).toString(),
112
+ borrowed: '0',
113
+ borrowedUsd: '0',
114
+ isBorrowed: false,
115
+ isSupplied: true,
116
+ collateral: true,
117
+ };
118
+ const collRatio = new Dec(data.TCRatio).div(1e16).toString();
119
+ const interestRate = new Dec(data.annualInterestRate).div(1e16).toString();
120
+ const interestBatchManager = data.interestBatchManager;
121
+ const payload = Object.assign(Object.assign({ usedAssets,
122
+ troveId,
123
+ interestRate,
124
+ interestBatchManager,
125
+ debtInFront, troveStatus: LIQUITY_TROVE_STATUS_ENUM[parseInt(data.status, 10)] }, getLiquityV2AggregatedPositionData({
126
+ usedAssets, assetsData, minCollRatio, interestRate,
127
+ })), { collRatio });
128
+ return payload;
129
+ });
@@ -4,7 +4,7 @@ export const compoundV2CollateralAssets = [
4
4
  'cETH', 'cDAI', 'cBAT', 'cZRX', 'cUSDC', 'cWBTC Legacy', 'cWBTC', 'cUSDT',
5
5
  'cTUSD', 'cLINK', 'cUSDP', 'cUNI', 'cCOMP', 'cMKR', 'cSUSHI', 'cAAVE', 'cYFI',
6
6
  ].map((symbol) => getAssetInfo(symbol));
7
- export const v3USDCCollAssetsEth = ['COMP', 'WBTC', 'ETH', 'UNI', 'LINK', 'wstETH', 'cbBTC', 'rswETH'];
7
+ export const v3USDCCollAssetsEth = ['COMP', 'WBTC', 'ETH', 'UNI', 'LINK', 'wstETH', 'cbBTC', 'tBTC'];
8
8
  export const v3USDCCollAssetsArb = ['ARB', 'ETH', 'GMX', 'WBTC', 'wstETH', 'ezETH'];
9
9
  export const v3USDCCollAssetsBase = ['ETH', 'cbETH', 'wstETH', 'cbBTC'];
10
10
  export const v3USDCCollAssetsOpt = ['ETH', 'OP', 'WBTC', 'wstETH'];
@@ -23,7 +23,7 @@ export const v3USDCeCollAssets = {
23
23
  [NetworkNumber.Arb]: v3USDCeCollAssetsArb,
24
24
  [NetworkNumber.Base]: [],
25
25
  };
26
- export const v3ETHCollAssetsEth = ['cbETH', 'wstETH', 'rETH', 'rsETH', 'weETH', 'osETH', 'WBTC', 'ezETH', 'cbBTC', 'rswETH'];
26
+ export const v3ETHCollAssetsEth = ['cbETH', 'wstETH', 'rETH', 'rsETH', 'weETH', 'osETH', 'WBTC', 'ezETH', 'cbBTC', 'rswETH', 'tBTC'];
27
27
  export const v3ETHCollAssetsBase = ['cbETH', 'ezETH', 'wstETH', 'USDC', 'weETH', 'wrsETH', 'cbBTC'];
28
28
  export const v3ETHCollAssetsArb = ['weETH', 'rETH', 'wstETH', 'WBTC', 'rsETH', 'ezETH', 'USDC', 'USDT'];
29
29
  export const v3ETHCollAssetsOpt = ['rETH', 'wstETH', 'WBTC', 'ezETH', 'USDC', 'USDT', 'weETH', 'wrsETH'];
@@ -42,7 +42,7 @@ export const v3USDbCCollAssets = {
42
42
  [NetworkNumber.Arb]: [],
43
43
  [NetworkNumber.Base]: v3USDbCCollAssetsBase,
44
44
  };
45
- export const v3USDTCollAssetsEth = ['ETH', 'WBTC', 'wstETH', 'COMP', 'UNI', 'LINK', 'cbBTC'];
45
+ export const v3USDTCollAssetsEth = ['COMP', 'ETH', 'WBTC', 'UNI', 'LINK', 'wstETH', 'cbBTC', 'tBTC'];
46
46
  export const v3USDTCollAssetsArb = ['ETH', 'WBTC', 'wstETH', 'ARB', 'GMX'];
47
47
  export const v3USDTCollAssetsOpt = ['ETH', 'WBTC', 'OP', 'wstETH'];
48
48
  // @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
@@ -4,4 +4,4 @@ export { SparkMarkets } from './spark';
4
4
  export { CrvUsdMarkets } from './curveUsd';
5
5
  export { MorphoBlueMarkets, findMorphoBlueMarket } from './morphoBlue';
6
6
  export { LlamaLendMarkets } from './llamaLend';
7
- export { EulerV2Markets } from './euler';
7
+ export { LiquityV2Markets } from './liquityV2';
@@ -4,4 +4,4 @@ export { SparkMarkets } from './spark';
4
4
  export { CrvUsdMarkets } from './curveUsd';
5
5
  export { MorphoBlueMarkets, findMorphoBlueMarket } from './morphoBlue';
6
6
  export { LlamaLendMarkets } from './llamaLend';
7
- export { EulerV2Markets } from './euler';
7
+ export { LiquityV2Markets } from './liquityV2';
@@ -0,0 +1,8 @@
1
+ import { NetworkNumber } from '../../types/common';
2
+ import { LiquityV2MarketInfo } from '../../types/liquityV2';
3
+ export declare const LIQUITY_V2_ETH_MARKET: (networkId?: NetworkNumber) => LiquityV2MarketInfo;
4
+ export declare const LIQUITY_V2_WSTETH_MARKET: (networkId?: NetworkNumber) => LiquityV2MarketInfo;
5
+ export declare const LiquityV2Markets: (networkId: NetworkNumber) => {
6
+ readonly liquityv2eth: LiquityV2MarketInfo;
7
+ readonly liquityv2wsteth: LiquityV2MarketInfo;
8
+ };
@@ -0,0 +1,28 @@
1
+ import { NetworkNumber } from '../../types/common';
2
+ import { LiquityV2Versions } from '../../types/liquityV2';
3
+ export const LIQUITY_V2_ETH_MARKET = (networkId = NetworkNumber.Eth) => ({
4
+ chainIds: [1],
5
+ label: 'Liquity V2 ETH',
6
+ shortLabel: 'ETH',
7
+ value: LiquityV2Versions.LiquityV2Eth,
8
+ url: 'eth',
9
+ debtToken: 'BOLD',
10
+ collateralToken: 'ETH',
11
+ marketAddress: '0x7d2d2c79ec89c7f1d718ae1586363ad2c56ded9d',
12
+ protocolName: 'liquity-v2',
13
+ });
14
+ export const LIQUITY_V2_WSTETH_MARKET = (networkId = NetworkNumber.Eth) => ({
15
+ chainIds: [1],
16
+ label: 'Liquity V2 wstETH',
17
+ shortLabel: 'wstETH',
18
+ value: LiquityV2Versions.LiquityV2WstEth,
19
+ url: 'wsteth',
20
+ debtToken: 'BOLD',
21
+ collateralToken: 'wstETH',
22
+ marketAddress: '0x83b74f12a2894fcf7a4864eff6090d7d8a060c6b',
23
+ protocolName: 'liquity-v2',
24
+ });
25
+ export const LiquityV2Markets = (networkId) => ({
26
+ [LiquityV2Versions.LiquityV2Eth]: LIQUITY_V2_ETH_MARKET(networkId),
27
+ [LiquityV2Versions.LiquityV2WstEth]: LIQUITY_V2_WSTETH_MARKET(networkId),
28
+ });
@@ -30,6 +30,7 @@ export declare const MORPHO_BLUE_USDE_DAI_770: (networkId?: NetworkNumber) => Mo
30
30
  export declare const MORPHO_BLUE_USDE_DAI_860: (networkId?: NetworkNumber) => MorphoBlueMarketData;
31
31
  export declare const MORPHO_BLUE_USDE_DAI_915: (networkId?: NetworkNumber) => MorphoBlueMarketData;
32
32
  export declare const MORPHO_BLUE_USDE_DAI_945: (networkId?: NetworkNumber) => MorphoBlueMarketData;
33
+ export declare const MORPHO_BLUE_RETH_ETH_945: (networkId?: NetworkNumber) => MorphoBlueMarketData;
33
34
  export declare const MORPHO_BLUE_CBETH_USDC_860_BASE: (networkId?: NetworkNumber) => MorphoBlueMarketData;
34
35
  export declare const MORPHO_BLUE_WSTETH_ETH_945_BASE: (networkId?: NetworkNumber) => MorphoBlueMarketData;
35
36
  export declare const MORPHO_BLUE_WSTETH_ETH_965_BASE: (networkId?: NetworkNumber) => MorphoBlueMarketData;
@@ -41,6 +42,7 @@ export declare const MORPHO_BLUE_RETH_USDC_860_BASE: (networkId?: NetworkNumber)
41
42
  export declare const MORPHO_BLUE_RETH_ETH_945_BASE: (networkId?: NetworkNumber) => MorphoBlueMarketData;
42
43
  export declare const MORPHO_BLUE_CBBTC_ETH_915_BASE: (networkId?: NetworkNumber) => MorphoBlueMarketData;
43
44
  export declare const MORPHO_BLUE_CBBTC_USDC_860_BASE: (networkId?: NetworkNumber) => MorphoBlueMarketData;
45
+ export declare const MORPHO_BLUE_WSUPEROETHB_WETH_915_BASE: (networkId?: NetworkNumber) => MorphoBlueMarketData;
44
46
  export declare const MorphoBlueMarkets: (networkId: NetworkNumber) => {
45
47
  readonly morphobluewstethusdc: MorphoBlueMarketData;
46
48
  readonly morphobluesdaiusdc: MorphoBlueMarketData;
@@ -61,6 +63,7 @@ export declare const MorphoBlueMarkets: (networkId: NetworkNumber) => {
61
63
  readonly morphobluetbtcusdc: MorphoBlueMarketData;
62
64
  readonly morphobluecbbtceth: MorphoBlueMarketData;
63
65
  readonly morphobluecbbtcusdc: MorphoBlueMarketData;
66
+ readonly morphoblueretheth_945: MorphoBlueMarketData;
64
67
  readonly morphobluewstetheth_945: MorphoBlueMarketData;
65
68
  readonly morphobluewstetheth_945_exchange_rate: MorphoBlueMarketData;
66
69
  readonly morphobluewstetheth_965_exchange_rate: MorphoBlueMarketData;
@@ -79,6 +82,7 @@ export declare const MorphoBlueMarkets: (networkId: NetworkNumber) => {
79
82
  readonly morphoblueretheth_945_base: MorphoBlueMarketData;
80
83
  readonly morphobluecbbtceth_915_base: MorphoBlueMarketData;
81
84
  readonly morphobluecbbtcusdc_860_base: MorphoBlueMarketData;
85
+ readonly morphobluewsuperoethbweth_915_base: MorphoBlueMarketData;
82
86
  readonly morphobluecbetheth_945_base: MorphoBlueMarketData;
83
87
  readonly morphobluecbetheth_965_base: MorphoBlueMarketData;
84
88
  readonly morphobluewstetheth_945_base: MorphoBlueMarketData;