@morpho-org/morpho-sdk 6.0.0-next.1 → 6.0.0-next.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (305) hide show
  1. package/MIGRATION-v5-to-v6.md +199 -34
  2. package/README.md +23 -15
  3. package/lib/cjs/abis.d.ts +3 -2829
  4. package/lib/cjs/abis.js +1 -1938
  5. package/lib/cjs/actions/blue/borrow.d.ts +3 -2
  6. package/lib/cjs/actions/blue/borrow.js +3 -2
  7. package/lib/cjs/actions/blue/common.js +6 -35
  8. package/lib/cjs/actions/blue/refinance.d.ts +2 -2
  9. package/lib/cjs/actions/blue/refinance.js +2 -2
  10. package/lib/cjs/actions/blue/repay.d.ts +1 -1
  11. package/lib/cjs/actions/blue/repay.js +1 -1
  12. package/lib/cjs/actions/blue/repayWithdrawCollateral.d.ts +2 -2
  13. package/lib/cjs/actions/blue/repayWithdrawCollateral.js +2 -2
  14. package/lib/cjs/actions/blue/supply.d.ts +2 -2
  15. package/lib/cjs/actions/blue/supply.js +4 -9
  16. package/lib/cjs/actions/blue/supplyCollateral.d.ts +2 -2
  17. package/lib/cjs/actions/blue/supplyCollateral.js +2 -2
  18. package/lib/cjs/actions/blue/supplyCollateralBorrow.d.ts +3 -2
  19. package/lib/cjs/actions/blue/supplyCollateralBorrow.js +3 -2
  20. package/lib/cjs/actions/blue/withdraw.d.ts +3 -3
  21. package/lib/cjs/actions/blue/withdraw.js +3 -3
  22. package/lib/cjs/actions/blue/withdrawCollateral.d.ts +2 -2
  23. package/lib/cjs/actions/blue/withdrawCollateral.js +2 -2
  24. package/lib/cjs/actions/bundles/common.d.ts +38 -4
  25. package/lib/cjs/actions/bundles/common.js +91 -35
  26. package/lib/cjs/actions/index.d.ts +0 -1
  27. package/lib/cjs/actions/index.js +0 -1
  28. package/lib/cjs/actions/requirements/blue/getBlueAuthorizationRequirement.d.ts +9 -8
  29. package/lib/cjs/actions/requirements/blue/getBlueAuthorizationRequirement.js +17 -26
  30. package/lib/cjs/actions/requirements/blue/index.d.ts +0 -1
  31. package/lib/cjs/actions/requirements/blue/index.js +0 -1
  32. package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +20 -14
  33. package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.js +24 -25
  34. package/lib/cjs/actions/requirements/encode/encodeErc20Approval.d.ts +4 -4
  35. package/lib/cjs/actions/requirements/encode/encodeErc20Approval.js +4 -5
  36. package/lib/cjs/actions/requirements/encode/encodeErc20Permit.d.ts +21 -12
  37. package/lib/cjs/actions/requirements/encode/encodeErc20Permit.js +39 -38
  38. package/lib/cjs/actions/requirements/encode/encodeErc20Permit2SignatureTransfer.d.ts +4 -2
  39. package/lib/cjs/actions/requirements/encode/encodeErc20Permit2SignatureTransfer.js +14 -9
  40. package/lib/cjs/actions/requirements/encode/encodeVaultSharesPermit.d.ts +9 -6
  41. package/lib/cjs/actions/requirements/encode/encodeVaultSharesPermit.js +22 -17
  42. package/lib/cjs/actions/requirements/encode/index.d.ts +0 -1
  43. package/lib/cjs/actions/requirements/encode/index.js +0 -1
  44. package/lib/cjs/actions/requirements/getRequirementsApproval.d.ts +5 -6
  45. package/lib/cjs/actions/requirements/getRequirementsApproval.js +5 -6
  46. package/lib/cjs/actions/requirements/index.d.ts +0 -1
  47. package/lib/cjs/actions/requirements/index.js +0 -1
  48. package/lib/cjs/actions/vaultV1/deposit.d.ts +1 -2
  49. package/lib/cjs/actions/vaultV1/deposit.js +1 -2
  50. package/lib/cjs/actions/vaultV1/inKindRedeem.d.ts +6 -4
  51. package/lib/cjs/actions/vaultV1/inKindRedeem.js +12 -8
  52. package/lib/cjs/actions/vaultV2/deposit.d.ts +1 -2
  53. package/lib/cjs/actions/vaultV2/deposit.js +1 -2
  54. package/lib/cjs/actions/vaultV2/forceWithdraw.d.ts +58 -39
  55. package/lib/cjs/actions/vaultV2/forceWithdraw.js +87 -60
  56. package/lib/cjs/actions/vaultV2/inKindRedeem.d.ts +6 -4
  57. package/lib/cjs/actions/vaultV2/inKindRedeem.js +12 -8
  58. package/lib/cjs/augment.d.ts +0 -1
  59. package/lib/cjs/augment.js +0 -1
  60. package/lib/cjs/blue/abis.d.ts +1 -1
  61. package/lib/cjs/blue/abis.js +1 -5
  62. package/lib/cjs/blue/entities.d.ts +2 -2
  63. package/lib/cjs/blue/entities.js +1 -2
  64. package/lib/cjs/blue/errors.d.ts +1 -1
  65. package/lib/cjs/blue/errors.js +2 -1
  66. package/lib/cjs/blue/fetch.d.ts +1 -1
  67. package/lib/cjs/blue/fetch.js +1 -2
  68. package/lib/cjs/blue/types.d.ts +2 -4
  69. package/lib/cjs/blue/utils.d.ts +1 -3
  70. package/lib/cjs/blue/utils.js +1 -3
  71. package/lib/cjs/client/morphoViemExtension.d.ts +1 -1
  72. package/lib/cjs/client/morphoViemExtension.js +1 -1
  73. package/lib/cjs/constants.d.ts +3 -37
  74. package/lib/cjs/constants.js +1 -39
  75. package/lib/cjs/entities/blue/blue.d.ts +38 -264
  76. package/lib/cjs/entities/blue/blue.js +2 -203
  77. package/lib/cjs/entities/index.d.ts +3 -60
  78. package/lib/cjs/entities/index.js +1 -20
  79. package/lib/cjs/entities/midnight/midnight.js +20 -24
  80. package/lib/cjs/entities/requirements/getBundlesTokenRequirements.d.ts +7 -6
  81. package/lib/cjs/entities/requirements/getBundlesTokenRequirements.js +19 -14
  82. package/lib/cjs/{actions/requirements/blue → entities/requirements}/getUnusedPermit2Nonce.js +3 -3
  83. package/lib/cjs/entities/requirements/index.d.ts +1 -0
  84. package/lib/cjs/entities/requirements/index.js +1 -0
  85. package/lib/cjs/entities/vaultV1/vaultV1.d.ts +18 -6
  86. package/lib/cjs/entities/vaultV1/vaultV1.js +25 -8
  87. package/lib/cjs/entities/vaultV2/vaultV2.d.ts +154 -35
  88. package/lib/cjs/entities/vaultV2/vaultV2.js +249 -23
  89. package/lib/cjs/entities/vaultV2BlueReallocationData.d.ts +8 -1
  90. package/lib/cjs/entities/vaultV2BlueReallocationData.js +50 -34
  91. package/lib/cjs/errors.d.ts +2 -46
  92. package/lib/cjs/errors.js +2 -46
  93. package/lib/cjs/fetch.d.ts +1 -15
  94. package/lib/cjs/fetch.js +1 -16
  95. package/lib/cjs/helpers/constant.d.ts +0 -2
  96. package/lib/cjs/helpers/constant.js +0 -2
  97. package/lib/cjs/helpers/index.d.ts +4 -3
  98. package/lib/cjs/helpers/index.js +10 -9
  99. package/lib/cjs/helpers/metadata.d.ts +3 -5
  100. package/lib/cjs/helpers/metadata.js +4 -6
  101. package/lib/cjs/helpers/previewVaultV2ForceWithdraw.d.ts +107 -0
  102. package/lib/cjs/helpers/previewVaultV2ForceWithdraw.js +164 -0
  103. package/lib/cjs/helpers/previewVaultV2InKindRedeem.d.ts +1 -0
  104. package/lib/cjs/helpers/previewVaultV2InKindRedeem.js +2 -0
  105. package/lib/cjs/helpers/slippage.d.ts +34 -90
  106. package/lib/cjs/helpers/slippage.js +52 -137
  107. package/lib/cjs/helpers/utilization.d.ts +12 -10
  108. package/lib/cjs/helpers/utilization.js +27 -12
  109. package/lib/cjs/helpers/validate.d.ts +66 -32
  110. package/lib/cjs/helpers/validate.js +84 -57
  111. package/lib/cjs/helpers/validateRequirementSpender.d.ts +1 -1
  112. package/lib/cjs/helpers/validateRequirementSpender.js +1 -3
  113. package/lib/cjs/helpers/vaultV2ForceWithdrawPlan.d.ts +274 -0
  114. package/lib/cjs/helpers/vaultV2ForceWithdrawPlan.js +369 -0
  115. package/lib/cjs/types/action.d.ts +102 -68
  116. package/lib/cjs/types/action.js +11 -4
  117. package/lib/cjs/types/error.d.ts +332 -385
  118. package/lib/cjs/types/error.js +369 -412
  119. package/lib/cjs/types/sharedLiquidity.d.ts +1 -117
  120. package/lib/cjs/types.d.ts +2 -18
  121. package/lib/cjs/utils.d.ts +8 -35
  122. package/lib/cjs/utils.js +11 -36
  123. package/lib/esm/abis.d.ts +3 -2829
  124. package/lib/esm/abis.js +3 -1935
  125. package/lib/esm/actions/blue/borrow.d.ts +3 -2
  126. package/lib/esm/actions/blue/borrow.js +3 -2
  127. package/lib/esm/actions/blue/common.js +8 -37
  128. package/lib/esm/actions/blue/refinance.d.ts +2 -2
  129. package/lib/esm/actions/blue/refinance.js +2 -2
  130. package/lib/esm/actions/blue/repay.d.ts +1 -1
  131. package/lib/esm/actions/blue/repay.js +1 -1
  132. package/lib/esm/actions/blue/repayWithdrawCollateral.d.ts +2 -2
  133. package/lib/esm/actions/blue/repayWithdrawCollateral.js +2 -2
  134. package/lib/esm/actions/blue/supply.d.ts +2 -2
  135. package/lib/esm/actions/blue/supply.js +6 -11
  136. package/lib/esm/actions/blue/supplyCollateral.d.ts +2 -2
  137. package/lib/esm/actions/blue/supplyCollateral.js +2 -2
  138. package/lib/esm/actions/blue/supplyCollateralBorrow.d.ts +3 -2
  139. package/lib/esm/actions/blue/supplyCollateralBorrow.js +3 -2
  140. package/lib/esm/actions/blue/withdraw.d.ts +3 -3
  141. package/lib/esm/actions/blue/withdraw.js +3 -3
  142. package/lib/esm/actions/blue/withdrawCollateral.d.ts +2 -2
  143. package/lib/esm/actions/blue/withdrawCollateral.js +2 -2
  144. package/lib/esm/actions/bundles/common.d.ts +38 -4
  145. package/lib/esm/actions/bundles/common.js +91 -36
  146. package/lib/esm/actions/index.d.ts +0 -1
  147. package/lib/esm/actions/index.js +0 -1
  148. package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.d.ts +9 -8
  149. package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.js +20 -29
  150. package/lib/esm/actions/requirements/blue/index.d.ts +0 -1
  151. package/lib/esm/actions/requirements/blue/index.js +0 -1
  152. package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +20 -14
  153. package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.js +25 -26
  154. package/lib/esm/actions/requirements/encode/encodeErc20Approval.d.ts +4 -4
  155. package/lib/esm/actions/requirements/encode/encodeErc20Approval.js +4 -5
  156. package/lib/esm/actions/requirements/encode/encodeErc20Permit.d.ts +21 -12
  157. package/lib/esm/actions/requirements/encode/encodeErc20Permit.js +40 -39
  158. package/lib/esm/actions/requirements/encode/encodeErc20Permit2SignatureTransfer.d.ts +4 -2
  159. package/lib/esm/actions/requirements/encode/encodeErc20Permit2SignatureTransfer.js +14 -9
  160. package/lib/esm/actions/requirements/encode/encodeVaultSharesPermit.d.ts +9 -6
  161. package/lib/esm/actions/requirements/encode/encodeVaultSharesPermit.js +22 -17
  162. package/lib/esm/actions/requirements/encode/index.d.ts +0 -1
  163. package/lib/esm/actions/requirements/encode/index.js +0 -1
  164. package/lib/esm/actions/requirements/getRequirementsApproval.d.ts +5 -6
  165. package/lib/esm/actions/requirements/getRequirementsApproval.js +5 -6
  166. package/lib/esm/actions/requirements/index.d.ts +0 -1
  167. package/lib/esm/actions/requirements/index.js +0 -1
  168. package/lib/esm/actions/vaultV1/deposit.d.ts +1 -2
  169. package/lib/esm/actions/vaultV1/deposit.js +1 -2
  170. package/lib/esm/actions/vaultV1/inKindRedeem.d.ts +6 -4
  171. package/lib/esm/actions/vaultV1/inKindRedeem.js +12 -8
  172. package/lib/esm/actions/vaultV2/deposit.d.ts +1 -2
  173. package/lib/esm/actions/vaultV2/deposit.js +1 -2
  174. package/lib/esm/actions/vaultV2/forceWithdraw.d.ts +58 -39
  175. package/lib/esm/actions/vaultV2/forceWithdraw.js +89 -62
  176. package/lib/esm/actions/vaultV2/inKindRedeem.d.ts +6 -4
  177. package/lib/esm/actions/vaultV2/inKindRedeem.js +12 -8
  178. package/lib/esm/augment.d.ts +0 -1
  179. package/lib/esm/augment.js +0 -1
  180. package/lib/esm/blue/abis.d.ts +1 -1
  181. package/lib/esm/blue/abis.js +1 -1
  182. package/lib/esm/blue/entities.d.ts +2 -2
  183. package/lib/esm/blue/entities.js +1 -1
  184. package/lib/esm/blue/errors.d.ts +1 -1
  185. package/lib/esm/blue/errors.js +1 -1
  186. package/lib/esm/blue/fetch.d.ts +1 -1
  187. package/lib/esm/blue/fetch.js +1 -1
  188. package/lib/esm/blue/types.d.ts +2 -4
  189. package/lib/esm/blue/utils.d.ts +1 -3
  190. package/lib/esm/blue/utils.js +1 -3
  191. package/lib/esm/client/morphoViemExtension.d.ts +1 -1
  192. package/lib/esm/client/morphoViemExtension.js +1 -1
  193. package/lib/esm/constants.d.ts +3 -37
  194. package/lib/esm/constants.js +3 -37
  195. package/lib/esm/entities/blue/blue.d.ts +38 -264
  196. package/lib/esm/entities/blue/blue.js +5 -206
  197. package/lib/esm/entities/index.d.ts +3 -60
  198. package/lib/esm/entities/index.js +1 -16
  199. package/lib/esm/entities/midnight/midnight.js +20 -24
  200. package/lib/esm/entities/requirements/getBundlesTokenRequirements.d.ts +7 -6
  201. package/lib/esm/entities/requirements/getBundlesTokenRequirements.js +20 -15
  202. package/lib/esm/{actions/requirements/blue → entities/requirements}/getUnusedPermit2Nonce.js +3 -3
  203. package/lib/esm/entities/requirements/index.d.ts +1 -0
  204. package/lib/esm/entities/requirements/index.js +1 -0
  205. package/lib/esm/entities/vaultV1/vaultV1.d.ts +18 -6
  206. package/lib/esm/entities/vaultV1/vaultV1.js +29 -12
  207. package/lib/esm/entities/vaultV2/vaultV2.d.ts +154 -35
  208. package/lib/esm/entities/vaultV2/vaultV2.js +256 -30
  209. package/lib/esm/entities/vaultV2BlueReallocationData.d.ts +8 -1
  210. package/lib/esm/entities/vaultV2BlueReallocationData.js +48 -32
  211. package/lib/esm/errors.d.ts +2 -46
  212. package/lib/esm/errors.js +2 -46
  213. package/lib/esm/fetch.d.ts +1 -15
  214. package/lib/esm/fetch.js +1 -15
  215. package/lib/esm/helpers/constant.d.ts +0 -2
  216. package/lib/esm/helpers/constant.js +0 -2
  217. package/lib/esm/helpers/index.d.ts +4 -3
  218. package/lib/esm/helpers/index.js +4 -3
  219. package/lib/esm/helpers/metadata.d.ts +3 -5
  220. package/lib/esm/helpers/metadata.js +4 -6
  221. package/lib/esm/helpers/previewVaultV2ForceWithdraw.d.ts +107 -0
  222. package/lib/esm/helpers/previewVaultV2ForceWithdraw.js +161 -0
  223. package/lib/esm/helpers/previewVaultV2InKindRedeem.d.ts +1 -0
  224. package/lib/esm/helpers/previewVaultV2InKindRedeem.js +2 -0
  225. package/lib/esm/helpers/slippage.d.ts +34 -90
  226. package/lib/esm/helpers/slippage.js +52 -134
  227. package/lib/esm/helpers/utilization.d.ts +12 -10
  228. package/lib/esm/helpers/utilization.js +26 -11
  229. package/lib/esm/helpers/validate.d.ts +66 -32
  230. package/lib/esm/helpers/validate.js +83 -57
  231. package/lib/esm/helpers/validateRequirementSpender.d.ts +1 -1
  232. package/lib/esm/helpers/validateRequirementSpender.js +1 -3
  233. package/lib/esm/helpers/vaultV2ForceWithdrawPlan.d.ts +274 -0
  234. package/lib/esm/helpers/vaultV2ForceWithdrawPlan.js +362 -0
  235. package/lib/esm/types/action.d.ts +102 -68
  236. package/lib/esm/types/action.js +12 -5
  237. package/lib/esm/types/error.d.ts +332 -385
  238. package/lib/esm/types/error.js +355 -392
  239. package/lib/esm/types/sharedLiquidity.d.ts +1 -117
  240. package/lib/esm/types.d.ts +2 -18
  241. package/lib/esm/utils.d.ts +8 -35
  242. package/lib/esm/utils.js +7 -34
  243. package/package.json +7 -15
  244. package/lib/cjs/actions/requirements/encode/encodeErc20Permit2Approve.d.ts +0 -42
  245. package/lib/cjs/actions/requirements/encode/encodeErc20Permit2Approve.js +0 -83
  246. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirements.d.ts +0 -88
  247. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirements.js +0 -151
  248. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +0 -37
  249. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.js +0 -50
  250. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.d.ts +0 -57
  251. package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.js +0 -74
  252. package/lib/cjs/actions/requirements/generalAdapter/index.d.ts +0 -3
  253. package/lib/cjs/actions/requirements/generalAdapter/index.js +0 -19
  254. package/lib/cjs/actions/signatures/getBlueAuthorizationAction.d.ts +0 -29
  255. package/lib/cjs/actions/signatures/getBlueAuthorizationAction.js +0 -48
  256. package/lib/cjs/actions/signatures/getTokenRequirementActions.d.ts +0 -58
  257. package/lib/cjs/actions/signatures/getTokenRequirementActions.js +0 -119
  258. package/lib/cjs/actions/signatures/getVaultExitBundlesV1PermitStruct.d.ts +0 -44
  259. package/lib/cjs/actions/signatures/getVaultExitBundlesV1PermitStruct.js +0 -43
  260. package/lib/cjs/actions/signatures/index.d.ts +0 -3
  261. package/lib/cjs/actions/signatures/index.js +0 -19
  262. package/lib/cjs/augment/VaultMarketPublicAllocatorConfig.d.ts +0 -8
  263. package/lib/cjs/augment/VaultMarketPublicAllocatorConfig.js +0 -8
  264. package/lib/cjs/bundler/actions.d.ts +0 -797
  265. package/lib/cjs/bundler/actions.js +0 -1371
  266. package/lib/cjs/bundler/index.d.ts +0 -2
  267. package/lib/cjs/bundler/index.js +0 -18
  268. package/lib/cjs/bundler/types.d.ts +0 -235
  269. package/lib/cjs/bundler/types.js +0 -2
  270. package/lib/cjs/entities/vaultV1ReallocationData.d.ts +0 -326
  271. package/lib/cjs/entities/vaultV1ReallocationData.js +0 -542
  272. package/lib/cjs/helpers/computeVaultV1Reallocations.d.ts +0 -78
  273. package/lib/cjs/helpers/computeVaultV1Reallocations.js +0 -243
  274. package/lib/esm/actions/requirements/encode/encodeErc20Permit2Approve.d.ts +0 -42
  275. package/lib/esm/actions/requirements/encode/encodeErc20Permit2Approve.js +0 -79
  276. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirements.d.ts +0 -88
  277. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirements.js +0 -147
  278. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +0 -37
  279. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.js +0 -46
  280. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.d.ts +0 -57
  281. package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit2.js +0 -70
  282. package/lib/esm/actions/requirements/generalAdapter/index.d.ts +0 -3
  283. package/lib/esm/actions/requirements/generalAdapter/index.js +0 -3
  284. package/lib/esm/actions/signatures/getBlueAuthorizationAction.d.ts +0 -29
  285. package/lib/esm/actions/signatures/getBlueAuthorizationAction.js +0 -44
  286. package/lib/esm/actions/signatures/getTokenRequirementActions.d.ts +0 -58
  287. package/lib/esm/actions/signatures/getTokenRequirementActions.js +0 -115
  288. package/lib/esm/actions/signatures/getVaultExitBundlesV1PermitStruct.d.ts +0 -44
  289. package/lib/esm/actions/signatures/getVaultExitBundlesV1PermitStruct.js +0 -39
  290. package/lib/esm/actions/signatures/index.d.ts +0 -3
  291. package/lib/esm/actions/signatures/index.js +0 -3
  292. package/lib/esm/augment/VaultMarketPublicAllocatorConfig.d.ts +0 -8
  293. package/lib/esm/augment/VaultMarketPublicAllocatorConfig.js +0 -5
  294. package/lib/esm/bundler/actions.d.ts +0 -797
  295. package/lib/esm/bundler/actions.js +0 -1368
  296. package/lib/esm/bundler/index.d.ts +0 -2
  297. package/lib/esm/bundler/index.js +0 -2
  298. package/lib/esm/bundler/types.d.ts +0 -235
  299. package/lib/esm/bundler/types.js +0 -1
  300. package/lib/esm/entities/vaultV1ReallocationData.d.ts +0 -326
  301. package/lib/esm/entities/vaultV1ReallocationData.js +0 -544
  302. package/lib/esm/helpers/computeVaultV1Reallocations.d.ts +0 -78
  303. package/lib/esm/helpers/computeVaultV1Reallocations.js +0 -239
  304. /package/lib/cjs/{actions/requirements/blue → entities/requirements}/getUnusedPermit2Nonce.d.ts +0 -0
  305. /package/lib/esm/{actions/requirements/blue → entities/requirements}/getUnusedPermit2Nonce.d.ts +0 -0
package/lib/esm/abis.js CHANGED
@@ -1,18 +1,6 @@
1
- export { marketParamsAbi as blueMarketParamsAbi,
2
- /** @deprecated Use `blueMarketParamsAbi` or the raw `/blue/abis` subpath. */
3
- marketParamsAbi, } from "@morpho-org/blue-sdk";
4
- export { adaptiveCurveIrmAbi as blueAdaptiveCurveIrmAbi,
5
- /** @deprecated Use `blueAdaptiveCurveIrmAbi` or the raw `/blue/abis` subpath. */
6
- adaptiveCurveIrmAbi, blueAbi, blueOracleAbi, erc2612Abi, erc5267Abi, metaMorphoAbi, metaMorphoFactoryAbi, morphoMarketV1AdapterAbi, morphoMarketV1AdapterFactoryAbi, morphoMarketV1AdapterV2Abi, morphoMarketV1AdapterV2FactoryAbi, morphoVaultV1AdapterAbi, morphoVaultV1AdapterFactoryAbi, permissionedErc20WrapperAbi, permit2Abi, preLiquidationAbi as bluePreLiquidationAbi,
7
- /** @deprecated Use `bluePreLiquidationAbi` or the raw `/blue/abis` subpath. */
8
- preLiquidationAbi, preLiquidationFactoryAbi as bluePreLiquidationFactoryAbi,
9
- /** @deprecated Use `bluePreLiquidationFactoryAbi` or the raw `/blue/abis` subpath. */
10
- preLiquidationFactoryAbi, publicAllocatorAbi, vaultV1AdapterAbi, vaultV1AdapterFactoryAbi, vaultV1PublicAllocatorAbi, vaultV2Abi, vaultV2BluePublicAllocatorAbi, vaultV2FactoryAbi, whitelistControllerAggregatorV2Abi, wrappedBackedTokenAbi, wstEthAbi, } from "@morpho-org/blue-sdk-viem";
11
- export { ecrecoverRatifierAbi as midnightEcrecoverRatifierAbi,
12
- /** @deprecated Use `midnightEcrecoverRatifierAbi` or the raw `/midnight/abis` subpath. */
13
- ecrecoverRatifierAbi, midnightAbi, midnightBundlesAbi, setterRatifierAbi as midnightSetterRatifierAbi,
14
- /** @deprecated Use `midnightSetterRatifierAbi` or the raw `/midnight/abis` subpath. */
15
- setterRatifierAbi, } from "@morpho-org/midnight-sdk";
1
+ export { marketParamsAbi as blueMarketParamsAbi } from "@morpho-org/blue-sdk";
2
+ export { adaptiveCurveIrmAbi as blueAdaptiveCurveIrmAbi, blueAbi, blueOracleAbi, erc2612Abi, erc5267Abi, metaMorphoAbi, metaMorphoFactoryAbi, morphoMarketV1AdapterAbi, morphoMarketV1AdapterFactoryAbi, morphoMarketV1AdapterV2Abi, morphoMarketV1AdapterV2FactoryAbi, morphoVaultV1AdapterAbi, morphoVaultV1AdapterFactoryAbi, permissionedErc20WrapperAbi, permit2Abi, preLiquidationAbi as bluePreLiquidationAbi, preLiquidationFactoryAbi as bluePreLiquidationFactoryAbi, vaultV2Abi, vaultV2BluePublicAllocatorAbi, vaultV2FactoryAbi, whitelistControllerAggregatorV2Abi, wrappedBackedTokenAbi, wstEthAbi, } from "@morpho-org/blue-sdk-viem";
3
+ export { ecrecoverRatifierAbi as midnightEcrecoverRatifierAbi, midnightAbi, midnightBundlesAbi, setterRatifierAbi as midnightSetterRatifierAbi, } from "@morpho-org/midnight-sdk";
16
4
  /** ABI for the VaultExitBundlesV1 periphery contract. */
17
5
  export const vaultExitBundlesV1Abi = [
18
6
  {
@@ -319,1926 +307,6 @@ export const vaultBundlesV1Abi = [
319
307
  stateMutability: "nonpayable",
320
308
  },
321
309
  ];
322
- /** ABI for the Bundler3 multicall contract. */
323
- export const bundler3Abi = [
324
- {
325
- type: "function",
326
- name: "initiator",
327
- inputs: [],
328
- outputs: [
329
- {
330
- name: "",
331
- type: "address",
332
- internalType: "address",
333
- },
334
- ],
335
- stateMutability: "view",
336
- },
337
- {
338
- type: "function",
339
- name: "multicall",
340
- inputs: [
341
- {
342
- name: "bundle",
343
- type: "tuple[]",
344
- internalType: "struct Call[]",
345
- components: [
346
- {
347
- name: "to",
348
- type: "address",
349
- internalType: "address",
350
- },
351
- {
352
- name: "data",
353
- type: "bytes",
354
- internalType: "bytes",
355
- },
356
- {
357
- name: "value",
358
- type: "uint256",
359
- internalType: "uint256",
360
- },
361
- {
362
- name: "skipRevert",
363
- type: "bool",
364
- internalType: "bool",
365
- },
366
- {
367
- name: "callbackHash",
368
- type: "bytes32",
369
- internalType: "bytes32",
370
- },
371
- ],
372
- },
373
- ],
374
- outputs: [],
375
- stateMutability: "payable",
376
- },
377
- {
378
- type: "function",
379
- name: "reenter",
380
- inputs: [
381
- {
382
- name: "bundle",
383
- type: "tuple[]",
384
- internalType: "struct Call[]",
385
- components: [
386
- {
387
- name: "to",
388
- type: "address",
389
- internalType: "address",
390
- },
391
- {
392
- name: "data",
393
- type: "bytes",
394
- internalType: "bytes",
395
- },
396
- {
397
- name: "value",
398
- type: "uint256",
399
- internalType: "uint256",
400
- },
401
- {
402
- name: "skipRevert",
403
- type: "bool",
404
- internalType: "bool",
405
- },
406
- {
407
- name: "callbackHash",
408
- type: "bytes32",
409
- internalType: "bytes32",
410
- },
411
- ],
412
- },
413
- ],
414
- outputs: [],
415
- stateMutability: "nonpayable",
416
- },
417
- {
418
- type: "function",
419
- name: "reenterHash",
420
- inputs: [],
421
- outputs: [
422
- {
423
- name: "",
424
- type: "bytes32",
425
- internalType: "bytes32",
426
- },
427
- ],
428
- stateMutability: "view",
429
- },
430
- {
431
- type: "error",
432
- name: "AlreadyInitiated",
433
- inputs: [],
434
- },
435
- {
436
- type: "error",
437
- name: "EmptyBundle",
438
- inputs: [],
439
- },
440
- {
441
- type: "error",
442
- name: "IncorrectReenterHash",
443
- inputs: [],
444
- },
445
- {
446
- type: "error",
447
- name: "MissingExpectedReenter",
448
- inputs: [],
449
- },
450
- ];
451
- /** ABI for the Bundler3 core adapter. */
452
- export const coreAdapterAbi = [
453
- {
454
- type: "receive",
455
- stateMutability: "payable",
456
- },
457
- {
458
- type: "function",
459
- name: "BUNDLER3",
460
- inputs: [],
461
- outputs: [
462
- {
463
- name: "",
464
- type: "address",
465
- internalType: "address",
466
- },
467
- ],
468
- stateMutability: "view",
469
- },
470
- {
471
- type: "function",
472
- name: "erc20Transfer",
473
- inputs: [
474
- {
475
- name: "token",
476
- type: "address",
477
- internalType: "address",
478
- },
479
- {
480
- name: "receiver",
481
- type: "address",
482
- internalType: "address",
483
- },
484
- {
485
- name: "amount",
486
- type: "uint256",
487
- internalType: "uint256",
488
- },
489
- ],
490
- outputs: [],
491
- stateMutability: "nonpayable",
492
- },
493
- {
494
- type: "function",
495
- name: "nativeTransfer",
496
- inputs: [
497
- {
498
- name: "receiver",
499
- type: "address",
500
- internalType: "address",
501
- },
502
- {
503
- name: "amount",
504
- type: "uint256",
505
- internalType: "uint256",
506
- },
507
- ],
508
- outputs: [],
509
- stateMutability: "nonpayable",
510
- },
511
- {
512
- type: "error",
513
- name: "AdapterAddress",
514
- inputs: [],
515
- },
516
- {
517
- type: "error",
518
- name: "FailedCall",
519
- inputs: [],
520
- },
521
- {
522
- type: "error",
523
- name: "InsufficientBalance",
524
- inputs: [
525
- {
526
- name: "balance",
527
- type: "uint256",
528
- internalType: "uint256",
529
- },
530
- {
531
- name: "needed",
532
- type: "uint256",
533
- internalType: "uint256",
534
- },
535
- ],
536
- },
537
- {
538
- type: "error",
539
- name: "SafeERC20FailedOperation",
540
- inputs: [
541
- {
542
- name: "token",
543
- type: "address",
544
- internalType: "address",
545
- },
546
- ],
547
- },
548
- {
549
- type: "error",
550
- name: "UnauthorizedSender",
551
- inputs: [],
552
- },
553
- {
554
- type: "error",
555
- name: "ZeroAddress",
556
- inputs: [],
557
- },
558
- {
559
- type: "error",
560
- name: "ZeroAmount",
561
- inputs: [],
562
- },
563
- ];
564
- /** ABI for the Bundler3 GeneralAdapter1 contract. */
565
- export const generalAdapter1Abi = [
566
- ...coreAdapterAbi,
567
- {
568
- type: "constructor",
569
- inputs: [
570
- {
571
- name: "bundler3",
572
- type: "address",
573
- internalType: "address",
574
- },
575
- {
576
- name: "morpho",
577
- type: "address",
578
- internalType: "address",
579
- },
580
- {
581
- name: "wNative",
582
- type: "address",
583
- internalType: "address",
584
- },
585
- ],
586
- stateMutability: "nonpayable",
587
- },
588
- {
589
- type: "function",
590
- name: "MORPHO",
591
- inputs: [],
592
- outputs: [
593
- {
594
- name: "",
595
- type: "address",
596
- internalType: "contract IMorpho",
597
- },
598
- ],
599
- stateMutability: "view",
600
- },
601
- {
602
- type: "function",
603
- name: "WRAPPED_NATIVE",
604
- inputs: [],
605
- outputs: [
606
- {
607
- name: "",
608
- type: "address",
609
- internalType: "contract IWNative",
610
- },
611
- ],
612
- stateMutability: "view",
613
- },
614
- {
615
- type: "function",
616
- name: "erc20TransferFrom",
617
- inputs: [
618
- {
619
- name: "token",
620
- type: "address",
621
- internalType: "address",
622
- },
623
- {
624
- name: "receiver",
625
- type: "address",
626
- internalType: "address",
627
- },
628
- {
629
- name: "amount",
630
- type: "uint256",
631
- internalType: "uint256",
632
- },
633
- ],
634
- outputs: [],
635
- stateMutability: "nonpayable",
636
- },
637
- {
638
- type: "function",
639
- name: "erc4626Deposit",
640
- inputs: [
641
- {
642
- name: "vault",
643
- type: "address",
644
- internalType: "address",
645
- },
646
- {
647
- name: "assets",
648
- type: "uint256",
649
- internalType: "uint256",
650
- },
651
- {
652
- name: "maxSharePriceE27",
653
- type: "uint256",
654
- internalType: "uint256",
655
- },
656
- {
657
- name: "receiver",
658
- type: "address",
659
- internalType: "address",
660
- },
661
- ],
662
- outputs: [],
663
- stateMutability: "nonpayable",
664
- },
665
- {
666
- type: "function",
667
- name: "erc4626Mint",
668
- inputs: [
669
- {
670
- name: "vault",
671
- type: "address",
672
- internalType: "address",
673
- },
674
- {
675
- name: "shares",
676
- type: "uint256",
677
- internalType: "uint256",
678
- },
679
- {
680
- name: "maxSharePriceE27",
681
- type: "uint256",
682
- internalType: "uint256",
683
- },
684
- {
685
- name: "receiver",
686
- type: "address",
687
- internalType: "address",
688
- },
689
- ],
690
- outputs: [],
691
- stateMutability: "nonpayable",
692
- },
693
- {
694
- type: "function",
695
- name: "erc4626Redeem",
696
- inputs: [
697
- {
698
- name: "vault",
699
- type: "address",
700
- internalType: "address",
701
- },
702
- {
703
- name: "shares",
704
- type: "uint256",
705
- internalType: "uint256",
706
- },
707
- {
708
- name: "minSharePriceE27",
709
- type: "uint256",
710
- internalType: "uint256",
711
- },
712
- {
713
- name: "receiver",
714
- type: "address",
715
- internalType: "address",
716
- },
717
- {
718
- name: "owner",
719
- type: "address",
720
- internalType: "address",
721
- },
722
- ],
723
- outputs: [],
724
- stateMutability: "nonpayable",
725
- },
726
- {
727
- type: "function",
728
- name: "erc4626Withdraw",
729
- inputs: [
730
- {
731
- name: "vault",
732
- type: "address",
733
- internalType: "address",
734
- },
735
- {
736
- name: "assets",
737
- type: "uint256",
738
- internalType: "uint256",
739
- },
740
- {
741
- name: "minSharePriceE27",
742
- type: "uint256",
743
- internalType: "uint256",
744
- },
745
- {
746
- name: "receiver",
747
- type: "address",
748
- internalType: "address",
749
- },
750
- {
751
- name: "owner",
752
- type: "address",
753
- internalType: "address",
754
- },
755
- ],
756
- outputs: [],
757
- stateMutability: "nonpayable",
758
- },
759
- {
760
- type: "function",
761
- name: "morphoBorrow",
762
- inputs: [
763
- {
764
- name: "marketParams",
765
- type: "tuple",
766
- internalType: "struct MarketParams",
767
- components: [
768
- {
769
- name: "loanToken",
770
- type: "address",
771
- internalType: "address",
772
- },
773
- {
774
- name: "collateralToken",
775
- type: "address",
776
- internalType: "address",
777
- },
778
- {
779
- name: "oracle",
780
- type: "address",
781
- internalType: "address",
782
- },
783
- {
784
- name: "irm",
785
- type: "address",
786
- internalType: "address",
787
- },
788
- {
789
- name: "lltv",
790
- type: "uint256",
791
- internalType: "uint256",
792
- },
793
- ],
794
- },
795
- {
796
- name: "assets",
797
- type: "uint256",
798
- internalType: "uint256",
799
- },
800
- {
801
- name: "shares",
802
- type: "uint256",
803
- internalType: "uint256",
804
- },
805
- {
806
- name: "minSharePriceE27",
807
- type: "uint256",
808
- internalType: "uint256",
809
- },
810
- {
811
- name: "receiver",
812
- type: "address",
813
- internalType: "address",
814
- },
815
- ],
816
- outputs: [],
817
- stateMutability: "nonpayable",
818
- },
819
- {
820
- type: "function",
821
- name: "morphoFlashLoan",
822
- inputs: [
823
- {
824
- name: "token",
825
- type: "address",
826
- internalType: "address",
827
- },
828
- {
829
- name: "assets",
830
- type: "uint256",
831
- internalType: "uint256",
832
- },
833
- {
834
- name: "data",
835
- type: "bytes",
836
- internalType: "bytes",
837
- },
838
- ],
839
- outputs: [],
840
- stateMutability: "nonpayable",
841
- },
842
- {
843
- type: "function",
844
- name: "morphoRepay",
845
- inputs: [
846
- {
847
- name: "marketParams",
848
- type: "tuple",
849
- internalType: "struct MarketParams",
850
- components: [
851
- {
852
- name: "loanToken",
853
- type: "address",
854
- internalType: "address",
855
- },
856
- {
857
- name: "collateralToken",
858
- type: "address",
859
- internalType: "address",
860
- },
861
- {
862
- name: "oracle",
863
- type: "address",
864
- internalType: "address",
865
- },
866
- {
867
- name: "irm",
868
- type: "address",
869
- internalType: "address",
870
- },
871
- {
872
- name: "lltv",
873
- type: "uint256",
874
- internalType: "uint256",
875
- },
876
- ],
877
- },
878
- {
879
- name: "assets",
880
- type: "uint256",
881
- internalType: "uint256",
882
- },
883
- {
884
- name: "shares",
885
- type: "uint256",
886
- internalType: "uint256",
887
- },
888
- {
889
- name: "maxSharePriceE27",
890
- type: "uint256",
891
- internalType: "uint256",
892
- },
893
- {
894
- name: "onBehalf",
895
- type: "address",
896
- internalType: "address",
897
- },
898
- {
899
- name: "data",
900
- type: "bytes",
901
- internalType: "bytes",
902
- },
903
- ],
904
- outputs: [],
905
- stateMutability: "nonpayable",
906
- },
907
- {
908
- type: "function",
909
- name: "morphoSupply",
910
- inputs: [
911
- {
912
- name: "marketParams",
913
- type: "tuple",
914
- internalType: "struct MarketParams",
915
- components: [
916
- {
917
- name: "loanToken",
918
- type: "address",
919
- internalType: "address",
920
- },
921
- {
922
- name: "collateralToken",
923
- type: "address",
924
- internalType: "address",
925
- },
926
- {
927
- name: "oracle",
928
- type: "address",
929
- internalType: "address",
930
- },
931
- {
932
- name: "irm",
933
- type: "address",
934
- internalType: "address",
935
- },
936
- {
937
- name: "lltv",
938
- type: "uint256",
939
- internalType: "uint256",
940
- },
941
- ],
942
- },
943
- {
944
- name: "assets",
945
- type: "uint256",
946
- internalType: "uint256",
947
- },
948
- {
949
- name: "shares",
950
- type: "uint256",
951
- internalType: "uint256",
952
- },
953
- {
954
- name: "maxSharePriceE27",
955
- type: "uint256",
956
- internalType: "uint256",
957
- },
958
- {
959
- name: "onBehalf",
960
- type: "address",
961
- internalType: "address",
962
- },
963
- {
964
- name: "data",
965
- type: "bytes",
966
- internalType: "bytes",
967
- },
968
- ],
969
- outputs: [],
970
- stateMutability: "nonpayable",
971
- },
972
- {
973
- type: "function",
974
- name: "morphoSupplyCollateral",
975
- inputs: [
976
- {
977
- name: "marketParams",
978
- type: "tuple",
979
- internalType: "struct MarketParams",
980
- components: [
981
- {
982
- name: "loanToken",
983
- type: "address",
984
- internalType: "address",
985
- },
986
- {
987
- name: "collateralToken",
988
- type: "address",
989
- internalType: "address",
990
- },
991
- {
992
- name: "oracle",
993
- type: "address",
994
- internalType: "address",
995
- },
996
- {
997
- name: "irm",
998
- type: "address",
999
- internalType: "address",
1000
- },
1001
- {
1002
- name: "lltv",
1003
- type: "uint256",
1004
- internalType: "uint256",
1005
- },
1006
- ],
1007
- },
1008
- {
1009
- name: "assets",
1010
- type: "uint256",
1011
- internalType: "uint256",
1012
- },
1013
- {
1014
- name: "onBehalf",
1015
- type: "address",
1016
- internalType: "address",
1017
- },
1018
- {
1019
- name: "data",
1020
- type: "bytes",
1021
- internalType: "bytes",
1022
- },
1023
- ],
1024
- outputs: [],
1025
- stateMutability: "nonpayable",
1026
- },
1027
- {
1028
- type: "function",
1029
- name: "morphoWithdraw",
1030
- inputs: [
1031
- {
1032
- name: "marketParams",
1033
- type: "tuple",
1034
- internalType: "struct MarketParams",
1035
- components: [
1036
- {
1037
- name: "loanToken",
1038
- type: "address",
1039
- internalType: "address",
1040
- },
1041
- {
1042
- name: "collateralToken",
1043
- type: "address",
1044
- internalType: "address",
1045
- },
1046
- {
1047
- name: "oracle",
1048
- type: "address",
1049
- internalType: "address",
1050
- },
1051
- {
1052
- name: "irm",
1053
- type: "address",
1054
- internalType: "address",
1055
- },
1056
- {
1057
- name: "lltv",
1058
- type: "uint256",
1059
- internalType: "uint256",
1060
- },
1061
- ],
1062
- },
1063
- {
1064
- name: "assets",
1065
- type: "uint256",
1066
- internalType: "uint256",
1067
- },
1068
- {
1069
- name: "shares",
1070
- type: "uint256",
1071
- internalType: "uint256",
1072
- },
1073
- {
1074
- name: "minSharePriceE27",
1075
- type: "uint256",
1076
- internalType: "uint256",
1077
- },
1078
- {
1079
- name: "receiver",
1080
- type: "address",
1081
- internalType: "address",
1082
- },
1083
- ],
1084
- outputs: [],
1085
- stateMutability: "nonpayable",
1086
- },
1087
- {
1088
- type: "function",
1089
- name: "morphoWithdrawCollateral",
1090
- inputs: [
1091
- {
1092
- name: "marketParams",
1093
- type: "tuple",
1094
- internalType: "struct MarketParams",
1095
- components: [
1096
- {
1097
- name: "loanToken",
1098
- type: "address",
1099
- internalType: "address",
1100
- },
1101
- {
1102
- name: "collateralToken",
1103
- type: "address",
1104
- internalType: "address",
1105
- },
1106
- {
1107
- name: "oracle",
1108
- type: "address",
1109
- internalType: "address",
1110
- },
1111
- {
1112
- name: "irm",
1113
- type: "address",
1114
- internalType: "address",
1115
- },
1116
- {
1117
- name: "lltv",
1118
- type: "uint256",
1119
- internalType: "uint256",
1120
- },
1121
- ],
1122
- },
1123
- {
1124
- name: "assets",
1125
- type: "uint256",
1126
- internalType: "uint256",
1127
- },
1128
- {
1129
- name: "receiver",
1130
- type: "address",
1131
- internalType: "address",
1132
- },
1133
- ],
1134
- outputs: [],
1135
- stateMutability: "nonpayable",
1136
- },
1137
- {
1138
- type: "function",
1139
- name: "onMorphoFlashLoan",
1140
- inputs: [
1141
- {
1142
- name: "",
1143
- type: "uint256",
1144
- internalType: "uint256",
1145
- },
1146
- {
1147
- name: "data",
1148
- type: "bytes",
1149
- internalType: "bytes",
1150
- },
1151
- ],
1152
- outputs: [],
1153
- stateMutability: "nonpayable",
1154
- },
1155
- {
1156
- type: "function",
1157
- name: "onMorphoRepay",
1158
- inputs: [
1159
- {
1160
- name: "",
1161
- type: "uint256",
1162
- internalType: "uint256",
1163
- },
1164
- {
1165
- name: "data",
1166
- type: "bytes",
1167
- internalType: "bytes",
1168
- },
1169
- ],
1170
- outputs: [],
1171
- stateMutability: "nonpayable",
1172
- },
1173
- {
1174
- type: "function",
1175
- name: "onMorphoSupply",
1176
- inputs: [
1177
- {
1178
- name: "",
1179
- type: "uint256",
1180
- internalType: "uint256",
1181
- },
1182
- {
1183
- name: "data",
1184
- type: "bytes",
1185
- internalType: "bytes",
1186
- },
1187
- ],
1188
- outputs: [],
1189
- stateMutability: "nonpayable",
1190
- },
1191
- {
1192
- type: "function",
1193
- name: "onMorphoSupplyCollateral",
1194
- inputs: [
1195
- {
1196
- name: "",
1197
- type: "uint256",
1198
- internalType: "uint256",
1199
- },
1200
- {
1201
- name: "data",
1202
- type: "bytes",
1203
- internalType: "bytes",
1204
- },
1205
- ],
1206
- outputs: [],
1207
- stateMutability: "nonpayable",
1208
- },
1209
- {
1210
- type: "function",
1211
- name: "permit2TransferFrom",
1212
- inputs: [
1213
- {
1214
- name: "token",
1215
- type: "address",
1216
- internalType: "address",
1217
- },
1218
- {
1219
- name: "receiver",
1220
- type: "address",
1221
- internalType: "address",
1222
- },
1223
- {
1224
- name: "amount",
1225
- type: "uint256",
1226
- internalType: "uint256",
1227
- },
1228
- ],
1229
- outputs: [],
1230
- stateMutability: "nonpayable",
1231
- },
1232
- {
1233
- type: "function",
1234
- name: "unwrapNative",
1235
- inputs: [
1236
- {
1237
- name: "amount",
1238
- type: "uint256",
1239
- internalType: "uint256",
1240
- },
1241
- {
1242
- name: "receiver",
1243
- type: "address",
1244
- internalType: "address",
1245
- },
1246
- ],
1247
- outputs: [],
1248
- stateMutability: "nonpayable",
1249
- },
1250
- {
1251
- type: "function",
1252
- name: "wrapNative",
1253
- inputs: [
1254
- {
1255
- name: "amount",
1256
- type: "uint256",
1257
- internalType: "uint256",
1258
- },
1259
- {
1260
- name: "receiver",
1261
- type: "address",
1262
- internalType: "address",
1263
- },
1264
- ],
1265
- outputs: [],
1266
- stateMutability: "nonpayable",
1267
- },
1268
- {
1269
- type: "error",
1270
- name: "SlippageExceeded",
1271
- inputs: [],
1272
- },
1273
- {
1274
- type: "error",
1275
- name: "UnexpectedOwner",
1276
- inputs: [],
1277
- },
1278
- {
1279
- type: "error",
1280
- name: "UnsafeCast",
1281
- inputs: [],
1282
- },
1283
- {
1284
- type: "error",
1285
- name: "ZeroShares",
1286
- inputs: [],
1287
- },
1288
- ];
1289
- /** ABI for the Ethereum-specific Bundler3 GeneralAdapter1 extension. */
1290
- export const ethereumGeneralAdapter1Abi = [
1291
- ...generalAdapter1Abi,
1292
- {
1293
- type: "constructor",
1294
- inputs: [
1295
- {
1296
- name: "bundler3",
1297
- type: "address",
1298
- internalType: "address",
1299
- },
1300
- {
1301
- name: "morpho",
1302
- type: "address",
1303
- internalType: "address",
1304
- },
1305
- {
1306
- name: "weth",
1307
- type: "address",
1308
- internalType: "address",
1309
- },
1310
- {
1311
- name: "wStEth",
1312
- type: "address",
1313
- internalType: "address",
1314
- },
1315
- {
1316
- name: "morphoToken",
1317
- type: "address",
1318
- internalType: "address",
1319
- },
1320
- {
1321
- name: "morphoWrapper",
1322
- type: "address",
1323
- internalType: "address",
1324
- },
1325
- ],
1326
- stateMutability: "nonpayable",
1327
- },
1328
- {
1329
- type: "function",
1330
- name: "MORPHO_TOKEN",
1331
- inputs: [],
1332
- outputs: [
1333
- {
1334
- name: "",
1335
- type: "address",
1336
- internalType: "address",
1337
- },
1338
- ],
1339
- stateMutability: "view",
1340
- },
1341
- {
1342
- type: "function",
1343
- name: "MORPHO_WRAPPER",
1344
- inputs: [],
1345
- outputs: [
1346
- {
1347
- name: "",
1348
- type: "address",
1349
- internalType: "address",
1350
- },
1351
- ],
1352
- stateMutability: "view",
1353
- },
1354
- {
1355
- type: "function",
1356
- name: "ST_ETH",
1357
- inputs: [],
1358
- outputs: [
1359
- {
1360
- name: "",
1361
- type: "address",
1362
- internalType: "address",
1363
- },
1364
- ],
1365
- stateMutability: "view",
1366
- },
1367
- {
1368
- type: "function",
1369
- name: "WST_ETH",
1370
- inputs: [],
1371
- outputs: [
1372
- {
1373
- name: "",
1374
- type: "address",
1375
- internalType: "address",
1376
- },
1377
- ],
1378
- stateMutability: "view",
1379
- },
1380
- {
1381
- type: "function",
1382
- name: "morphoWrapperDepositFor",
1383
- inputs: [
1384
- {
1385
- name: "receiver",
1386
- type: "address",
1387
- internalType: "address",
1388
- },
1389
- {
1390
- name: "amount",
1391
- type: "uint256",
1392
- internalType: "uint256",
1393
- },
1394
- ],
1395
- outputs: [],
1396
- stateMutability: "nonpayable",
1397
- },
1398
- {
1399
- type: "function",
1400
- name: "morphoWrapperWithdrawTo",
1401
- inputs: [
1402
- {
1403
- name: "receiver",
1404
- type: "address",
1405
- internalType: "address",
1406
- },
1407
- {
1408
- name: "amount",
1409
- type: "uint256",
1410
- internalType: "uint256",
1411
- },
1412
- ],
1413
- outputs: [],
1414
- stateMutability: "nonpayable",
1415
- },
1416
- {
1417
- type: "function",
1418
- name: "stakeEth",
1419
- inputs: [
1420
- {
1421
- name: "amount",
1422
- type: "uint256",
1423
- internalType: "uint256",
1424
- },
1425
- {
1426
- name: "maxSharePriceE27",
1427
- type: "uint256",
1428
- internalType: "uint256",
1429
- },
1430
- {
1431
- name: "referral",
1432
- type: "address",
1433
- internalType: "address",
1434
- },
1435
- {
1436
- name: "receiver",
1437
- type: "address",
1438
- internalType: "address",
1439
- },
1440
- ],
1441
- outputs: [],
1442
- stateMutability: "nonpayable",
1443
- },
1444
- {
1445
- type: "function",
1446
- name: "unwrapStEth",
1447
- inputs: [
1448
- {
1449
- name: "amount",
1450
- type: "uint256",
1451
- internalType: "uint256",
1452
- },
1453
- {
1454
- name: "receiver",
1455
- type: "address",
1456
- internalType: "address",
1457
- },
1458
- ],
1459
- outputs: [],
1460
- stateMutability: "nonpayable",
1461
- },
1462
- {
1463
- type: "function",
1464
- name: "wrapStEth",
1465
- inputs: [
1466
- {
1467
- name: "amount",
1468
- type: "uint256",
1469
- internalType: "uint256",
1470
- },
1471
- {
1472
- name: "receiver",
1473
- type: "address",
1474
- internalType: "address",
1475
- },
1476
- ],
1477
- outputs: [],
1478
- stateMutability: "nonpayable",
1479
- },
1480
- ];
1481
- /** ABI for the Bundler3 Paraswap adapter. */
1482
- export const paraswapAdapterAbi = [
1483
- ...coreAdapterAbi,
1484
- {
1485
- type: "constructor",
1486
- inputs: [
1487
- {
1488
- name: "bundler3",
1489
- type: "address",
1490
- internalType: "address",
1491
- },
1492
- {
1493
- name: "morpho",
1494
- type: "address",
1495
- internalType: "address",
1496
- },
1497
- {
1498
- name: "augustusRegistry",
1499
- type: "address",
1500
- internalType: "address",
1501
- },
1502
- ],
1503
- stateMutability: "nonpayable",
1504
- },
1505
- {
1506
- type: "function",
1507
- name: "AUGUSTUS_REGISTRY",
1508
- inputs: [],
1509
- outputs: [
1510
- {
1511
- name: "",
1512
- type: "address",
1513
- internalType: "contract IAugustusRegistry",
1514
- },
1515
- ],
1516
- stateMutability: "view",
1517
- },
1518
- {
1519
- type: "function",
1520
- name: "MORPHO",
1521
- inputs: [],
1522
- outputs: [
1523
- {
1524
- name: "",
1525
- type: "address",
1526
- internalType: "contract IMorpho",
1527
- },
1528
- ],
1529
- stateMutability: "view",
1530
- },
1531
- {
1532
- type: "function",
1533
- name: "buy",
1534
- inputs: [
1535
- {
1536
- name: "augustus",
1537
- type: "address",
1538
- internalType: "address",
1539
- },
1540
- {
1541
- name: "callData",
1542
- type: "bytes",
1543
- internalType: "bytes",
1544
- },
1545
- {
1546
- name: "srcToken",
1547
- type: "address",
1548
- internalType: "address",
1549
- },
1550
- {
1551
- name: "destToken",
1552
- type: "address",
1553
- internalType: "address",
1554
- },
1555
- {
1556
- name: "newDestAmount",
1557
- type: "uint256",
1558
- internalType: "uint256",
1559
- },
1560
- {
1561
- name: "offsets",
1562
- type: "tuple",
1563
- internalType: "struct Offsets",
1564
- components: [
1565
- {
1566
- name: "exactAmount",
1567
- type: "uint256",
1568
- internalType: "uint256",
1569
- },
1570
- {
1571
- name: "limitAmount",
1572
- type: "uint256",
1573
- internalType: "uint256",
1574
- },
1575
- {
1576
- name: "quotedAmount",
1577
- type: "uint256",
1578
- internalType: "uint256",
1579
- },
1580
- ],
1581
- },
1582
- {
1583
- name: "receiver",
1584
- type: "address",
1585
- internalType: "address",
1586
- },
1587
- ],
1588
- outputs: [],
1589
- stateMutability: "nonpayable",
1590
- },
1591
- {
1592
- type: "function",
1593
- name: "buyMorphoDebt",
1594
- inputs: [
1595
- {
1596
- name: "augustus",
1597
- type: "address",
1598
- internalType: "address",
1599
- },
1600
- {
1601
- name: "callData",
1602
- type: "bytes",
1603
- internalType: "bytes",
1604
- },
1605
- {
1606
- name: "srcToken",
1607
- type: "address",
1608
- internalType: "address",
1609
- },
1610
- {
1611
- name: "marketParams",
1612
- type: "tuple",
1613
- internalType: "struct MarketParams",
1614
- components: [
1615
- {
1616
- name: "loanToken",
1617
- type: "address",
1618
- internalType: "address",
1619
- },
1620
- {
1621
- name: "collateralToken",
1622
- type: "address",
1623
- internalType: "address",
1624
- },
1625
- {
1626
- name: "oracle",
1627
- type: "address",
1628
- internalType: "address",
1629
- },
1630
- {
1631
- name: "irm",
1632
- type: "address",
1633
- internalType: "address",
1634
- },
1635
- {
1636
- name: "lltv",
1637
- type: "uint256",
1638
- internalType: "uint256",
1639
- },
1640
- ],
1641
- },
1642
- {
1643
- name: "offsets",
1644
- type: "tuple",
1645
- internalType: "struct Offsets",
1646
- components: [
1647
- {
1648
- name: "exactAmount",
1649
- type: "uint256",
1650
- internalType: "uint256",
1651
- },
1652
- {
1653
- name: "limitAmount",
1654
- type: "uint256",
1655
- internalType: "uint256",
1656
- },
1657
- {
1658
- name: "quotedAmount",
1659
- type: "uint256",
1660
- internalType: "uint256",
1661
- },
1662
- ],
1663
- },
1664
- {
1665
- name: "onBehalf",
1666
- type: "address",
1667
- internalType: "address",
1668
- },
1669
- {
1670
- name: "receiver",
1671
- type: "address",
1672
- internalType: "address",
1673
- },
1674
- ],
1675
- outputs: [],
1676
- stateMutability: "nonpayable",
1677
- },
1678
- {
1679
- type: "function",
1680
- name: "sell",
1681
- inputs: [
1682
- {
1683
- name: "augustus",
1684
- type: "address",
1685
- internalType: "address",
1686
- },
1687
- {
1688
- name: "callData",
1689
- type: "bytes",
1690
- internalType: "bytes",
1691
- },
1692
- {
1693
- name: "srcToken",
1694
- type: "address",
1695
- internalType: "address",
1696
- },
1697
- {
1698
- name: "destToken",
1699
- type: "address",
1700
- internalType: "address",
1701
- },
1702
- {
1703
- name: "sellEntireBalance",
1704
- type: "bool",
1705
- internalType: "bool",
1706
- },
1707
- {
1708
- name: "offsets",
1709
- type: "tuple",
1710
- internalType: "struct Offsets",
1711
- components: [
1712
- {
1713
- name: "exactAmount",
1714
- type: "uint256",
1715
- internalType: "uint256",
1716
- },
1717
- {
1718
- name: "limitAmount",
1719
- type: "uint256",
1720
- internalType: "uint256",
1721
- },
1722
- {
1723
- name: "quotedAmount",
1724
- type: "uint256",
1725
- internalType: "uint256",
1726
- },
1727
- ],
1728
- },
1729
- {
1730
- name: "receiver",
1731
- type: "address",
1732
- internalType: "address",
1733
- },
1734
- ],
1735
- outputs: [],
1736
- stateMutability: "nonpayable",
1737
- },
1738
- {
1739
- type: "error",
1740
- name: "BuyAmountTooLow",
1741
- inputs: [],
1742
- },
1743
- {
1744
- type: "error",
1745
- name: "InvalidAugustus",
1746
- inputs: [],
1747
- },
1748
- {
1749
- type: "error",
1750
- name: "InvalidOffset",
1751
- inputs: [],
1752
- },
1753
- {
1754
- type: "error",
1755
- name: "SellAmountTooHigh",
1756
- inputs: [],
1757
- },
1758
- ];
1759
- /** ABI for the Bundler3 ERC20 wrapper adapter. */
1760
- export const erc20WrapperAdapterAbi = [
1761
- ...coreAdapterAbi,
1762
- {
1763
- type: "constructor",
1764
- inputs: [
1765
- {
1766
- name: "bundler3",
1767
- type: "address",
1768
- internalType: "address",
1769
- },
1770
- ],
1771
- stateMutability: "nonpayable",
1772
- },
1773
- {
1774
- type: "function",
1775
- name: "erc20WrapperDepositFor",
1776
- inputs: [
1777
- {
1778
- name: "wrapper",
1779
- type: "address",
1780
- internalType: "address",
1781
- },
1782
- {
1783
- name: "amount",
1784
- type: "uint256",
1785
- internalType: "uint256",
1786
- },
1787
- ],
1788
- outputs: [],
1789
- stateMutability: "nonpayable",
1790
- },
1791
- {
1792
- type: "function",
1793
- name: "erc20WrapperWithdrawTo",
1794
- inputs: [
1795
- {
1796
- name: "wrapper",
1797
- type: "address",
1798
- internalType: "address",
1799
- },
1800
- {
1801
- name: "receiver",
1802
- type: "address",
1803
- internalType: "address",
1804
- },
1805
- {
1806
- name: "amount",
1807
- type: "uint256",
1808
- internalType: "uint256",
1809
- },
1810
- ],
1811
- outputs: [],
1812
- stateMutability: "nonpayable",
1813
- },
1814
- {
1815
- type: "error",
1816
- name: "DepositFailed",
1817
- inputs: [],
1818
- },
1819
- {
1820
- type: "error",
1821
- name: "WithdrawFailed",
1822
- inputs: [],
1823
- },
1824
- ];
1825
- /** ABI for the Bundler3 Aave V2 migration adapter. */
1826
- export const aaveV2MigrationAdapterAbi = [
1827
- ...coreAdapterAbi,
1828
- {
1829
- type: "constructor",
1830
- inputs: [
1831
- {
1832
- name: "bundler3",
1833
- type: "address",
1834
- internalType: "address",
1835
- },
1836
- {
1837
- name: "aaveV2Pool",
1838
- type: "address",
1839
- internalType: "address",
1840
- },
1841
- ],
1842
- stateMutability: "nonpayable",
1843
- },
1844
- {
1845
- type: "function",
1846
- name: "aaveV2Repay",
1847
- inputs: [
1848
- {
1849
- name: "token",
1850
- type: "address",
1851
- internalType: "address",
1852
- },
1853
- {
1854
- name: "amount",
1855
- type: "uint256",
1856
- internalType: "uint256",
1857
- },
1858
- {
1859
- name: "interestRateMode",
1860
- type: "uint256",
1861
- internalType: "uint256",
1862
- },
1863
- {
1864
- name: "onBehalf",
1865
- type: "address",
1866
- internalType: "address",
1867
- },
1868
- ],
1869
- outputs: [],
1870
- stateMutability: "nonpayable",
1871
- },
1872
- {
1873
- type: "function",
1874
- name: "aaveV2Withdraw",
1875
- inputs: [
1876
- {
1877
- name: "token",
1878
- type: "address",
1879
- internalType: "address",
1880
- },
1881
- {
1882
- name: "amount",
1883
- type: "uint256",
1884
- internalType: "uint256",
1885
- },
1886
- {
1887
- name: "receiver",
1888
- type: "address",
1889
- internalType: "address",
1890
- },
1891
- ],
1892
- outputs: [],
1893
- stateMutability: "nonpayable",
1894
- },
1895
- ];
1896
- /** ABI for the Bundler3 Aave V3 migration adapter. */
1897
- export const aaveV3MigrationAdapterAbi = [
1898
- ...coreAdapterAbi,
1899
- {
1900
- type: "constructor",
1901
- inputs: [
1902
- {
1903
- name: "bundler3",
1904
- type: "address",
1905
- internalType: "address",
1906
- },
1907
- {
1908
- name: "aaveV3Pool",
1909
- type: "address",
1910
- internalType: "address",
1911
- },
1912
- ],
1913
- stateMutability: "nonpayable",
1914
- },
1915
- {
1916
- type: "function",
1917
- name: "aaveV3Repay",
1918
- inputs: [
1919
- {
1920
- name: "token",
1921
- type: "address",
1922
- internalType: "address",
1923
- },
1924
- {
1925
- name: "amount",
1926
- type: "uint256",
1927
- internalType: "uint256",
1928
- },
1929
- {
1930
- name: "interestRateMode",
1931
- type: "uint256",
1932
- internalType: "uint256",
1933
- },
1934
- {
1935
- name: "onBehalf",
1936
- type: "address",
1937
- internalType: "address",
1938
- },
1939
- ],
1940
- outputs: [],
1941
- stateMutability: "nonpayable",
1942
- },
1943
- {
1944
- type: "function",
1945
- name: "aaveV3Withdraw",
1946
- inputs: [
1947
- {
1948
- name: "token",
1949
- type: "address",
1950
- internalType: "address",
1951
- },
1952
- {
1953
- name: "amount",
1954
- type: "uint256",
1955
- internalType: "uint256",
1956
- },
1957
- {
1958
- name: "receiver",
1959
- type: "address",
1960
- internalType: "address",
1961
- },
1962
- ],
1963
- outputs: [],
1964
- stateMutability: "nonpayable",
1965
- },
1966
- ];
1967
- /** ABI for the Bundler3 Aave V3 Optimizer migration adapter. */
1968
- export const aaveV3OptimizerMigrationAdapterAbi = [
1969
- ...coreAdapterAbi,
1970
- {
1971
- type: "constructor",
1972
- inputs: [
1973
- {
1974
- name: "bundler3",
1975
- type: "address",
1976
- internalType: "address",
1977
- },
1978
- {
1979
- name: "aaveV3Optimizer",
1980
- type: "address",
1981
- internalType: "address",
1982
- },
1983
- ],
1984
- stateMutability: "nonpayable",
1985
- },
1986
- {
1987
- type: "function",
1988
- name: "aaveV3OptimizerRepay",
1989
- inputs: [
1990
- {
1991
- name: "underlying",
1992
- type: "address",
1993
- internalType: "address",
1994
- },
1995
- {
1996
- name: "amount",
1997
- type: "uint256",
1998
- internalType: "uint256",
1999
- },
2000
- {
2001
- name: "onBehalf",
2002
- type: "address",
2003
- internalType: "address",
2004
- },
2005
- ],
2006
- outputs: [],
2007
- stateMutability: "nonpayable",
2008
- },
2009
- {
2010
- type: "function",
2011
- name: "aaveV3OptimizerWithdraw",
2012
- inputs: [
2013
- {
2014
- name: "underlying",
2015
- type: "address",
2016
- internalType: "address",
2017
- },
2018
- {
2019
- name: "amount",
2020
- type: "uint256",
2021
- internalType: "uint256",
2022
- },
2023
- {
2024
- name: "maxIterations",
2025
- type: "uint256",
2026
- internalType: "uint256",
2027
- },
2028
- {
2029
- name: "receiver",
2030
- type: "address",
2031
- internalType: "address",
2032
- },
2033
- ],
2034
- outputs: [],
2035
- stateMutability: "nonpayable",
2036
- },
2037
- {
2038
- type: "function",
2039
- name: "aaveV3OptimizerWithdrawCollateral",
2040
- inputs: [
2041
- {
2042
- name: "underlying",
2043
- type: "address",
2044
- internalType: "address",
2045
- },
2046
- {
2047
- name: "amount",
2048
- type: "uint256",
2049
- internalType: "uint256",
2050
- },
2051
- {
2052
- name: "receiver",
2053
- type: "address",
2054
- internalType: "address",
2055
- },
2056
- ],
2057
- outputs: [],
2058
- stateMutability: "nonpayable",
2059
- },
2060
- ];
2061
- /** ABI for the Bundler3 Compound V2 migration adapter. */
2062
- export const compoundV2MigrationAdapterAbi = [
2063
- ...coreAdapterAbi,
2064
- {
2065
- type: "constructor",
2066
- inputs: [
2067
- {
2068
- name: "bundler3",
2069
- type: "address",
2070
- internalType: "address",
2071
- },
2072
- {
2073
- name: "cEth",
2074
- type: "address",
2075
- internalType: "address",
2076
- },
2077
- ],
2078
- stateMutability: "nonpayable",
2079
- },
2080
- {
2081
- type: "function",
2082
- name: "C_ETH",
2083
- inputs: [],
2084
- outputs: [
2085
- {
2086
- name: "",
2087
- type: "address",
2088
- internalType: "address",
2089
- },
2090
- ],
2091
- stateMutability: "view",
2092
- },
2093
- {
2094
- type: "function",
2095
- name: "compoundV2RedeemErc20",
2096
- inputs: [
2097
- {
2098
- name: "cToken",
2099
- type: "address",
2100
- internalType: "address",
2101
- },
2102
- {
2103
- name: "amount",
2104
- type: "uint256",
2105
- internalType: "uint256",
2106
- },
2107
- {
2108
- name: "receiver",
2109
- type: "address",
2110
- internalType: "address",
2111
- },
2112
- ],
2113
- outputs: [],
2114
- stateMutability: "nonpayable",
2115
- },
2116
- {
2117
- type: "function",
2118
- name: "compoundV2RedeemEth",
2119
- inputs: [
2120
- {
2121
- name: "amount",
2122
- type: "uint256",
2123
- internalType: "uint256",
2124
- },
2125
- {
2126
- name: "receiver",
2127
- type: "address",
2128
- internalType: "address",
2129
- },
2130
- ],
2131
- outputs: [],
2132
- stateMutability: "nonpayable",
2133
- },
2134
- {
2135
- type: "function",
2136
- name: "compoundV2RepayErc20",
2137
- inputs: [
2138
- {
2139
- name: "cToken",
2140
- type: "address",
2141
- internalType: "address",
2142
- },
2143
- {
2144
- name: "amount",
2145
- type: "uint256",
2146
- internalType: "uint256",
2147
- },
2148
- {
2149
- name: "onBehalf",
2150
- type: "address",
2151
- internalType: "address",
2152
- },
2153
- ],
2154
- outputs: [],
2155
- stateMutability: "nonpayable",
2156
- },
2157
- {
2158
- type: "function",
2159
- name: "compoundV2RepayEth",
2160
- inputs: [
2161
- {
2162
- name: "amount",
2163
- type: "uint256",
2164
- internalType: "uint256",
2165
- },
2166
- {
2167
- name: "onBehalf",
2168
- type: "address",
2169
- internalType: "address",
2170
- },
2171
- ],
2172
- outputs: [],
2173
- stateMutability: "nonpayable",
2174
- },
2175
- ];
2176
- /** ABI for the Bundler3 Compound V3 migration adapter. */
2177
- export const compoundV3MigrationAdapterAbi = [
2178
- ...coreAdapterAbi,
2179
- {
2180
- type: "constructor",
2181
- inputs: [
2182
- {
2183
- name: "bundler3",
2184
- type: "address",
2185
- internalType: "address",
2186
- },
2187
- ],
2188
- stateMutability: "nonpayable",
2189
- },
2190
- {
2191
- type: "function",
2192
- name: "compoundV3Repay",
2193
- inputs: [
2194
- {
2195
- name: "instance",
2196
- type: "address",
2197
- internalType: "address",
2198
- },
2199
- {
2200
- name: "amount",
2201
- type: "uint256",
2202
- internalType: "uint256",
2203
- },
2204
- {
2205
- name: "onBehalf",
2206
- type: "address",
2207
- internalType: "address",
2208
- },
2209
- ],
2210
- outputs: [],
2211
- stateMutability: "nonpayable",
2212
- },
2213
- {
2214
- type: "function",
2215
- name: "compoundV3WithdrawFrom",
2216
- inputs: [
2217
- {
2218
- name: "instance",
2219
- type: "address",
2220
- internalType: "address",
2221
- },
2222
- {
2223
- name: "asset",
2224
- type: "address",
2225
- internalType: "address",
2226
- },
2227
- {
2228
- name: "amount",
2229
- type: "uint256",
2230
- internalType: "uint256",
2231
- },
2232
- {
2233
- name: "receiver",
2234
- type: "address",
2235
- internalType: "address",
2236
- },
2237
- ],
2238
- outputs: [],
2239
- stateMutability: "nonpayable",
2240
- },
2241
- ];
2242
310
  /**
2243
311
  * Pinned ABI JSON for the five BlueBundlesV1 entrypoints used by high-level Morpho Blue writes.
2244
312
  *