@morpho-org/morpho-sdk 6.0.0-next.0 → 6.0.0-next.2
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/MIGRATION-v5-to-v6.md +329 -15
- package/README.md +93 -47
- package/lib/cjs/abis.d.ts +227 -2
- package/lib/cjs/abis.js +156 -3
- package/lib/cjs/actions/blue/borrow.d.ts +1 -1
- package/lib/cjs/actions/blue/borrow.js +1 -1
- package/lib/cjs/actions/blue/common.d.ts +6 -19
- package/lib/cjs/actions/blue/common.js +28 -162
- package/lib/cjs/actions/blue/refinance.d.ts +1 -1
- package/lib/cjs/actions/blue/refinance.js +1 -1
- package/lib/cjs/actions/blue/repay.d.ts +3 -3
- package/lib/cjs/actions/blue/repay.js +1 -1
- package/lib/cjs/actions/blue/repayWithdrawCollateral.d.ts +3 -3
- package/lib/cjs/actions/blue/repayWithdrawCollateral.js +1 -1
- package/lib/cjs/actions/blue/supply.d.ts +3 -3
- package/lib/cjs/actions/blue/supply.js +3 -8
- package/lib/cjs/actions/blue/supplyCollateral.d.ts +3 -3
- package/lib/cjs/actions/blue/supplyCollateral.js +1 -1
- package/lib/cjs/actions/blue/supplyCollateralBorrow.d.ts +3 -3
- package/lib/cjs/actions/blue/supplyCollateralBorrow.js +1 -1
- package/lib/cjs/actions/blue/withdraw.d.ts +1 -1
- package/lib/cjs/actions/blue/withdraw.js +1 -1
- package/lib/cjs/actions/blue/withdrawCollateral.d.ts +1 -1
- package/lib/cjs/actions/blue/withdrawCollateral.js +1 -1
- package/lib/cjs/actions/bundles/common.d.ts +230 -0
- package/lib/cjs/actions/bundles/common.js +507 -0
- package/lib/cjs/actions/bundles/index.d.ts +3 -0
- package/lib/cjs/actions/bundles/index.js +23 -0
- package/lib/cjs/actions/bundles/resolveBundlesTokenRequirements.d.ts +76 -0
- package/lib/cjs/actions/bundles/resolveBundlesTokenRequirements.js +125 -0
- package/lib/cjs/actions/index.d.ts +1 -0
- package/lib/cjs/actions/index.js +1 -0
- package/lib/cjs/actions/midnight/supplyCollateralTakeBorrow.d.ts +2 -2
- package/lib/cjs/actions/midnight/supplyCollateralTakeBorrow.js +2 -2
- package/lib/cjs/actions/midnight/takeBorrow.d.ts +2 -2
- package/lib/cjs/actions/midnight/takeBorrow.js +2 -2
- package/lib/cjs/actions/midnight/takeLend.d.ts +2 -2
- package/lib/cjs/actions/midnight/takeLend.js +2 -2
- package/lib/cjs/actions/requirements/blue/getBlueAuthorizationRequirement.d.ts +3 -0
- package/lib/cjs/actions/requirements/blue/getBlueAuthorizationRequirement.js +6 -10
- package/lib/cjs/actions/requirements/blue/index.d.ts +0 -2
- package/lib/cjs/actions/requirements/blue/index.js +0 -2
- package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +15 -8
- package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.js +21 -21
- package/lib/cjs/actions/requirements/encode/encodeErc20Approval.d.ts +1 -1
- package/lib/cjs/actions/requirements/encode/encodeErc20Approval.js +2 -1
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit.d.ts +19 -10
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit.js +43 -31
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit2Approve.d.ts +4 -2
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit2Approve.js +15 -10
- package/lib/{esm/actions/requirements/encode/encodeErc20Permit2TransferFrom.d.ts → cjs/actions/requirements/encode/encodeErc20Permit2SignatureTransfer.d.ts} +16 -14
- package/lib/cjs/actions/requirements/encode/{encodeErc20Permit2TransferFrom.js → encodeErc20Permit2SignatureTransfer.js} +27 -22
- package/lib/cjs/actions/requirements/encode/encodeVaultSharesPermit.d.ts +12 -9
- package/lib/cjs/actions/requirements/encode/encodeVaultSharesPermit.js +27 -21
- package/lib/cjs/actions/requirements/encode/index.d.ts +1 -1
- package/lib/cjs/actions/requirements/encode/index.js +1 -1
- package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirements.js +1 -0
- package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +4 -1
- package/lib/cjs/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.js +5 -2
- package/lib/cjs/actions/requirements/getRequirementsApproval.d.ts +4 -3
- package/lib/cjs/actions/requirements/getRequirementsApproval.js +4 -3
- package/lib/cjs/actions/signatures/getTokenRequirementActions.js +2 -2
- package/lib/cjs/actions/signatures/getVaultExitBundlesV1PermitStruct.d.ts +28 -30
- package/lib/cjs/actions/signatures/getVaultExitBundlesV1PermitStruct.js +20 -66
- package/lib/cjs/actions/vaultV1/deposit.d.ts +73 -57
- package/lib/cjs/actions/vaultV1/deposit.js +110 -109
- package/lib/cjs/actions/vaultV1/inKindRedeem.d.ts +1 -0
- package/lib/cjs/actions/vaultV1/inKindRedeem.js +3 -2
- package/lib/cjs/actions/vaultV1/migrateToV2.d.ts +43 -66
- package/lib/cjs/actions/vaultV1/migrateToV2.js +91 -104
- package/lib/cjs/actions/vaultV1/redeem.d.ts +30 -23
- package/lib/cjs/actions/vaultV1/redeem.js +56 -33
- package/lib/cjs/actions/vaultV1/withdraw.d.ts +58 -24
- package/lib/cjs/actions/vaultV1/withdraw.js +86 -34
- package/lib/cjs/actions/vaultV2/deposit.d.ts +74 -57
- package/lib/cjs/actions/vaultV2/deposit.js +111 -109
- package/lib/cjs/actions/vaultV2/forceWithdraw.d.ts +58 -39
- package/lib/cjs/actions/vaultV2/forceWithdraw.js +87 -60
- package/lib/cjs/actions/vaultV2/inKindRedeem.d.ts +1 -0
- package/lib/cjs/actions/vaultV2/inKindRedeem.js +3 -2
- package/lib/cjs/actions/vaultV2/redeem.d.ts +30 -24
- package/lib/cjs/actions/vaultV2/redeem.js +56 -34
- package/lib/cjs/actions/vaultV2/withdraw.d.ts +58 -25
- package/lib/cjs/actions/vaultV2/withdraw.js +86 -35
- package/lib/cjs/augment/VaultMarketPublicAllocatorConfig.d.ts +4 -1
- package/lib/cjs/blue/abis.d.ts +5 -1
- package/lib/cjs/blue/abis.js +2 -0
- package/lib/cjs/blue/entities.d.ts +8 -2
- package/lib/cjs/blue/entities.js +1 -0
- package/lib/cjs/blue/errors.d.ts +1 -1
- package/lib/cjs/blue/errors.js +2 -1
- package/lib/cjs/blue/fetch.d.ts +3 -1
- package/lib/cjs/blue/fetch.js +1 -0
- package/lib/cjs/entities/blue/blue.d.ts +29 -20
- package/lib/cjs/entities/blue/blue.js +6 -1
- package/lib/cjs/entities/index.d.ts +9 -2
- package/lib/cjs/entities/index.js +16 -0
- package/lib/cjs/entities/midnight/midnight.d.ts +2 -2
- package/lib/cjs/entities/midnight/midnight.js +20 -24
- package/lib/cjs/{actions/requirements/blue/getBlueBundlesV1TokenRequirements.d.ts → entities/requirements/getBundlesTokenRequirements.d.ts} +27 -19
- package/lib/cjs/{actions/requirements/blue/getBlueBundlesV1TokenRequirements.js → entities/requirements/getBundlesTokenRequirements.js} +76 -75
- package/lib/{esm/actions/requirements/blue → cjs/entities/requirements}/getUnusedPermit2Nonce.d.ts +1 -1
- package/lib/cjs/{actions/requirements/blue → entities/requirements}/getUnusedPermit2Nonce.js +4 -4
- package/lib/cjs/entities/requirements/getVaultBundlesSharesRequirements.d.ts +28 -0
- package/lib/cjs/entities/requirements/getVaultBundlesSharesRequirements.js +74 -0
- package/lib/cjs/entities/requirements/index.d.ts +2 -0
- package/lib/cjs/entities/requirements/index.js +18 -0
- package/lib/cjs/entities/vaultV1/vaultV1.d.ts +356 -101
- package/lib/cjs/entities/vaultV1/vaultV1.js +334 -120
- package/lib/cjs/entities/vaultV1ReallocationData.d.ts +6 -0
- package/lib/cjs/entities/vaultV1ReallocationData.js +20 -5
- package/lib/cjs/entities/vaultV2/vaultV2.d.ts +359 -100
- package/lib/cjs/entities/vaultV2/vaultV2.js +448 -93
- package/lib/cjs/entities/vaultV2BlueReallocationData.d.ts +8 -1
- package/lib/cjs/entities/vaultV2BlueReallocationData.js +46 -13
- package/lib/cjs/errors.d.ts +1 -1
- package/lib/cjs/errors.js +3 -2
- package/lib/cjs/fetch.d.ts +3 -1
- package/lib/cjs/fetch.js +1 -0
- package/lib/cjs/helpers/computeVaultV1Reallocations.d.ts +2 -0
- package/lib/cjs/helpers/computeVaultV1Reallocations.js +2 -0
- package/lib/cjs/helpers/index.d.ts +4 -1
- package/lib/cjs/helpers/index.js +14 -1
- package/lib/cjs/helpers/metadata.d.ts +3 -5
- package/lib/cjs/helpers/metadata.js +4 -6
- package/lib/cjs/helpers/previewVaultV2ForceWithdraw.d.ts +107 -0
- package/lib/cjs/helpers/previewVaultV2ForceWithdraw.js +164 -0
- package/lib/cjs/helpers/previewVaultV2InKindRedeem.d.ts +1 -0
- package/lib/cjs/helpers/previewVaultV2InKindRedeem.js +2 -0
- package/lib/cjs/helpers/referralFee.d.ts +21 -0
- package/lib/cjs/helpers/referralFee.js +35 -0
- package/lib/cjs/helpers/slippage.d.ts +136 -1
- package/lib/cjs/helpers/slippage.js +188 -0
- package/lib/cjs/helpers/validate.d.ts +67 -8
- package/lib/cjs/helpers/validate.js +94 -9
- package/lib/cjs/helpers/validateRequirementSpender.d.ts +1 -1
- package/lib/cjs/helpers/validateRequirementSpender.js +1 -0
- package/lib/cjs/helpers/vaultV2ForceWithdrawPlan.d.ts +274 -0
- package/lib/cjs/helpers/vaultV2ForceWithdrawPlan.js +369 -0
- package/lib/cjs/index.d.ts +1 -0
- package/lib/cjs/index.js +1 -0
- package/lib/cjs/types/action.d.ts +273 -82
- package/lib/cjs/types/action.js +12 -12
- package/lib/cjs/types/error.d.ts +349 -23
- package/lib/cjs/types/error.js +393 -39
- package/lib/cjs/types/sharedLiquidity.d.ts +2 -2
- package/lib/cjs/utils.d.ts +3 -1
- package/lib/cjs/utils.js +10 -1
- package/lib/esm/abis.d.ts +227 -2
- package/lib/esm/abis.js +157 -2
- package/lib/esm/actions/blue/borrow.d.ts +1 -1
- package/lib/esm/actions/blue/borrow.js +1 -1
- package/lib/esm/actions/blue/common.d.ts +6 -19
- package/lib/esm/actions/blue/common.js +30 -164
- package/lib/esm/actions/blue/refinance.d.ts +1 -1
- package/lib/esm/actions/blue/refinance.js +1 -1
- package/lib/esm/actions/blue/repay.d.ts +3 -3
- package/lib/esm/actions/blue/repay.js +1 -1
- package/lib/esm/actions/blue/repayWithdrawCollateral.d.ts +3 -3
- package/lib/esm/actions/blue/repayWithdrawCollateral.js +1 -1
- package/lib/esm/actions/blue/supply.d.ts +3 -3
- package/lib/esm/actions/blue/supply.js +5 -10
- package/lib/esm/actions/blue/supplyCollateral.d.ts +3 -3
- package/lib/esm/actions/blue/supplyCollateral.js +1 -1
- package/lib/esm/actions/blue/supplyCollateralBorrow.d.ts +3 -3
- package/lib/esm/actions/blue/supplyCollateralBorrow.js +1 -1
- package/lib/esm/actions/blue/withdraw.d.ts +1 -1
- package/lib/esm/actions/blue/withdraw.js +1 -1
- package/lib/esm/actions/blue/withdrawCollateral.d.ts +1 -1
- package/lib/esm/actions/blue/withdrawCollateral.js +1 -1
- package/lib/esm/actions/bundles/common.d.ts +230 -0
- package/lib/esm/actions/bundles/common.js +494 -0
- package/lib/esm/actions/bundles/index.d.ts +3 -0
- package/lib/esm/actions/bundles/index.js +2 -0
- package/lib/esm/actions/bundles/resolveBundlesTokenRequirements.d.ts +76 -0
- package/lib/esm/actions/bundles/resolveBundlesTokenRequirements.js +121 -0
- package/lib/esm/actions/index.d.ts +1 -0
- package/lib/esm/actions/index.js +1 -0
- package/lib/esm/actions/midnight/supplyCollateralTakeBorrow.d.ts +2 -2
- package/lib/esm/actions/midnight/supplyCollateralTakeBorrow.js +2 -2
- package/lib/esm/actions/midnight/takeBorrow.d.ts +2 -2
- package/lib/esm/actions/midnight/takeBorrow.js +2 -2
- package/lib/esm/actions/midnight/takeLend.d.ts +2 -2
- package/lib/esm/actions/midnight/takeLend.js +2 -2
- package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.d.ts +3 -0
- package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.js +8 -12
- package/lib/esm/actions/requirements/blue/index.d.ts +0 -2
- package/lib/esm/actions/requirements/blue/index.js +0 -2
- package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +15 -8
- package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.js +22 -22
- package/lib/esm/actions/requirements/encode/encodeErc20Approval.d.ts +1 -1
- package/lib/esm/actions/requirements/encode/encodeErc20Approval.js +2 -1
- package/lib/esm/actions/requirements/encode/encodeErc20Permit.d.ts +19 -10
- package/lib/esm/actions/requirements/encode/encodeErc20Permit.js +44 -32
- package/lib/esm/actions/requirements/encode/encodeErc20Permit2Approve.d.ts +4 -2
- package/lib/esm/actions/requirements/encode/encodeErc20Permit2Approve.js +15 -10
- package/lib/{cjs/actions/requirements/encode/encodeErc20Permit2TransferFrom.d.ts → esm/actions/requirements/encode/encodeErc20Permit2SignatureTransfer.d.ts} +16 -14
- package/lib/esm/actions/requirements/encode/{encodeErc20Permit2TransferFrom.js → encodeErc20Permit2SignatureTransfer.js} +25 -20
- package/lib/esm/actions/requirements/encode/encodeVaultSharesPermit.d.ts +12 -9
- package/lib/esm/actions/requirements/encode/encodeVaultSharesPermit.js +27 -21
- package/lib/esm/actions/requirements/encode/index.d.ts +1 -1
- package/lib/esm/actions/requirements/encode/index.js +1 -1
- package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirements.js +1 -0
- package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +4 -1
- package/lib/esm/actions/requirements/generalAdapter/getGeneralAdapterRequirementsPermit.js +5 -2
- package/lib/esm/actions/requirements/getRequirementsApproval.d.ts +4 -3
- package/lib/esm/actions/requirements/getRequirementsApproval.js +4 -3
- package/lib/esm/actions/signatures/getTokenRequirementActions.js +3 -3
- package/lib/esm/actions/signatures/getVaultExitBundlesV1PermitStruct.d.ts +28 -30
- package/lib/esm/actions/signatures/getVaultExitBundlesV1PermitStruct.js +21 -67
- package/lib/esm/actions/vaultV1/deposit.d.ts +73 -57
- package/lib/esm/actions/vaultV1/deposit.js +112 -111
- package/lib/esm/actions/vaultV1/inKindRedeem.d.ts +1 -0
- package/lib/esm/actions/vaultV1/inKindRedeem.js +3 -2
- package/lib/esm/actions/vaultV1/migrateToV2.d.ts +43 -66
- package/lib/esm/actions/vaultV1/migrateToV2.js +93 -106
- package/lib/esm/actions/vaultV1/redeem.d.ts +30 -23
- package/lib/esm/actions/vaultV1/redeem.js +56 -33
- package/lib/esm/actions/vaultV1/withdraw.d.ts +58 -24
- package/lib/esm/actions/vaultV1/withdraw.js +86 -34
- package/lib/esm/actions/vaultV2/deposit.d.ts +74 -57
- package/lib/esm/actions/vaultV2/deposit.js +113 -111
- package/lib/esm/actions/vaultV2/forceWithdraw.d.ts +58 -39
- package/lib/esm/actions/vaultV2/forceWithdraw.js +89 -62
- package/lib/esm/actions/vaultV2/inKindRedeem.d.ts +1 -0
- package/lib/esm/actions/vaultV2/inKindRedeem.js +3 -2
- package/lib/esm/actions/vaultV2/redeem.d.ts +30 -24
- package/lib/esm/actions/vaultV2/redeem.js +56 -34
- package/lib/esm/actions/vaultV2/withdraw.d.ts +58 -25
- package/lib/esm/actions/vaultV2/withdraw.js +86 -35
- package/lib/esm/augment/VaultMarketPublicAllocatorConfig.d.ts +4 -1
- package/lib/esm/augment/VaultMarketPublicAllocatorConfig.js +3 -1
- package/lib/esm/blue/abis.d.ts +5 -1
- package/lib/esm/blue/abis.js +5 -1
- package/lib/esm/blue/entities.d.ts +8 -2
- package/lib/esm/blue/entities.js +3 -1
- package/lib/esm/blue/errors.d.ts +1 -1
- package/lib/esm/blue/errors.js +1 -1
- package/lib/esm/blue/fetch.d.ts +3 -1
- package/lib/esm/blue/fetch.js +3 -1
- package/lib/esm/entities/blue/blue.d.ts +29 -20
- package/lib/esm/entities/blue/blue.js +7 -2
- package/lib/esm/entities/index.d.ts +9 -2
- package/lib/esm/entities/index.js +4 -1
- package/lib/esm/entities/midnight/midnight.d.ts +2 -2
- package/lib/esm/entities/midnight/midnight.js +20 -24
- package/lib/esm/{actions/requirements/blue/getBlueBundlesV1TokenRequirements.d.ts → entities/requirements/getBundlesTokenRequirements.d.ts} +27 -19
- package/lib/esm/{actions/requirements/blue/getBlueBundlesV1TokenRequirements.js → entities/requirements/getBundlesTokenRequirements.js} +67 -66
- package/lib/{cjs/actions/requirements/blue → esm/entities/requirements}/getUnusedPermit2Nonce.d.ts +1 -1
- package/lib/esm/{actions/requirements/blue → entities/requirements}/getUnusedPermit2Nonce.js +4 -4
- package/lib/esm/entities/requirements/getVaultBundlesSharesRequirements.d.ts +28 -0
- package/lib/esm/entities/requirements/getVaultBundlesSharesRequirements.js +70 -0
- package/lib/esm/entities/requirements/index.d.ts +2 -0
- package/lib/esm/entities/requirements/index.js +2 -0
- package/lib/esm/entities/vaultV1/vaultV1.d.ts +356 -101
- package/lib/esm/entities/vaultV1/vaultV1.js +338 -124
- package/lib/esm/entities/vaultV1ReallocationData.d.ts +6 -0
- package/lib/esm/entities/vaultV1ReallocationData.js +20 -5
- package/lib/esm/entities/vaultV2/vaultV2.d.ts +359 -100
- package/lib/esm/entities/vaultV2/vaultV2.js +452 -97
- package/lib/esm/entities/vaultV2BlueReallocationData.d.ts +8 -1
- package/lib/esm/entities/vaultV2BlueReallocationData.js +46 -13
- package/lib/esm/errors.d.ts +1 -1
- package/lib/esm/errors.js +1 -1
- package/lib/esm/fetch.d.ts +3 -1
- package/lib/esm/fetch.js +3 -1
- package/lib/esm/helpers/computeVaultV1Reallocations.d.ts +2 -0
- package/lib/esm/helpers/computeVaultV1Reallocations.js +2 -0
- package/lib/esm/helpers/index.d.ts +4 -1
- package/lib/esm/helpers/index.js +4 -1
- package/lib/esm/helpers/metadata.d.ts +3 -5
- package/lib/esm/helpers/metadata.js +4 -6
- package/lib/esm/helpers/previewVaultV2ForceWithdraw.d.ts +107 -0
- package/lib/esm/helpers/previewVaultV2ForceWithdraw.js +161 -0
- package/lib/esm/helpers/previewVaultV2InKindRedeem.d.ts +1 -0
- package/lib/esm/helpers/previewVaultV2InKindRedeem.js +2 -0
- package/lib/esm/helpers/referralFee.d.ts +21 -0
- package/lib/esm/helpers/referralFee.js +31 -0
- package/lib/esm/helpers/slippage.d.ts +136 -1
- package/lib/esm/helpers/slippage.js +186 -2
- package/lib/esm/helpers/validate.d.ts +67 -8
- package/lib/esm/helpers/validate.js +92 -10
- package/lib/esm/helpers/validateRequirementSpender.d.ts +1 -1
- package/lib/esm/helpers/validateRequirementSpender.js +1 -0
- package/lib/esm/helpers/vaultV2ForceWithdrawPlan.d.ts +274 -0
- package/lib/esm/helpers/vaultV2ForceWithdrawPlan.js +362 -0
- package/lib/esm/index.d.ts +1 -0
- package/lib/esm/index.js +1 -0
- package/lib/esm/types/action.d.ts +273 -82
- package/lib/esm/types/action.js +11 -11
- package/lib/esm/types/error.d.ts +349 -23
- package/lib/esm/types/error.js +377 -31
- package/lib/esm/types/sharedLiquidity.d.ts +2 -2
- package/lib/esm/utils.d.ts +3 -1
- package/lib/esm/utils.js +3 -1
- package/package.json +7 -7
|
@@ -1,134 +1,135 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.vaultV1Deposit = void 0;
|
|
4
|
-
const blue_sdk_1 = require("@morpho-org/blue-sdk");
|
|
5
4
|
const morpho_ts_1 = require("@morpho-org/morpho-ts");
|
|
6
5
|
const viem_1 = require("viem");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
6
|
+
const abis_js_1 = require("../../abis.js");
|
|
7
|
+
const validate_js_1 = require("../../helpers/validate.js");
|
|
8
|
+
const index_js_1 = require("../../types/index.js");
|
|
9
|
+
const common_js_1 = require("../bundles/common.js");
|
|
11
10
|
/**
|
|
12
|
-
*
|
|
11
|
+
* Encodes a Vault V1 deposit through the registered VaultBundlesV1 contract.
|
|
13
12
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* the
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* asset
|
|
21
|
-
*
|
|
22
|
-
* @param params.
|
|
23
|
-
* @param params.
|
|
24
|
-
* @param params.
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* @param params.args.
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
* @param params.metadata -
|
|
34
|
-
* @
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* @throws {
|
|
38
|
-
*
|
|
39
|
-
* @throws {
|
|
40
|
-
*
|
|
41
|
-
* @throws {NativeAmountOnNonWNativeVaultError} when
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* @throws {
|
|
49
|
-
*
|
|
13
|
+
* @param params.vault.chainId - Chain containing the vault and its registered VaultBundlesV1 contract.
|
|
14
|
+
* @param params.vault.address - Vault V1 contract receiving the net deposit.
|
|
15
|
+
* @param params.vault.asset - Underlying ERC-20 asset; must be the chain's wNative for native funding.
|
|
16
|
+
* @param params.args.amount - Positive gross ERC-20 amount in asset base units, exclusive with `nativeAmount`.
|
|
17
|
+
* @param params.args.nativeAmount - Positive gross native amount in wei, exclusive with `amount` and
|
|
18
|
+
* `requirementSignature`; sent as `tx.value` and wrapped by VaultBundlesV1.
|
|
19
|
+
* @param params.args.maxSharePrice - Positive maximum asset base units per share base unit, scaled
|
|
20
|
+
* by RAY (1e27). Compute it for the net deposit after referral fees to bound slippage.
|
|
21
|
+
* @param params.args.userAddress - Permit owner and transaction sender; VaultBundlesV1 mints shares to this account.
|
|
22
|
+
* @param params.args.recipient - Unsupported; shares are always minted to the transaction sender.
|
|
23
|
+
* @param params.args.requirementSignature - Optional ERC-2612 or Permit2 SignatureTransfer signature
|
|
24
|
+
* for the gross amount, vault asset, `userAddress`, and VaultBundlesV1 spender.
|
|
25
|
+
* @param params.args.referralFeePct - Optional WAD-scaled fee in [0, 1e18), defaulting to zero.
|
|
26
|
+
* The fee is rounded down and deducted from gross assets before depositing.
|
|
27
|
+
* @param params.args.referralFeeRecipient - Optional fee recipient; a nonzero address is required
|
|
28
|
+
* when `referralFeePct > 0n`.
|
|
29
|
+
* @param params.args.deadline - Positive uint256 Unix timestamp in seconds after which execution
|
|
30
|
+
* reverts. The caller must supply it; the builder chooses no default.
|
|
31
|
+
* @param params.metadata - Optional analytics metadata appended to the transaction calldata.
|
|
32
|
+
* @param params.metadata.origin - Hex origin identifier of at most four bytes, with an optional `0x` prefix.
|
|
33
|
+
* @param params.metadata.timestamp - Optional flag to append the current timestamp; defaults to false.
|
|
34
|
+
* @returns A deep-frozen `Transaction<VaultV1DepositAction>` targeting VaultBundlesV1, with
|
|
35
|
+
* `to`, `value`, `data`, and gross/fee/net deposit action metadata.
|
|
36
|
+
* @throws {MixedBundlesFundingError} when ERC-20 and native funding are both supplied.
|
|
37
|
+
* @throws {NegativeInputError} when the selected funding amount or `referralFeePct` is negative.
|
|
38
|
+
* @throws {NonPositiveInputError} when funding, `maxSharePrice`, or `deadline` is not positive.
|
|
39
|
+
* @throws {ChainWNativeMissingError} when native funding is requested on a chain without wNative.
|
|
40
|
+
* @throws {NativeAmountOnNonWNativeVaultError} when native funding targets a non-wNative vault.
|
|
41
|
+
* @throws {ReferralFeePctExceededError} when `referralFeePct` is at least WAD; it extends
|
|
42
|
+
* {@link InputExceedsMaxError}, so either class catches it.
|
|
43
|
+
* @throws {ReferralFeeRecipientMissingError} when a positive `referralFeePct` has no recipient.
|
|
44
|
+
* @throws {UnexpectedRequirementSignatureError} when native funding carries a token permit or a
|
|
45
|
+
* Permit2 AllowanceTransfer signature is supplied.
|
|
46
|
+
* @throws {InputExceedsMaxError} when funding, `maxSharePrice`, or `deadline` exceeds uint256.
|
|
47
|
+
* @throws {DepositOwnerMismatchError} when the signed owner differs from `userAddress`.
|
|
48
|
+
* @throws {DepositAssetMismatchError} when the signed asset differs from the vault asset.
|
|
49
|
+
* @throws {DepositAmountMismatchError} when the signed amount differs from the gross funding amount.
|
|
50
|
+
* @throws {DepositSpenderMismatchError} when the signed spender is not VaultBundlesV1.
|
|
51
|
+
* @throws {BundlesRequirementSignatureMismatchError} when the signature deadline, nonce, or encoding is invalid.
|
|
52
|
+
* @throws {UnsupportedChainIdError} when the chain is absent from the address registry.
|
|
53
|
+
* @throws {UnknownAddressError} when VaultBundlesV1 is not registered on the target chain.
|
|
50
54
|
* @example
|
|
51
55
|
* ```ts
|
|
56
|
+
* import { vaults } from "@morpho-org/morpho-test";
|
|
52
57
|
* import { vaultV1Deposit } from "@morpho-org/morpho-sdk";
|
|
58
|
+
* import type { Address } from "viem";
|
|
59
|
+
* import { mainnet } from "viem/chains";
|
|
53
60
|
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
* }
|
|
62
|
-
*
|
|
61
|
+
* export function buildSteakUsdcDeposit(
|
|
62
|
+
* userAddress: Address,
|
|
63
|
+
* maxSharePrice: bigint,
|
|
64
|
+
* deadline: bigint,
|
|
65
|
+
* ) {
|
|
66
|
+
* const vault = vaults[mainnet.id].steakUsdc;
|
|
67
|
+
* const tx = vaultV1Deposit({
|
|
68
|
+
* vault: { chainId: mainnet.id, address: vault.address, asset: vault.asset },
|
|
69
|
+
* args: { amount: 1_000_000n, maxSharePrice, userAddress, deadline },
|
|
70
|
+
* });
|
|
71
|
+
* // tx satisfies Readonly<Transaction<VaultV1DepositAction>>
|
|
72
|
+
* return tx;
|
|
73
|
+
* }
|
|
63
74
|
* ```
|
|
64
75
|
*/
|
|
65
|
-
const vaultV1Deposit = (
|
|
66
|
-
|
|
67
|
-
|
|
76
|
+
const vaultV1Deposit = (params) => {
|
|
77
|
+
const funding = (0, common_js_1.resolveBundlesFunding)(params.args);
|
|
78
|
+
if (params.args.maxSharePrice <= 0n) {
|
|
79
|
+
throw new index_js_1.NonPositiveInputError("maxSharePrice", params.args.maxSharePrice);
|
|
68
80
|
}
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
if (
|
|
76
|
-
throw new
|
|
77
|
-
}
|
|
78
|
-
if (!(0, morpho_ts_1.isDefined)(wNative)) {
|
|
79
|
-
throw new index_js_3.ChainWNativeMissingError(chainId);
|
|
81
|
+
// Reject ABI overflow with SDK errors before calldata encoding.
|
|
82
|
+
(0, validate_js_1.validateUint256Field)(funding.value > 0n ? "nativeAmount" : "amount", funding.assets);
|
|
83
|
+
(0, validate_js_1.validateUint256Field)("maxSharePrice", params.args.maxSharePrice);
|
|
84
|
+
if (funding.value > 0n) {
|
|
85
|
+
// Reject native funding unless the vault accepts the chain's wrapped-native asset.
|
|
86
|
+
(0, validate_js_1.validateNativeVaultAsset)(params.vault.chainId, params.vault.asset);
|
|
87
|
+
if (params.args.requirementSignature != null) {
|
|
88
|
+
throw new index_js_1.UnexpectedRequirementSignatureError(params.args.requirementSignature.action.type);
|
|
80
89
|
}
|
|
81
|
-
if (!(0, viem_1.isAddressEqual)(asset, wNative)) {
|
|
82
|
-
throw new index_js_3.NativeAmountOnNonWNativeVaultError(asset, wNative);
|
|
83
|
-
}
|
|
84
|
-
actions.push(
|
|
85
|
-
// Transfers native token from Bundler3 to GeneralAdapter1 for wrapping.
|
|
86
|
-
{
|
|
87
|
-
type: "nativeTransfer",
|
|
88
|
-
args: [bundler3, generalAdapter1, nativeAmount, false /* skipRevert */],
|
|
89
|
-
}, {
|
|
90
|
-
type: "wrapNative",
|
|
91
|
-
args: [nativeAmount, generalAdapter1, false /* skipRevert */],
|
|
92
|
-
});
|
|
93
|
-
}
|
|
94
|
-
if (amount > 0n) {
|
|
95
|
-
actions.push(...(0, getTokenRequirementActions_js_1.getTokenRequirementActions)({
|
|
96
|
-
asset,
|
|
97
|
-
amount,
|
|
98
|
-
recipient: generalAdapter1,
|
|
99
|
-
requirementSignature,
|
|
100
|
-
}));
|
|
101
90
|
}
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
recipient,
|
|
113
|
-
false /* skipRevert */,
|
|
114
|
-
],
|
|
91
|
+
const common = (0, common_js_1.normalizeBundlesCommonParams)(params.args);
|
|
92
|
+
const referralFeeAssets = (0, common_js_1.getBundlesReferralFeeAssets)(funding.assets, common.referralFeePct);
|
|
93
|
+
const netAssets = funding.assets - referralFeeAssets;
|
|
94
|
+
const spender = (0, morpho_ts_1.getChainAddress)(params.vault.chainId, "bundles.vaultBundlesV1");
|
|
95
|
+
const tokenPermit = (0, common_js_1.getBundlesTokenPermit)({
|
|
96
|
+
userAddress: params.args.userAddress,
|
|
97
|
+
token: params.vault.asset,
|
|
98
|
+
spender,
|
|
99
|
+
amount: funding.assets,
|
|
100
|
+
requirementSignature: params.args.requirementSignature,
|
|
115
101
|
});
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
102
|
+
return (0, common_js_1.finalizeVaultBundlesV1Transaction)({
|
|
103
|
+
chainId: params.vault.chainId,
|
|
104
|
+
value: funding.value,
|
|
105
|
+
data: (0, viem_1.encodeFunctionData)({
|
|
106
|
+
abi: abis_js_1.vaultBundlesV1Abi,
|
|
107
|
+
functionName: "vaultBundlesV1Deposit",
|
|
108
|
+
args: [
|
|
109
|
+
params.vault.address,
|
|
110
|
+
funding.assets,
|
|
111
|
+
params.args.maxSharePrice,
|
|
112
|
+
tokenPermit,
|
|
113
|
+
common.referralFeePct,
|
|
114
|
+
common.referralFeeRecipient,
|
|
115
|
+
common.deadline,
|
|
116
|
+
],
|
|
117
|
+
}),
|
|
122
118
|
action: {
|
|
123
119
|
type: "vaultV1Deposit",
|
|
124
120
|
args: {
|
|
125
|
-
vault:
|
|
126
|
-
amount,
|
|
127
|
-
maxSharePrice,
|
|
128
|
-
|
|
129
|
-
|
|
121
|
+
vault: params.vault.address,
|
|
122
|
+
amount: funding.assets,
|
|
123
|
+
maxSharePrice: params.args.maxSharePrice,
|
|
124
|
+
nativeAmount: funding.value || undefined,
|
|
125
|
+
referralFeePct: common.referralFeePct,
|
|
126
|
+
referralFeeRecipient: common.referralFeeRecipient,
|
|
127
|
+
referralFeeAssets,
|
|
128
|
+
netAssets,
|
|
129
|
+
deadline: common.deadline,
|
|
130
130
|
},
|
|
131
131
|
},
|
|
132
|
+
metadata: params.metadata,
|
|
132
133
|
});
|
|
133
134
|
};
|
|
134
135
|
exports.vaultV1Deposit = vaultV1Deposit;
|
|
@@ -36,6 +36,7 @@ export interface VaultV1InKindRedeemParams {
|
|
|
36
36
|
* @returns A deep-frozen `Readonly<Transaction<VaultV1InKindRedeemAction>>` with `to`, `value`,
|
|
37
37
|
* `data`, and the typed action discriminator.
|
|
38
38
|
* @throws {NonPositiveInputError} when `amount` or `deadline` is not positive.
|
|
39
|
+
* @throws {InputExceedsMaxError} when `deadline` exceeds `uint256`.
|
|
39
40
|
* @throws {EmptyMarketParamsListError} when no markets are supplied.
|
|
40
41
|
* @throws {UnsupportedChainIdError} when no address registry exists for the target chain.
|
|
41
42
|
* @throws {UnknownAddressError} when VaultExitBundlesV1 is not registered on the target chain.
|
|
@@ -5,6 +5,7 @@ const morpho_ts_1 = require("@morpho-org/morpho-ts");
|
|
|
5
5
|
const viem_1 = require("viem");
|
|
6
6
|
const abis_js_1 = require("../../abis.js");
|
|
7
7
|
const index_js_1 = require("../../helpers/index.js");
|
|
8
|
+
const validate_js_1 = require("../../helpers/validate.js");
|
|
8
9
|
const index_js_2 = require("../../types/index.js");
|
|
9
10
|
const getVaultExitBundlesV1PermitStruct_js_1 = require("../signatures/getVaultExitBundlesV1PermitStruct.js");
|
|
10
11
|
/**
|
|
@@ -27,6 +28,7 @@ const getVaultExitBundlesV1PermitStruct_js_1 = require("../signatures/getVaultEx
|
|
|
27
28
|
* @returns A deep-frozen `Readonly<Transaction<VaultV1InKindRedeemAction>>` with `to`, `value`,
|
|
28
29
|
* `data`, and the typed action discriminator.
|
|
29
30
|
* @throws {NonPositiveInputError} when `amount` or `deadline` is not positive.
|
|
31
|
+
* @throws {InputExceedsMaxError} when `deadline` exceeds `uint256`.
|
|
30
32
|
* @throws {EmptyMarketParamsListError} when no markets are supplied.
|
|
31
33
|
* @throws {UnsupportedChainIdError} when no address registry exists for the target chain.
|
|
32
34
|
* @throws {UnknownAddressError} when VaultExitBundlesV1 is not registered on the target chain.
|
|
@@ -45,8 +47,7 @@ const getVaultExitBundlesV1PermitStruct_js_1 = require("../signatures/getVaultEx
|
|
|
45
47
|
const vaultV1InKindRedeem = ({ vault, args, metadata, }) => {
|
|
46
48
|
if (args.amount <= 0n)
|
|
47
49
|
throw new index_js_2.NonPositiveInputError("amount", args.amount);
|
|
48
|
-
|
|
49
|
-
throw new index_js_2.NonPositiveInputError("deadline", args.deadline);
|
|
50
|
+
(0, validate_js_1.validateDeadline)(args.deadline);
|
|
50
51
|
if (args.marketParamsList.length === 0)
|
|
51
52
|
throw new index_js_2.EmptyMarketParamsListError();
|
|
52
53
|
const to = (0, morpho_ts_1.getChainAddress)(vault.chainId, "bundles.vaultExitBundlesV1");
|
|
@@ -1,85 +1,62 @@
|
|
|
1
1
|
import { type Address } from "viem";
|
|
2
|
-
import { type
|
|
2
|
+
import { type Erc2612RequirementSignature, type Metadata, type Transaction, type VaultV1MigrateToV2Action, type VaultV1MigrateToV2AmountArgs } from "../../types/index.js";
|
|
3
3
|
/** Parameters for {@link vaultV1MigrateToV2}. */
|
|
4
4
|
export interface VaultV1MigrateToV2Params {
|
|
5
|
-
vault: {
|
|
6
|
-
chainId: number;
|
|
7
|
-
address: Address;
|
|
8
|
-
|
|
9
|
-
asset: Address;
|
|
5
|
+
readonly vault: {
|
|
6
|
+
readonly chainId: number;
|
|
7
|
+
readonly address: Address;
|
|
8
|
+
readonly asset: Address;
|
|
10
9
|
};
|
|
11
|
-
args: {
|
|
12
|
-
targetVault: Address;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
recipient: Address;
|
|
23
|
-
/** Pre-signed permit/permit2 approval for V1 share transfer. */
|
|
24
|
-
requirementSignature?: PermitRequirementSignature;
|
|
10
|
+
readonly args: VaultV1MigrateToV2AmountArgs & {
|
|
11
|
+
readonly targetVault: Address;
|
|
12
|
+
readonly targetAsset: Address;
|
|
13
|
+
readonly maxSharePriceVaultV2: bigint;
|
|
14
|
+
readonly userAddress: Address;
|
|
15
|
+
readonly recipient?: never;
|
|
16
|
+
readonly minSharePriceVaultV1?: never;
|
|
17
|
+
readonly requirementSignature?: Erc2612RequirementSignature;
|
|
18
|
+
readonly referralFeePct?: bigint;
|
|
19
|
+
readonly referralFeeRecipient?: Address;
|
|
20
|
+
readonly deadline: bigint;
|
|
25
21
|
};
|
|
26
|
-
metadata?: Metadata;
|
|
22
|
+
readonly metadata?: Metadata;
|
|
27
23
|
}
|
|
28
24
|
/**
|
|
29
|
-
*
|
|
25
|
+
* Encodes an assets-or-shares Vault V1 to Vault V2 migration through VaultBundlesV1.
|
|
30
26
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
* @
|
|
41
|
-
*
|
|
42
|
-
* @
|
|
43
|
-
* @
|
|
44
|
-
* @param params.args.targetVault - The target VaultV2 address.
|
|
45
|
-
* @param params.args.targetAsset - The underlying asset of the target V2 vault. Must equal
|
|
46
|
-
* `vault.asset`.
|
|
47
|
-
* @param params.args.shares - Number of V1 shares to migrate.
|
|
48
|
-
* @param params.args.minSharePriceVaultV1 - Minimum V1 share price in RAY (slippage protection
|
|
49
|
-
* for the redeem leg).
|
|
50
|
-
* @param params.args.maxSharePriceVaultV2 - Maximum V2 share price in RAY (inflation protection
|
|
51
|
-
* for the deposit leg).
|
|
52
|
-
* @param params.args.recipient - Address that receives the V2 vault shares.
|
|
53
|
-
* @param params.args.requirementSignature - Optional pre-signed permit/permit2 for the V1 share
|
|
54
|
-
* transfer.
|
|
55
|
-
* @param params.metadata - Optional analytics metadata attached to the bundle.
|
|
56
|
-
* @returns A deep-frozen `Transaction<VaultV1MigrateToV2Action>` with `to`, `value`, `data`, and
|
|
57
|
-
* the typed `action` discriminator the simulation layer consumes.
|
|
58
|
-
* @throws {VaultAssetMismatchError} when `targetAsset` differs from `vault.asset`.
|
|
59
|
-
* @throws {NonPositiveInputError} when `shares <= 0n` or `maxSharePriceVaultV2 <= 0n`.
|
|
60
|
-
* @throws {NegativeInputError} when `minSharePriceVaultV1 < 0n`.
|
|
61
|
-
* @throws {DepositAssetMismatchError} from `getTokenRequirementActions` when `requirementSignature`
|
|
62
|
-
* is provided and the signed asset differs from `vault.address` (the V1 share token).
|
|
63
|
-
* @throws {DepositAmountMismatchError} from `getTokenRequirementActions` when `requirementSignature`
|
|
64
|
-
* is provided and the signed amount differs from `args.shares`.
|
|
65
|
-
* @throws {Permit2ExpirationMissingError} from `getTokenRequirementActions` when a Permit2 requirement
|
|
66
|
-
* signature is missing its expiration.
|
|
27
|
+
* @param params - Source/destination vaults, exclusive migration amount, fee, permit, and deadline.
|
|
28
|
+
* @returns A deep-frozen VaultBundlesV1 migration transaction.
|
|
29
|
+
* @throws {VaultAssetMismatchError} when source and destination assets differ.
|
|
30
|
+
* @throws {SameVaultMigrationError} when source and destination vaults are identical.
|
|
31
|
+
* @throws {AmountAndSharesExclusiveError} when both amount modes or neither are supplied.
|
|
32
|
+
* @throws {NonPositiveInputError} when the selected amount, destination share-price bound, or deadline is not positive.
|
|
33
|
+
* @throws {InputExceedsMaxError} when the selected amount, `maxSharePriceVaultV2`, or `deadline` exceeds uint256.
|
|
34
|
+
* @throws {NegativeInputError} when `referralFeePct` is negative.
|
|
35
|
+
* @throws {ReferralFeePctExceededError} when `referralFeePct` is at least WAD.
|
|
36
|
+
* @throws {ReferralFeeRecipientMissingError} when a positive referral fee has no non-zero recipient.
|
|
37
|
+
* @throws {UnsupportedChainIdError} when the chain is absent from the address registry.
|
|
38
|
+
* @throws {UnknownAddressError} when VaultBundlesV1 is not registered on the target chain.
|
|
39
|
+
* @throws {BundlesPermitMismatchError} when the optional share permit is incompatible.
|
|
67
40
|
* @example
|
|
68
41
|
* ```ts
|
|
69
42
|
* import { vaultV1MigrateToV2 } from "@morpho-org/morpho-sdk";
|
|
70
43
|
*
|
|
71
44
|
* const tx = vaultV1MigrateToV2({
|
|
72
|
-
* vault: {
|
|
45
|
+
* vault: {
|
|
46
|
+
* chainId: 1,
|
|
47
|
+
* address: "0x0000000000000000000000000000000000000001",
|
|
48
|
+
* asset: "0x0000000000000000000000000000000000000003",
|
|
49
|
+
* },
|
|
73
50
|
* args: {
|
|
74
|
-
* targetVault,
|
|
75
|
-
* targetAsset: USDC,
|
|
76
51
|
* shares: 1_000_000n,
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
52
|
+
* targetVault: "0x0000000000000000000000000000000000000002",
|
|
53
|
+
* targetAsset: "0x0000000000000000000000000000000000000003",
|
|
54
|
+
* maxSharePriceVaultV2: 1_000_000_000_000_000_000_000_000_000n,
|
|
55
|
+
* userAddress: "0x0000000000000000000000000000000000000004",
|
|
56
|
+
* deadline: 1_900_000_000n,
|
|
80
57
|
* },
|
|
81
58
|
* });
|
|
82
|
-
* // tx
|
|
59
|
+
* // tx.action.type === "vaultV1MigrateToV2"
|
|
83
60
|
* ```
|
|
84
61
|
*/
|
|
85
|
-
export declare const vaultV1MigrateToV2: (
|
|
62
|
+
export declare const vaultV1MigrateToV2: (params: VaultV1MigrateToV2Params) => Readonly<Transaction<VaultV1MigrateToV2Action>>;
|