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