@morpho-org/morpho-sdk 2.0.0 → 3.0.0

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