@defisaver/positions-sdk 0.0.32 → 0.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +63 -63
- package/cjs/config/contracts.d.ts +908 -41
- package/cjs/config/contracts.js +171 -44
- package/cjs/contracts.js +4 -10
- package/cjs/curveUsd/index.js +1 -1
- package/cjs/helpers/curveUsdHelpers/index.d.ts +2 -1
- package/cjs/helpers/curveUsdHelpers/index.js +25 -17
- package/cjs/markets/morphoBlue/index.d.ts +2 -0
- package/cjs/markets/morphoBlue/index.js +17 -1
- package/cjs/moneymarket/moneymarketCommonService.js +1 -1
- package/cjs/morphoBlue/index.js +6 -3
- package/cjs/services/utils.d.ts +4 -0
- package/cjs/services/utils.js +13 -1
- package/cjs/types/contracts/generated/CrvUSDView.d.ts +30 -4
- package/cjs/types/curveUsd.d.ts +6 -0
- package/cjs/types/morphoBlue.d.ts +2 -1
- package/cjs/types/morphoBlue.js +1 -0
- package/esm/config/contracts.d.ts +908 -41
- package/esm/config/contracts.js +171 -44
- package/esm/contracts.js +4 -10
- package/esm/curveUsd/index.js +1 -1
- package/esm/helpers/curveUsdHelpers/index.d.ts +2 -1
- package/esm/helpers/curveUsdHelpers/index.js +26 -18
- package/esm/markets/morphoBlue/index.d.ts +2 -0
- package/esm/markets/morphoBlue/index.js +15 -0
- package/esm/moneymarket/moneymarketCommonService.js +1 -1
- package/esm/morphoBlue/index.js +6 -3
- package/esm/services/utils.d.ts +4 -0
- package/esm/services/utils.js +11 -0
- package/esm/types/contracts/generated/CrvUSDView.d.ts +30 -4
- package/esm/types/curveUsd.d.ts +6 -0
- package/esm/types/morphoBlue.d.ts +2 -1
- package/esm/types/morphoBlue.js +1 -0
- package/package.json +40 -40
- package/src/aaveV2/index.ts +226 -226
- package/src/aaveV3/index.ts +561 -561
- package/src/assets/index.ts +60 -60
- package/src/chickenBonds/index.ts +123 -123
- package/src/compoundV2/index.ts +219 -219
- package/src/compoundV3/index.ts +275 -275
- package/src/config/contracts.js +817 -690
- package/src/constants/index.ts +5 -5
- package/src/contracts.ts +124 -130
- package/src/curveUsd/index.ts +228 -228
- package/src/exchange/index.ts +17 -17
- package/src/helpers/aaveHelpers/index.ts +134 -134
- package/src/helpers/chickenBondsHelpers/index.ts +23 -23
- package/src/helpers/compoundHelpers/index.ts +181 -181
- package/src/helpers/curveUsdHelpers/index.ts +40 -32
- package/src/helpers/index.ts +6 -6
- package/src/helpers/makerHelpers/index.ts +94 -94
- package/src/helpers/morphoBlueHelpers/index.ts +46 -46
- package/src/helpers/sparkHelpers/index.ts +106 -106
- package/src/index.ts +42 -42
- package/src/liquity/index.ts +116 -116
- package/src/maker/index.ts +101 -101
- package/src/markets/aave/index.ts +80 -80
- package/src/markets/aave/marketAssets.ts +24 -24
- package/src/markets/compound/index.ts +141 -141
- package/src/markets/compound/marketsAssets.ts +48 -48
- package/src/markets/curveUsd/index.ts +69 -69
- package/src/markets/index.ts +4 -4
- package/src/markets/morphoBlue/index.ts +36 -20
- package/src/markets/spark/index.ts +29 -29
- package/src/markets/spark/marketAssets.ts +10 -10
- package/src/moneymarket/moneymarketCommonService.ts +75 -75
- package/src/morphoAaveV2/index.ts +255 -255
- package/src/morphoAaveV3/index.ts +619 -619
- package/src/morphoBlue/index.ts +170 -165
- package/src/multicall/index.ts +22 -22
- package/src/services/dsrService.ts +15 -15
- package/src/services/priceService.ts +21 -21
- package/src/services/utils.ts +48 -35
- package/src/spark/index.ts +422 -422
- package/src/staking/staking.ts +167 -167
- package/src/types/aave.ts +256 -256
- package/src/types/chickenBonds.ts +45 -45
- package/src/types/common.ts +83 -83
- package/src/types/compound.ts +128 -128
- package/src/types/contracts/generated/CrvUSDView.ts +43 -8
- package/src/types/curveUsd.ts +118 -112
- package/src/types/index.ts +7 -7
- package/src/types/liquity.ts +30 -30
- package/src/types/maker.ts +50 -50
- package/src/types/morphoBlue.ts +80 -79
- package/src/types/spark.ts +106 -106
|
@@ -1,142 +1,142 @@
|
|
|
1
|
-
import { getConfigContractAddress } from '../../contracts';
|
|
2
|
-
import { CompoundBulkerOptions, CompoundMarketData, CompoundVersions } from '../../types';
|
|
3
|
-
import { NetworkNumber } from '../../types/common';
|
|
4
|
-
import {
|
|
5
|
-
compoundV2CollateralAssets,
|
|
6
|
-
v3ETHCollAssets,
|
|
7
|
-
v3USDbCCollAssets,
|
|
8
|
-
v3USDCCollAssets,
|
|
9
|
-
v3USDCeCollAssets,
|
|
10
|
-
} from './marketsAssets';
|
|
11
|
-
|
|
12
|
-
const EMPTY_BULKER_OPTIONS: CompoundBulkerOptions = { supply: '', withdraw: '' };
|
|
13
|
-
|
|
14
|
-
const STANDARD_BULKER_OPTIONS: CompoundBulkerOptions = {
|
|
15
|
-
supply: '0x414354494f4e5f535550504c595f4e41544956455f544f4b454e000000000000',
|
|
16
|
-
withdraw: '0x414354494f4e5f57495448445241575f4e41544956455f544f4b454e00000000',
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const BULKER_OPTIONS: Record<NetworkNumber, Record<CompoundVersions, CompoundBulkerOptions>> = {
|
|
20
|
-
[NetworkNumber.Eth]: {
|
|
21
|
-
[CompoundVersions.CompoundV3USDC]: { supply: 2, withdraw: 5 },
|
|
22
|
-
[CompoundVersions.CompoundV3ETH]: STANDARD_BULKER_OPTIONS,
|
|
23
|
-
|
|
24
|
-
// Non-existing markets, keeping it because of typescript
|
|
25
|
-
[CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
|
|
26
|
-
[CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
|
|
27
|
-
[CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
|
|
28
|
-
},
|
|
29
|
-
[NetworkNumber.Arb]: {
|
|
30
|
-
[CompoundVersions.CompoundV3USDC]: STANDARD_BULKER_OPTIONS,
|
|
31
|
-
[CompoundVersions.CompoundV3USDCe]: STANDARD_BULKER_OPTIONS,
|
|
32
|
-
|
|
33
|
-
// Non-existing markets, keeping it because of typescript
|
|
34
|
-
[CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
|
|
35
|
-
[CompoundVersions.CompoundV3ETH]: EMPTY_BULKER_OPTIONS,
|
|
36
|
-
[CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
|
|
37
|
-
},
|
|
38
|
-
[NetworkNumber.Base]: {
|
|
39
|
-
[CompoundVersions.CompoundV3ETH]: STANDARD_BULKER_OPTIONS,
|
|
40
|
-
[CompoundVersions.CompoundV3USDbC]: STANDARD_BULKER_OPTIONS,
|
|
41
|
-
|
|
42
|
-
// Non-existing markets, keeping it because of typescript
|
|
43
|
-
[CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
|
|
44
|
-
[CompoundVersions.CompoundV3USDC]: EMPTY_BULKER_OPTIONS,
|
|
45
|
-
[CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
|
|
46
|
-
},
|
|
47
|
-
[NetworkNumber.Opt]: { // Non-existing markets, keeping it because of typescript
|
|
48
|
-
[CompoundVersions.CompoundV3ETH]: EMPTY_BULKER_OPTIONS,
|
|
49
|
-
[CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
|
|
50
|
-
[CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
|
|
51
|
-
[CompoundVersions.CompoundV3USDC]: EMPTY_BULKER_OPTIONS,
|
|
52
|
-
[CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
|
|
53
|
-
},
|
|
54
|
-
};
|
|
55
|
-
|
|
56
|
-
export const COMPOUND_V2: CompoundMarketData = {
|
|
57
|
-
chainIds: [NetworkNumber.Eth],
|
|
58
|
-
label: 'Compound V2',
|
|
59
|
-
shortLabel: 'v2',
|
|
60
|
-
value: CompoundVersions.CompoundV2,
|
|
61
|
-
baseAsset: '',
|
|
62
|
-
collAssets: compoundV2CollateralAssets.map(a => a.underlyingAsset),
|
|
63
|
-
baseMarket: '',
|
|
64
|
-
baseMarketAddress: '',
|
|
65
|
-
secondLabel: '',
|
|
66
|
-
bulkerName: '',
|
|
67
|
-
bulkerAddress: '',
|
|
68
|
-
bulkerOptions: BULKER_OPTIONS[NetworkNumber.Eth][CompoundVersions.CompoundV2],
|
|
69
|
-
// icon: SvgAdapter(protocolIcons.compound),
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export const COMPOUND_V3_USDC = (networkId: NetworkNumber): CompoundMarketData => ({
|
|
73
|
-
chainIds: [NetworkNumber.Eth, NetworkNumber.Arb],
|
|
74
|
-
label: 'Compound V3 - USDC',
|
|
75
|
-
shortLabel: 'v3',
|
|
76
|
-
value: CompoundVersions.CompoundV3USDC,
|
|
77
|
-
baseAsset: 'USDC',
|
|
78
|
-
collAssets: networkId ? v3USDCCollAssets[networkId] : [],
|
|
79
|
-
baseMarket: 'cUSDCv3',
|
|
80
|
-
baseMarketAddress: getConfigContractAddress('cUSDCv3', networkId),
|
|
81
|
-
secondLabel: 'Market',
|
|
82
|
-
bulkerName: networkId === NetworkNumber.Arb ? 'CompV3USDCBulkerArb' : 'CompV3USDCBulker',
|
|
83
|
-
bulkerAddress: getConfigContractAddress(networkId === NetworkNumber.Arb ? 'CompV3USDCBulkerArb' : 'CompV3USDCBulker', networkId),
|
|
84
|
-
bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDC],
|
|
85
|
-
// icon: SvgAdapter(protocolIcons.compoundv3),
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
export const COMPOUND_V3_USDCe = (networkId: NetworkNumber): CompoundMarketData => ({
|
|
89
|
-
chainIds: [NetworkNumber.Arb],
|
|
90
|
-
label: 'Compound V3 - USDC.e',
|
|
91
|
-
shortLabel: 'v3',
|
|
92
|
-
value: CompoundVersions.CompoundV3USDCe,
|
|
93
|
-
baseAsset: 'USDC.e',
|
|
94
|
-
collAssets: networkId ? v3USDCeCollAssets[networkId] : [],
|
|
95
|
-
baseMarket: 'cUSDCev3',
|
|
96
|
-
baseMarketAddress: getConfigContractAddress('cUSDCev3', networkId),
|
|
97
|
-
secondLabel: 'Market',
|
|
98
|
-
bulkerName: 'CompV3USDCBulkerArb',
|
|
99
|
-
bulkerAddress: getConfigContractAddress('CompV3USDCBulkerArb', networkId),
|
|
100
|
-
bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDCe],
|
|
101
|
-
// icon: SvgAdapter(protocolIcons.compoundv3),
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
export const COMPOUND_V3_ETH = (networkId: NetworkNumber): CompoundMarketData => ({
|
|
105
|
-
chainIds: [NetworkNumber.Eth, NetworkNumber.Base],
|
|
106
|
-
label: 'Compound V3 - ETH',
|
|
107
|
-
shortLabel: 'v3',
|
|
108
|
-
value: CompoundVersions.CompoundV3ETH,
|
|
109
|
-
baseAsset: 'ETH',
|
|
110
|
-
collAssets: networkId ? v3ETHCollAssets[networkId] : [],
|
|
111
|
-
baseMarket: 'cETHv3',
|
|
112
|
-
baseMarketAddress: getConfigContractAddress('cETHv3', networkId),
|
|
113
|
-
secondLabel: 'Market',
|
|
114
|
-
bulkerName: 'CompV3ETHBulker',
|
|
115
|
-
bulkerAddress: getConfigContractAddress('CompV3ETHBulker', networkId),
|
|
116
|
-
bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3ETH],
|
|
117
|
-
// icon: SvgAdapter(protocolIcons.compoundv3),
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
export const COMPOUND_V3_USDBC = (networkId: NetworkNumber): CompoundMarketData => ({
|
|
121
|
-
chainIds: [NetworkNumber.Base],
|
|
122
|
-
label: 'Compound V3 - USDbC',
|
|
123
|
-
shortLabel: 'v3',
|
|
124
|
-
value: CompoundVersions.CompoundV3USDbC,
|
|
125
|
-
baseAsset: 'USDbC',
|
|
126
|
-
collAssets: networkId ? v3USDbCCollAssets[networkId] : [],
|
|
127
|
-
baseMarket: 'cUSDbCv3',
|
|
128
|
-
baseMarketAddress: getConfigContractAddress('cUSDbCv3', networkId),
|
|
129
|
-
secondLabel: 'Market',
|
|
130
|
-
bulkerName: 'CompV3USDbCBulker',
|
|
131
|
-
bulkerAddress: getConfigContractAddress('CompV3USDbCBulker', networkId),
|
|
132
|
-
bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDbC],
|
|
133
|
-
// icon: SvgAdapter(protocolIcons.compoundv3),
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
export const CompoundMarkets = (networkId: NetworkNumber) => ({
|
|
137
|
-
[CompoundVersions.CompoundV2]: COMPOUND_V2,
|
|
138
|
-
[CompoundVersions.CompoundV3ETH]: COMPOUND_V3_ETH(networkId),
|
|
139
|
-
[CompoundVersions.CompoundV3USDC]: COMPOUND_V3_USDC(networkId),
|
|
140
|
-
[CompoundVersions.CompoundV3USDbC]: COMPOUND_V3_USDBC(networkId),
|
|
141
|
-
[CompoundVersions.CompoundV3USDCe]: COMPOUND_V3_USDCe(networkId),
|
|
1
|
+
import { getConfigContractAddress } from '../../contracts';
|
|
2
|
+
import { CompoundBulkerOptions, CompoundMarketData, CompoundVersions } from '../../types';
|
|
3
|
+
import { NetworkNumber } from '../../types/common';
|
|
4
|
+
import {
|
|
5
|
+
compoundV2CollateralAssets,
|
|
6
|
+
v3ETHCollAssets,
|
|
7
|
+
v3USDbCCollAssets,
|
|
8
|
+
v3USDCCollAssets,
|
|
9
|
+
v3USDCeCollAssets,
|
|
10
|
+
} from './marketsAssets';
|
|
11
|
+
|
|
12
|
+
const EMPTY_BULKER_OPTIONS: CompoundBulkerOptions = { supply: '', withdraw: '' };
|
|
13
|
+
|
|
14
|
+
const STANDARD_BULKER_OPTIONS: CompoundBulkerOptions = {
|
|
15
|
+
supply: '0x414354494f4e5f535550504c595f4e41544956455f544f4b454e000000000000',
|
|
16
|
+
withdraw: '0x414354494f4e5f57495448445241575f4e41544956455f544f4b454e00000000',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const BULKER_OPTIONS: Record<NetworkNumber, Record<CompoundVersions, CompoundBulkerOptions>> = {
|
|
20
|
+
[NetworkNumber.Eth]: {
|
|
21
|
+
[CompoundVersions.CompoundV3USDC]: { supply: 2, withdraw: 5 },
|
|
22
|
+
[CompoundVersions.CompoundV3ETH]: STANDARD_BULKER_OPTIONS,
|
|
23
|
+
|
|
24
|
+
// Non-existing markets, keeping it because of typescript
|
|
25
|
+
[CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
|
|
26
|
+
[CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
|
|
27
|
+
[CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
|
|
28
|
+
},
|
|
29
|
+
[NetworkNumber.Arb]: {
|
|
30
|
+
[CompoundVersions.CompoundV3USDC]: STANDARD_BULKER_OPTIONS,
|
|
31
|
+
[CompoundVersions.CompoundV3USDCe]: STANDARD_BULKER_OPTIONS,
|
|
32
|
+
|
|
33
|
+
// Non-existing markets, keeping it because of typescript
|
|
34
|
+
[CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
|
|
35
|
+
[CompoundVersions.CompoundV3ETH]: EMPTY_BULKER_OPTIONS,
|
|
36
|
+
[CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
|
|
37
|
+
},
|
|
38
|
+
[NetworkNumber.Base]: {
|
|
39
|
+
[CompoundVersions.CompoundV3ETH]: STANDARD_BULKER_OPTIONS,
|
|
40
|
+
[CompoundVersions.CompoundV3USDbC]: STANDARD_BULKER_OPTIONS,
|
|
41
|
+
|
|
42
|
+
// Non-existing markets, keeping it because of typescript
|
|
43
|
+
[CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
|
|
44
|
+
[CompoundVersions.CompoundV3USDC]: EMPTY_BULKER_OPTIONS,
|
|
45
|
+
[CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
|
|
46
|
+
},
|
|
47
|
+
[NetworkNumber.Opt]: { // Non-existing markets, keeping it because of typescript
|
|
48
|
+
[CompoundVersions.CompoundV3ETH]: EMPTY_BULKER_OPTIONS,
|
|
49
|
+
[CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
|
|
50
|
+
[CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
|
|
51
|
+
[CompoundVersions.CompoundV3USDC]: EMPTY_BULKER_OPTIONS,
|
|
52
|
+
[CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export const COMPOUND_V2: CompoundMarketData = {
|
|
57
|
+
chainIds: [NetworkNumber.Eth],
|
|
58
|
+
label: 'Compound V2',
|
|
59
|
+
shortLabel: 'v2',
|
|
60
|
+
value: CompoundVersions.CompoundV2,
|
|
61
|
+
baseAsset: '',
|
|
62
|
+
collAssets: compoundV2CollateralAssets.map(a => a.underlyingAsset),
|
|
63
|
+
baseMarket: '',
|
|
64
|
+
baseMarketAddress: '',
|
|
65
|
+
secondLabel: '',
|
|
66
|
+
bulkerName: '',
|
|
67
|
+
bulkerAddress: '',
|
|
68
|
+
bulkerOptions: BULKER_OPTIONS[NetworkNumber.Eth][CompoundVersions.CompoundV2],
|
|
69
|
+
// icon: SvgAdapter(protocolIcons.compound),
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
export const COMPOUND_V3_USDC = (networkId: NetworkNumber): CompoundMarketData => ({
|
|
73
|
+
chainIds: [NetworkNumber.Eth, NetworkNumber.Arb],
|
|
74
|
+
label: 'Compound V3 - USDC',
|
|
75
|
+
shortLabel: 'v3',
|
|
76
|
+
value: CompoundVersions.CompoundV3USDC,
|
|
77
|
+
baseAsset: 'USDC',
|
|
78
|
+
collAssets: networkId ? v3USDCCollAssets[networkId] : [],
|
|
79
|
+
baseMarket: 'cUSDCv3',
|
|
80
|
+
baseMarketAddress: getConfigContractAddress('cUSDCv3', networkId),
|
|
81
|
+
secondLabel: 'Market',
|
|
82
|
+
bulkerName: networkId === NetworkNumber.Arb ? 'CompV3USDCBulkerArb' : 'CompV3USDCBulker',
|
|
83
|
+
bulkerAddress: getConfigContractAddress(networkId === NetworkNumber.Arb ? 'CompV3USDCBulkerArb' : 'CompV3USDCBulker', networkId),
|
|
84
|
+
bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDC],
|
|
85
|
+
// icon: SvgAdapter(protocolIcons.compoundv3),
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
export const COMPOUND_V3_USDCe = (networkId: NetworkNumber): CompoundMarketData => ({
|
|
89
|
+
chainIds: [NetworkNumber.Arb],
|
|
90
|
+
label: 'Compound V3 - USDC.e',
|
|
91
|
+
shortLabel: 'v3',
|
|
92
|
+
value: CompoundVersions.CompoundV3USDCe,
|
|
93
|
+
baseAsset: 'USDC.e',
|
|
94
|
+
collAssets: networkId ? v3USDCeCollAssets[networkId] : [],
|
|
95
|
+
baseMarket: 'cUSDCev3',
|
|
96
|
+
baseMarketAddress: getConfigContractAddress('cUSDCev3', networkId),
|
|
97
|
+
secondLabel: 'Market',
|
|
98
|
+
bulkerName: 'CompV3USDCBulkerArb',
|
|
99
|
+
bulkerAddress: getConfigContractAddress('CompV3USDCBulkerArb', networkId),
|
|
100
|
+
bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDCe],
|
|
101
|
+
// icon: SvgAdapter(protocolIcons.compoundv3),
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
export const COMPOUND_V3_ETH = (networkId: NetworkNumber): CompoundMarketData => ({
|
|
105
|
+
chainIds: [NetworkNumber.Eth, NetworkNumber.Base],
|
|
106
|
+
label: 'Compound V3 - ETH',
|
|
107
|
+
shortLabel: 'v3',
|
|
108
|
+
value: CompoundVersions.CompoundV3ETH,
|
|
109
|
+
baseAsset: 'ETH',
|
|
110
|
+
collAssets: networkId ? v3ETHCollAssets[networkId] : [],
|
|
111
|
+
baseMarket: 'cETHv3',
|
|
112
|
+
baseMarketAddress: getConfigContractAddress('cETHv3', networkId),
|
|
113
|
+
secondLabel: 'Market',
|
|
114
|
+
bulkerName: 'CompV3ETHBulker',
|
|
115
|
+
bulkerAddress: getConfigContractAddress('CompV3ETHBulker', networkId),
|
|
116
|
+
bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3ETH],
|
|
117
|
+
// icon: SvgAdapter(protocolIcons.compoundv3),
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
export const COMPOUND_V3_USDBC = (networkId: NetworkNumber): CompoundMarketData => ({
|
|
121
|
+
chainIds: [NetworkNumber.Base],
|
|
122
|
+
label: 'Compound V3 - USDbC',
|
|
123
|
+
shortLabel: 'v3',
|
|
124
|
+
value: CompoundVersions.CompoundV3USDbC,
|
|
125
|
+
baseAsset: 'USDbC',
|
|
126
|
+
collAssets: networkId ? v3USDbCCollAssets[networkId] : [],
|
|
127
|
+
baseMarket: 'cUSDbCv3',
|
|
128
|
+
baseMarketAddress: getConfigContractAddress('cUSDbCv3', networkId),
|
|
129
|
+
secondLabel: 'Market',
|
|
130
|
+
bulkerName: 'CompV3USDbCBulker',
|
|
131
|
+
bulkerAddress: getConfigContractAddress('CompV3USDbCBulker', networkId),
|
|
132
|
+
bulkerOptions: BULKER_OPTIONS[networkId][CompoundVersions.CompoundV3USDbC],
|
|
133
|
+
// icon: SvgAdapter(protocolIcons.compoundv3),
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
export const CompoundMarkets = (networkId: NetworkNumber) => ({
|
|
137
|
+
[CompoundVersions.CompoundV2]: COMPOUND_V2,
|
|
138
|
+
[CompoundVersions.CompoundV3ETH]: COMPOUND_V3_ETH(networkId),
|
|
139
|
+
[CompoundVersions.CompoundV3USDC]: COMPOUND_V3_USDC(networkId),
|
|
140
|
+
[CompoundVersions.CompoundV3USDbC]: COMPOUND_V3_USDBC(networkId),
|
|
141
|
+
[CompoundVersions.CompoundV3USDCe]: COMPOUND_V3_USDCe(networkId),
|
|
142
142
|
}) as const;
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { getAssetInfo } from '@defisaver/tokens';
|
|
2
|
-
import { NetworkNumber } from '../../types/common';
|
|
3
|
-
|
|
4
|
-
export const compoundV2CollateralAssets = [
|
|
5
|
-
'cETH', 'cDAI', 'cBAT', 'cZRX', 'cUSDC', 'cWBTC Legacy', 'cWBTC', 'cUSDT',
|
|
6
|
-
'cTUSD', 'cLINK', 'cUSDP', 'cUNI', 'cCOMP', 'cMKR', 'cSUSHI', 'cAAVE', 'cYFI',
|
|
7
|
-
].map((symbol) => getAssetInfo(symbol));
|
|
8
|
-
|
|
9
|
-
export const v3USDCCollAssetsEth = ['ETH', 'COMP', 'WBTC', 'UNI', 'LINK'];
|
|
10
|
-
export const v3USDCCollAssetsArb = ['ARB', 'ETH', 'GMX', 'WBTC'];
|
|
11
|
-
|
|
12
|
-
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
13
|
-
export const v3USDCCollAssets = {
|
|
14
|
-
[NetworkNumber.Eth]: v3USDCCollAssetsEth,
|
|
15
|
-
[NetworkNumber.Opt]: [],
|
|
16
|
-
[NetworkNumber.Arb]: v3USDCCollAssetsArb,
|
|
17
|
-
[NetworkNumber.Base]: [],
|
|
18
|
-
} as const;
|
|
19
|
-
|
|
20
|
-
export const v3USDCeCollAssetsArb = ['ARB', 'ETH', 'GMX', 'WBTC'];
|
|
21
|
-
|
|
22
|
-
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
23
|
-
export const v3USDCeCollAssets = {
|
|
24
|
-
[NetworkNumber.Eth]: [],
|
|
25
|
-
[NetworkNumber.Opt]: [],
|
|
26
|
-
[NetworkNumber.Arb]: v3USDCeCollAssetsArb,
|
|
27
|
-
[NetworkNumber.Base]: [],
|
|
28
|
-
} as const;
|
|
29
|
-
|
|
30
|
-
export const v3ETHCollAssetsEth = ['cbETH', 'wstETH', 'rETH'];
|
|
31
|
-
export const v3ETHCollAssetsBase = ['cbETH'];
|
|
32
|
-
|
|
33
|
-
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
34
|
-
export const v3ETHCollAssets = {
|
|
35
|
-
[NetworkNumber.Eth]: v3ETHCollAssetsEth,
|
|
36
|
-
[NetworkNumber.Opt]: [],
|
|
37
|
-
[NetworkNumber.Arb]: [],
|
|
38
|
-
[NetworkNumber.Base]: v3ETHCollAssetsBase,
|
|
39
|
-
} as const;
|
|
40
|
-
|
|
41
|
-
export const v3USDbCCollAssetsBase = ['ETH', 'cbETH'];
|
|
42
|
-
|
|
43
|
-
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
44
|
-
export const v3USDbCCollAssets = {
|
|
45
|
-
[NetworkNumber.Eth]: [],
|
|
46
|
-
[NetworkNumber.Opt]: [],
|
|
47
|
-
[NetworkNumber.Arb]: [],
|
|
48
|
-
[NetworkNumber.Base]: v3USDbCCollAssetsBase,
|
|
1
|
+
import { getAssetInfo } from '@defisaver/tokens';
|
|
2
|
+
import { NetworkNumber } from '../../types/common';
|
|
3
|
+
|
|
4
|
+
export const compoundV2CollateralAssets = [
|
|
5
|
+
'cETH', 'cDAI', 'cBAT', 'cZRX', 'cUSDC', 'cWBTC Legacy', 'cWBTC', 'cUSDT',
|
|
6
|
+
'cTUSD', 'cLINK', 'cUSDP', 'cUNI', 'cCOMP', 'cMKR', 'cSUSHI', 'cAAVE', 'cYFI',
|
|
7
|
+
].map((symbol) => getAssetInfo(symbol));
|
|
8
|
+
|
|
9
|
+
export const v3USDCCollAssetsEth = ['ETH', 'COMP', 'WBTC', 'UNI', 'LINK'];
|
|
10
|
+
export const v3USDCCollAssetsArb = ['ARB', 'ETH', 'GMX', 'WBTC'];
|
|
11
|
+
|
|
12
|
+
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
13
|
+
export const v3USDCCollAssets = {
|
|
14
|
+
[NetworkNumber.Eth]: v3USDCCollAssetsEth,
|
|
15
|
+
[NetworkNumber.Opt]: [],
|
|
16
|
+
[NetworkNumber.Arb]: v3USDCCollAssetsArb,
|
|
17
|
+
[NetworkNumber.Base]: [],
|
|
18
|
+
} as const;
|
|
19
|
+
|
|
20
|
+
export const v3USDCeCollAssetsArb = ['ARB', 'ETH', 'GMX', 'WBTC'];
|
|
21
|
+
|
|
22
|
+
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
23
|
+
export const v3USDCeCollAssets = {
|
|
24
|
+
[NetworkNumber.Eth]: [],
|
|
25
|
+
[NetworkNumber.Opt]: [],
|
|
26
|
+
[NetworkNumber.Arb]: v3USDCeCollAssetsArb,
|
|
27
|
+
[NetworkNumber.Base]: [],
|
|
28
|
+
} as const;
|
|
29
|
+
|
|
30
|
+
export const v3ETHCollAssetsEth = ['cbETH', 'wstETH', 'rETH'];
|
|
31
|
+
export const v3ETHCollAssetsBase = ['cbETH'];
|
|
32
|
+
|
|
33
|
+
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
34
|
+
export const v3ETHCollAssets = {
|
|
35
|
+
[NetworkNumber.Eth]: v3ETHCollAssetsEth,
|
|
36
|
+
[NetworkNumber.Opt]: [],
|
|
37
|
+
[NetworkNumber.Arb]: [],
|
|
38
|
+
[NetworkNumber.Base]: v3ETHCollAssetsBase,
|
|
39
|
+
} as const;
|
|
40
|
+
|
|
41
|
+
export const v3USDbCCollAssetsBase = ['ETH', 'cbETH'];
|
|
42
|
+
|
|
43
|
+
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
44
|
+
export const v3USDbCCollAssets = {
|
|
45
|
+
[NetworkNumber.Eth]: [],
|
|
46
|
+
[NetworkNumber.Opt]: [],
|
|
47
|
+
[NetworkNumber.Arb]: [],
|
|
48
|
+
[NetworkNumber.Base]: v3USDbCCollAssetsBase,
|
|
49
49
|
};
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { getConfigContractAddress } from '../../contracts';
|
|
2
|
-
import { CrvUSDMarketData, CrvUSDVersions } from '../../types';
|
|
3
|
-
import { NetworkNumber } from '../../types/common';
|
|
4
|
-
|
|
5
|
-
export const CRVUSD_WSTETH_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
6
|
-
chainIds: [1],
|
|
7
|
-
label: 'wstETH',
|
|
8
|
-
shortLabel: 'wstETH',
|
|
9
|
-
value: CrvUSDVersions.wstETH,
|
|
10
|
-
collAsset: 'wstETH',
|
|
11
|
-
baseAsset: 'crvUSD',
|
|
12
|
-
controllerAddress: getConfigContractAddress('crvUSDwstETHController', networkId),
|
|
13
|
-
ammAddress: getConfigContractAddress('crvUSDwstETHAmm', networkId),
|
|
14
|
-
createCollAssets: ['wstETH', 'ETH'],
|
|
15
|
-
});
|
|
16
|
-
export const CRVUSD_ETH_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
17
|
-
chainIds: [1],
|
|
18
|
-
label: 'ETH',
|
|
19
|
-
shortLabel: 'ETH',
|
|
20
|
-
value: CrvUSDVersions.ETH,
|
|
21
|
-
collAsset: 'ETH',
|
|
22
|
-
baseAsset: 'crvUSD',
|
|
23
|
-
controllerAddress: getConfigContractAddress('crvUSDETHController', networkId),
|
|
24
|
-
ammAddress: getConfigContractAddress('crvUSDETHAmm', networkId),
|
|
25
|
-
createCollAssets: ['ETH'],
|
|
26
|
-
});
|
|
27
|
-
export const CRVUSD_WBTC_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
28
|
-
chainIds: [1],
|
|
29
|
-
label: 'WBTC',
|
|
30
|
-
shortLabel: 'WBTC',
|
|
31
|
-
value: CrvUSDVersions.WBTC,
|
|
32
|
-
collAsset: 'WBTC',
|
|
33
|
-
baseAsset: 'crvUSD',
|
|
34
|
-
controllerAddress: getConfigContractAddress('crvUSDWBTCController', networkId),
|
|
35
|
-
ammAddress: getConfigContractAddress('crvUSDWBTCAmm', networkId),
|
|
36
|
-
createCollAssets: ['WBTC'],
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
export const CRVUSD_TBTC_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
40
|
-
chainIds: [1],
|
|
41
|
-
label: 'tBTC',
|
|
42
|
-
shortLabel: 'tBTC',
|
|
43
|
-
value: CrvUSDVersions.tBTC,
|
|
44
|
-
collAsset: 'tBTC',
|
|
45
|
-
baseAsset: 'crvUSD',
|
|
46
|
-
controllerAddress: getConfigContractAddress('crvUSDtBTCController', networkId),
|
|
47
|
-
ammAddress: getConfigContractAddress('crvUSDtBTCAmm', networkId),
|
|
48
|
-
createCollAssets: ['tBTC'],
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
export const CRVUSD_SFRXETH_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
52
|
-
chainIds: [1],
|
|
53
|
-
label: 'sfrxETH',
|
|
54
|
-
shortLabel: 'sfrxETH',
|
|
55
|
-
value: CrvUSDVersions.sfrxETH,
|
|
56
|
-
collAsset: 'sfrxETH',
|
|
57
|
-
baseAsset: 'crvUSD',
|
|
58
|
-
controllerAddress: getConfigContractAddress('crvUSDsfrxETHController', networkId),
|
|
59
|
-
ammAddress: getConfigContractAddress('crvUSDsfrxETHAmm', networkId),
|
|
60
|
-
createCollAssets: ['sfrxETH'],
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
export const CrvUsdMarkets = (networkId: NetworkNumber) => ({
|
|
65
|
-
[CrvUSDVersions.wstETH]: CRVUSD_WSTETH_MARKET(networkId),
|
|
66
|
-
[CrvUSDVersions.ETH]: CRVUSD_ETH_MARKET(networkId),
|
|
67
|
-
[CrvUSDVersions.WBTC]: CRVUSD_WBTC_MARKET(networkId),
|
|
68
|
-
[CrvUSDVersions.tBTC]: CRVUSD_TBTC_MARKET(networkId),
|
|
69
|
-
[CrvUSDVersions.sfrxETH]: CRVUSD_SFRXETH_MARKET(networkId),
|
|
1
|
+
import { getConfigContractAddress } from '../../contracts';
|
|
2
|
+
import { CrvUSDMarketData, CrvUSDVersions } from '../../types';
|
|
3
|
+
import { NetworkNumber } from '../../types/common';
|
|
4
|
+
|
|
5
|
+
export const CRVUSD_WSTETH_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
6
|
+
chainIds: [1],
|
|
7
|
+
label: 'wstETH',
|
|
8
|
+
shortLabel: 'wstETH',
|
|
9
|
+
value: CrvUSDVersions.wstETH,
|
|
10
|
+
collAsset: 'wstETH',
|
|
11
|
+
baseAsset: 'crvUSD',
|
|
12
|
+
controllerAddress: getConfigContractAddress('crvUSDwstETHController', networkId),
|
|
13
|
+
ammAddress: getConfigContractAddress('crvUSDwstETHAmm', networkId),
|
|
14
|
+
createCollAssets: ['wstETH', 'ETH'],
|
|
15
|
+
});
|
|
16
|
+
export const CRVUSD_ETH_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
17
|
+
chainIds: [1],
|
|
18
|
+
label: 'ETH',
|
|
19
|
+
shortLabel: 'ETH',
|
|
20
|
+
value: CrvUSDVersions.ETH,
|
|
21
|
+
collAsset: 'ETH',
|
|
22
|
+
baseAsset: 'crvUSD',
|
|
23
|
+
controllerAddress: getConfigContractAddress('crvUSDETHController', networkId),
|
|
24
|
+
ammAddress: getConfigContractAddress('crvUSDETHAmm', networkId),
|
|
25
|
+
createCollAssets: ['ETH'],
|
|
26
|
+
});
|
|
27
|
+
export const CRVUSD_WBTC_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
28
|
+
chainIds: [1],
|
|
29
|
+
label: 'WBTC',
|
|
30
|
+
shortLabel: 'WBTC',
|
|
31
|
+
value: CrvUSDVersions.WBTC,
|
|
32
|
+
collAsset: 'WBTC',
|
|
33
|
+
baseAsset: 'crvUSD',
|
|
34
|
+
controllerAddress: getConfigContractAddress('crvUSDWBTCController', networkId),
|
|
35
|
+
ammAddress: getConfigContractAddress('crvUSDWBTCAmm', networkId),
|
|
36
|
+
createCollAssets: ['WBTC'],
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export const CRVUSD_TBTC_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
40
|
+
chainIds: [1],
|
|
41
|
+
label: 'tBTC',
|
|
42
|
+
shortLabel: 'tBTC',
|
|
43
|
+
value: CrvUSDVersions.tBTC,
|
|
44
|
+
collAsset: 'tBTC',
|
|
45
|
+
baseAsset: 'crvUSD',
|
|
46
|
+
controllerAddress: getConfigContractAddress('crvUSDtBTCController', networkId),
|
|
47
|
+
ammAddress: getConfigContractAddress('crvUSDtBTCAmm', networkId),
|
|
48
|
+
createCollAssets: ['tBTC'],
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export const CRVUSD_SFRXETH_MARKET = (networkId: NetworkNumber): CrvUSDMarketData => ({
|
|
52
|
+
chainIds: [1],
|
|
53
|
+
label: 'sfrxETH',
|
|
54
|
+
shortLabel: 'sfrxETH',
|
|
55
|
+
value: CrvUSDVersions.sfrxETH,
|
|
56
|
+
collAsset: 'sfrxETH',
|
|
57
|
+
baseAsset: 'crvUSD',
|
|
58
|
+
controllerAddress: getConfigContractAddress('crvUSDsfrxETHController', networkId),
|
|
59
|
+
ammAddress: getConfigContractAddress('crvUSDsfrxETHAmm', networkId),
|
|
60
|
+
createCollAssets: ['sfrxETH'],
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
export const CrvUsdMarkets = (networkId: NetworkNumber) => ({
|
|
65
|
+
[CrvUSDVersions.wstETH]: CRVUSD_WSTETH_MARKET(networkId),
|
|
66
|
+
[CrvUSDVersions.ETH]: CRVUSD_ETH_MARKET(networkId),
|
|
67
|
+
[CrvUSDVersions.WBTC]: CRVUSD_WBTC_MARKET(networkId),
|
|
68
|
+
[CrvUSDVersions.tBTC]: CRVUSD_TBTC_MARKET(networkId),
|
|
69
|
+
[CrvUSDVersions.sfrxETH]: CRVUSD_SFRXETH_MARKET(networkId),
|
|
70
70
|
}) as const;
|
package/src/markets/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { AaveMarkets } from './aave';
|
|
2
|
-
export { CompoundMarkets } from './compound';
|
|
3
|
-
export { SparkMarkets } from './spark';
|
|
4
|
-
export { CrvUsdMarkets } from './curveUsd';
|
|
1
|
+
export { AaveMarkets } from './aave';
|
|
2
|
+
export { CompoundMarkets } from './compound';
|
|
3
|
+
export { SparkMarkets } from './spark';
|
|
4
|
+
export { CrvUsdMarkets } from './curveUsd';
|
|
5
5
|
export { MorphoBlueMarkets } from './morphoBlue';
|
|
@@ -1,21 +1,37 @@
|
|
|
1
|
-
import { MorphoBlueMarketData, MorphoBlueVersions } from '../../types';
|
|
2
|
-
import { NetworkNumber } from '../../types/common';
|
|
3
|
-
|
|
4
|
-
export const MORPHO_BLUE_WSTETH_ETH = (networkId: NetworkNumber = NetworkNumber.Eth): MorphoBlueMarketData => ({
|
|
5
|
-
chainIds: [1],
|
|
6
|
-
label: 'Morpho Blue',
|
|
7
|
-
shortLabel: 'wstETH/ETH',
|
|
8
|
-
value: MorphoBlueVersions.MorphoBlueWstEthEth,
|
|
9
|
-
url: 'default',
|
|
10
|
-
loanToken: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
|
11
|
-
collateralToken: '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',
|
|
12
|
-
oracle: '0x2a01eb9496094da03c4e364def50f5ad1280ad72',
|
|
13
|
-
irm: '0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC',
|
|
14
|
-
lltv: 0.945,
|
|
15
|
-
// icon: SvgAdapter(protocolIcons.spark),
|
|
16
|
-
protocolName: 'morpho-blue',
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
export const
|
|
20
|
-
[
|
|
1
|
+
import { MorphoBlueMarketData, MorphoBlueVersions } from '../../types';
|
|
2
|
+
import { NetworkNumber } from '../../types/common';
|
|
3
|
+
|
|
4
|
+
export const MORPHO_BLUE_WSTETH_ETH = (networkId: NetworkNumber = NetworkNumber.Eth): MorphoBlueMarketData => ({
|
|
5
|
+
chainIds: [1],
|
|
6
|
+
label: 'Morpho Blue',
|
|
7
|
+
shortLabel: 'wstETH/ETH',
|
|
8
|
+
value: MorphoBlueVersions.MorphoBlueWstEthEth,
|
|
9
|
+
url: 'default',
|
|
10
|
+
loanToken: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
|
|
11
|
+
collateralToken: '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',
|
|
12
|
+
oracle: '0x2a01eb9496094da03c4e364def50f5ad1280ad72',
|
|
13
|
+
irm: '0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC',
|
|
14
|
+
lltv: 0.945,
|
|
15
|
+
// icon: SvgAdapter(protocolIcons.spark),
|
|
16
|
+
protocolName: 'morpho-blue',
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export const MORPHO_BLUE_WSTETH_USDC = (networkId: NetworkNumber = NetworkNumber.Eth): MorphoBlueMarketData => ({
|
|
20
|
+
chainIds: [1],
|
|
21
|
+
label: 'Morpho Blue',
|
|
22
|
+
shortLabel: 'wstETH/USDC',
|
|
23
|
+
value: MorphoBlueVersions.MorphoBlueWstEthUSDC,
|
|
24
|
+
url: 'default',
|
|
25
|
+
loanToken: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
|
|
26
|
+
collateralToken: '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',
|
|
27
|
+
oracle: '0x48F7E36EB6B826B2dF4B2E630B62Cd25e89E40e2',
|
|
28
|
+
irm: '0x870aC11D48B15DB9a138Cf899d20F13F79Ba00BC',
|
|
29
|
+
lltv: 0.86,
|
|
30
|
+
// icon: SvgAdapter(protocolIcons.spark),
|
|
31
|
+
protocolName: 'morpho-blue',
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export const MorphoBlueMarkets = (networkId: NetworkNumber) => ({
|
|
35
|
+
[MorphoBlueVersions.MorphoBlueWstEthEth]: MORPHO_BLUE_WSTETH_ETH(networkId),
|
|
36
|
+
[MorphoBlueVersions.MorphoBlueWstEthUSDC]: MORPHO_BLUE_WSTETH_USDC(networkId),
|
|
21
37
|
}) as const;
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { getConfigContractAddress } from '../../contracts';
|
|
2
|
-
import { SparkMarketData, SparkVersions } from '../../types';
|
|
3
|
-
import { NetworkNumber } from '../../types/common';
|
|
4
|
-
import { sparkAssetsDefaultMarket } from './marketAssets';
|
|
5
|
-
|
|
6
|
-
export const sparkEthEmodeId = {
|
|
7
|
-
[NetworkNumber.Eth]: 1,
|
|
8
|
-
} as const;
|
|
9
|
-
|
|
10
|
-
export const SPARK_V1 = (networkId: NetworkNumber = NetworkNumber.Eth): SparkMarketData => ({
|
|
11
|
-
chainIds: [1],
|
|
12
|
-
label: 'Spark',
|
|
13
|
-
shortLabel: 'v1',
|
|
14
|
-
value: SparkVersions.SparkV1,
|
|
15
|
-
url: 'default',
|
|
16
|
-
assets: networkId ? sparkAssetsDefaultMarket[networkId] : [],
|
|
17
|
-
provider: 'SparkPoolAddressesProvider',
|
|
18
|
-
providerAddress: getConfigContractAddress('SparkPoolAddressesProvider', networkId),
|
|
19
|
-
lendingPool: 'SparkLendingPool',
|
|
20
|
-
lendingPoolAddress: getConfigContractAddress('SparkLendingPool', networkId),
|
|
21
|
-
protocolData: 'SparkProtocolDataProvider',
|
|
22
|
-
protocolDataAddress: getConfigContractAddress('SparkProtocolDataProvider', networkId),
|
|
23
|
-
// icon: SvgAdapter(protocolIcons.spark),
|
|
24
|
-
protocolName: 'spark',
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export const SparkMarkets = (networkId: NetworkNumber) => ({
|
|
29
|
-
[SparkVersions.SparkV1]: SPARK_V1(networkId),
|
|
1
|
+
import { getConfigContractAddress } from '../../contracts';
|
|
2
|
+
import { SparkMarketData, SparkVersions } from '../../types';
|
|
3
|
+
import { NetworkNumber } from '../../types/common';
|
|
4
|
+
import { sparkAssetsDefaultMarket } from './marketAssets';
|
|
5
|
+
|
|
6
|
+
export const sparkEthEmodeId = {
|
|
7
|
+
[NetworkNumber.Eth]: 1,
|
|
8
|
+
} as const;
|
|
9
|
+
|
|
10
|
+
export const SPARK_V1 = (networkId: NetworkNumber = NetworkNumber.Eth): SparkMarketData => ({
|
|
11
|
+
chainIds: [1],
|
|
12
|
+
label: 'Spark',
|
|
13
|
+
shortLabel: 'v1',
|
|
14
|
+
value: SparkVersions.SparkV1,
|
|
15
|
+
url: 'default',
|
|
16
|
+
assets: networkId ? sparkAssetsDefaultMarket[networkId] : [],
|
|
17
|
+
provider: 'SparkPoolAddressesProvider',
|
|
18
|
+
providerAddress: getConfigContractAddress('SparkPoolAddressesProvider', networkId),
|
|
19
|
+
lendingPool: 'SparkLendingPool',
|
|
20
|
+
lendingPoolAddress: getConfigContractAddress('SparkLendingPool', networkId),
|
|
21
|
+
protocolData: 'SparkProtocolDataProvider',
|
|
22
|
+
protocolDataAddress: getConfigContractAddress('SparkProtocolDataProvider', networkId),
|
|
23
|
+
// icon: SvgAdapter(protocolIcons.spark),
|
|
24
|
+
protocolName: 'spark',
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export const SparkMarkets = (networkId: NetworkNumber) => ({
|
|
29
|
+
[SparkVersions.SparkV1]: SPARK_V1(networkId),
|
|
30
30
|
}) as const;
|