@1delta/margin-fetcher 0.0.11 → 0.0.13
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/dist/lending/aave-v2-type/types.d.ts +2 -0
- package/dist/lending/aave-v2-type/types.d.ts.map +1 -1
- package/dist/lending/fetchLender.d.ts.map +1 -1
- package/dist/lending/fetchLender.js +25 -29
- package/dist/lending/fetchLenderAll.d.ts +2 -1
- package/dist/lending/fetchLenderAll.d.ts.map +1 -1
- package/dist/lending/fetchLenderAll.js +3 -3
- package/dist/lending/fetchLenderExt.d.ts +2 -1
- package/dist/lending/fetchLenderExt.d.ts.map +1 -1
- package/dist/lending/fetchLenderExt.js +28 -14
- package/dist/lending/index.d.ts +2 -0
- package/dist/lending/index.d.ts.map +1 -1
- package/dist/lending/index.js +2 -0
- package/dist/lending/morpho/convertPublic.d.ts +3 -5
- package/dist/lending/morpho/convertPublic.d.ts.map +1 -1
- package/dist/lending/morpho/convertPublic.js +16 -12
- package/dist/lending/morpho/fetchPublic.js +1 -1
- package/dist/lending/morpho/publicCallBuild.d.ts +1 -4
- package/dist/lending/morpho/publicCallBuild.d.ts.map +1 -1
- package/dist/lending/morpho/types.d.ts +2 -0
- package/dist/lending/morpho/types.d.ts.map +1 -1
- package/dist/lending/user-data/aave-v3-type/userCallBuild.d.ts.map +1 -1
- package/dist/lending/user-data/aave-v3-type/userCallBuild.js +4 -7
- package/dist/lending/user-data/abis.d.ts +88 -0
- package/dist/lending/user-data/abis.d.ts.map +1 -1
- package/dist/lending/user-data/abis.js +5 -1
- package/dist/lending/user-data/compound-v3/userCallParse.d.ts.map +1 -1
- package/dist/lending/user-data/compound-v3/userCallParse.js +1 -0
- package/dist/lending/user-data/fetchUserData.d.ts +4 -4
- package/dist/lending/user-data/fetchUserData.d.ts.map +1 -1
- package/dist/lending/user-data/fetchUserData.js +46 -25
- package/dist/lending/user-data/morpho/userCallBuild.d.ts +4 -5
- package/dist/lending/user-data/morpho/userCallBuild.d.ts.map +1 -1
- package/dist/lending/user-data/morpho/userCallBuild.js +15 -9
- package/dist/lending/user-data/morpho/userCallParse.d.ts +1 -2
- package/dist/lending/user-data/morpho/userCallParse.d.ts.map +1 -1
- package/dist/lending/user-data/morpho/userCallParse.js +15 -12
- package/dist/lending/user-data/types.d.ts +30 -19
- package/dist/lending/user-data/types.d.ts.map +1 -1
- package/dist/lending/user-data/types.js +12 -0
- package/dist/lending/user-data/utils/createGeneralUserState.d.ts +4 -4
- package/dist/lending/user-data/utils/createGeneralUserState.d.ts.map +1 -1
- package/dist/lending/user-data/utils/createGeneralUserState.js +24 -17
- package/dist/utils/index.d.ts +5 -3
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +20 -11
- package/dist/utils/parsing.d.ts +1 -0
- package/dist/utils/parsing.d.ts.map +1 -1
- package/dist/utils/parsing.js +3 -0
- package/dist/yields/index.d.ts.map +1 -1
- package/dist/yields/index.js +12 -5
- package/package.json +1 -1
- package/src/abis/morpho/blue.ts +99 -0
- package/src/abis/morpho/lens.ts +31 -0
- package/src/lending/aave-v2-type/types.ts +2 -0
- package/src/lending/fetchLender.ts +86 -49
- package/src/lending/fetchLenderAll.ts +30 -0
- package/src/lending/fetchLenderExt.ts +82 -0
- package/src/lending/index.ts +3 -1
- package/src/lending/morpho/convertPublic.ts +153 -0
- package/src/lending/morpho/fetchPublic.ts +80 -0
- package/src/lending/morpho/publicCallBuild.ts +11 -0
- package/src/lending/morpho/types.ts +129 -0
- package/src/lending/user-data/aave-v3-type/userCallBuild.ts +2 -8
- package/src/lending/user-data/abis.ts +4 -1
- package/src/lending/user-data/compound-v3/userCallParse.ts +1 -0
- package/src/lending/user-data/fetchUserData.ts +114 -33
- package/src/lending/user-data/morpho/decoder.ts +71 -0
- package/src/lending/user-data/morpho/morphoLib.ts +61 -0
- package/src/lending/user-data/morpho/types.ts +12 -0
- package/src/lending/user-data/morpho/userCallBuild.ts +63 -0
- package/src/lending/user-data/morpho/userCallParse.ts +150 -0
- package/src/lending/user-data/morpho/userCallParseNoDeploy.ts +168 -0
- package/src/lending/user-data/types.ts +64 -42
- package/src/lending/user-data/utils/createGeneralUserState.ts +56 -32
- package/src/utils/index.ts +32 -14
- package/src/utils/parsing.ts +5 -0
- package/src/yields/index.ts +13 -4
- package/test/lenderData.test.ts +13251 -13649
- package/test/mainPrices.test.ts +1 -13
- package/test/morpho.test.ts +20 -0
- package/test/userDataMorpho.test.ts +79 -0
- package/test/utils.ts +13 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RewardsMap } from "../aave-v3-type/types";
|
|
2
|
+
import { GenericCurrency } from "../types";
|
|
2
3
|
export declare enum AaveV2TypeGetReserveDataIndexes {
|
|
3
4
|
availableLiquidity = 0,
|
|
4
5
|
totalStableDebt = 1,
|
|
@@ -44,6 +45,7 @@ export declare enum AaveV2TypeIncentivesControllerPoolInfoIndexes {
|
|
|
44
45
|
export interface AaveV2GeneralPublicResponse {
|
|
45
46
|
data: {
|
|
46
47
|
[tokenSymbol: string]: {
|
|
48
|
+
asset: GenericCurrency;
|
|
47
49
|
totalDeposits: number;
|
|
48
50
|
totalDebtStable: number;
|
|
49
51
|
totalDebt: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lending/aave-v2-type/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lending/aave-v2-type/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAG3C,oBAAY,+BAA+B;IACzC,kBAAkB,IAAI;IACtB,eAAe,IAAA;IACf,iBAAiB,IAAA;IACjB,aAAa,IAAA;IACb,kBAAkB,IAAA;IAClB,gBAAgB,IAA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ACN,CAAC,CAAC,CAAC,EAAE;oBACH,QAAQ,EAAE,CAAC,CAAC;oBAEZ,sBAAsB,EAAE,MAAM,CAAC;oBAC/B,gBAAgB,EAAE,MAAM,CAAC;oBACzB,YAAY,EAAE,MAAM,CAAA;iBACrB,CAAA;aACF,CAAA;YAGD,gBAAgB,EAAE,OAAO,CAAC;YAC1B,gBAAgB,EAAE,OAAO,CAAC;YAC1B,SAAS,EAAE,OAAO,CAAC;YACnB,QAAQ,EAAE,OAAO,CAAC;YAClB,QAAQ,EAAE,OAAO,CAAC;SACnB,CAAA;KACF,CAAA;IACD,OAAO,EAAE,MAAM,CAAA;CAChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchLender.d.ts","sourceRoot":"","sources":["../../src/lending/fetchLender.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetchLender.d.ts","sourceRoot":"","sources":["../../src/lending/fetchLender.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AAWnE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAG/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AA+E1C,eAAO,MAAM,mBAAmB,GAC9B,SAAS,MAAM,EACf,SAAS,MAAM,EAAE,EACjB,QAAQ;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EACnC,kBAAkB,gBAAgB,EAClC,gBAAgB,sBAAsB,EACtC,YAAW,MAAM,OAAO,CAAC,gBAAgB,CAExC,KACA,OAAO,CAAC;IAAE,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CAqDnC,CAAA"}
|
|
@@ -12,7 +12,7 @@ import { InitLensAbi } from '../abis/init/InitLens';
|
|
|
12
12
|
import { CometAbi } from '../abis/compound-v3/Comet';
|
|
13
13
|
import { CometExtAbi } from '../abis/compound-v3/CometExt';
|
|
14
14
|
import { IrgetterAbi } from '../abis/compound-v3/IrGetter';
|
|
15
|
-
import { isAaveV2Type, isAaveV3Original, isAaveV3Type, isCompoundV3, isInit } from '../utils';
|
|
15
|
+
import { isAaveV2Type, isAaveV3Original, isAaveV3Type, isCompoundV3, isInit, } from '../utils';
|
|
16
16
|
import { buildAaveV2StyleLenderReserveCall } from './aave-v2-type/publicCallBuild';
|
|
17
17
|
import { buildAaveV3StyleLenderReserveCall } from './aave-v3-type/publicCallBuild';
|
|
18
18
|
import { buildInitStyleLenderReserveCall } from './init/publicCallBuild';
|
|
@@ -30,18 +30,22 @@ function buildLenderCall(chainId, lender) {
|
|
|
30
30
|
return buildAaveV2StyleLenderReserveCall(chainId, lender);
|
|
31
31
|
if (isAaveV3Type(lender))
|
|
32
32
|
return buildAaveV3StyleLenderReserveCall(chainId, lender);
|
|
33
|
+
if (isCompoundV3(lender))
|
|
34
|
+
return buildCompoundV3StyleLenderReserveCall(chainId, lender);
|
|
33
35
|
if (isInit(lender))
|
|
34
36
|
return buildInitStyleLenderReserveCall(chainId, lender);
|
|
35
|
-
return
|
|
37
|
+
return [];
|
|
36
38
|
}
|
|
37
39
|
function getLenderDataConverter(lender, chainId, prices, additionalYields, tokenList = {}) {
|
|
38
40
|
if (isAaveV2Type(lender))
|
|
39
41
|
return getAaveV2ReservesDataConverter(lender, chainId, prices, additionalYields, tokenList);
|
|
40
42
|
if (isAaveV3Type(lender))
|
|
41
43
|
return getAaveV3ReservesDataConverter(lender, chainId, prices, additionalYields, tokenList);
|
|
44
|
+
if (isCompoundV3(lender))
|
|
45
|
+
return getCompoundV3ReservesDataConverter(lender, chainId, prices, additionalYields, tokenList);
|
|
42
46
|
if (isInit(lender))
|
|
43
47
|
return getInitReservesDataConverter(lender, chainId, prices, additionalYields, tokenList);
|
|
44
|
-
return
|
|
48
|
+
return [() => null, 0];
|
|
45
49
|
}
|
|
46
50
|
const getAbi = (lender) => {
|
|
47
51
|
if (isAaveV2Type(lender))
|
|
@@ -49,33 +53,23 @@ const getAbi = (lender) => {
|
|
|
49
53
|
...ProtocolDataProviderAbi,
|
|
50
54
|
...UniswapV2PairAbi,
|
|
51
55
|
...RewarderAbi,
|
|
52
|
-
...IncentivesControllerAbi
|
|
56
|
+
...IncentivesControllerAbi,
|
|
53
57
|
];
|
|
54
58
|
if (isAaveV3Original(lender))
|
|
55
|
-
return [
|
|
56
|
-
...AavePoolV3UpgradedAbi,
|
|
57
|
-
...AaveV3ProtocolDataProviderAbi
|
|
58
|
-
];
|
|
59
|
+
return [...AavePoolV3UpgradedAbi, ...AaveV3ProtocolDataProviderAbi];
|
|
59
60
|
if (lender === Lender.YLDR)
|
|
60
|
-
return [
|
|
61
|
-
...YLDRProtocolDataProviderAbi,
|
|
62
|
-
];
|
|
61
|
+
return [...YLDRProtocolDataProviderAbi];
|
|
63
62
|
if (isAaveV3Type(lender))
|
|
64
|
-
return [
|
|
65
|
-
...AavePoolLegacyAbi,
|
|
66
|
-
...AavePoolDataProviderLegacyAbi
|
|
67
|
-
];
|
|
63
|
+
return [...AavePoolLegacyAbi, ...AavePoolDataProviderLegacyAbi];
|
|
68
64
|
if (isCompoundV3(lender))
|
|
69
|
-
return [
|
|
70
|
-
...IrgetterAbi,
|
|
71
|
-
...CometAbi,
|
|
72
|
-
...CometExtAbi
|
|
73
|
-
];
|
|
65
|
+
return [...IrgetterAbi, ...CometAbi, ...CometExtAbi];
|
|
74
66
|
if (isInit(lender))
|
|
75
67
|
return InitLensAbi;
|
|
76
68
|
return [];
|
|
77
69
|
};
|
|
78
|
-
export const getLenderPublicData = async (chainId, lenders, prices, additionalYields, multicallRetry, tokenList = async () => {
|
|
70
|
+
export const getLenderPublicData = async (chainId, lenders, prices, additionalYields, multicallRetry, tokenList = async () => {
|
|
71
|
+
return {};
|
|
72
|
+
}) => {
|
|
79
73
|
let calls = [];
|
|
80
74
|
for (const lender of lenders) {
|
|
81
75
|
const abi = getAbi(lender);
|
|
@@ -94,15 +88,17 @@ export const getLenderPublicData = async (chainId, lenders, prices, additionalYi
|
|
|
94
88
|
let currentSlice = 0;
|
|
95
89
|
for (const lender of lenders) {
|
|
96
90
|
const [converter, sliceLength] = getLenderDataConverter(lender, chainId, prices, additionalYields, list);
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
91
|
+
if (sliceLength > 0) {
|
|
92
|
+
const data = rawResults.slice(currentSlice, currentSlice + sliceLength);
|
|
93
|
+
const convertedData = converter(data);
|
|
94
|
+
if (!convertedData) {
|
|
95
|
+
invalidLenders.push(lender);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
lenderData[lender] = convertedData;
|
|
99
|
+
}
|
|
100
|
+
currentSlice += sliceLength;
|
|
104
101
|
}
|
|
105
|
-
currentSlice += sliceLength;
|
|
106
102
|
}
|
|
107
103
|
return lenderData;
|
|
108
104
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { AdditionalYields, MulticallRetryFunction } from '../types';
|
|
2
2
|
import { Lender } from '@1delta/asset-registry';
|
|
3
|
+
import { GenericTokenList } from './types';
|
|
3
4
|
export declare const getLenderPublicDataAll: (chainId: string, lenders: Lender[], prices: {
|
|
4
5
|
[asset: string]: number;
|
|
5
|
-
}, additionalYields: AdditionalYields, multicallRetry: MulticallRetryFunction) => Promise<{
|
|
6
|
+
}, additionalYields: AdditionalYields, multicallRetry: MulticallRetryFunction, tokenList?: () => Promise<GenericTokenList>) => Promise<{
|
|
6
7
|
[lender: string]: any;
|
|
7
8
|
}>;
|
|
8
9
|
//# sourceMappingURL=fetchLenderAll.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchLenderAll.d.ts","sourceRoot":"","sources":["../../src/lending/fetchLenderAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"fetchLenderAll.d.ts","sourceRoot":"","sources":["../../src/lending/fetchLenderAll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAA;AACnE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAG/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAI1C,eAAO,MAAM,sBAAsB,GACjC,SAAS,MAAM,EACf,SAAS,MAAM,EAAE,EACjB,QAAQ;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EACnC,kBAAkB,gBAAgB,EAClC,gBAAgB,sBAAsB,EACtC,YAAY,MAAM,OAAO,CAAC,gBAAgB,CAAC,KAC1C,OAAO,CAAC;IAAE,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CAcnC,CAAA"}
|
|
@@ -2,11 +2,11 @@ import { Lender } from '@1delta/asset-registry';
|
|
|
2
2
|
import { getLenderPublicData } from './fetchLender';
|
|
3
3
|
import { getLenderPublicDataViaApi } from './fetchLenderExt';
|
|
4
4
|
const LENDERS_VIA_API = [Lender.MORPHO_BLUE];
|
|
5
|
-
export const getLenderPublicDataAll = async (chainId, lenders, prices, additionalYields, multicallRetry) => {
|
|
5
|
+
export const getLenderPublicDataAll = async (chainId, lenders, prices, additionalYields, multicallRetry, tokenList) => {
|
|
6
6
|
const lendersApi = lenders.filter(l => LENDERS_VIA_API.includes(l));
|
|
7
7
|
const lendersOnChain = lenders.filter(l => !LENDERS_VIA_API.includes(l));
|
|
8
|
-
const onChain = getLenderPublicData(chainId, lendersOnChain, prices, additionalYields, multicallRetry);
|
|
9
|
-
const api = getLenderPublicDataViaApi(chainId, lendersApi, prices, additionalYields);
|
|
8
|
+
const onChain = getLenderPublicData(chainId, lendersOnChain, prices, additionalYields, multicallRetry, tokenList);
|
|
9
|
+
const api = getLenderPublicDataViaApi(chainId, lendersApi, prices, additionalYields, tokenList);
|
|
10
10
|
const [onChainRes, apiRes] = await Promise.all([onChain, api]);
|
|
11
11
|
return { ...onChainRes, ...apiRes };
|
|
12
12
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { AdditionalYields } from '../types';
|
|
2
2
|
import { Lender } from '@1delta/asset-registry';
|
|
3
|
+
import { GenericTokenList } from './types';
|
|
3
4
|
export declare const getLenderPublicDataViaApi: (chainId: string, lenders: Lender[], prices: {
|
|
4
5
|
[asset: string]: number;
|
|
5
|
-
}, additionalYields: AdditionalYields) => Promise<{
|
|
6
|
+
}, additionalYields: AdditionalYields, tokenList?: () => Promise<GenericTokenList>) => Promise<{
|
|
6
7
|
[lender: string]: any;
|
|
7
8
|
}>;
|
|
8
9
|
//# sourceMappingURL=fetchLenderExt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchLenderExt.d.ts","sourceRoot":"","sources":["../../src/lending/fetchLenderExt.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"fetchLenderExt.d.ts","sourceRoot":"","sources":["../../src/lending/fetchLenderExt.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AA2B1C,eAAO,MAAM,yBAAyB,GACpC,SAAS,MAAM,EACf,SAAS,MAAM,EAAE,EACjB,QAAQ;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EACnC,kBAAkB,gBAAgB,EAClC,YAAW,MAAM,OAAO,CAAC,gBAAgB,CAExC,KACA,OAAO,CAAC;IAAE,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CA2CnC,CAAA"}
|
|
@@ -1,27 +1,41 @@
|
|
|
1
1
|
import { isMorphoType, isMultiMarket } from '../utils';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { fetchMorphoMarkets } from './morpho/fetchPublic';
|
|
3
|
+
import { convertMarketsToMorphoResponse } from './morpho/convertPublic';
|
|
4
|
+
async function getLenderDataFromApi(lender, chainId, prices, additionalYields) {
|
|
4
5
|
if (isMorphoType(lender))
|
|
5
|
-
return await
|
|
6
|
+
return await fetchMorphoMarkets(chainId);
|
|
6
7
|
return {};
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
+
function convertLenderDataFromApi(lender, chainId, data, prices, additionalYields, list = {}) {
|
|
10
|
+
if (isMorphoType(lender))
|
|
11
|
+
return convertMarketsToMorphoResponse(data, chainId, additionalYields, list);
|
|
12
|
+
return {};
|
|
13
|
+
}
|
|
14
|
+
export const getLenderPublicDataViaApi = async (chainId, lenders, prices, additionalYields, tokenList = async () => {
|
|
15
|
+
return {};
|
|
16
|
+
}) => {
|
|
9
17
|
let promises = [];
|
|
10
18
|
for (const lender of lenders) {
|
|
11
|
-
promises.push(
|
|
19
|
+
promises.push(getLenderDataFromApi(lender, chainId, prices, additionalYields));
|
|
12
20
|
}
|
|
13
|
-
const results = await Promise.all(promises);
|
|
21
|
+
const [list, ...results] = await Promise.all([tokenList(), ...promises]);
|
|
14
22
|
const lenderData = {};
|
|
15
23
|
for (let i = 0; i < lenders.length; i++) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
try {
|
|
25
|
+
const lender = lenders[i];
|
|
26
|
+
if (isMultiMarket(lender)) {
|
|
27
|
+
const dataObtained = results[i];
|
|
28
|
+
const converted = convertLenderDataFromApi(lender, chainId, dataObtained, prices, additionalYields, list);
|
|
29
|
+
Object.keys(converted).forEach((marketId) => {
|
|
30
|
+
lenderData[marketId] = converted[marketId];
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
lenderData[lender] = convertLenderDataFromApi(lender, chainId, results[i], prices, additionalYields, list);
|
|
35
|
+
}
|
|
22
36
|
}
|
|
23
|
-
|
|
24
|
-
|
|
37
|
+
catch (e) {
|
|
38
|
+
console.log('error fetching from API on', chainId, ':', e);
|
|
25
39
|
}
|
|
26
40
|
}
|
|
27
41
|
return lenderData;
|
package/dist/lending/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lending/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lending/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,aAAa,CAAA;AAC3B,cAAc,SAAS,CAAA"}
|
package/dist/lending/index.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { MorphoGeneralPublicResponse, GetMarketsResponse } from './types';
|
|
2
2
|
import { AdditionalYields } from '../../types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
[m: string]: MorphoGeneralPublicResponse;
|
|
7
|
-
};
|
|
3
|
+
import { GenericTokenList } from '../types';
|
|
4
|
+
export declare function convertMarketsToMorphoResponse(response: GetMarketsResponse, chainId: string, additionalYields?: AdditionalYields, tokens?: GenericTokenList): {
|
|
5
|
+
[m: string]: MorphoGeneralPublicResponse;
|
|
8
6
|
};
|
|
9
7
|
//# sourceMappingURL=convertPublic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertPublic.d.ts","sourceRoot":"","sources":["../../../src/lending/morpho/convertPublic.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"convertPublic.d.ts","sourceRoot":"","sources":["../../../src/lending/morpho/convertPublic.ts"],"names":[],"mappings":"AACA,OAAO,EACL,2BAA2B,EAE3B,kBAAkB,EACnB,MAAM,SAAS,CAAA;AAEhB,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAc3C,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,kBAAkB,EAC5B,OAAO,EAAE,MAAM,EACf,gBAAgB,GAAE,gBAIjB,EACD,MAAM,GAAE,gBAAqB,GAC3B;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,2BAA2B,CAAA;CAAE,CAyH/C"}
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import { formatUnits } from 'viem';
|
|
2
2
|
import { apyToApr } from '../user-data/utils';
|
|
3
|
-
import { getAssetMeta } from '../../assets';
|
|
4
3
|
function parseLtv(ltv) {
|
|
5
4
|
let str = 0;
|
|
6
5
|
try {
|
|
7
6
|
str = Number(formatUnits(BigInt(ltv), 18));
|
|
8
7
|
}
|
|
9
|
-
catch (e) {
|
|
10
|
-
}
|
|
8
|
+
catch (e) { }
|
|
11
9
|
return str;
|
|
12
10
|
}
|
|
13
11
|
function formatNr(n, d) {
|
|
14
12
|
return Number(formatUnits(BigInt(n ?? 0), d));
|
|
15
13
|
}
|
|
16
|
-
export function convertMarketsToMorphoResponse(response, chainId, additionalYields = {
|
|
14
|
+
export function convertMarketsToMorphoResponse(response, chainId, additionalYields = {
|
|
15
|
+
intrinsicYields: {},
|
|
16
|
+
lenderRewards: {},
|
|
17
|
+
loaded: true,
|
|
18
|
+
}, tokens = {}) {
|
|
17
19
|
const data = {};
|
|
18
20
|
response.markets.items.forEach((market) => {
|
|
19
21
|
const { uniqueKey, lltv, irmAddress, oracleAddress, loanAsset, collateralAsset, state, } = market;
|
|
20
22
|
if (collateralAsset && loanAsset && oracleAddress) {
|
|
21
|
-
const m =
|
|
23
|
+
const m = 'MORPHO_BLUE_' + uniqueKey.slice(2).toUpperCase();
|
|
22
24
|
// @ts-ignore
|
|
23
25
|
if (!data[m])
|
|
24
26
|
data[m] = { data: {} };
|
|
@@ -32,9 +34,11 @@ export function convertMarketsToMorphoResponse(response, chainId, additionalYiel
|
|
|
32
34
|
// }
|
|
33
35
|
// })
|
|
34
36
|
const loanAssetAddress = loanAsset.address.toLowerCase();
|
|
37
|
+
const meta = tokens[loanAssetAddress] ?? loanAsset;
|
|
35
38
|
data[m].data[loanAssetAddress] = {
|
|
36
39
|
poolId: loanAssetAddress,
|
|
37
40
|
underlying: loanAssetAddress,
|
|
41
|
+
asset: meta,
|
|
38
42
|
totalDeposits: formatNr(state.supplyAssets, loanAsset.decimals),
|
|
39
43
|
totalDebtStable: 0,
|
|
40
44
|
totalDebt: formatNr(state.borrowAssets, loanAsset.decimals),
|
|
@@ -44,7 +48,7 @@ export function convertMarketsToMorphoResponse(response, chainId, additionalYiel
|
|
|
44
48
|
depositRate: apyToApr(Number(state.supplyApy)) * 100,
|
|
45
49
|
variableBorrowRate: apyToApr(Number(state.borrowApy)) * 100,
|
|
46
50
|
stableBorrowRate: 0,
|
|
47
|
-
stakingYield: additionalYields.intrinsicYields[
|
|
51
|
+
stakingYield: additionalYields.intrinsicYields[meta?.assetGroup] ?? 0,
|
|
48
52
|
rewards: Object.keys(loanRewards).length > 0 ? loanRewards : undefined,
|
|
49
53
|
decimals: loanAsset.decimals,
|
|
50
54
|
config: {
|
|
@@ -63,10 +67,12 @@ export function convertMarketsToMorphoResponse(response, chainId, additionalYiel
|
|
|
63
67
|
};
|
|
64
68
|
const ltv = parseLtv(lltv);
|
|
65
69
|
const collateralAssetAddress = collateralAsset.address.toLowerCase();
|
|
70
|
+
const metaCollateral = tokens[collateralAssetAddress] ?? collateralAsset;
|
|
66
71
|
// 2. COLLATERAL asset entry
|
|
67
72
|
data[m].data[collateralAssetAddress] = {
|
|
68
73
|
poolId: collateralAssetAddress,
|
|
69
74
|
underlying: collateralAssetAddress,
|
|
75
|
+
asset: metaCollateral,
|
|
70
76
|
totalDeposits: formatNr(state.collateralAssets, collateralAsset.decimals),
|
|
71
77
|
totalDebtStable: 0,
|
|
72
78
|
totalDebt: 0,
|
|
@@ -76,7 +82,7 @@ export function convertMarketsToMorphoResponse(response, chainId, additionalYiel
|
|
|
76
82
|
depositRate: 0,
|
|
77
83
|
variableBorrowRate: 0,
|
|
78
84
|
stableBorrowRate: 0,
|
|
79
|
-
stakingYield: additionalYields.intrinsicYields[
|
|
85
|
+
stakingYield: additionalYields.intrinsicYields[metaCollateral?.assetGroup] ?? 0,
|
|
80
86
|
rewards: undefined,
|
|
81
87
|
decimals: collateralAsset.decimals,
|
|
82
88
|
config: {
|
|
@@ -104,12 +110,10 @@ export function convertMarketsToMorphoResponse(response, chainId, additionalYiel
|
|
|
104
110
|
irm: irmAddress,
|
|
105
111
|
collateralAddress: collateralAsset.address,
|
|
106
112
|
loanAddress: loanAsset.address,
|
|
107
|
-
}
|
|
113
|
+
},
|
|
108
114
|
};
|
|
115
|
+
data[m].chainId = chainId;
|
|
109
116
|
}
|
|
110
117
|
});
|
|
111
|
-
return
|
|
112
|
-
data,
|
|
113
|
-
chainId
|
|
114
|
-
};
|
|
118
|
+
return data;
|
|
115
119
|
}
|
|
@@ -54,7 +54,7 @@ query GetMarkets {
|
|
|
54
54
|
const BASE_URL = "https://blue-api.morpho.org/graphql";
|
|
55
55
|
export async function fetchMorphoMarkets(chainId) {
|
|
56
56
|
const requestBody = {
|
|
57
|
-
query: query(
|
|
57
|
+
query: query(200, 0, chainId),
|
|
58
58
|
variables: {},
|
|
59
59
|
};
|
|
60
60
|
const response = await fetch(BASE_URL, {
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { AdditionalYields } from "../../types";
|
|
2
2
|
export declare function fetchMorphoPublicData(chainId: string, yields?: AdditionalYields): Promise<{
|
|
3
|
-
|
|
4
|
-
data: {
|
|
5
|
-
[m: string]: import("./types").MorphoGeneralPublicResponse;
|
|
6
|
-
};
|
|
3
|
+
[m: string]: import("./types").MorphoGeneralPublicResponse;
|
|
7
4
|
}>;
|
|
8
5
|
//# sourceMappingURL=publicCallBuild.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"publicCallBuild.d.ts","sourceRoot":"","sources":["../../../src/lending/morpho/publicCallBuild.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAI9C,wBAAsB,qBAAqB,CACvC,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,gBAA2E
|
|
1
|
+
{"version":3,"file":"publicCallBuild.d.ts","sourceRoot":"","sources":["../../../src/lending/morpho/publicCallBuild.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAI9C,wBAAsB,qBAAqB,CACvC,OAAO,EAAE,MAAM,EACf,MAAM,GAAE,gBAA2E;;GAItF"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GenericCurrency } from "../types";
|
|
1
2
|
export type GetMarketsResponse = {
|
|
2
3
|
markets: {
|
|
3
4
|
items: {
|
|
@@ -70,6 +71,7 @@ export interface MorphoGeneralPublicResponse {
|
|
|
70
71
|
[tokenSymbol: string]: {
|
|
71
72
|
poolId: string;
|
|
72
73
|
underlying: string;
|
|
74
|
+
asset: GenericCurrency;
|
|
73
75
|
totalDeposits: number;
|
|
74
76
|
totalDebtStable: 0;
|
|
75
77
|
totalDebt: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lending/morpho/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lending/morpho/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAA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AAM,CAAA;oBACxB,YAAY,EAAE,CAAC,CAAA;iBAChB,CAAA;aACF,CAAA;YAGD,gBAAgB,EAAE,OAAO,CAAC;YAC1B,gBAAgB,EAAE,OAAO,CAAC;YAC1B,SAAS,EAAE,KAAK,CAAC;YACjB,QAAQ,EAAE,IAAI,CAAC;YACf,QAAQ,EAAE,KAAK,CAAC;SACjB,CAAA;KACF,CAAA;IACD,yBAAyB;IACzB,MAAM,EAAE;QACN,MAAM,EAAE,YAAY,CAAC;KACtB,CAAA;IACD,OAAO,EAAE,MAAM,CAAA;CAChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userCallBuild.d.ts","sourceRoot":"","sources":["../../../../src/lending/user-data/aave-v3-type/userCallBuild.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"userCallBuild.d.ts","sourceRoot":"","sources":["../../../../src/lending/user-data/aave-v3-type/userCallBuild.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAA;AAmB/C,eAAO,MAAM,mBAAmB,GAAI,SAAS,MAAM,EAAE,QAAQ,MAAM,EAAE,SAAS,MAAM,KAAG,IAAI,EAqB1F,CAAA"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import { getAaveAssets,
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
4
|
-
const getBaseAaveV3Calls = (chainId, account, lender, assetsToQuery, aaveTokenMap) => {
|
|
5
|
-
const broker = getComposerAddress(chainId);
|
|
1
|
+
import { getAaveAssets, getAaveTypePoolDataProviderAddress, getAaveTypePoolAddress } from "../../../assets";
|
|
2
|
+
import { isYLDR } from "../../../utils";
|
|
3
|
+
const getBaseAaveV3Calls = (chainId, account, lender, assetsToQuery) => {
|
|
6
4
|
return assetsToQuery.flatMap((tk) => [
|
|
7
5
|
{
|
|
8
6
|
address: getAaveTypePoolDataProviderAddress(chainId, lender),
|
|
@@ -13,9 +11,8 @@ const getBaseAaveV3Calls = (chainId, account, lender, assetsToQuery, aaveTokenMa
|
|
|
13
11
|
};
|
|
14
12
|
export const buildAaveV3UserCall = (chainId, lender, account) => {
|
|
15
13
|
const assetsToQuery = getAaveAssets(chainId, lender);
|
|
16
|
-
const aaveTokenMap = getAaveStyleProtocolTokenMap(chainId, lender);
|
|
17
14
|
const calls = [
|
|
18
|
-
...getBaseAaveV3Calls(chainId, account, lender, assetsToQuery
|
|
15
|
+
...getBaseAaveV3Calls(chainId, account, lender, assetsToQuery),
|
|
19
16
|
];
|
|
20
17
|
if (!isYLDR(lender)) {
|
|
21
18
|
const callDataEmode = {
|
|
@@ -9085,5 +9085,93 @@ export declare const getAbi: (lender: Lender) => readonly [{
|
|
|
9085
9085
|
readonly outputs: readonly [];
|
|
9086
9086
|
readonly stateMutability: "nonpayable";
|
|
9087
9087
|
readonly type: "function";
|
|
9088
|
+
})[] | ({
|
|
9089
|
+
readonly inputs: readonly [{
|
|
9090
|
+
readonly internalType: "Id";
|
|
9091
|
+
readonly name: "";
|
|
9092
|
+
readonly type: "bytes32";
|
|
9093
|
+
}, {
|
|
9094
|
+
readonly internalType: "address";
|
|
9095
|
+
readonly name: "";
|
|
9096
|
+
readonly type: "address";
|
|
9097
|
+
}];
|
|
9098
|
+
readonly name: "position";
|
|
9099
|
+
readonly outputs: readonly [{
|
|
9100
|
+
readonly internalType: "uint256";
|
|
9101
|
+
readonly name: "supplyShares";
|
|
9102
|
+
readonly type: "uint256";
|
|
9103
|
+
}, {
|
|
9104
|
+
readonly internalType: "uint128";
|
|
9105
|
+
readonly name: "borrowShares";
|
|
9106
|
+
readonly type: "uint128";
|
|
9107
|
+
}, {
|
|
9108
|
+
readonly internalType: "uint128";
|
|
9109
|
+
readonly name: "collateral";
|
|
9110
|
+
readonly type: "uint128";
|
|
9111
|
+
}];
|
|
9112
|
+
readonly stateMutability: "view";
|
|
9113
|
+
readonly type: "function";
|
|
9114
|
+
} | {
|
|
9115
|
+
readonly inputs: readonly [{
|
|
9116
|
+
readonly internalType: "bytes32[]";
|
|
9117
|
+
readonly name: "slots";
|
|
9118
|
+
readonly type: "bytes32[]";
|
|
9119
|
+
}];
|
|
9120
|
+
readonly name: "extSloads";
|
|
9121
|
+
readonly outputs: readonly [{
|
|
9122
|
+
readonly internalType: "bytes32[]";
|
|
9123
|
+
readonly name: "res";
|
|
9124
|
+
readonly type: "bytes32[]";
|
|
9125
|
+
}];
|
|
9126
|
+
readonly stateMutability: "view";
|
|
9127
|
+
readonly type: "function";
|
|
9128
|
+
} | {
|
|
9129
|
+
readonly inputs: readonly [{
|
|
9130
|
+
readonly internalType: "Id";
|
|
9131
|
+
readonly name: "";
|
|
9132
|
+
readonly type: "bytes32";
|
|
9133
|
+
}];
|
|
9134
|
+
readonly name: "market";
|
|
9135
|
+
readonly outputs: readonly [{
|
|
9136
|
+
readonly internalType: "uint128";
|
|
9137
|
+
readonly name: "totalSupplyAssets";
|
|
9138
|
+
readonly type: "uint128";
|
|
9139
|
+
}, {
|
|
9140
|
+
readonly internalType: "uint128";
|
|
9141
|
+
readonly name: "totalSupplyShares";
|
|
9142
|
+
readonly type: "uint128";
|
|
9143
|
+
}, {
|
|
9144
|
+
readonly internalType: "uint128";
|
|
9145
|
+
readonly name: "totalBorrowAssets";
|
|
9146
|
+
readonly type: "uint128";
|
|
9147
|
+
}, {
|
|
9148
|
+
readonly internalType: "uint128";
|
|
9149
|
+
readonly name: "totalBorrowShares";
|
|
9150
|
+
readonly type: "uint128";
|
|
9151
|
+
}, {
|
|
9152
|
+
readonly internalType: "uint128";
|
|
9153
|
+
readonly name: "lastUpdate";
|
|
9154
|
+
readonly type: "uint128";
|
|
9155
|
+
}, {
|
|
9156
|
+
readonly internalType: "uint128";
|
|
9157
|
+
readonly name: "fee";
|
|
9158
|
+
readonly type: "uint128";
|
|
9159
|
+
}];
|
|
9160
|
+
readonly stateMutability: "view";
|
|
9161
|
+
readonly type: "function";
|
|
9162
|
+
} | {
|
|
9163
|
+
inputs: {
|
|
9164
|
+
internalType: string;
|
|
9165
|
+
name: string;
|
|
9166
|
+
type: string;
|
|
9167
|
+
}[];
|
|
9168
|
+
name: string;
|
|
9169
|
+
outputs: {
|
|
9170
|
+
internalType: string;
|
|
9171
|
+
name: string;
|
|
9172
|
+
type: string;
|
|
9173
|
+
}[];
|
|
9174
|
+
stateMutability: string;
|
|
9175
|
+
type: string;
|
|
9088
9176
|
})[];
|
|
9089
9177
|
//# sourceMappingURL=abis.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abis.d.ts","sourceRoot":"","sources":["../../../src/lending/user-data/abis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"abis.d.ts","sourceRoot":"","sources":["../../../src/lending/user-data/abis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAoB/C,eAAO,MAAM,MAAM,GAAI,QAAQ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgCpC,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isAaveV2Type, isAaveV3Type, isCompoundV3, isInit, isAaveV32Type, isYLDR } from "../../utils";
|
|
1
|
+
import { isAaveV2Type, isAaveV3Type, isCompoundV3, isInit, isAaveV32Type, isYLDR, isMorphoType } from "../../utils";
|
|
2
2
|
import { IncentivesControllerAbi } from "../../abis/lendle/IncentivesController";
|
|
3
3
|
import { RewarderAbi } from "../../abis/aurelius/Rewarder";
|
|
4
4
|
import { AavePoolV3UpgradedAbi } from "../../abis/aave/AavePoolV3Upgraded";
|
|
@@ -14,6 +14,8 @@ import { MultiFeeDistributionAbi } from "../../abis/lendle/MultiFeeDistribution"
|
|
|
14
14
|
import { PullRewardsIncentivesController } from "../../abis/meridian/PullRewardsIncentivesController";
|
|
15
15
|
import { CometRewardsAbi } from "../../abis/compound-v3/CometRewards";
|
|
16
16
|
import { YLDRAbi } from "../../abis/aave-v3/YLDR";
|
|
17
|
+
import { MorphoBlueAbi } from "../../abis/morpho/blue";
|
|
18
|
+
import { MorphoLensAbi } from "../../abis/morpho/lens";
|
|
17
19
|
export const getAbi = (lender) => {
|
|
18
20
|
if (isAaveV2Type(lender))
|
|
19
21
|
return [
|
|
@@ -46,6 +48,8 @@ export const getAbi = (lender) => {
|
|
|
46
48
|
...CometExtAbi,
|
|
47
49
|
...CometRewardsAbi,
|
|
48
50
|
];
|
|
51
|
+
if (isMorphoType(lender))
|
|
52
|
+
return [...MorphoBlueAbi, ...MorphoLensAbi];
|
|
49
53
|
if (isInit(lender))
|
|
50
54
|
return InitLensAbi;
|
|
51
55
|
return [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"userCallParse.d.ts","sourceRoot":"","sources":["../../../../src/lending/user-data/compound-v3/userCallParse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAA;AAOxD,eAAO,MAAM,8BAA8B,GACzC,QAAQ,MAAM,EACd,SAAS,MAAM,EACf,SAAS,MAAM,EACf,QAAQ;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EACnC,YAAY;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EACvC,YAAY,GAAG,KACd,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,6BAA6B,GAAG,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"userCallParse.d.ts","sourceRoot":"","sources":["../../../../src/lending/user-data/compound-v3/userCallParse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,6BAA6B,EAAE,MAAM,UAAU,CAAA;AAOxD,eAAO,MAAM,8BAA8B,GACzC,QAAQ,MAAM,EACd,SAAS,MAAM,EACf,SAAS,MAAM,EACf,QAAQ;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EACnC,YAAY;IAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EACvC,YAAY,GAAG,KACd,CAAC,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,6BAA6B,GAAG,SAAS,EAAE,MAAM,CA8GrE,CAAA"}
|