@morpho-org/morpho-sdk 5.9.0 → 6.0.0-next.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/MIGRATION-v5-to-v6.md +201 -0
- package/README.md +58 -40
- package/lib/cjs/actions/blue/borrow.d.ts +62 -61
- package/lib/cjs/actions/blue/borrow.js +48 -80
- package/lib/cjs/actions/blue/common.d.ts +99 -0
- package/lib/cjs/actions/blue/common.js +318 -0
- package/lib/cjs/actions/blue/refinance.d.ts +72 -112
- package/lib/cjs/actions/blue/refinance.js +97 -199
- package/lib/cjs/actions/blue/repay.d.ts +72 -68
- package/lib/cjs/actions/blue/repay.js +56 -118
- package/lib/cjs/actions/blue/repayWithdrawCollateral.d.ts +85 -90
- package/lib/cjs/actions/blue/repayWithdrawCollateral.js +148 -137
- package/lib/cjs/actions/blue/supply.d.ts +62 -45
- package/lib/cjs/actions/blue/supply.js +94 -70
- package/lib/cjs/actions/blue/supplyCollateral.d.ts +63 -40
- package/lib/cjs/actions/blue/supplyCollateral.js +52 -69
- package/lib/cjs/actions/blue/supplyCollateralBorrow.d.ts +82 -90
- package/lib/cjs/actions/blue/supplyCollateralBorrow.js +133 -120
- package/lib/cjs/actions/blue/withdraw.d.ts +68 -79
- package/lib/cjs/actions/blue/withdraw.js +101 -97
- package/lib/cjs/actions/blue/withdrawCollateral.d.ts +56 -28
- package/lib/cjs/actions/blue/withdrawCollateral.js +45 -50
- package/lib/cjs/actions/index.d.ts +1 -1
- package/lib/cjs/actions/requirements/blue/getBlueAuthorizationRequirement.d.ts +29 -17
- package/lib/cjs/actions/requirements/blue/getBlueAuthorizationRequirement.js +60 -19
- package/lib/cjs/actions/requirements/blue/getBlueBundlesV1TokenRequirements.d.ts +80 -0
- package/lib/cjs/actions/requirements/blue/getBlueBundlesV1TokenRequirements.js +207 -0
- package/lib/cjs/actions/requirements/blue/getUnusedPermit2Nonce.d.ts +48 -0
- package/lib/cjs/actions/requirements/blue/getUnusedPermit2Nonce.js +72 -0
- package/lib/cjs/actions/requirements/blue/index.d.ts +2 -0
- package/lib/cjs/actions/requirements/blue/index.js +2 -0
- package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +10 -7
- package/lib/cjs/actions/requirements/encode/encodeBlueSignatureAuthorization.js +30 -5
- package/lib/cjs/actions/requirements/encode/encodeErc20Approval.d.ts +2 -1
- package/lib/cjs/actions/requirements/encode/encodeErc20Approval.js +7 -2
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit.d.ts +16 -7
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit.js +33 -6
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit2TransferFrom.d.ts +61 -0
- package/lib/cjs/actions/requirements/encode/encodeErc20Permit2TransferFrom.js +123 -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/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +1 -1
- package/lib/cjs/actions/requirements/getRequirementsApproval.d.ts +5 -4
- package/lib/cjs/actions/requirements/getRequirementsApproval.js +5 -4
- package/lib/cjs/actions/signatures/getTokenRequirementActions.d.ts +1 -0
- package/lib/cjs/actions/signatures/getTokenRequirementActions.js +4 -0
- package/lib/cjs/bundler/actions.d.ts +4 -4
- package/lib/cjs/bundler/actions.js +4 -4
- package/lib/cjs/client/morphoViemExtension.d.ts +2 -1
- package/lib/cjs/client/morphoViemExtension.js +2 -1
- package/lib/cjs/entities/blue/blue.d.ts +806 -374
- package/lib/cjs/entities/blue/blue.js +447 -696
- package/lib/cjs/entities/index.d.ts +1 -0
- package/lib/cjs/helpers/computeVaultV1Reallocations.d.ts +3 -9
- package/lib/cjs/helpers/computeVaultV1Reallocations.js +3 -9
- package/lib/cjs/helpers/validate.d.ts +14 -23
- package/lib/cjs/helpers/validate.js +30 -48
- package/lib/cjs/helpers/validateRequirementSpender.d.ts +2 -1
- package/lib/cjs/helpers/validateRequirementSpender.js +2 -0
- package/lib/cjs/types/action.d.ts +146 -162
- package/lib/cjs/types/action.js +29 -2
- package/lib/cjs/types/client.d.ts +9 -0
- package/lib/cjs/types/error.d.ts +141 -14
- package/lib/cjs/types/error.js +198 -21
- package/lib/cjs/types/sharedLiquidity.d.ts +0 -7
- package/lib/esm/actions/blue/borrow.d.ts +62 -61
- package/lib/esm/actions/blue/borrow.js +48 -80
- package/lib/esm/actions/blue/common.d.ts +99 -0
- package/lib/esm/actions/blue/common.js +306 -0
- package/lib/esm/actions/blue/refinance.d.ts +72 -112
- package/lib/esm/actions/blue/refinance.js +98 -200
- package/lib/esm/actions/blue/repay.d.ts +72 -68
- package/lib/esm/actions/blue/repay.js +56 -118
- package/lib/esm/actions/blue/repayWithdrawCollateral.d.ts +85 -90
- package/lib/esm/actions/blue/repayWithdrawCollateral.js +149 -138
- package/lib/esm/actions/blue/supply.d.ts +62 -45
- package/lib/esm/actions/blue/supply.js +94 -70
- package/lib/esm/actions/blue/supplyCollateral.d.ts +63 -40
- package/lib/esm/actions/blue/supplyCollateral.js +52 -69
- package/lib/esm/actions/blue/supplyCollateralBorrow.d.ts +82 -90
- package/lib/esm/actions/blue/supplyCollateralBorrow.js +134 -121
- package/lib/esm/actions/blue/withdraw.d.ts +68 -79
- package/lib/esm/actions/blue/withdraw.js +100 -96
- package/lib/esm/actions/blue/withdrawCollateral.d.ts +56 -28
- package/lib/esm/actions/blue/withdrawCollateral.js +45 -50
- package/lib/esm/actions/index.d.ts +1 -1
- package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.d.ts +29 -17
- package/lib/esm/actions/requirements/blue/getBlueAuthorizationRequirement.js +63 -22
- package/lib/esm/actions/requirements/blue/getBlueBundlesV1TokenRequirements.d.ts +80 -0
- package/lib/esm/actions/requirements/blue/getBlueBundlesV1TokenRequirements.js +203 -0
- package/lib/esm/actions/requirements/blue/getUnusedPermit2Nonce.d.ts +48 -0
- package/lib/esm/actions/requirements/blue/getUnusedPermit2Nonce.js +68 -0
- package/lib/esm/actions/requirements/blue/index.d.ts +2 -0
- package/lib/esm/actions/requirements/blue/index.js +2 -0
- package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.d.ts +10 -7
- package/lib/esm/actions/requirements/encode/encodeBlueSignatureAuthorization.js +31 -6
- package/lib/esm/actions/requirements/encode/encodeErc20Approval.d.ts +2 -1
- package/lib/esm/actions/requirements/encode/encodeErc20Approval.js +8 -3
- package/lib/esm/actions/requirements/encode/encodeErc20Permit.d.ts +16 -7
- package/lib/esm/actions/requirements/encode/encodeErc20Permit.js +34 -7
- package/lib/esm/actions/requirements/encode/encodeErc20Permit2TransferFrom.d.ts +61 -0
- package/lib/esm/actions/requirements/encode/encodeErc20Permit2TransferFrom.js +119 -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/generalAdapter/getGeneralAdapterRequirementsPermit.d.ts +1 -1
- package/lib/esm/actions/requirements/getRequirementsApproval.d.ts +5 -4
- package/lib/esm/actions/requirements/getRequirementsApproval.js +5 -4
- package/lib/esm/actions/signatures/getTokenRequirementActions.d.ts +1 -0
- package/lib/esm/actions/signatures/getTokenRequirementActions.js +5 -1
- package/lib/esm/bundler/actions.d.ts +4 -4
- package/lib/esm/bundler/actions.js +4 -4
- package/lib/esm/client/morphoViemExtension.d.ts +2 -1
- package/lib/esm/client/morphoViemExtension.js +2 -1
- package/lib/esm/entities/blue/blue.d.ts +806 -374
- package/lib/esm/entities/blue/blue.js +453 -702
- package/lib/esm/entities/index.d.ts +1 -0
- package/lib/esm/helpers/computeVaultV1Reallocations.d.ts +3 -9
- package/lib/esm/helpers/computeVaultV1Reallocations.js +3 -9
- package/lib/esm/helpers/validate.d.ts +14 -23
- package/lib/esm/helpers/validate.js +30 -48
- package/lib/esm/helpers/validateRequirementSpender.d.ts +2 -1
- package/lib/esm/helpers/validateRequirementSpender.js +2 -0
- package/lib/esm/types/action.d.ts +146 -162
- package/lib/esm/types/action.js +28 -2
- package/lib/esm/types/client.d.ts +9 -0
- package/lib/esm/types/error.d.ts +141 -14
- package/lib/esm/types/error.js +184 -17
- package/lib/esm/types/sharedLiquidity.d.ts +0 -7
- package/package.json +4 -3
- package/lib/cjs/actions/blue/buildAssetFundingActions.d.ts +0 -47
- package/lib/cjs/actions/blue/buildAssetFundingActions.js +0 -63
- package/lib/cjs/actions/blue/buildReallocationActions.d.ts +0 -69
- package/lib/cjs/actions/blue/buildReallocationActions.js +0 -141
- package/lib/cjs/actions/blue/resolveRepayFunding.d.ts +0 -66
- package/lib/cjs/actions/blue/resolveRepayFunding.js +0 -85
- package/lib/esm/actions/blue/buildAssetFundingActions.d.ts +0 -47
- package/lib/esm/actions/blue/buildAssetFundingActions.js +0 -59
- package/lib/esm/actions/blue/buildReallocationActions.d.ts +0 -69
- package/lib/esm/actions/blue/buildReallocationActions.js +0 -135
- package/lib/esm/actions/blue/resolveRepayFunding.d.ts +0 -66
- package/lib/esm/actions/blue/resolveRepayFunding.js +0 -81
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { type MarketParams } from "@morpho-org/blue-sdk";
|
|
2
|
-
import type { Action } from "../../bundler/index.js";
|
|
3
|
-
import type { BlueReallocationPlan, VaultV1Reallocation, VaultV2BlueReallocation } from "../../types/index.js";
|
|
4
|
-
/**
|
|
5
|
-
* Builds PublicAllocator V1 reallocation actions for a Morpho Blue target market.
|
|
6
|
-
*
|
|
7
|
-
* Preserves the supplied reallocation order and aggregates each allocator call's native fee.
|
|
8
|
-
*
|
|
9
|
-
* @param params.reallocations - Validated Vault V1 reallocations to execute.
|
|
10
|
-
* @param params.targetMarketParams - Morpho Blue market receiving the reallocated liquidity.
|
|
11
|
-
* @returns The reallocation actions and aggregate native fee, with zero V2 penalty assets.
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
14
|
-
export declare const buildVaultV1ReallocationActions: ({ reallocations, targetMarketParams, }: {
|
|
15
|
-
readonly reallocations: readonly VaultV1Reallocation[];
|
|
16
|
-
readonly targetMarketParams: MarketParams;
|
|
17
|
-
}) => {
|
|
18
|
-
actions: Action[];
|
|
19
|
-
fee: bigint;
|
|
20
|
-
penaltyAssets: bigint;
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Builds BluePublicAllocator reallocation actions for a Morpho Blue target market.
|
|
24
|
-
*
|
|
25
|
-
* Prepends one aggregate loan-token funding action when penalties are non-zero, then builds one
|
|
26
|
-
* allocator action per validated Vault V2 reallocation.
|
|
27
|
-
*
|
|
28
|
-
* @param params.chainId - Chain whose registered Bundler3 and allocator addresses are used.
|
|
29
|
-
* @param params.reallocations - Validated Vault V2 Blue reallocations to execute.
|
|
30
|
-
* @param params.targetMarketParams - Morpho Blue market receiving the reallocated liquidity.
|
|
31
|
-
* @param params.penaltyFundingSource - Optional source of penalty assets. Defaults to the
|
|
32
|
-
* transaction initiator.
|
|
33
|
-
* @returns The funding and reallocation actions and aggregate penalty assets, with zero native fee.
|
|
34
|
-
* @internal
|
|
35
|
-
*/
|
|
36
|
-
export declare const buildVaultV2BlueReallocationActions: ({ chainId, reallocations, targetMarketParams, penaltyFundingSource, }: {
|
|
37
|
-
readonly chainId: number;
|
|
38
|
-
readonly reallocations: readonly VaultV2BlueReallocation[];
|
|
39
|
-
readonly targetMarketParams: MarketParams;
|
|
40
|
-
readonly penaltyFundingSource?: "initiator" | "generalAdapter1";
|
|
41
|
-
}) => {
|
|
42
|
-
actions: Action[];
|
|
43
|
-
fee: bigint;
|
|
44
|
-
penaltyAssets: bigint;
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* Validates a homogeneous Blue reallocation plan and builds its Bundler actions.
|
|
48
|
-
*
|
|
49
|
-
* Dispatches Vault V1 and Vault V2 plans to their version-specific builders. V1 plans aggregate
|
|
50
|
-
* native fees, while V2 plans aggregate loan-token penalties using the selected funding source.
|
|
51
|
-
*
|
|
52
|
-
* @param params.chainId - Chain whose registered Bundler3 and allocator addresses are used.
|
|
53
|
-
* @param params.reallocations - Optional homogeneous Vault V1 or Vault V2 reallocation plan.
|
|
54
|
-
* @param params.targetMarketParams - Morpho Blue market receiving the reallocated liquidity.
|
|
55
|
-
* @param params.penaltyFundingSource - Optional source of V2 penalty assets. Defaults to the
|
|
56
|
-
* transaction initiator.
|
|
57
|
-
* @returns The reallocation actions, aggregate V1 native fee, and aggregate V2 penalty assets.
|
|
58
|
-
* @internal
|
|
59
|
-
*/
|
|
60
|
-
export declare const buildBlueReallocationActions: ({ chainId, reallocations, targetMarketParams, penaltyFundingSource, }: {
|
|
61
|
-
readonly chainId: number;
|
|
62
|
-
readonly reallocations: BlueReallocationPlan | undefined;
|
|
63
|
-
readonly targetMarketParams: MarketParams;
|
|
64
|
-
readonly penaltyFundingSource?: "initiator" | "generalAdapter1";
|
|
65
|
-
}) => {
|
|
66
|
-
actions: Action[];
|
|
67
|
-
fee: bigint;
|
|
68
|
-
penaltyAssets: bigint;
|
|
69
|
-
};
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.buildBlueReallocationActions = exports.buildVaultV2BlueReallocationActions = exports.buildVaultV1ReallocationActions = void 0;
|
|
4
|
-
const blue_sdk_1 = require("@morpho-org/blue-sdk");
|
|
5
|
-
const validate_js_1 = require("../../helpers/validate.js");
|
|
6
|
-
/**
|
|
7
|
-
* Builds PublicAllocator V1 reallocation actions for a Morpho Blue target market.
|
|
8
|
-
*
|
|
9
|
-
* Preserves the supplied reallocation order and aggregates each allocator call's native fee.
|
|
10
|
-
*
|
|
11
|
-
* @param params.reallocations - Validated Vault V1 reallocations to execute.
|
|
12
|
-
* @param params.targetMarketParams - Morpho Blue market receiving the reallocated liquidity.
|
|
13
|
-
* @returns The reallocation actions and aggregate native fee, with zero V2 penalty assets.
|
|
14
|
-
* @internal
|
|
15
|
-
*/
|
|
16
|
-
const buildVaultV1ReallocationActions = ({ reallocations, targetMarketParams, }) => {
|
|
17
|
-
let fee = 0n;
|
|
18
|
-
const actions = [];
|
|
19
|
-
for (const reallocation of reallocations) {
|
|
20
|
-
actions.push({
|
|
21
|
-
type: "reallocateTo",
|
|
22
|
-
args: [
|
|
23
|
-
reallocation.vault,
|
|
24
|
-
reallocation.fee,
|
|
25
|
-
reallocation.withdrawals.map((withdrawal) => ({
|
|
26
|
-
marketParams: withdrawal.marketParams,
|
|
27
|
-
amount: withdrawal.amount,
|
|
28
|
-
})),
|
|
29
|
-
targetMarketParams,
|
|
30
|
-
false,
|
|
31
|
-
],
|
|
32
|
-
});
|
|
33
|
-
fee += reallocation.fee;
|
|
34
|
-
}
|
|
35
|
-
return { actions, fee, penaltyAssets: 0n };
|
|
36
|
-
};
|
|
37
|
-
exports.buildVaultV1ReallocationActions = buildVaultV1ReallocationActions;
|
|
38
|
-
/**
|
|
39
|
-
* Builds BluePublicAllocator reallocation actions for a Morpho Blue target market.
|
|
40
|
-
*
|
|
41
|
-
* Prepends one aggregate loan-token funding action when penalties are non-zero, then builds one
|
|
42
|
-
* allocator action per validated Vault V2 reallocation.
|
|
43
|
-
*
|
|
44
|
-
* @param params.chainId - Chain whose registered Bundler3 and allocator addresses are used.
|
|
45
|
-
* @param params.reallocations - Validated Vault V2 Blue reallocations to execute.
|
|
46
|
-
* @param params.targetMarketParams - Morpho Blue market receiving the reallocated liquidity.
|
|
47
|
-
* @param params.penaltyFundingSource - Optional source of penalty assets. Defaults to the
|
|
48
|
-
* transaction initiator.
|
|
49
|
-
* @returns The funding and reallocation actions and aggregate penalty assets, with zero native fee.
|
|
50
|
-
* @internal
|
|
51
|
-
*/
|
|
52
|
-
const buildVaultV2BlueReallocationActions = ({ chainId, reallocations, targetMarketParams, penaltyFundingSource = "initiator", }) => {
|
|
53
|
-
const actions = [];
|
|
54
|
-
const penaltyAssets = reallocations.reduce((total, reallocation) => total +
|
|
55
|
-
blue_sdk_1.VaultV2BluePublicAllocatorConfigUtils.getPenaltyAssets(reallocation, reallocation.assets), 0n);
|
|
56
|
-
if (penaltyAssets > 0n) {
|
|
57
|
-
const { bundler3: { bundler3, generalAdapter1 }, } = (0, blue_sdk_1.getChainAddresses)(chainId);
|
|
58
|
-
actions.push(penaltyFundingSource === "generalAdapter1"
|
|
59
|
-
? {
|
|
60
|
-
type: "erc20Transfer",
|
|
61
|
-
args: [
|
|
62
|
-
targetMarketParams.loanToken,
|
|
63
|
-
bundler3,
|
|
64
|
-
penaltyAssets,
|
|
65
|
-
generalAdapter1,
|
|
66
|
-
false,
|
|
67
|
-
],
|
|
68
|
-
}
|
|
69
|
-
: {
|
|
70
|
-
type: "erc20TransferFrom",
|
|
71
|
-
args: [
|
|
72
|
-
targetMarketParams.loanToken,
|
|
73
|
-
penaltyAssets,
|
|
74
|
-
bundler3,
|
|
75
|
-
false,
|
|
76
|
-
],
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
for (const reallocation of reallocations) {
|
|
80
|
-
actions.push(reallocation.from.type === "market"
|
|
81
|
-
? {
|
|
82
|
-
type: "vaultV2BluePublicAllocatorReallocate",
|
|
83
|
-
args: [
|
|
84
|
-
reallocation.vault,
|
|
85
|
-
reallocation.from.adapter,
|
|
86
|
-
reallocation.from.marketParams,
|
|
87
|
-
reallocation.to.adapter,
|
|
88
|
-
targetMarketParams,
|
|
89
|
-
reallocation.assets,
|
|
90
|
-
reallocation.penalty,
|
|
91
|
-
false,
|
|
92
|
-
],
|
|
93
|
-
}
|
|
94
|
-
: {
|
|
95
|
-
type: "vaultV2BluePublicAllocatorAllocateFromIdle",
|
|
96
|
-
args: [
|
|
97
|
-
reallocation.vault,
|
|
98
|
-
reallocation.to.adapter,
|
|
99
|
-
targetMarketParams,
|
|
100
|
-
reallocation.assets,
|
|
101
|
-
reallocation.penalty,
|
|
102
|
-
false,
|
|
103
|
-
],
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
return { actions, fee: 0n, penaltyAssets };
|
|
107
|
-
};
|
|
108
|
-
exports.buildVaultV2BlueReallocationActions = buildVaultV2BlueReallocationActions;
|
|
109
|
-
/**
|
|
110
|
-
* Validates a homogeneous Blue reallocation plan and builds its Bundler actions.
|
|
111
|
-
*
|
|
112
|
-
* Dispatches Vault V1 and Vault V2 plans to their version-specific builders. V1 plans aggregate
|
|
113
|
-
* native fees, while V2 plans aggregate loan-token penalties using the selected funding source.
|
|
114
|
-
*
|
|
115
|
-
* @param params.chainId - Chain whose registered Bundler3 and allocator addresses are used.
|
|
116
|
-
* @param params.reallocations - Optional homogeneous Vault V1 or Vault V2 reallocation plan.
|
|
117
|
-
* @param params.targetMarketParams - Morpho Blue market receiving the reallocated liquidity.
|
|
118
|
-
* @param params.penaltyFundingSource - Optional source of V2 penalty assets. Defaults to the
|
|
119
|
-
* transaction initiator.
|
|
120
|
-
* @returns The reallocation actions, aggregate V1 native fee, and aggregate V2 penalty assets.
|
|
121
|
-
* @internal
|
|
122
|
-
*/
|
|
123
|
-
const buildBlueReallocationActions = ({ chainId, reallocations, targetMarketParams, penaltyFundingSource, }) => {
|
|
124
|
-
const reallocationPlan = (0, validate_js_1.validateAndNormalizeReallocations)({
|
|
125
|
-
reallocations,
|
|
126
|
-
targetMarketId: targetMarketParams.id,
|
|
127
|
-
chainId,
|
|
128
|
-
});
|
|
129
|
-
return reallocationPlan.type === "vaultV1"
|
|
130
|
-
? (0, exports.buildVaultV1ReallocationActions)({
|
|
131
|
-
reallocations: reallocationPlan.reallocations,
|
|
132
|
-
targetMarketParams,
|
|
133
|
-
})
|
|
134
|
-
: (0, exports.buildVaultV2BlueReallocationActions)({
|
|
135
|
-
chainId,
|
|
136
|
-
reallocations: reallocationPlan.reallocations,
|
|
137
|
-
targetMarketParams,
|
|
138
|
-
penaltyFundingSource,
|
|
139
|
-
});
|
|
140
|
-
};
|
|
141
|
-
exports.buildBlueReallocationActions = buildBlueReallocationActions;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import type { MarketId } from "@morpho-org/blue-sdk";
|
|
2
|
-
/**
|
|
3
|
-
* Pre-resolved repay amounts (plus `maxSharePrice`) validated by {@link resolveRepayFunding}.
|
|
4
|
-
*
|
|
5
|
-
* These are the fields the entity layer (`MorphoBlue.repay` / `repayWithdrawCollateral`) resolves
|
|
6
|
-
* from live market/position state before either repay builder assembles the bundle.
|
|
7
|
-
*
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
export interface RepayFundingInput {
|
|
11
|
-
/** (assets mode) ERC-20 loan tokens pulled from the payer. */
|
|
12
|
-
readonly amount: bigint;
|
|
13
|
-
/** (shares mode) Borrow shares to repay. Discriminates the mode when `> 0n`. */
|
|
14
|
-
readonly shares: bigint;
|
|
15
|
-
/** Native ETH wrapped into wNative to help fund the repay. */
|
|
16
|
-
readonly nativeAmount: bigint;
|
|
17
|
-
/** Loan tokens routed into `GeneralAdapter1` (see `RepayActionAmountArgs`). */
|
|
18
|
-
readonly transferAmount: bigint;
|
|
19
|
-
/** Maximum acceptable repay share price (in ray). */
|
|
20
|
-
readonly maxSharePrice: bigint;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Derived repay funding values consumed by the repay builders.
|
|
24
|
-
*
|
|
25
|
-
* @internal
|
|
26
|
-
*/
|
|
27
|
-
export interface RepayFunding {
|
|
28
|
-
/** `true` when repaying an exact share count (full close); `false` in assets mode. */
|
|
29
|
-
readonly isSharesMode: boolean;
|
|
30
|
-
/** Assets passed to `morphoRepay` (`transferAmount` in assets mode, `0n` in shares mode). */
|
|
31
|
-
readonly repayAssets: bigint;
|
|
32
|
-
/** Shares passed to `morphoRepay` (`shares` in shares mode, `0n` in assets mode). */
|
|
33
|
-
readonly repayShares: bigint;
|
|
34
|
-
/** ERC-20 loan tokens pulled into `GeneralAdapter1` (net of any wrapped native). */
|
|
35
|
-
readonly erc20Amount: bigint;
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Resolves and validates the repay funding envelope shared by `blueRepay` and
|
|
39
|
-
* `blueRepayWithdrawCollateral`.
|
|
40
|
-
*
|
|
41
|
-
* Encode-only and synchronous — reads no on-chain state and does no amount arithmetic beyond
|
|
42
|
-
* deriving the bundle values from the pre-resolved args (the entity layer resolves the amounts
|
|
43
|
-
* upstream). Runs the shared mode/amount guards, discriminates assets vs shares mode on
|
|
44
|
-
* `shares > 0n`, then validates the funding so the assembled bundle neither strands over-pulled
|
|
45
|
-
* tokens nor under-funds the repay:
|
|
46
|
-
*
|
|
47
|
-
* - **assets mode** (`shares` `0n`): repays `transferAmount` (`= amount + nativeAmount`, additive
|
|
48
|
-
* like `blueSupply`); ERC-20 pulled = `amount`.
|
|
49
|
-
* - **shares mode** (`shares > 0n`): repays exact `shares`; ERC-20 pulled = `transferAmount` (already
|
|
50
|
-
* net of native).
|
|
51
|
-
*
|
|
52
|
-
* Single source of truth for the funding math both repay builders depend on — a correctness fix here
|
|
53
|
-
* applies to both paths instead of risking a silent divergence between two copies.
|
|
54
|
-
*
|
|
55
|
-
* @param input - The pre-resolved repay amounts plus the repay `maxSharePrice`.
|
|
56
|
-
* @param marketId - Market id used to tag the thrown errors.
|
|
57
|
-
* @returns `{ isSharesMode, repayAssets, repayShares, erc20Amount }` — the mode discriminator and the
|
|
58
|
-
* amounts the repay builders assemble the bundle from.
|
|
59
|
-
* @throws {NonPositiveInputError} when `maxSharePrice <= 0n` or total repay funding is zero.
|
|
60
|
-
* @throws {NegativeInputError} when `amount`, `shares`, `nativeAmount`, or `transferAmount` is negative.
|
|
61
|
-
* @throws {MutuallyExclusiveRepayAmountsError} when both `amount` and `shares` are `> 0n`.
|
|
62
|
-
* @throws {TransferAmountNotEqualToAssetsError} when in assets mode and
|
|
63
|
-
* `transferAmount !== amount + nativeAmount`.
|
|
64
|
-
* @internal
|
|
65
|
-
*/
|
|
66
|
-
export declare const resolveRepayFunding: ({ amount, shares, nativeAmount, transferAmount, maxSharePrice, }: RepayFundingInput, marketId: MarketId) => RepayFunding;
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveRepayFunding = void 0;
|
|
4
|
-
const index_js_1 = require("../../types/index.js");
|
|
5
|
-
/**
|
|
6
|
-
* Resolves and validates the repay funding envelope shared by `blueRepay` and
|
|
7
|
-
* `blueRepayWithdrawCollateral`.
|
|
8
|
-
*
|
|
9
|
-
* Encode-only and synchronous — reads no on-chain state and does no amount arithmetic beyond
|
|
10
|
-
* deriving the bundle values from the pre-resolved args (the entity layer resolves the amounts
|
|
11
|
-
* upstream). Runs the shared mode/amount guards, discriminates assets vs shares mode on
|
|
12
|
-
* `shares > 0n`, then validates the funding so the assembled bundle neither strands over-pulled
|
|
13
|
-
* tokens nor under-funds the repay:
|
|
14
|
-
*
|
|
15
|
-
* - **assets mode** (`shares` `0n`): repays `transferAmount` (`= amount + nativeAmount`, additive
|
|
16
|
-
* like `blueSupply`); ERC-20 pulled = `amount`.
|
|
17
|
-
* - **shares mode** (`shares > 0n`): repays exact `shares`; ERC-20 pulled = `transferAmount` (already
|
|
18
|
-
* net of native).
|
|
19
|
-
*
|
|
20
|
-
* Single source of truth for the funding math both repay builders depend on — a correctness fix here
|
|
21
|
-
* applies to both paths instead of risking a silent divergence between two copies.
|
|
22
|
-
*
|
|
23
|
-
* @param input - The pre-resolved repay amounts plus the repay `maxSharePrice`.
|
|
24
|
-
* @param marketId - Market id used to tag the thrown errors.
|
|
25
|
-
* @returns `{ isSharesMode, repayAssets, repayShares, erc20Amount }` — the mode discriminator and the
|
|
26
|
-
* amounts the repay builders assemble the bundle from.
|
|
27
|
-
* @throws {NonPositiveInputError} when `maxSharePrice <= 0n` or total repay funding is zero.
|
|
28
|
-
* @throws {NegativeInputError} when `amount`, `shares`, `nativeAmount`, or `transferAmount` is negative.
|
|
29
|
-
* @throws {MutuallyExclusiveRepayAmountsError} when both `amount` and `shares` are `> 0n`.
|
|
30
|
-
* @throws {TransferAmountNotEqualToAssetsError} when in assets mode and
|
|
31
|
-
* `transferAmount !== amount + nativeAmount`.
|
|
32
|
-
* @internal
|
|
33
|
-
*/
|
|
34
|
-
const resolveRepayFunding = ({ amount, shares, nativeAmount, transferAmount, maxSharePrice, }, marketId) => {
|
|
35
|
-
if (maxSharePrice <= 0n) {
|
|
36
|
-
throw new index_js_1.NonPositiveInputError("maxSharePrice", maxSharePrice);
|
|
37
|
-
}
|
|
38
|
-
if (nativeAmount < 0n) {
|
|
39
|
-
throw new index_js_1.NegativeInputError("nativeAmount", nativeAmount);
|
|
40
|
-
}
|
|
41
|
-
if (amount < 0n) {
|
|
42
|
-
throw new index_js_1.NegativeInputError("amount", amount);
|
|
43
|
-
}
|
|
44
|
-
if (shares < 0n) {
|
|
45
|
-
throw new index_js_1.NegativeInputError("shares", shares);
|
|
46
|
-
}
|
|
47
|
-
if (amount > 0n && shares > 0n) {
|
|
48
|
-
throw new index_js_1.MutuallyExclusiveRepayAmountsError(marketId);
|
|
49
|
-
}
|
|
50
|
-
// Shares mode repays an exact share count and pulls `transferAmount` ERC-20
|
|
51
|
-
// (already net of native), skimming the residual. Assets mode repays
|
|
52
|
-
// `transferAmount` (= amount + native, additive) and pulls `amount`.
|
|
53
|
-
const isSharesMode = shares > 0n;
|
|
54
|
-
const repayAssets = isSharesMode ? 0n : transferAmount;
|
|
55
|
-
const repayShares = shares;
|
|
56
|
-
const erc20Amount = isSharesMode ? transferAmount : amount;
|
|
57
|
-
// Validate the pre-resolved funding. Assets mode is additive like `blueSupply`:
|
|
58
|
-
// the ERC-20 pulled (`amount`) plus the wrapped `nativeAmount` must equal the
|
|
59
|
-
// assets repaid, and the total must be positive — so the adapter neither strands
|
|
60
|
-
// over-pulled tokens nor under-funds the repay. Shares mode pulls `transferAmount`
|
|
61
|
-
// ERC-20 (0 on a fully-native repay) and wraps `nativeAmount`; the bundle must
|
|
62
|
-
// fund the repay with a non-negative transfer and a positive total.
|
|
63
|
-
if (isSharesMode) {
|
|
64
|
-
if (transferAmount < 0n) {
|
|
65
|
-
throw new index_js_1.NegativeInputError("transferAmount", transferAmount);
|
|
66
|
-
}
|
|
67
|
-
if (transferAmount + nativeAmount <= 0n) {
|
|
68
|
-
throw new index_js_1.NonPositiveInputError("transferAmount + nativeAmount", transferAmount + nativeAmount);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
if (transferAmount !== amount + nativeAmount) {
|
|
73
|
-
throw new index_js_1.TransferAmountNotEqualToAssetsError({
|
|
74
|
-
transferAmount,
|
|
75
|
-
assets: amount + nativeAmount,
|
|
76
|
-
market: marketId,
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
if (repayAssets <= 0n) {
|
|
80
|
-
throw new index_js_1.NonPositiveInputError("amount + nativeAmount", repayAssets);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return { isSharesMode, repayAssets, repayShares, erc20Amount };
|
|
84
|
-
};
|
|
85
|
-
exports.resolveRepayFunding = resolveRepayFunding;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { Address } from "viem";
|
|
2
|
-
import type { Action } from "../../bundler/index.js";
|
|
3
|
-
import type { PermitRequirementSignature } from "../../types/index.js";
|
|
4
|
-
/** Parameters for {@link buildAssetFundingActions}. */
|
|
5
|
-
export interface BuildAssetFundingActionsParams {
|
|
6
|
-
/** Chain the operation runs on — resolves adapter addresses and validates wNative. */
|
|
7
|
-
readonly chainId: number;
|
|
8
|
-
/** Asset wrapped and/or pulled into `GeneralAdapter1` (loan token, collateral token, …). */
|
|
9
|
-
readonly asset: Address;
|
|
10
|
-
/** ERC-20 amount of `asset` to pull from the payer (`0n` on a fully-native funding). */
|
|
11
|
-
readonly erc20Amount: bigint;
|
|
12
|
-
/** Native ETH to wrap into wNative before the pull (`0n` when not wrapping). */
|
|
13
|
-
readonly nativeAmount: bigint;
|
|
14
|
-
/** Optional pre-signed permit/permit2 approval for the ERC-20 pull. */
|
|
15
|
-
readonly requirementSignature?: PermitRequirementSignature;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Builds the shared asset-funding actions — native wrapping followed by the ERC-20 pull — that move
|
|
19
|
-
* `asset` into `GeneralAdapter1` before a bundled Morpho operation (`blueSupply`,
|
|
20
|
-
* `blueSupplyCollateral`, `blueSupplyCollateralBorrow`, `blueRepay`, `blueRepayWithdrawCollateral`).
|
|
21
|
-
*
|
|
22
|
-
* Encode-only and synchronous: returns a fresh `Action[]` (never mutates its inputs, mirroring
|
|
23
|
-
* `buildVaultV2BlueReallocationActions`) and reads no on-chain state. When `nativeAmount > 0n`, validates
|
|
24
|
-
* `asset` is the chain's wNative and emits `nativeTransfer → wrapNative`. When `erc20Amount > 0n`,
|
|
25
|
-
* pulls the ERC-20 via a signed permit/permit2 (`requirementSignature`) or a plain
|
|
26
|
-
* `erc20TransferFrom` — `getTokenRequirementActions` emits the latter itself when no signature is
|
|
27
|
-
* supplied. A fully-native funding emits no ERC-20 action; funding nothing returns `[]`.
|
|
28
|
-
*
|
|
29
|
-
* Single source of truth for the native-wrap + ERC-20-pull composition every bundled Blue funding
|
|
30
|
-
* path depends on — a fix here applies to all of them instead of risking a silent divergence
|
|
31
|
-
* between copies.
|
|
32
|
-
*
|
|
33
|
-
* @param params - See {@link BuildAssetFundingActionsParams}.
|
|
34
|
-
* @returns The `nativeTransfer`/`wrapNative`/pull actions, in bundle order (empty when nothing is
|
|
35
|
-
* funded).
|
|
36
|
-
* @throws {ChainWNativeMissingError} when `nativeAmount > 0n` but the chain has no configured wNative.
|
|
37
|
-
* @throws {NativeAmountOnNonWNativeAssetError} when `nativeAmount > 0n` but `asset` is not the
|
|
38
|
-
* chain's wNative.
|
|
39
|
-
* @throws {DepositAssetMismatchError} from `getTokenRequirementActions` when `requirementSignature` is
|
|
40
|
-
* provided and the signed asset differs from `asset`.
|
|
41
|
-
* @throws {DepositAmountMismatchError} from `getTokenRequirementActions` when `requirementSignature` is
|
|
42
|
-
* provided and the signed amount differs from `erc20Amount`.
|
|
43
|
-
* @throws {Permit2ExpirationMissingError} from `getTokenRequirementActions` when a Permit2 requirement
|
|
44
|
-
* signature is missing its expiration.
|
|
45
|
-
* @internal
|
|
46
|
-
*/
|
|
47
|
-
export declare const buildAssetFundingActions: ({ chainId, asset, erc20Amount, nativeAmount, requirementSignature, }: BuildAssetFundingActionsParams) => Action[];
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { getChainAddresses } from "@morpho-org/blue-sdk";
|
|
2
|
-
import { validateNativeAsset } from "../../helpers/index.js";
|
|
3
|
-
import { getTokenRequirementActions } from "../signatures/getTokenRequirementActions.js";
|
|
4
|
-
/**
|
|
5
|
-
* Builds the shared asset-funding actions — native wrapping followed by the ERC-20 pull — that move
|
|
6
|
-
* `asset` into `GeneralAdapter1` before a bundled Morpho operation (`blueSupply`,
|
|
7
|
-
* `blueSupplyCollateral`, `blueSupplyCollateralBorrow`, `blueRepay`, `blueRepayWithdrawCollateral`).
|
|
8
|
-
*
|
|
9
|
-
* Encode-only and synchronous: returns a fresh `Action[]` (never mutates its inputs, mirroring
|
|
10
|
-
* `buildVaultV2BlueReallocationActions`) and reads no on-chain state. When `nativeAmount > 0n`, validates
|
|
11
|
-
* `asset` is the chain's wNative and emits `nativeTransfer → wrapNative`. When `erc20Amount > 0n`,
|
|
12
|
-
* pulls the ERC-20 via a signed permit/permit2 (`requirementSignature`) or a plain
|
|
13
|
-
* `erc20TransferFrom` — `getTokenRequirementActions` emits the latter itself when no signature is
|
|
14
|
-
* supplied. A fully-native funding emits no ERC-20 action; funding nothing returns `[]`.
|
|
15
|
-
*
|
|
16
|
-
* Single source of truth for the native-wrap + ERC-20-pull composition every bundled Blue funding
|
|
17
|
-
* path depends on — a fix here applies to all of them instead of risking a silent divergence
|
|
18
|
-
* between copies.
|
|
19
|
-
*
|
|
20
|
-
* @param params - See {@link BuildAssetFundingActionsParams}.
|
|
21
|
-
* @returns The `nativeTransfer`/`wrapNative`/pull actions, in bundle order (empty when nothing is
|
|
22
|
-
* funded).
|
|
23
|
-
* @throws {ChainWNativeMissingError} when `nativeAmount > 0n` but the chain has no configured wNative.
|
|
24
|
-
* @throws {NativeAmountOnNonWNativeAssetError} when `nativeAmount > 0n` but `asset` is not the
|
|
25
|
-
* chain's wNative.
|
|
26
|
-
* @throws {DepositAssetMismatchError} from `getTokenRequirementActions` when `requirementSignature` is
|
|
27
|
-
* provided and the signed asset differs from `asset`.
|
|
28
|
-
* @throws {DepositAmountMismatchError} from `getTokenRequirementActions` when `requirementSignature` is
|
|
29
|
-
* provided and the signed amount differs from `erc20Amount`.
|
|
30
|
-
* @throws {Permit2ExpirationMissingError} from `getTokenRequirementActions` when a Permit2 requirement
|
|
31
|
-
* signature is missing its expiration.
|
|
32
|
-
* @internal
|
|
33
|
-
*/
|
|
34
|
-
export const buildAssetFundingActions = ({ chainId, asset, erc20Amount, nativeAmount, requirementSignature, }) => {
|
|
35
|
-
const { bundler3: { generalAdapter1, bundler3 }, } = getChainAddresses(chainId);
|
|
36
|
-
const actions = [];
|
|
37
|
-
// Wrap native into wNative before pulling the ERC-20 remainder.
|
|
38
|
-
if (nativeAmount > 0n) {
|
|
39
|
-
validateNativeAsset(chainId, asset);
|
|
40
|
-
actions.push({
|
|
41
|
-
type: "nativeTransfer",
|
|
42
|
-
args: [bundler3, generalAdapter1, nativeAmount, false],
|
|
43
|
-
}, {
|
|
44
|
-
type: "wrapNative",
|
|
45
|
-
args: [nativeAmount, generalAdapter1, false],
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
// Pull the ERC-20 portion (0 on a fully native funding). getTokenRequirementActions emits a plain
|
|
49
|
-
// erc20TransferFrom itself when no permit/permit2 signature is supplied.
|
|
50
|
-
if (erc20Amount > 0n) {
|
|
51
|
-
actions.push(...getTokenRequirementActions({
|
|
52
|
-
asset,
|
|
53
|
-
amount: erc20Amount,
|
|
54
|
-
recipient: generalAdapter1,
|
|
55
|
-
requirementSignature,
|
|
56
|
-
}));
|
|
57
|
-
}
|
|
58
|
-
return actions;
|
|
59
|
-
};
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { type MarketParams } from "@morpho-org/blue-sdk";
|
|
2
|
-
import type { Action } from "../../bundler/index.js";
|
|
3
|
-
import type { BlueReallocationPlan, VaultV1Reallocation, VaultV2BlueReallocation } from "../../types/index.js";
|
|
4
|
-
/**
|
|
5
|
-
* Builds PublicAllocator V1 reallocation actions for a Morpho Blue target market.
|
|
6
|
-
*
|
|
7
|
-
* Preserves the supplied reallocation order and aggregates each allocator call's native fee.
|
|
8
|
-
*
|
|
9
|
-
* @param params.reallocations - Validated Vault V1 reallocations to execute.
|
|
10
|
-
* @param params.targetMarketParams - Morpho Blue market receiving the reallocated liquidity.
|
|
11
|
-
* @returns The reallocation actions and aggregate native fee, with zero V2 penalty assets.
|
|
12
|
-
* @internal
|
|
13
|
-
*/
|
|
14
|
-
export declare const buildVaultV1ReallocationActions: ({ reallocations, targetMarketParams, }: {
|
|
15
|
-
readonly reallocations: readonly VaultV1Reallocation[];
|
|
16
|
-
readonly targetMarketParams: MarketParams;
|
|
17
|
-
}) => {
|
|
18
|
-
actions: Action[];
|
|
19
|
-
fee: bigint;
|
|
20
|
-
penaltyAssets: bigint;
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Builds BluePublicAllocator reallocation actions for a Morpho Blue target market.
|
|
24
|
-
*
|
|
25
|
-
* Prepends one aggregate loan-token funding action when penalties are non-zero, then builds one
|
|
26
|
-
* allocator action per validated Vault V2 reallocation.
|
|
27
|
-
*
|
|
28
|
-
* @param params.chainId - Chain whose registered Bundler3 and allocator addresses are used.
|
|
29
|
-
* @param params.reallocations - Validated Vault V2 Blue reallocations to execute.
|
|
30
|
-
* @param params.targetMarketParams - Morpho Blue market receiving the reallocated liquidity.
|
|
31
|
-
* @param params.penaltyFundingSource - Optional source of penalty assets. Defaults to the
|
|
32
|
-
* transaction initiator.
|
|
33
|
-
* @returns The funding and reallocation actions and aggregate penalty assets, with zero native fee.
|
|
34
|
-
* @internal
|
|
35
|
-
*/
|
|
36
|
-
export declare const buildVaultV2BlueReallocationActions: ({ chainId, reallocations, targetMarketParams, penaltyFundingSource, }: {
|
|
37
|
-
readonly chainId: number;
|
|
38
|
-
readonly reallocations: readonly VaultV2BlueReallocation[];
|
|
39
|
-
readonly targetMarketParams: MarketParams;
|
|
40
|
-
readonly penaltyFundingSource?: "initiator" | "generalAdapter1";
|
|
41
|
-
}) => {
|
|
42
|
-
actions: Action[];
|
|
43
|
-
fee: bigint;
|
|
44
|
-
penaltyAssets: bigint;
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* Validates a homogeneous Blue reallocation plan and builds its Bundler actions.
|
|
48
|
-
*
|
|
49
|
-
* Dispatches Vault V1 and Vault V2 plans to their version-specific builders. V1 plans aggregate
|
|
50
|
-
* native fees, while V2 plans aggregate loan-token penalties using the selected funding source.
|
|
51
|
-
*
|
|
52
|
-
* @param params.chainId - Chain whose registered Bundler3 and allocator addresses are used.
|
|
53
|
-
* @param params.reallocations - Optional homogeneous Vault V1 or Vault V2 reallocation plan.
|
|
54
|
-
* @param params.targetMarketParams - Morpho Blue market receiving the reallocated liquidity.
|
|
55
|
-
* @param params.penaltyFundingSource - Optional source of V2 penalty assets. Defaults to the
|
|
56
|
-
* transaction initiator.
|
|
57
|
-
* @returns The reallocation actions, aggregate V1 native fee, and aggregate V2 penalty assets.
|
|
58
|
-
* @internal
|
|
59
|
-
*/
|
|
60
|
-
export declare const buildBlueReallocationActions: ({ chainId, reallocations, targetMarketParams, penaltyFundingSource, }: {
|
|
61
|
-
readonly chainId: number;
|
|
62
|
-
readonly reallocations: BlueReallocationPlan | undefined;
|
|
63
|
-
readonly targetMarketParams: MarketParams;
|
|
64
|
-
readonly penaltyFundingSource?: "initiator" | "generalAdapter1";
|
|
65
|
-
}) => {
|
|
66
|
-
actions: Action[];
|
|
67
|
-
fee: bigint;
|
|
68
|
-
penaltyAssets: bigint;
|
|
69
|
-
};
|