@morpho-org/morpho-sdk 5.4.1 → 5.5.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.
- package/README.md +15 -1
- package/lib/cjs/abis.d.ts +313 -0
- package/lib/cjs/abis.js +167 -1
- package/lib/cjs/actions/requirements/encode/encodeErc20Approval.d.ts +1 -1
- package/lib/cjs/actions/requirements/encode/encodeErc20Approval.js +9 -2
- package/lib/cjs/actions/requirements/encode/encodeVaultSharesPermit.d.ts +64 -0
- package/lib/cjs/actions/requirements/encode/encodeVaultSharesPermit.js +131 -0
- package/lib/cjs/actions/requirements/encode/index.d.ts +1 -0
- package/lib/cjs/actions/requirements/encode/index.js +1 -0
- package/lib/cjs/actions/requirements/getRequirementsApproval.d.ts +3 -2
- package/lib/cjs/actions/requirements/getRequirementsApproval.js +3 -2
- package/lib/cjs/actions/signatures/getVaultExitBundlesV1PermitStruct.d.ts +52 -0
- package/lib/cjs/actions/signatures/getVaultExitBundlesV1PermitStruct.js +91 -0
- package/lib/cjs/actions/signatures/index.d.ts +1 -0
- package/lib/cjs/actions/signatures/index.js +1 -0
- package/lib/cjs/actions/vaultV1/inKindRedeem.d.ts +54 -0
- package/lib/cjs/actions/vaultV1/inKindRedeem.js +96 -0
- package/lib/cjs/actions/vaultV1/index.d.ts +1 -0
- package/lib/cjs/actions/vaultV1/index.js +1 -0
- package/lib/cjs/actions/vaultV2/inKindRedeem.d.ts +56 -0
- package/lib/cjs/actions/vaultV2/inKindRedeem.js +97 -0
- package/lib/cjs/actions/vaultV2/index.d.ts +1 -0
- package/lib/cjs/actions/vaultV2/index.js +1 -0
- package/lib/cjs/bundler/actions.d.ts +1 -2
- package/lib/cjs/bundler/actions.js +1 -2
- package/lib/cjs/entities/blue/blue.d.ts +8 -8
- package/lib/cjs/entities/reallocationData.d.ts +1 -2
- package/lib/cjs/entities/reallocationData.js +1 -2
- package/lib/cjs/entities/vaultV1/vaultV1.d.ts +82 -4
- package/lib/cjs/entities/vaultV1/vaultV1.js +164 -0
- package/lib/cjs/entities/vaultV2/vaultV2.d.ts +89 -3
- package/lib/cjs/entities/vaultV2/vaultV2.js +181 -0
- package/lib/cjs/helpers/index.d.ts +1 -0
- package/lib/cjs/helpers/index.js +3 -1
- package/lib/cjs/helpers/previewVaultV2InKindRedeem.d.ts +49 -0
- package/lib/cjs/helpers/previewVaultV2InKindRedeem.js +73 -0
- package/lib/cjs/helpers/validate.d.ts +1 -1
- package/lib/cjs/helpers/validateRequirementSpender.d.ts +1 -1
- package/lib/cjs/helpers/validateRequirementSpender.js +2 -1
- package/lib/cjs/types/action.d.ts +21 -1
- package/lib/cjs/types/error.d.ts +139 -0
- package/lib/cjs/types/error.js +189 -2
- package/lib/esm/abis.d.ts +313 -0
- package/lib/esm/abis.js +166 -0
- package/lib/esm/actions/requirements/encode/encodeErc20Approval.d.ts +1 -1
- package/lib/esm/actions/requirements/encode/encodeErc20Approval.js +9 -2
- package/lib/esm/actions/requirements/encode/encodeVaultSharesPermit.d.ts +64 -0
- package/lib/esm/actions/requirements/encode/encodeVaultSharesPermit.js +127 -0
- package/lib/esm/actions/requirements/encode/index.d.ts +1 -0
- package/lib/esm/actions/requirements/encode/index.js +1 -0
- package/lib/esm/actions/requirements/getRequirementsApproval.d.ts +3 -2
- package/lib/esm/actions/requirements/getRequirementsApproval.js +3 -2
- package/lib/esm/actions/signatures/getVaultExitBundlesV1PermitStruct.d.ts +52 -0
- package/lib/esm/actions/signatures/getVaultExitBundlesV1PermitStruct.js +87 -0
- package/lib/esm/actions/signatures/index.d.ts +1 -0
- package/lib/esm/actions/signatures/index.js +1 -0
- package/lib/esm/actions/vaultV1/inKindRedeem.d.ts +54 -0
- package/lib/esm/actions/vaultV1/inKindRedeem.js +92 -0
- package/lib/esm/actions/vaultV1/index.d.ts +1 -0
- package/lib/esm/actions/vaultV1/index.js +1 -0
- package/lib/esm/actions/vaultV2/inKindRedeem.d.ts +56 -0
- package/lib/esm/actions/vaultV2/inKindRedeem.js +93 -0
- package/lib/esm/actions/vaultV2/index.d.ts +1 -0
- package/lib/esm/actions/vaultV2/index.js +1 -0
- package/lib/esm/bundler/actions.d.ts +1 -2
- package/lib/esm/bundler/actions.js +1 -2
- package/lib/esm/entities/blue/blue.d.ts +5 -5
- package/lib/esm/entities/reallocationData.d.ts +1 -2
- package/lib/esm/entities/reallocationData.js +1 -2
- package/lib/esm/entities/vaultV1/vaultV1.d.ts +80 -2
- package/lib/esm/entities/vaultV1/vaultV1.js +170 -6
- package/lib/esm/entities/vaultV2/vaultV2.d.ts +88 -2
- package/lib/esm/entities/vaultV2/vaultV2.js +187 -6
- package/lib/esm/helpers/index.d.ts +1 -0
- package/lib/esm/helpers/index.js +1 -0
- package/lib/esm/helpers/previewVaultV2InKindRedeem.d.ts +49 -0
- package/lib/esm/helpers/previewVaultV2InKindRedeem.js +70 -0
- package/lib/esm/helpers/validate.d.ts +1 -1
- package/lib/esm/helpers/validateRequirementSpender.d.ts +1 -1
- package/lib/esm/helpers/validateRequirementSpender.js +2 -1
- package/lib/esm/types/action.d.ts +21 -1
- package/lib/esm/types/error.d.ts +139 -0
- package/lib/esm/types/error.js +175 -0
- package/package.json +9 -11
package/lib/cjs/types/error.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
3
|
+
exports.DepositAssetMismatchError = exports.DepositAmountMismatchError = exports.EmptyDeallocationsError = exports.ExcessiveSlippageToleranceError = exports.MissingAccrualPositionError = exports.UnsupportedMidnightAuthorizationTargetError = exports.UnsupportedErc20ApprovalSpenderError = exports.ApprovalAmountLessThanSpendAmountError = exports.MissingClientPropertyError = exports.CryptoUnavailableError = exports.ChainIdMismatchError = exports.AddressMismatchError = exports.UnexpectedRequirementSignatureError = exports.AmbiguousRequirementSignaturesError = exports.BundlerErrors = exports.NegativeMaxRepaySharePriceError = exports.NegativeBorrowSharesError = exports.NegativeMinSharePriceError = exports.NegativeWithdrawMinSharePriceError = exports.NegativeSupplyMaxSharePriceError = exports.NegativeSupplyAmountError = exports.NonPositiveMinBorrowSharePriceError = exports.NegativeReallocationFeeError = exports.NegativeNativeAmountError = exports.NegativeSlippageToleranceError = exports.NonPositiveWithdrawAmountError = exports.ZeroSupplyAmountError = exports.NonPositiveWithdrawCollateralAmountError = exports.NonPositiveRepayMaxSharePriceError = exports.NonPositiveRepayAmountError = exports.NonPositiveReallocationAmountError = exports.ZeroCollateralAmountError = exports.NonPositiveBorrowAmountError = exports.ZeroDepositAmountError = exports.NonPositiveMaxSharePriceError = exports.NonPositiveSharesAmountError = exports.NonPositiveAssetAmountError = exports.VaultExitBundlesV1PermitMismatchError = exports.VaultIsBlueFeeRecipientError = exports.VaultMorphoMismatchError = exports.InsufficientBlueBalanceForInKindRedeemError = exports.InKindRedeemCoverageError = exports.InKindRedeemZeroDeallocationError = exports.UnsupportedInKindAdapterError = exports.AdapterNotPartOfVaultError = exports.InKindRedeemRequiresSingleAdapterError = exports.ExpiredDeadlineError = exports.EmptyMarketParamsListError = exports.NonPositiveInputError = exports.NegativeInputError = void 0;
|
|
4
|
+
exports.MutuallyExclusiveWithdrawAmountsError = exports.InsufficientMidnightWithdrawableLiquidityError = exports.MidnightRedeemExceedsCreditError = exports.NoMidnightCreditToRedeemError = exports.UnpreparedMidnightOfferRootSignatureError = exports.MidnightOfferRootOfferCountMismatchError = exports.MidnightOfferRootRatifierMismatchError = exports.MidnightOfferRootOwnerMismatchError = exports.MidnightOfferRootMismatchError = exports.MissingMidnightOfferRootSignatureError = exports.UnknownMidnightRatifierError = exports.MidnightTakeableOfferMarketMismatchError = exports.MidnightOfferMarketLoanTokenMismatchError = exports.MidnightMarketAddressMismatchError = exports.MidnightOfferMarketAddressMismatchError = exports.MidnightOfferMarketChainMismatchError = exports.MidnightOfferMakerMismatchError = exports.MidnightOfferSideMismatchError = exports.EmptyMidnightTakeableOffersError = exports.MidnightAmountExceedsMaxOfferCapError = exports.UnknownReallocationPositionError = exports.UnknownReallocationVaultMarketConfigError = exports.UnknownReallocationVaultError = exports.UnknownReallocationMarketError = exports.InsufficientSharedLiquidityError = exports.DisabledReallocationMarketError = exports.MissingPublicAllocatorConfigError = exports.RepaySharesExceedDebtError = exports.InvalidSignatureError = exports.RepayExceedsDebtError = exports.ShareDivideByZeroError = exports.WithdrawMakesPositionUnhealthyError = exports.WithdrawExceedsCollateralError = exports.MutuallyExclusiveRepayAmountsError = exports.TransferAmountNotEqualToAssetsError = exports.UnsortedReallocationWithdrawalsError = exports.ReallocationWithdrawalOnTargetMarketError = exports.EmptyReallocationWithdrawalsError = exports.AccrualPositionUserMismatchError = exports.MarketIdMismatchError = exports.MissingMarketPriceError = exports.BorrowExceedsSafeLtvError = exports.NativeAmountOnNonWNativeCollateralError = exports.NativeAmountOnNonWNativeAssetError = exports.VaultAddressMismatchError = exports.ChainWNativeMissingError = exports.NativeAmountOnNonWNativeVaultError = exports.Permit2ExpirationMissingError = exports.DepositSpenderMismatchError = exports.DepositOwnerMismatchError = void 0;
|
|
5
|
+
exports.RefinanceSharesMissingBorrowAssetsError = exports.RefinanceExceedsBorrowAssetsError = exports.RefinanceExceedsBorrowSharesError = exports.RefinanceExceedsCollateralError = exports.RefinanceTokenMismatchError = exports.RefinanceSameMarketError = exports.BorrowAmountAndSharesExclusiveError = exports.VaultAssetMismatchError = exports.ReallocationWithdrawExceedsMarketSupplyError = exports.WithdrawSharesExceedSupplyError = exports.WithdrawExceedsSupplyError = void 0;
|
|
5
6
|
const blue_sdk_1 = require("@morpho-org/blue-sdk");
|
|
6
7
|
/**
|
|
7
8
|
* Thrown when a morpho-sdk input that must be non-negative is negative.
|
|
@@ -59,6 +60,192 @@ class NonPositiveInputError extends Error {
|
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
62
|
exports.NonPositiveInputError = NonPositiveInputError;
|
|
63
|
+
/** Thrown when an in-kind redemption does not include any Morpho Blue market parameters. */
|
|
64
|
+
class EmptyMarketParamsListError extends Error {
|
|
65
|
+
constructor() {
|
|
66
|
+
super("Market parameters list cannot be empty. Include enough ordered vault markets to cover the in-kind redemption.");
|
|
67
|
+
this.name = "EmptyMarketParamsListError";
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
exports.EmptyMarketParamsListError = EmptyMarketParamsListError;
|
|
71
|
+
/** Thrown when an in-kind redemption deadline has already passed. */
|
|
72
|
+
class ExpiredDeadlineError extends Error {
|
|
73
|
+
deadline;
|
|
74
|
+
timestamp;
|
|
75
|
+
/**
|
|
76
|
+
* @param deadline - Expired deadline supplied by the caller.
|
|
77
|
+
* @param timestamp - Current timestamp used for validation.
|
|
78
|
+
*/
|
|
79
|
+
constructor(deadline, timestamp) {
|
|
80
|
+
super(`Deadline "${deadline}" has expired at timestamp "${timestamp}". Choose a future deadline and rebuild the exit.`);
|
|
81
|
+
this.deadline = deadline;
|
|
82
|
+
this.timestamp = timestamp;
|
|
83
|
+
this.name = "ExpiredDeadlineError";
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
exports.ExpiredDeadlineError = ExpiredDeadlineError;
|
|
87
|
+
/** Thrown when Vault V2 in-kind redemption is attempted with anything other than one adapter. */
|
|
88
|
+
class InKindRedeemRequiresSingleAdapterError extends Error {
|
|
89
|
+
vault;
|
|
90
|
+
adapters;
|
|
91
|
+
/**
|
|
92
|
+
* @param vault - Vault V2 address.
|
|
93
|
+
* @param adapters - Number of adapters in the supplied vault snapshot.
|
|
94
|
+
*/
|
|
95
|
+
constructor(vault, adapters) {
|
|
96
|
+
super(`Vault "${vault}" has "${adapters}" adapters. In-kind redemption requires exactly one MorphoMarketV1AdapterV2.`);
|
|
97
|
+
this.vault = vault;
|
|
98
|
+
this.adapters = adapters;
|
|
99
|
+
this.name = "InKindRedeemRequiresSingleAdapterError";
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
exports.InKindRedeemRequiresSingleAdapterError = InKindRedeemRequiresSingleAdapterError;
|
|
103
|
+
/** Thrown when a requested in-kind redemption adapter is not part of the Vault V2 snapshot. */
|
|
104
|
+
class AdapterNotPartOfVaultError extends Error {
|
|
105
|
+
vault;
|
|
106
|
+
adapter;
|
|
107
|
+
/**
|
|
108
|
+
* @param vault - Vault V2 address.
|
|
109
|
+
* @param adapter - Adapter rejected by the vault snapshot.
|
|
110
|
+
*/
|
|
111
|
+
constructor(vault, adapter) {
|
|
112
|
+
super(`Adapter "${adapter}" is not part of vault "${vault}". Use the vault's sole configured adapter.`);
|
|
113
|
+
this.vault = vault;
|
|
114
|
+
this.adapter = adapter;
|
|
115
|
+
this.name = "AdapterNotPartOfVaultError";
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
exports.AdapterNotPartOfVaultError = AdapterNotPartOfVaultError;
|
|
119
|
+
/** Thrown when the Vault V2 adapter cannot expose MorphoMarketV1AdapterV2 market shares. */
|
|
120
|
+
class UnsupportedInKindAdapterError extends Error {
|
|
121
|
+
adapter;
|
|
122
|
+
/**
|
|
123
|
+
* @param adapter - Unsupported Vault V2 adapter address.
|
|
124
|
+
*/
|
|
125
|
+
constructor(adapter) {
|
|
126
|
+
super(`Adapter "${adapter}" does not support Vault V2 in-kind redemption. Use a MorphoMarketV1AdapterV2-backed vault.`);
|
|
127
|
+
this.adapter = adapter;
|
|
128
|
+
this.name = "UnsupportedInKindAdapterError";
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
exports.UnsupportedInKindAdapterError = UnsupportedInKindAdapterError;
|
|
132
|
+
/** Thrown when a Vault V2 in-kind redemption rounds to no deallocated assets. */
|
|
133
|
+
class InKindRedeemZeroDeallocationError extends Error {
|
|
134
|
+
/**
|
|
135
|
+
* @param params - Values that caused the exit to round to zero deallocated assets.
|
|
136
|
+
* @param params.vault - Vault V2 address with no idle assets available for the exit.
|
|
137
|
+
* @param params.amount - Positive penalty-inclusive amount requested by the caller.
|
|
138
|
+
* @param params.penalty - WAD-scaled force-deallocation penalty applied by the adapter.
|
|
139
|
+
*/
|
|
140
|
+
vault;
|
|
141
|
+
amount;
|
|
142
|
+
penalty;
|
|
143
|
+
constructor(params) {
|
|
144
|
+
super(`Vault "${params.vault}" has no idle assets, and in-kind redemption amount "${params.amount}" rounds to zero deallocated assets after applying penalty "${params.penalty}". Increase the amount or use another exit path.`);
|
|
145
|
+
this.vault = params.vault;
|
|
146
|
+
this.amount = params.amount;
|
|
147
|
+
this.penalty = params.penalty;
|
|
148
|
+
this.name = "InKindRedeemZeroDeallocationError";
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
exports.InKindRedeemZeroDeallocationError = InKindRedeemZeroDeallocationError;
|
|
152
|
+
/** Thrown when the ordered market list cannot cover the requested in-kind redemption. */
|
|
153
|
+
class InKindRedeemCoverageError extends Error {
|
|
154
|
+
/**
|
|
155
|
+
* @param params - Coverage values used to explain the rejected exit.
|
|
156
|
+
* @param params.required - Assets that must be deallocated from listed markets.
|
|
157
|
+
* @param params.covered - Assets covered by the supplied market list.
|
|
158
|
+
* @param params.maxExitAssets - Largest penalty-inclusive exit supported by the list.
|
|
159
|
+
*/
|
|
160
|
+
required;
|
|
161
|
+
covered;
|
|
162
|
+
maxExitAssets;
|
|
163
|
+
constructor(params) {
|
|
164
|
+
super(`In-kind redemption requires "${params.required}" assets but the market list covers "${params.covered}". Reduce the amount to at most "${params.maxExitAssets}" or include more vault markets.`);
|
|
165
|
+
this.required = params.required;
|
|
166
|
+
this.covered = params.covered;
|
|
167
|
+
this.maxExitAssets = params.maxExitAssets;
|
|
168
|
+
this.name = "InKindRedeemCoverageError";
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
exports.InKindRedeemCoverageError = InKindRedeemCoverageError;
|
|
172
|
+
/** Thrown when Morpho Blue lacks the physical loan-token balance needed during an exit callback. */
|
|
173
|
+
class InsufficientBlueBalanceForInKindRedeemError extends Error {
|
|
174
|
+
/**
|
|
175
|
+
* @param params - Morpho Blue balance values used to explain the rejected exit.
|
|
176
|
+
* @param params.asset - Loan token required by the exit.
|
|
177
|
+
* @param params.available - Current token balance held by Morpho Blue.
|
|
178
|
+
* @param params.required - Peak token balance required by the exit.
|
|
179
|
+
*/
|
|
180
|
+
asset;
|
|
181
|
+
available;
|
|
182
|
+
required;
|
|
183
|
+
constructor(params) {
|
|
184
|
+
super(`Morpho Blue holds "${params.available}" of asset "${params.asset}", but this in-kind redemption requires "${params.required}" during its callback. Reduce the amount or wait for Blue liquidity.`);
|
|
185
|
+
this.asset = params.asset;
|
|
186
|
+
this.available = params.available;
|
|
187
|
+
this.required = params.required;
|
|
188
|
+
this.name = "InsufficientBlueBalanceForInKindRedeemError";
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
exports.InsufficientBlueBalanceForInKindRedeemError = InsufficientBlueBalanceForInKindRedeemError;
|
|
192
|
+
/** Thrown when a MetaMorpho vault is connected to a different Morpho deployment. */
|
|
193
|
+
class VaultMorphoMismatchError extends Error {
|
|
194
|
+
/**
|
|
195
|
+
* @param params - Vault and Morpho addresses used to explain the mismatch.
|
|
196
|
+
* @param params.vault - MetaMorpho vault address.
|
|
197
|
+
* @param params.expected - Morpho Blue address expected for the target chain.
|
|
198
|
+
* @param params.actual - Morpho address returned by the vault.
|
|
199
|
+
*/
|
|
200
|
+
vault;
|
|
201
|
+
expected;
|
|
202
|
+
actual;
|
|
203
|
+
constructor(params) {
|
|
204
|
+
super(`Vault "${params.vault}" uses Morpho "${params.actual}", expected "${params.expected}". Use vault data from the selected chain.`);
|
|
205
|
+
this.vault = params.vault;
|
|
206
|
+
this.expected = params.expected;
|
|
207
|
+
this.actual = params.actual;
|
|
208
|
+
this.name = "VaultMorphoMismatchError";
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
exports.VaultMorphoMismatchError = VaultMorphoMismatchError;
|
|
212
|
+
/** Thrown when a Vault V1 is Morpho Blue's fee recipient and cannot safely redeem in kind. */
|
|
213
|
+
class VaultIsBlueFeeRecipientError extends Error {
|
|
214
|
+
vault;
|
|
215
|
+
blue;
|
|
216
|
+
/**
|
|
217
|
+
* @param vault - Unsupported Vault V1 address.
|
|
218
|
+
* @param blue - Morpho Blue deployment whose fees accrue to the vault.
|
|
219
|
+
*/
|
|
220
|
+
constructor(vault, blue) {
|
|
221
|
+
super(`Vault "${vault}" is Morpho Blue "${blue}"'s fee recipient. Use another exit path because VaultExitBundlesV1 cannot safely account for the vault's accrued fee shares.`);
|
|
222
|
+
this.vault = vault;
|
|
223
|
+
this.blue = blue;
|
|
224
|
+
this.name = "VaultIsBlueFeeRecipientError";
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
exports.VaultIsBlueFeeRecipientError = VaultIsBlueFeeRecipientError;
|
|
228
|
+
/** Thrown when a vault-shares requirement cannot be safely encoded as an ERC-2612 permit. */
|
|
229
|
+
class VaultExitBundlesV1PermitMismatchError extends Error {
|
|
230
|
+
/**
|
|
231
|
+
* @param params - Permit mismatch values used to explain the rejection.
|
|
232
|
+
* @param params.field - Permit field that does not match the exit.
|
|
233
|
+
* @param params.expected - Value required by the exit.
|
|
234
|
+
* @param params.actual - Value supplied by the signature.
|
|
235
|
+
* @param params.cause - Original parser failure when signature decoding is wrapped.
|
|
236
|
+
*/
|
|
237
|
+
field;
|
|
238
|
+
expected;
|
|
239
|
+
actual;
|
|
240
|
+
constructor(params) {
|
|
241
|
+
super(`VaultExitBundlesV1 permit ${params.field} mismatch: expected "${params.expected}", got "${params.actual}". Rebuild and sign the vault-exit permit.`, { cause: params.cause });
|
|
242
|
+
this.field = params.field;
|
|
243
|
+
this.expected = params.expected;
|
|
244
|
+
this.actual = params.actual;
|
|
245
|
+
this.name = "VaultExitBundlesV1PermitMismatchError";
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
exports.VaultExitBundlesV1PermitMismatchError = VaultExitBundlesV1PermitMismatchError;
|
|
62
249
|
/** @deprecated Use {@link NonPositiveInputError}. */
|
|
63
250
|
exports.NonPositiveAssetAmountError = NonPositiveInputError;
|
|
64
251
|
/** @deprecated Use {@link NonPositiveInputError}. */
|
package/lib/esm/abis.d.ts
CHANGED
|
@@ -1,6 +1,319 @@
|
|
|
1
1
|
export { marketParamsAbi } from "@morpho-org/blue-sdk";
|
|
2
2
|
export { adaptiveCurveIrmAbi, blueAbi, blueOracleAbi, erc2612Abi, erc5267Abi, metaMorphoAbi, metaMorphoFactoryAbi, morphoMarketV1AdapterAbi, morphoMarketV1AdapterFactoryAbi, morphoMarketV1AdapterV2Abi, morphoMarketV1AdapterV2FactoryAbi, morphoVaultV1AdapterAbi, morphoVaultV1AdapterFactoryAbi, permissionedErc20WrapperAbi, permit2Abi, preLiquidationAbi, preLiquidationFactoryAbi, publicAllocatorAbi, vaultV1AdapterAbi, vaultV1AdapterFactoryAbi, vaultV2Abi, vaultV2FactoryAbi, whitelistControllerAggregatorV2Abi, wrappedBackedTokenAbi, wstEthAbi, } from "@morpho-org/blue-sdk-viem";
|
|
3
3
|
export { ecrecoverRatifierAbi, midnightAbi, midnightBundlesAbi, setterRatifierAbi, } from "@morpho-org/midnight-sdk";
|
|
4
|
+
/** ABI for the VaultExitBundlesV1 periphery contract. */
|
|
5
|
+
export declare const vaultExitBundlesV1Abi: readonly [{
|
|
6
|
+
readonly type: "constructor";
|
|
7
|
+
readonly inputs: readonly [{
|
|
8
|
+
readonly name: "_blue";
|
|
9
|
+
readonly type: "address";
|
|
10
|
+
readonly internalType: "address";
|
|
11
|
+
}];
|
|
12
|
+
readonly stateMutability: "nonpayable";
|
|
13
|
+
}, {
|
|
14
|
+
readonly type: "error";
|
|
15
|
+
readonly name: "AdapterNotPartOfVault";
|
|
16
|
+
readonly inputs: readonly [];
|
|
17
|
+
}, {
|
|
18
|
+
readonly type: "error";
|
|
19
|
+
readonly name: "AlreadyInitiated";
|
|
20
|
+
readonly inputs: readonly [];
|
|
21
|
+
}, {
|
|
22
|
+
readonly type: "error";
|
|
23
|
+
readonly name: "ApproveReturnedFalse";
|
|
24
|
+
readonly inputs: readonly [];
|
|
25
|
+
}, {
|
|
26
|
+
readonly type: "error";
|
|
27
|
+
readonly name: "DeadlinePassed";
|
|
28
|
+
readonly inputs: readonly [];
|
|
29
|
+
}, {
|
|
30
|
+
readonly type: "error";
|
|
31
|
+
readonly name: "InvalidAdaptersLength";
|
|
32
|
+
readonly inputs: readonly [];
|
|
33
|
+
}, {
|
|
34
|
+
readonly type: "error";
|
|
35
|
+
readonly name: "MorphoMismatch";
|
|
36
|
+
readonly inputs: readonly [];
|
|
37
|
+
}, {
|
|
38
|
+
readonly type: "error";
|
|
39
|
+
readonly name: "NoCode";
|
|
40
|
+
readonly inputs: readonly [];
|
|
41
|
+
}, {
|
|
42
|
+
readonly type: "error";
|
|
43
|
+
readonly name: "PctExceeded";
|
|
44
|
+
readonly inputs: readonly [];
|
|
45
|
+
}, {
|
|
46
|
+
readonly type: "error";
|
|
47
|
+
readonly name: "SlippageExceeded";
|
|
48
|
+
readonly inputs: readonly [];
|
|
49
|
+
}, {
|
|
50
|
+
readonly type: "error";
|
|
51
|
+
readonly name: "TransferReturnedFalse";
|
|
52
|
+
readonly inputs: readonly [];
|
|
53
|
+
}, {
|
|
54
|
+
readonly type: "error";
|
|
55
|
+
readonly name: "UnauthorizedCallback";
|
|
56
|
+
readonly inputs: readonly [];
|
|
57
|
+
}, {
|
|
58
|
+
readonly type: "function";
|
|
59
|
+
readonly name: "BLUE";
|
|
60
|
+
readonly inputs: readonly [];
|
|
61
|
+
readonly outputs: readonly [{
|
|
62
|
+
readonly name: "";
|
|
63
|
+
readonly type: "address";
|
|
64
|
+
readonly internalType: "address";
|
|
65
|
+
}];
|
|
66
|
+
readonly stateMutability: "view";
|
|
67
|
+
}, {
|
|
68
|
+
readonly type: "function";
|
|
69
|
+
readonly name: "initiator";
|
|
70
|
+
readonly inputs: readonly [];
|
|
71
|
+
readonly outputs: readonly [{
|
|
72
|
+
readonly name: "";
|
|
73
|
+
readonly type: "address";
|
|
74
|
+
readonly internalType: "address";
|
|
75
|
+
}];
|
|
76
|
+
readonly stateMutability: "view";
|
|
77
|
+
}, {
|
|
78
|
+
readonly type: "function";
|
|
79
|
+
readonly name: "onMorphoFlashLoan";
|
|
80
|
+
readonly inputs: readonly [{
|
|
81
|
+
readonly name: "exitAssets";
|
|
82
|
+
readonly type: "uint256";
|
|
83
|
+
readonly internalType: "uint256";
|
|
84
|
+
}, {
|
|
85
|
+
readonly name: "data";
|
|
86
|
+
readonly type: "bytes";
|
|
87
|
+
readonly internalType: "bytes";
|
|
88
|
+
}];
|
|
89
|
+
readonly outputs: readonly [];
|
|
90
|
+
readonly stateMutability: "nonpayable";
|
|
91
|
+
}, {
|
|
92
|
+
readonly type: "function";
|
|
93
|
+
readonly name: "onMorphoSupply";
|
|
94
|
+
readonly inputs: readonly [{
|
|
95
|
+
readonly name: "assets";
|
|
96
|
+
readonly type: "uint256";
|
|
97
|
+
readonly internalType: "uint256";
|
|
98
|
+
}, {
|
|
99
|
+
readonly name: "data";
|
|
100
|
+
readonly type: "bytes";
|
|
101
|
+
readonly internalType: "bytes";
|
|
102
|
+
}];
|
|
103
|
+
readonly outputs: readonly [];
|
|
104
|
+
readonly stateMutability: "nonpayable";
|
|
105
|
+
}, {
|
|
106
|
+
readonly type: "function";
|
|
107
|
+
readonly name: "vaultExitBundlesV1ForceWithdrawVaultV2";
|
|
108
|
+
readonly inputs: readonly [{
|
|
109
|
+
readonly name: "vault";
|
|
110
|
+
readonly type: "address";
|
|
111
|
+
readonly internalType: "address";
|
|
112
|
+
}, {
|
|
113
|
+
readonly name: "adapter";
|
|
114
|
+
readonly type: "address";
|
|
115
|
+
readonly internalType: "address";
|
|
116
|
+
}, {
|
|
117
|
+
readonly name: "exitAssets";
|
|
118
|
+
readonly type: "uint256";
|
|
119
|
+
readonly internalType: "uint256";
|
|
120
|
+
}, {
|
|
121
|
+
readonly name: "minSharePriceE27";
|
|
122
|
+
readonly type: "uint256";
|
|
123
|
+
readonly internalType: "uint256";
|
|
124
|
+
}, {
|
|
125
|
+
readonly name: "sharesPermit";
|
|
126
|
+
readonly type: "tuple";
|
|
127
|
+
readonly internalType: "struct Permit";
|
|
128
|
+
readonly components: readonly [{
|
|
129
|
+
readonly name: "value";
|
|
130
|
+
readonly type: "uint256";
|
|
131
|
+
readonly internalType: "uint256";
|
|
132
|
+
}, {
|
|
133
|
+
readonly name: "nonce";
|
|
134
|
+
readonly type: "uint256";
|
|
135
|
+
readonly internalType: "uint256";
|
|
136
|
+
}, {
|
|
137
|
+
readonly name: "deadline";
|
|
138
|
+
readonly type: "uint256";
|
|
139
|
+
readonly internalType: "uint256";
|
|
140
|
+
}, {
|
|
141
|
+
readonly name: "v";
|
|
142
|
+
readonly type: "uint8";
|
|
143
|
+
readonly internalType: "uint8";
|
|
144
|
+
}, {
|
|
145
|
+
readonly name: "r";
|
|
146
|
+
readonly type: "bytes32";
|
|
147
|
+
readonly internalType: "bytes32";
|
|
148
|
+
}, {
|
|
149
|
+
readonly name: "s";
|
|
150
|
+
readonly type: "bytes32";
|
|
151
|
+
readonly internalType: "bytes32";
|
|
152
|
+
}];
|
|
153
|
+
}, {
|
|
154
|
+
readonly name: "referralFeePct";
|
|
155
|
+
readonly type: "uint256";
|
|
156
|
+
readonly internalType: "uint256";
|
|
157
|
+
}, {
|
|
158
|
+
readonly name: "referralFeeRecipient";
|
|
159
|
+
readonly type: "address";
|
|
160
|
+
readonly internalType: "address";
|
|
161
|
+
}, {
|
|
162
|
+
readonly name: "deadline";
|
|
163
|
+
readonly type: "uint256";
|
|
164
|
+
readonly internalType: "uint256";
|
|
165
|
+
}];
|
|
166
|
+
readonly outputs: readonly [];
|
|
167
|
+
readonly stateMutability: "nonpayable";
|
|
168
|
+
}, {
|
|
169
|
+
readonly type: "function";
|
|
170
|
+
readonly name: "vaultExitBundlesV1InKindRedemptionVaultV1";
|
|
171
|
+
readonly inputs: readonly [{
|
|
172
|
+
readonly name: "vault";
|
|
173
|
+
readonly type: "address";
|
|
174
|
+
readonly internalType: "address";
|
|
175
|
+
}, {
|
|
176
|
+
readonly name: "marketParamsList";
|
|
177
|
+
readonly type: "tuple[]";
|
|
178
|
+
readonly internalType: "struct MarketParams[]";
|
|
179
|
+
readonly components: readonly [{
|
|
180
|
+
readonly name: "loanToken";
|
|
181
|
+
readonly type: "address";
|
|
182
|
+
readonly internalType: "address";
|
|
183
|
+
}, {
|
|
184
|
+
readonly name: "collateralToken";
|
|
185
|
+
readonly type: "address";
|
|
186
|
+
readonly internalType: "address";
|
|
187
|
+
}, {
|
|
188
|
+
readonly name: "oracle";
|
|
189
|
+
readonly type: "address";
|
|
190
|
+
readonly internalType: "address";
|
|
191
|
+
}, {
|
|
192
|
+
readonly name: "irm";
|
|
193
|
+
readonly type: "address";
|
|
194
|
+
readonly internalType: "address";
|
|
195
|
+
}, {
|
|
196
|
+
readonly name: "lltv";
|
|
197
|
+
readonly type: "uint256";
|
|
198
|
+
readonly internalType: "uint256";
|
|
199
|
+
}];
|
|
200
|
+
}, {
|
|
201
|
+
readonly name: "exitAssets";
|
|
202
|
+
readonly type: "uint256";
|
|
203
|
+
readonly internalType: "uint256";
|
|
204
|
+
}, {
|
|
205
|
+
readonly name: "sharesPermit";
|
|
206
|
+
readonly type: "tuple";
|
|
207
|
+
readonly internalType: "struct Permit";
|
|
208
|
+
readonly components: readonly [{
|
|
209
|
+
readonly name: "value";
|
|
210
|
+
readonly type: "uint256";
|
|
211
|
+
readonly internalType: "uint256";
|
|
212
|
+
}, {
|
|
213
|
+
readonly name: "nonce";
|
|
214
|
+
readonly type: "uint256";
|
|
215
|
+
readonly internalType: "uint256";
|
|
216
|
+
}, {
|
|
217
|
+
readonly name: "deadline";
|
|
218
|
+
readonly type: "uint256";
|
|
219
|
+
readonly internalType: "uint256";
|
|
220
|
+
}, {
|
|
221
|
+
readonly name: "v";
|
|
222
|
+
readonly type: "uint8";
|
|
223
|
+
readonly internalType: "uint8";
|
|
224
|
+
}, {
|
|
225
|
+
readonly name: "r";
|
|
226
|
+
readonly type: "bytes32";
|
|
227
|
+
readonly internalType: "bytes32";
|
|
228
|
+
}, {
|
|
229
|
+
readonly name: "s";
|
|
230
|
+
readonly type: "bytes32";
|
|
231
|
+
readonly internalType: "bytes32";
|
|
232
|
+
}];
|
|
233
|
+
}, {
|
|
234
|
+
readonly name: "deadline";
|
|
235
|
+
readonly type: "uint256";
|
|
236
|
+
readonly internalType: "uint256";
|
|
237
|
+
}];
|
|
238
|
+
readonly outputs: readonly [];
|
|
239
|
+
readonly stateMutability: "nonpayable";
|
|
240
|
+
}, {
|
|
241
|
+
readonly type: "function";
|
|
242
|
+
readonly name: "vaultExitBundlesV1InKindRedemptionVaultV2";
|
|
243
|
+
readonly inputs: readonly [{
|
|
244
|
+
readonly name: "vault";
|
|
245
|
+
readonly type: "address";
|
|
246
|
+
readonly internalType: "address";
|
|
247
|
+
}, {
|
|
248
|
+
readonly name: "adapter";
|
|
249
|
+
readonly type: "address";
|
|
250
|
+
readonly internalType: "address";
|
|
251
|
+
}, {
|
|
252
|
+
readonly name: "marketParamsList";
|
|
253
|
+
readonly type: "tuple[]";
|
|
254
|
+
readonly internalType: "struct MarketParams[]";
|
|
255
|
+
readonly components: readonly [{
|
|
256
|
+
readonly name: "loanToken";
|
|
257
|
+
readonly type: "address";
|
|
258
|
+
readonly internalType: "address";
|
|
259
|
+
}, {
|
|
260
|
+
readonly name: "collateralToken";
|
|
261
|
+
readonly type: "address";
|
|
262
|
+
readonly internalType: "address";
|
|
263
|
+
}, {
|
|
264
|
+
readonly name: "oracle";
|
|
265
|
+
readonly type: "address";
|
|
266
|
+
readonly internalType: "address";
|
|
267
|
+
}, {
|
|
268
|
+
readonly name: "irm";
|
|
269
|
+
readonly type: "address";
|
|
270
|
+
readonly internalType: "address";
|
|
271
|
+
}, {
|
|
272
|
+
readonly name: "lltv";
|
|
273
|
+
readonly type: "uint256";
|
|
274
|
+
readonly internalType: "uint256";
|
|
275
|
+
}];
|
|
276
|
+
}, {
|
|
277
|
+
readonly name: "exitAssets";
|
|
278
|
+
readonly type: "uint256";
|
|
279
|
+
readonly internalType: "uint256";
|
|
280
|
+
}, {
|
|
281
|
+
readonly name: "sharesPermit";
|
|
282
|
+
readonly type: "tuple";
|
|
283
|
+
readonly internalType: "struct Permit";
|
|
284
|
+
readonly components: readonly [{
|
|
285
|
+
readonly name: "value";
|
|
286
|
+
readonly type: "uint256";
|
|
287
|
+
readonly internalType: "uint256";
|
|
288
|
+
}, {
|
|
289
|
+
readonly name: "nonce";
|
|
290
|
+
readonly type: "uint256";
|
|
291
|
+
readonly internalType: "uint256";
|
|
292
|
+
}, {
|
|
293
|
+
readonly name: "deadline";
|
|
294
|
+
readonly type: "uint256";
|
|
295
|
+
readonly internalType: "uint256";
|
|
296
|
+
}, {
|
|
297
|
+
readonly name: "v";
|
|
298
|
+
readonly type: "uint8";
|
|
299
|
+
readonly internalType: "uint8";
|
|
300
|
+
}, {
|
|
301
|
+
readonly name: "r";
|
|
302
|
+
readonly type: "bytes32";
|
|
303
|
+
readonly internalType: "bytes32";
|
|
304
|
+
}, {
|
|
305
|
+
readonly name: "s";
|
|
306
|
+
readonly type: "bytes32";
|
|
307
|
+
readonly internalType: "bytes32";
|
|
308
|
+
}];
|
|
309
|
+
}, {
|
|
310
|
+
readonly name: "deadline";
|
|
311
|
+
readonly type: "uint256";
|
|
312
|
+
readonly internalType: "uint256";
|
|
313
|
+
}];
|
|
314
|
+
readonly outputs: readonly [];
|
|
315
|
+
readonly stateMutability: "nonpayable";
|
|
316
|
+
}];
|
|
4
317
|
/** ABI for the Bundler3 multicall contract. */
|
|
5
318
|
export declare const bundler3Abi: readonly [{
|
|
6
319
|
readonly type: "function";
|