@defisaver/positions-sdk 2.1.151-midnight-2-dev → 2.1.151
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/cjs/claiming/compV3.js +1 -0
- package/cjs/config/contracts.d.ts +0 -4
- package/cjs/config/contracts.js +0 -4
- package/cjs/helpers/morphoMidnightHelpers/tenor.d.ts +2 -6
- package/cjs/helpers/morphoMidnightHelpers/tenor.js +1 -5
- package/cjs/markets/aaveV4/index.d.ts +2 -0
- package/cjs/markets/aaveV4/index.js +13 -1
- package/cjs/markets/index.d.ts +1 -1
- package/cjs/markets/index.js +1 -2
- package/cjs/markets/morphoMidnight/index.d.ts +10 -92
- package/cjs/markets/morphoMidnight/index.js +60 -519
- package/cjs/morphoMidnight/index.js +1 -11
- package/cjs/types/aaveV4.d.ts +1 -0
- package/cjs/types/aaveV4.js +1 -0
- package/cjs/types/morphoMidnight.d.ts +4 -57
- package/cjs/types/morphoMidnight.js +0 -45
- package/esm/claiming/compV3.js +1 -0
- package/esm/config/contracts.d.ts +0 -4
- package/esm/config/contracts.js +0 -4
- package/esm/helpers/morphoMidnightHelpers/tenor.d.ts +2 -6
- package/esm/helpers/morphoMidnightHelpers/tenor.js +2 -6
- package/esm/markets/aaveV4/index.d.ts +2 -0
- package/esm/markets/aaveV4/index.js +11 -0
- package/esm/markets/index.d.ts +1 -1
- package/esm/markets/index.js +1 -1
- package/esm/markets/morphoMidnight/index.d.ts +10 -92
- package/esm/markets/morphoMidnight/index.js +59 -473
- package/esm/morphoMidnight/index.js +1 -11
- package/esm/types/aaveV4.d.ts +1 -0
- package/esm/types/aaveV4.js +1 -0
- package/esm/types/morphoMidnight.d.ts +4 -57
- package/esm/types/morphoMidnight.js +0 -45
- package/package.json +2 -2
- package/src/claiming/compV3.ts +1 -0
- package/src/config/contracts.ts +0 -4
- package/src/helpers/morphoMidnightHelpers/tenor.ts +2 -6
- package/src/markets/aaveV4/index.ts +12 -0
- package/src/markets/index.ts +0 -1
- package/src/markets/morphoMidnight/index.ts +61 -724
- package/src/morphoMidnight/index.ts +1 -8
- package/src/types/aaveV4.ts +1 -0
- package/src/types/morphoMidnight.ts +3 -59
package/cjs/claiming/compV3.js
CHANGED
|
@@ -18,6 +18,7 @@ const claiming_1 = require("../types/claiming");
|
|
|
18
18
|
// `rewardConfig` set - such a market never accrues COMP, so there is nothing to claim.
|
|
19
19
|
// Not decodable by name, since the error lives in CometRewards' ABI and we call through CompV3View.
|
|
20
20
|
const NOT_SUPPORTED_ERROR_SIG = '0x9c58e3b6';
|
|
21
|
+
// Only an actual on-chain revert counts - viem reports transport failures as ContractFunctionExecutionError too.
|
|
21
22
|
const isMarketWithoutRewardsConfig = (err) => {
|
|
22
23
|
var _a;
|
|
23
24
|
if (!(err instanceof viem_1.BaseError))
|
|
@@ -89746,10 +89746,6 @@ export declare const MidnightView: {
|
|
|
89746
89746
|
readonly type: "function";
|
|
89747
89747
|
}];
|
|
89748
89748
|
readonly networks: {
|
|
89749
|
-
readonly "1": {
|
|
89750
|
-
readonly address: "0xB64FBf011343961D9AC4A04b714414E35ebE6BE0";
|
|
89751
|
-
readonly createdBlock: 25938908;
|
|
89752
|
-
};
|
|
89753
89749
|
readonly "8453": {
|
|
89754
89750
|
readonly address: "0x3aa272f329E8B562A3bA56Bb6979a44D23A28839";
|
|
89755
89751
|
readonly createdBlock: 48932293;
|
package/cjs/config/contracts.js
CHANGED
|
@@ -1131,10 +1131,6 @@ exports.MorphoBlueView = {
|
|
|
1131
1131
|
exports.MidnightView = {
|
|
1132
1132
|
"abi": [{ "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }], "name": "getMarketInfo", "outputs": [{ "components": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }, { "internalType": "uint128", "name": "totalUnits", "type": "uint128" }, { "internalType": "uint128", "name": "lossFactor", "type": "uint128" }, { "internalType": "uint128", "name": "withdrawable", "type": "uint128" }, { "internalType": "uint128", "name": "continuousFeeCredit", "type": "uint128" }, { "internalType": "uint16[7]", "name": "settlementFees", "type": "uint16[7]" }, { "internalType": "uint32", "name": "continuousFee", "type": "uint32" }, { "internalType": "uint8", "name": "tickSpacing", "type": "uint8" }, { "internalType": "uint256[]", "name": "prices", "type": "uint256[]" }], "internalType": "struct MidnightView.MarketInfo", "name": "info", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getPositionInfo", "outputs": [{ "components": [{ "internalType": "uint128", "name": "credit", "type": "uint128" }, { "internalType": "uint128", "name": "pendingFee", "type": "uint128" }, { "internalType": "uint128", "name": "debt", "type": "uint128" }, { "internalType": "uint128", "name": "collateralBitmap", "type": "uint128" }, { "internalType": "uint128[]", "name": "collateral", "type": "uint128[]" }, { "internalType": "uint256", "name": "ratio", "type": "uint256" }], "internalType": "struct MidnightView.PositionInfo", "name": "pos", "type": "tuple" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }, { "internalType": "address", "name": "_user", "type": "address" }], "name": "getRatio", "outputs": [{ "internalType": "uint256", "name": "ratio", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "components": [{ "internalType": "uint256", "name": "chainId", "type": "uint256" }, { "internalType": "address", "name": "midnight", "type": "address" }, { "internalType": "address", "name": "loanToken", "type": "address" }, { "components": [{ "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "lltv", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationCursor", "type": "uint256" }, { "internalType": "address", "name": "oracle", "type": "address" }], "internalType": "struct CollateralParams[]", "name": "collateralParams", "type": "tuple[]" }, { "internalType": "uint256", "name": "maturity", "type": "uint256" }, { "internalType": "uint256", "name": "rcfThreshold", "type": "uint256" }, { "internalType": "address", "name": "enterGate", "type": "address" }, { "internalType": "address", "name": "liquidatorGate", "type": "address" }], "internalType": "struct Market", "name": "_market", "type": "tuple" }], "name": "toId", "outputs": [{ "internalType": "bytes32", "name": "id", "type": "bytes32" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "bytes32", "name": "_id", "type": "bytes32" }], "name": "toMarket", "outputs": [{ "components": [{ "internalType": "uint256", "name": "chainId", "type": "uint256" }, { "internalType": "address", "name": "midnight", "type": "address" }, { "internalType": "address", "name": "loanToken", "type": "address" }, { "components": [{ "internalType": "address", "name": "token", "type": "address" }, { "internalType": "uint256", "name": "lltv", "type": "uint256" }, { "internalType": "uint256", "name": "liquidationCursor", "type": "uint256" }, { "internalType": "address", "name": "oracle", "type": "address" }], "internalType": "struct CollateralParams[]", "name": "collateralParams", "type": "tuple[]" }, { "internalType": "uint256", "name": "maturity", "type": "uint256" }, { "internalType": "uint256", "name": "rcfThreshold", "type": "uint256" }, { "internalType": "address", "name": "enterGate", "type": "address" }, { "internalType": "address", "name": "liquidatorGate", "type": "address" }], "internalType": "struct Market", "name": "market", "type": "tuple" }], "stateMutability": "view", "type": "function" }],
|
|
1133
1133
|
"networks": {
|
|
1134
|
-
"1": {
|
|
1135
|
-
"address": "0xB64FBf011343961D9AC4A04b714414E35ebE6BE0",
|
|
1136
|
-
"createdBlock": 25938908,
|
|
1137
|
-
},
|
|
1138
1134
|
"8453": {
|
|
1139
1135
|
"address": "0x3aa272f329E8B562A3bA56Bb6979a44D23A28839",
|
|
1140
1136
|
"createdBlock": 48932293,
|
|
@@ -41,15 +41,11 @@ interface TenorOfferFill {
|
|
|
41
41
|
/**
|
|
42
42
|
* Tenor's offer JSON is flat (market fields live on the offer). Morpho's is nested, and that nested
|
|
43
43
|
* shape is what the app encodes for `Midnight.take`. Map Tenor into that shape so recipes stay on one encoder.
|
|
44
|
-
*
|
|
45
|
-
* The core address is the one field Tenor's offer does not carry, so it is derived from the offer's own
|
|
46
|
-
* `chain_id` rather than the caller's network — an offer names the chain it was made on, and taking it
|
|
47
|
-
* against another chain's core would address a market that does not exist.
|
|
48
44
|
*/
|
|
49
45
|
export declare const tenorOfferToApiOffer: (offer: TenorOffer) => {
|
|
50
46
|
market: {
|
|
51
47
|
chain_id: string | number;
|
|
52
|
-
midnight: "0xAdedD8ab6dE832766Fedf0FaC4992E5C4D3EA18A"
|
|
48
|
+
midnight: "0xAdedD8ab6dE832766Fedf0FaC4992E5C4D3EA18A";
|
|
53
49
|
loan_token: string;
|
|
54
50
|
collaterals: TenorOfferCollateral[];
|
|
55
51
|
maturity: string | number;
|
|
@@ -77,7 +73,7 @@ export declare const tenorOfferFillToApiFill: (fill: TenorOfferFill) => {
|
|
|
77
73
|
offer: {
|
|
78
74
|
market: {
|
|
79
75
|
chain_id: string | number;
|
|
80
|
-
midnight: "0xAdedD8ab6dE832766Fedf0FaC4992E5C4D3EA18A"
|
|
76
|
+
midnight: "0xAdedD8ab6dE832766Fedf0FaC4992E5C4D3EA18A";
|
|
81
77
|
loan_token: string;
|
|
82
78
|
collaterals: TenorOfferCollateral[];
|
|
83
79
|
maturity: string | number;
|
|
@@ -34,15 +34,11 @@ const tenorFillPrice = (assets, units) => (new decimal_js_1.default(units).lte(0
|
|
|
34
34
|
/**
|
|
35
35
|
* Tenor's offer JSON is flat (market fields live on the offer). Morpho's is nested, and that nested
|
|
36
36
|
* shape is what the app encodes for `Midnight.take`. Map Tenor into that shape so recipes stay on one encoder.
|
|
37
|
-
*
|
|
38
|
-
* The core address is the one field Tenor's offer does not carry, so it is derived from the offer's own
|
|
39
|
-
* `chain_id` rather than the caller's network — an offer names the chain it was made on, and taking it
|
|
40
|
-
* against another chain's core would address a market that does not exist.
|
|
41
37
|
*/
|
|
42
38
|
const tenorOfferToApiOffer = (offer) => ({
|
|
43
39
|
market: {
|
|
44
40
|
chain_id: offer.chain_id,
|
|
45
|
-
midnight:
|
|
41
|
+
midnight: morphoMidnight_1.MIDNIGHT_BASE,
|
|
46
42
|
loan_token: offer.loan_token_address,
|
|
47
43
|
collaterals: offer.collaterals || [],
|
|
48
44
|
maturity: offer.maturity,
|
|
@@ -21,6 +21,7 @@ export declare const AAVE_V4_KELP_SPOKE: (networkId: NetworkNumber) => AaveV4Spo
|
|
|
21
21
|
export declare const AAVE_V4_LIDO_SPOKE: (networkId: NetworkNumber) => AaveV4SpokeInfo;
|
|
22
22
|
export declare const AAVE_V4_LOMBARD_BTC_SPOKE: (networkId: NetworkNumber) => AaveV4SpokeInfo;
|
|
23
23
|
export declare const AAVE_V4_MAIN_SPOKE: (networkId: NetworkNumber) => AaveV4SpokeInfo;
|
|
24
|
+
export declare const AAVE_V4_PAXG_GOLD_SPOKE: (networkId: NetworkNumber) => AaveV4SpokeInfo;
|
|
24
25
|
export declare const AAVE_V4_USDG_PENDLE_SPOKE: (networkId: NetworkNumber) => AaveV4SpokeInfo;
|
|
25
26
|
export declare const AAVE_V4_USDG_MAPLE_SPOKE: (networkId: NetworkNumber) => AaveV4SpokeInfo;
|
|
26
27
|
export declare const AaveV4Spokes: (networkId: NetworkNumber) => {
|
|
@@ -34,6 +35,7 @@ export declare const AaveV4Spokes: (networkId: NetworkNumber) => {
|
|
|
34
35
|
readonly aave_v4_lido_spoke: AaveV4SpokeInfo;
|
|
35
36
|
readonly aave_v4_lombard_btc_spoke: AaveV4SpokeInfo;
|
|
36
37
|
readonly aave_v4_main_spoke: AaveV4SpokeInfo;
|
|
38
|
+
readonly aave_v4_paxg_gold_spoke: AaveV4SpokeInfo;
|
|
37
39
|
readonly aave_v4_usdg_pendle_spoke: AaveV4SpokeInfo;
|
|
38
40
|
readonly aave_v4_usdg_maple_spoke: AaveV4SpokeInfo;
|
|
39
41
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findAaveV4SpokeByAddress = exports.getAaveV4SpokeTypeInfo = exports.AaveV4Spokes = exports.AAVE_V4_USDG_MAPLE_SPOKE = exports.AAVE_V4_USDG_PENDLE_SPOKE = exports.AAVE_V4_MAIN_SPOKE = exports.AAVE_V4_LOMBARD_BTC_SPOKE = exports.AAVE_V4_LIDO_SPOKE = exports.AAVE_V4_KELP_SPOKE = exports.AAVE_V4_GOLD_SPOKE = exports.AAVE_V4_FOREX_SPOKE = exports.AAVE_V4_ETHERFI_SPOKE = exports.AAVE_V4_ETHENA_ECOSYSTEM_SPOKE = exports.AAVE_V4_ETHENA_CORRELATED_SPOKE = exports.AAVE_V4_BLUECHIP_SPOKE = exports.getAaveV4HubByAddress = exports.getAaveV4HubTypeInfo = exports.AaveV4Hubs = exports.AAVE_V4_PAXOS_HUB = exports.AAVE_V4_PRIME_HUB = exports.AAVE_V4_PLUS_HUB = exports.AAVE_V4_CORE_HUB = void 0;
|
|
3
|
+
exports.findAaveV4SpokeByAddress = exports.getAaveV4SpokeTypeInfo = exports.AaveV4Spokes = exports.AAVE_V4_USDG_MAPLE_SPOKE = exports.AAVE_V4_USDG_PENDLE_SPOKE = exports.AAVE_V4_PAXG_GOLD_SPOKE = exports.AAVE_V4_MAIN_SPOKE = exports.AAVE_V4_LOMBARD_BTC_SPOKE = exports.AAVE_V4_LIDO_SPOKE = exports.AAVE_V4_KELP_SPOKE = exports.AAVE_V4_GOLD_SPOKE = exports.AAVE_V4_FOREX_SPOKE = exports.AAVE_V4_ETHERFI_SPOKE = exports.AAVE_V4_ETHENA_ECOSYSTEM_SPOKE = exports.AAVE_V4_ETHENA_CORRELATED_SPOKE = exports.AAVE_V4_BLUECHIP_SPOKE = exports.getAaveV4HubByAddress = exports.getAaveV4HubTypeInfo = exports.AaveV4Hubs = exports.AAVE_V4_PAXOS_HUB = exports.AAVE_V4_PRIME_HUB = exports.AAVE_V4_PLUS_HUB = exports.AAVE_V4_CORE_HUB = void 0;
|
|
4
4
|
const types_1 = require("../../types");
|
|
5
5
|
// HUBS
|
|
6
6
|
const AAVE_V4_CORE_HUB = (networkId) => ({
|
|
@@ -173,6 +173,17 @@ const AAVE_V4_MAIN_SPOKE = (networkId) => ({
|
|
|
173
173
|
],
|
|
174
174
|
});
|
|
175
175
|
exports.AAVE_V4_MAIN_SPOKE = AAVE_V4_MAIN_SPOKE;
|
|
176
|
+
const AAVE_V4_PAXG_GOLD_SPOKE = (networkId) => ({
|
|
177
|
+
chainIds: [types_1.NetworkNumber.Eth],
|
|
178
|
+
label: 'PAXG Gold',
|
|
179
|
+
value: types_1.AaveV4SpokesType.AaveV4PaxgGoldSpoke,
|
|
180
|
+
url: 'paxg-gold',
|
|
181
|
+
address: '0xAD75cE6354f87F3135cE10621d385d8D1e2562C2',
|
|
182
|
+
hubs: [
|
|
183
|
+
(0, exports.AAVE_V4_PAXOS_HUB)(types_1.NetworkNumber.Eth).address,
|
|
184
|
+
],
|
|
185
|
+
});
|
|
186
|
+
exports.AAVE_V4_PAXG_GOLD_SPOKE = AAVE_V4_PAXG_GOLD_SPOKE;
|
|
176
187
|
const AAVE_V4_USDG_PENDLE_SPOKE = (networkId) => ({
|
|
177
188
|
chainIds: [types_1.NetworkNumber.Eth],
|
|
178
189
|
label: 'USDG Pendle',
|
|
@@ -208,6 +219,7 @@ const AaveV4Spokes = (networkId) => ({
|
|
|
208
219
|
[types_1.AaveV4SpokesType.AaveV4LidoSpoke]: (0, exports.AAVE_V4_LIDO_SPOKE)(networkId),
|
|
209
220
|
[types_1.AaveV4SpokesType.AaveV4LombardBtcSpoke]: (0, exports.AAVE_V4_LOMBARD_BTC_SPOKE)(networkId),
|
|
210
221
|
[types_1.AaveV4SpokesType.AaveV4MainSpoke]: (0, exports.AAVE_V4_MAIN_SPOKE)(networkId),
|
|
222
|
+
[types_1.AaveV4SpokesType.AaveV4PaxgGoldSpoke]: (0, exports.AAVE_V4_PAXG_GOLD_SPOKE)(networkId),
|
|
211
223
|
[types_1.AaveV4SpokesType.AaveV4USDGPendleSpoke]: (0, exports.AAVE_V4_USDG_PENDLE_SPOKE)(networkId),
|
|
212
224
|
[types_1.AaveV4SpokesType.AaveV4USDGMapleSpoke]: (0, exports.AAVE_V4_USDG_MAPLE_SPOKE)(networkId),
|
|
213
225
|
});
|
package/cjs/markets/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export { CompoundMarkets, compoundV2CollateralAssets, v3ETHCollAssets, v3USDbCCo
|
|
|
3
3
|
export { SparkMarkets } from './spark';
|
|
4
4
|
export { CrvUsdMarkets } from './curveUsd';
|
|
5
5
|
export { MorphoBlueMarkets, findMorphoBlueMarket } from './morphoBlue';
|
|
6
|
-
export { MorphoMidnightMarkets, findMorphoMidnightMarket, isTenorMidnightMarket, morphoMidnightMarketCollateralParams,
|
|
6
|
+
export { MorphoMidnightMarkets, findMorphoMidnightMarket, isTenorMidnightMarket, morphoMidnightMarketCollateralParams, } from './morphoMidnight';
|
|
7
7
|
export { LlamaLendMarkets } from './llamaLend';
|
|
8
8
|
export { LiquityV2Markets, findLiquityV2MarketByAddress } from './liquityV2';
|
|
9
9
|
export { FluidMarkets, getFluidVersionsDataForNetwork, getFluidMarketInfoById, getFTokenAddress, getFluidMarketInfoByAddress, } from './fluid';
|
package/cjs/markets/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findAaveV4SpokeByAddress = exports.AaveV4Spokes = exports.getFluidMarketInfoByAddress = exports.getFTokenAddress = exports.getFluidMarketInfoById = exports.getFluidVersionsDataForNetwork = exports.FluidMarkets = exports.findLiquityV2MarketByAddress = exports.LiquityV2Markets = exports.LlamaLendMarkets = exports.
|
|
3
|
+
exports.findAaveV4SpokeByAddress = exports.AaveV4Spokes = exports.getFluidMarketInfoByAddress = exports.getFTokenAddress = exports.getFluidMarketInfoById = exports.getFluidVersionsDataForNetwork = exports.FluidMarkets = exports.findLiquityV2MarketByAddress = exports.LiquityV2Markets = exports.LlamaLendMarkets = exports.morphoMidnightMarketCollateralParams = exports.isTenorMidnightMarket = exports.findMorphoMidnightMarket = exports.MorphoMidnightMarkets = exports.findMorphoBlueMarket = exports.MorphoBlueMarkets = exports.CrvUsdMarkets = exports.SparkMarkets = exports.v3USDTCollAssets = exports.v3USDCeCollAssets = exports.v3USDCCollAssets = exports.v3USDbCCollAssets = exports.v3ETHCollAssets = exports.compoundV2CollateralAssets = exports.CompoundMarkets = exports.getAaveV3MarketByMarketAddress = exports.aaveV3AssetsDefaultMarket = exports.aaveV2AssetsDefaultMarket = exports.aaveV1AssetsDefaultMarket = exports.AaveMarkets = void 0;
|
|
4
4
|
var aave_1 = require("./aave");
|
|
5
5
|
Object.defineProperty(exports, "AaveMarkets", { enumerable: true, get: function () { return aave_1.AaveMarkets; } });
|
|
6
6
|
Object.defineProperty(exports, "aaveV1AssetsDefaultMarket", { enumerable: true, get: function () { return aave_1.aaveV1AssetsDefaultMarket; } });
|
|
@@ -27,7 +27,6 @@ Object.defineProperty(exports, "MorphoMidnightMarkets", { enumerable: true, get:
|
|
|
27
27
|
Object.defineProperty(exports, "findMorphoMidnightMarket", { enumerable: true, get: function () { return morphoMidnight_1.findMorphoMidnightMarket; } });
|
|
28
28
|
Object.defineProperty(exports, "isTenorMidnightMarket", { enumerable: true, get: function () { return morphoMidnight_1.isTenorMidnightMarket; } });
|
|
29
29
|
Object.defineProperty(exports, "morphoMidnightMarketCollateralParams", { enumerable: true, get: function () { return morphoMidnight_1.morphoMidnightMarketCollateralParams; } });
|
|
30
|
-
Object.defineProperty(exports, "morphoMidnightVisibleCollaterals", { enumerable: true, get: function () { return morphoMidnight_1.morphoMidnightVisibleCollaterals; } });
|
|
31
30
|
var llamaLend_1 = require("./llamaLend");
|
|
32
31
|
Object.defineProperty(exports, "LlamaLendMarkets", { enumerable: true, get: function () { return llamaLend_1.LlamaLendMarkets; } });
|
|
33
32
|
var liquityV2_1 = require("./liquityV2");
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { MorphoMidnightCollateralParams, MorphoMidnightMarketData, NetworkNumber } from '../../types';
|
|
2
2
|
/**
|
|
3
|
-
* Morpho Midnight core contract
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* https://docs.morpho.org/get-started/resources/addresses/.
|
|
3
|
+
* Morpho Midnight core contract on Base. Every Midnight market trades against this one, whoever curates
|
|
4
|
+
* its order book — it is part of the market struct the id is hashed from, and it is what offer tuples
|
|
5
|
+
* encode for `Midnight.take`.
|
|
7
6
|
*/
|
|
8
7
|
export declare const MIDNIGHT_BASE: "0xAdedD8ab6dE832766Fedf0FaC4992E5C4D3EA18A";
|
|
9
|
-
export declare const MIDNIGHT_ETH: "0x471686c42792F93528B000beF54bC10E3aa2045f";
|
|
10
|
-
export declare const midnightCoreAddress: (network: NetworkNumber) => "0xAdedD8ab6dE832766Fedf0FaC4992E5C4D3EA18A" | "0x471686c42792F93528B000beF54bC10E3aa2045f";
|
|
11
8
|
export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20260731: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
12
9
|
export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20260828: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
13
10
|
export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20260925: (networkId?: NetworkNumber) => MorphoMidnightMarketData;
|
|
@@ -40,48 +37,6 @@ export declare const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261030: () => Morpho
|
|
|
40
37
|
export declare const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261127: () => MorphoMidnightMarketData;
|
|
41
38
|
export declare const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20261225: () => MorphoMidnightMarketData;
|
|
42
39
|
export declare const MORPHO_MIDNIGHT_TENOR_CBETH_WETH_945_20270129: () => MorphoMidnightMarketData;
|
|
43
|
-
export declare const MORPHO_MIDNIGHT_WBTC_USDC_860_20260925_ETH: () => MorphoMidnightMarketData;
|
|
44
|
-
export declare const MORPHO_MIDNIGHT_WBTC_USDC_860_20261030_ETH: () => MorphoMidnightMarketData;
|
|
45
|
-
export declare const MORPHO_MIDNIGHT_WBTC_USDC_860_20261127_ETH: () => MorphoMidnightMarketData;
|
|
46
|
-
export declare const MORPHO_MIDNIGHT_WBTC_USDC_860_20261225_ETH: () => MorphoMidnightMarketData;
|
|
47
|
-
export declare const MORPHO_MIDNIGHT_WBTC_USDC_860_20270129_ETH: () => MorphoMidnightMarketData;
|
|
48
|
-
export declare const MORPHO_MIDNIGHT_WBTC_USDC_860_20270226_ETH: () => MorphoMidnightMarketData;
|
|
49
|
-
export declare const MORPHO_MIDNIGHT_WBTC_USDC_860_20270326_ETH: () => MorphoMidnightMarketData;
|
|
50
|
-
export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20260925_ETH: () => MorphoMidnightMarketData;
|
|
51
|
-
export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20261030_ETH: () => MorphoMidnightMarketData;
|
|
52
|
-
export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20261127_ETH: () => MorphoMidnightMarketData;
|
|
53
|
-
export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20261225_ETH: () => MorphoMidnightMarketData;
|
|
54
|
-
export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20270129_ETH: () => MorphoMidnightMarketData;
|
|
55
|
-
export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20270226_ETH: () => MorphoMidnightMarketData;
|
|
56
|
-
export declare const MORPHO_MIDNIGHT_CBBTC_USDC_860_20270326_ETH: () => MorphoMidnightMarketData;
|
|
57
|
-
export declare const MORPHO_MIDNIGHT_TENOR_REUSD_USDC_915_20260925_ETH: () => MorphoMidnightMarketData;
|
|
58
|
-
export declare const MORPHO_MIDNIGHT_TENOR_REUSD_USDC_915_20261030_ETH: () => MorphoMidnightMarketData;
|
|
59
|
-
export declare const MORPHO_MIDNIGHT_TENOR_REUSD_USDC_915_20261127_ETH: () => MorphoMidnightMarketData;
|
|
60
|
-
export declare const MORPHO_MIDNIGHT_TENOR_REUSD_USDC_915_20261225_ETH: () => MorphoMidnightMarketData;
|
|
61
|
-
export declare const MORPHO_MIDNIGHT_TENOR_SIUSD_USDC_915_20260925_ETH: () => MorphoMidnightMarketData;
|
|
62
|
-
export declare const MORPHO_MIDNIGHT_TENOR_SIUSD_USDC_915_20261030_ETH: () => MorphoMidnightMarketData;
|
|
63
|
-
export declare const MORPHO_MIDNIGHT_TENOR_SIUSD_USDC_915_20261127_ETH: () => MorphoMidnightMarketData;
|
|
64
|
-
export declare const MORPHO_MIDNIGHT_TENOR_SIUSD_USDC_915_20261225_ETH: () => MorphoMidnightMarketData;
|
|
65
|
-
export declare const MORPHO_MIDNIGHT_TENOR_STRUSD_USDC_860_20260925_ETH: () => MorphoMidnightMarketData;
|
|
66
|
-
export declare const MORPHO_MIDNIGHT_TENOR_STRUSD_USDC_860_20261030_ETH: () => MorphoMidnightMarketData;
|
|
67
|
-
export declare const MORPHO_MIDNIGHT_TENOR_STRUSD_USDC_860_20261127_ETH: () => MorphoMidnightMarketData;
|
|
68
|
-
export declare const MORPHO_MIDNIGHT_TENOR_STRUSD_USDC_860_20261225_ETH: () => MorphoMidnightMarketData;
|
|
69
|
-
export declare const MORPHO_MIDNIGHT_TENOR_USD3_USDC_915_20260925_ETH: () => MorphoMidnightMarketData;
|
|
70
|
-
export declare const MORPHO_MIDNIGHT_TENOR_USD3_USDC_915_20261030_ETH: () => MorphoMidnightMarketData;
|
|
71
|
-
export declare const MORPHO_MIDNIGHT_TENOR_USD3_USDC_915_20261127_ETH: () => MorphoMidnightMarketData;
|
|
72
|
-
export declare const MORPHO_MIDNIGHT_TENOR_USD3_USDC_915_20261225_ETH: () => MorphoMidnightMarketData;
|
|
73
|
-
export declare const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20260925_ETH: () => MorphoMidnightMarketData;
|
|
74
|
-
export declare const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261030_ETH: () => MorphoMidnightMarketData;
|
|
75
|
-
export declare const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261127_ETH: () => MorphoMidnightMarketData;
|
|
76
|
-
export declare const MORPHO_MIDNIGHT_TENOR_WETH_USDC_860_20261225_ETH: () => MorphoMidnightMarketData;
|
|
77
|
-
export declare const MORPHO_MIDNIGHT_TENOR_WSRUSD_USDC_945_20260925_ETH: () => MorphoMidnightMarketData;
|
|
78
|
-
export declare const MORPHO_MIDNIGHT_TENOR_WSRUSD_USDC_945_20261030_ETH: () => MorphoMidnightMarketData;
|
|
79
|
-
export declare const MORPHO_MIDNIGHT_TENOR_WSRUSD_USDC_945_20261127_ETH: () => MorphoMidnightMarketData;
|
|
80
|
-
export declare const MORPHO_MIDNIGHT_TENOR_WSRUSD_USDC_945_20261225_ETH: () => MorphoMidnightMarketData;
|
|
81
|
-
export declare const MORPHO_MIDNIGHT_TENOR_WSTETH_WETH_965_20260925_ETH: () => MorphoMidnightMarketData;
|
|
82
|
-
export declare const MORPHO_MIDNIGHT_TENOR_WSTETH_WETH_965_20261030_ETH: () => MorphoMidnightMarketData;
|
|
83
|
-
export declare const MORPHO_MIDNIGHT_TENOR_WSTETH_WETH_965_20261127_ETH: () => MorphoMidnightMarketData;
|
|
84
|
-
export declare const MORPHO_MIDNIGHT_TENOR_WSTETH_WETH_965_20261225_ETH: () => MorphoMidnightMarketData;
|
|
85
40
|
export declare const MorphoMidnightMarkets: (networkId: NetworkNumber) => {
|
|
86
41
|
readonly morphomidnightcbbtcusdc_860_20260731_base: MorphoMidnightMarketData;
|
|
87
42
|
readonly morphomidnightcbbtcusdc_860_20260828_base: MorphoMidnightMarketData;
|
|
@@ -115,50 +70,13 @@ export declare const MorphoMidnightMarkets: (networkId: NetworkNumber) => {
|
|
|
115
70
|
readonly morphomidnighttenorcbethweth_20261127_base: MorphoMidnightMarketData;
|
|
116
71
|
readonly morphomidnighttenorcbethweth_20261225_base: MorphoMidnightMarketData;
|
|
117
72
|
readonly morphomidnighttenorcbethweth_20270129_base: MorphoMidnightMarketData;
|
|
118
|
-
readonly morphomidnightwbtcusdc_860_20260925_eth: MorphoMidnightMarketData;
|
|
119
|
-
readonly morphomidnightwbtcusdc_860_20261030_eth: MorphoMidnightMarketData;
|
|
120
|
-
readonly morphomidnightwbtcusdc_860_20261127_eth: MorphoMidnightMarketData;
|
|
121
|
-
readonly morphomidnightwbtcusdc_860_20261225_eth: MorphoMidnightMarketData;
|
|
122
|
-
readonly morphomidnightwbtcusdc_860_20270129_eth: MorphoMidnightMarketData;
|
|
123
|
-
readonly morphomidnightwbtcusdc_860_20270226_eth: MorphoMidnightMarketData;
|
|
124
|
-
readonly morphomidnightwbtcusdc_860_20270326_eth: MorphoMidnightMarketData;
|
|
125
|
-
readonly morphomidnightcbbtcusdc_860_20260925_eth: MorphoMidnightMarketData;
|
|
126
|
-
readonly morphomidnightcbbtcusdc_860_20261030_eth: MorphoMidnightMarketData;
|
|
127
|
-
readonly morphomidnightcbbtcusdc_860_20261127_eth: MorphoMidnightMarketData;
|
|
128
|
-
readonly morphomidnightcbbtcusdc_860_20261225_eth: MorphoMidnightMarketData;
|
|
129
|
-
readonly morphomidnightcbbtcusdc_860_20270129_eth: MorphoMidnightMarketData;
|
|
130
|
-
readonly morphomidnightcbbtcusdc_860_20270226_eth: MorphoMidnightMarketData;
|
|
131
|
-
readonly morphomidnightcbbtcusdc_860_20270326_eth: MorphoMidnightMarketData;
|
|
132
|
-
readonly morphomidnighttenorreusdusdc_20260925_eth: MorphoMidnightMarketData;
|
|
133
|
-
readonly morphomidnighttenorreusdusdc_20261030_eth: MorphoMidnightMarketData;
|
|
134
|
-
readonly morphomidnighttenorreusdusdc_20261127_eth: MorphoMidnightMarketData;
|
|
135
|
-
readonly morphomidnighttenorreusdusdc_20261225_eth: MorphoMidnightMarketData;
|
|
136
|
-
readonly morphomidnighttenorsiusdusdc_20260925_eth: MorphoMidnightMarketData;
|
|
137
|
-
readonly morphomidnighttenorsiusdusdc_20261030_eth: MorphoMidnightMarketData;
|
|
138
|
-
readonly morphomidnighttenorsiusdusdc_20261127_eth: MorphoMidnightMarketData;
|
|
139
|
-
readonly morphomidnighttenorsiusdusdc_20261225_eth: MorphoMidnightMarketData;
|
|
140
|
-
readonly morphomidnighttenorstrusdusdc_20260925_eth: MorphoMidnightMarketData;
|
|
141
|
-
readonly morphomidnighttenorstrusdusdc_20261030_eth: MorphoMidnightMarketData;
|
|
142
|
-
readonly morphomidnighttenorstrusdusdc_20261127_eth: MorphoMidnightMarketData;
|
|
143
|
-
readonly morphomidnighttenorstrusdusdc_20261225_eth: MorphoMidnightMarketData;
|
|
144
|
-
readonly morphomidnighttenorusd3usdc_20260925_eth: MorphoMidnightMarketData;
|
|
145
|
-
readonly morphomidnighttenorusd3usdc_20261030_eth: MorphoMidnightMarketData;
|
|
146
|
-
readonly morphomidnighttenorusd3usdc_20261127_eth: MorphoMidnightMarketData;
|
|
147
|
-
readonly morphomidnighttenorusd3usdc_20261225_eth: MorphoMidnightMarketData;
|
|
148
|
-
readonly morphomidnighttenorwethusdc_20260925_eth: MorphoMidnightMarketData;
|
|
149
|
-
readonly morphomidnighttenorwethusdc_20261030_eth: MorphoMidnightMarketData;
|
|
150
|
-
readonly morphomidnighttenorwethusdc_20261127_eth: MorphoMidnightMarketData;
|
|
151
|
-
readonly morphomidnighttenorwethusdc_20261225_eth: MorphoMidnightMarketData;
|
|
152
|
-
readonly morphomidnighttenorwsrusdusdc_20260925_eth: MorphoMidnightMarketData;
|
|
153
|
-
readonly morphomidnighttenorwsrusdusdc_20261030_eth: MorphoMidnightMarketData;
|
|
154
|
-
readonly morphomidnighttenorwsrusdusdc_20261127_eth: MorphoMidnightMarketData;
|
|
155
|
-
readonly morphomidnighttenorwsrusdusdc_20261225_eth: MorphoMidnightMarketData;
|
|
156
|
-
readonly morphomidnighttenorwstethweth_20260925_eth: MorphoMidnightMarketData;
|
|
157
|
-
readonly morphomidnighttenorwstethweth_20261030_eth: MorphoMidnightMarketData;
|
|
158
|
-
readonly morphomidnighttenorwstethweth_20261127_eth: MorphoMidnightMarketData;
|
|
159
|
-
readonly morphomidnighttenorwstethweth_20261225_eth: MorphoMidnightMarketData;
|
|
160
73
|
};
|
|
161
74
|
export declare const isTenorMidnightMarket: (market: Pick<MorphoMidnightMarketData, "curator"> | string) => boolean;
|
|
162
75
|
export declare const findMorphoMidnightMarket: (marketId: string, network?: NetworkNumber) => MorphoMidnightMarketData | undefined;
|
|
163
|
-
|
|
164
|
-
|
|
76
|
+
/**
|
|
77
|
+
* The market's collateral set as the chain knows it: the listed collaterals followed by the curator's
|
|
78
|
+
* hidden ones. This — not `collaterals` — is what a `Market` struct takes, since the market id is the hash
|
|
79
|
+
* of that struct. Anything assembling one for a contract call goes through here so it can't quietly build
|
|
80
|
+
* a market of its own instead.
|
|
81
|
+
*/
|
|
82
|
+
export declare const morphoMidnightMarketCollateralParams: (market: Pick<MorphoMidnightMarketData, "collaterals" | "hiddenCollaterals">) => MorphoMidnightCollateralParams[];
|