@defisaver/positions-sdk 2.1.11 → 2.1.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/.mocharc.json +4 -4
- package/.nvmrc +1 -1
- package/README.md +64 -64
- package/cjs/aaveV3/index.js +1 -1
- package/cjs/contracts.d.ts +100947 -134653
- package/cjs/helpers/morphoBlueHelpers/index.js +66 -66
- package/cjs/markets/aave/marketAssets.js +1 -1
- package/cjs/services/viem.d.ts +2 -3254
- package/cjs/staking/staking.d.ts +1 -1
- package/cjs/staking/staking.js +17 -14
- package/esm/aaveV3/index.js +1 -1
- package/esm/contracts.d.ts +100947 -134653
- package/esm/helpers/morphoBlueHelpers/index.js +66 -66
- package/esm/markets/aave/marketAssets.js +1 -1
- package/esm/services/viem.d.ts +2 -3254
- package/esm/staking/staking.d.ts +1 -1
- package/esm/staking/staking.js +17 -14
- package/package.json +47 -47
- package/src/aaveV2/index.ts +240 -240
- package/src/aaveV3/index.ts +614 -614
- package/src/aaveV3/merit.ts +97 -97
- package/src/aaveV3/merkl.ts +74 -74
- package/src/claiming/aaveV3.ts +154 -154
- package/src/claiming/compV3.ts +22 -22
- package/src/claiming/index.ts +12 -12
- package/src/claiming/king.ts +66 -66
- package/src/claiming/morphoBlue.ts +118 -118
- package/src/claiming/spark.ts +225 -225
- package/src/compoundV2/index.ts +244 -244
- package/src/compoundV3/index.ts +274 -274
- package/src/config/contracts.ts +1251 -1251
- package/src/constants/index.ts +10 -10
- package/src/contracts.ts +120 -120
- package/src/curveUsd/index.ts +254 -254
- package/src/eulerV2/index.ts +324 -324
- package/src/exchange/index.ts +25 -25
- package/src/fluid/index.ts +1668 -1668
- package/src/helpers/aaveHelpers/index.ts +187 -187
- package/src/helpers/compoundHelpers/index.ts +283 -283
- package/src/helpers/curveUsdHelpers/index.ts +40 -40
- package/src/helpers/eulerHelpers/index.ts +222 -222
- package/src/helpers/fluidHelpers/index.ts +326 -326
- package/src/helpers/index.ts +10 -10
- package/src/helpers/liquityV2Helpers/index.ts +82 -82
- package/src/helpers/llamaLendHelpers/index.ts +53 -53
- package/src/helpers/makerHelpers/index.ts +52 -52
- package/src/helpers/morphoBlueHelpers/index.ts +396 -396
- package/src/helpers/sparkHelpers/index.ts +158 -158
- package/src/index.ts +47 -47
- package/src/liquity/index.ts +159 -159
- package/src/liquityV2/index.ts +657 -657
- package/src/llamaLend/index.ts +305 -305
- package/src/maker/index.ts +223 -223
- package/src/markets/aave/index.ts +116 -116
- package/src/markets/aave/marketAssets.ts +54 -54
- package/src/markets/compound/index.ts +238 -238
- package/src/markets/compound/marketsAssets.ts +97 -97
- package/src/markets/curveUsd/index.ts +69 -69
- package/src/markets/euler/index.ts +26 -26
- package/src/markets/fluid/index.ts +2460 -2460
- package/src/markets/index.ts +25 -25
- package/src/markets/liquityV2/index.ts +102 -102
- package/src/markets/llamaLend/contractAddresses.ts +141 -141
- package/src/markets/llamaLend/index.ts +235 -235
- package/src/markets/morphoBlue/index.ts +895 -895
- package/src/markets/spark/index.ts +29 -29
- package/src/markets/spark/marketAssets.ts +12 -12
- package/src/moneymarket/moneymarketCommonService.ts +80 -80
- package/src/morphoBlue/index.ts +274 -274
- package/src/portfolio/index.ts +570 -570
- package/src/services/priceService.ts +159 -159
- package/src/services/utils.ts +115 -115
- package/src/services/viem.ts +34 -34
- package/src/setup.ts +8 -8
- package/src/spark/index.ts +456 -456
- package/src/staking/eligibility.ts +53 -53
- package/src/staking/index.ts +1 -1
- package/src/staking/staking.ts +177 -172
- package/src/types/aave.ts +189 -189
- package/src/types/claiming.ts +109 -109
- package/src/types/common.ts +107 -107
- package/src/types/compound.ts +136 -136
- package/src/types/curveUsd.ts +123 -123
- package/src/types/euler.ts +175 -175
- package/src/types/fluid.ts +452 -452
- package/src/types/index.ts +13 -13
- package/src/types/liquity.ts +30 -30
- package/src/types/liquityV2.ts +126 -126
- package/src/types/llamaLend.ts +159 -159
- package/src/types/maker.ts +63 -63
- package/src/types/merit.ts +1 -1
- package/src/types/merkl.ts +70 -70
- package/src/types/morphoBlue.ts +194 -194
- package/src/types/portfolio.ts +60 -60
- package/src/types/spark.ts +133 -133
- package/src/umbrella/index.ts +69 -69
- package/src/umbrella/umbrellaUtils.ts +29 -29
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
import { getConfigContractAddress } from '../../contracts';
|
|
3
|
-
import { compareAddresses } from '../../services/utils';
|
|
4
|
-
import {
|
|
5
|
-
AaveMarketInfo, AaveVersions,
|
|
6
|
-
} from '../../types';
|
|
7
|
-
import { NetworkNumber } from '../../types/common';
|
|
8
|
-
import {
|
|
9
|
-
aaveV1AssetsDefaultMarket, aaveV2AssetsDefaultMarket, aaveV3AssetsDefaultMarket, aaveV3AssetsEtherfiMarket, aaveV3AssetsLidoMarket,
|
|
10
|
-
} from './marketAssets';
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
aaveV1AssetsDefaultMarket,
|
|
14
|
-
aaveV2AssetsDefaultMarket,
|
|
15
|
-
aaveV3AssetsDefaultMarket,
|
|
16
|
-
aaveV3AssetsLidoMarket,
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const AAVE_V1: AaveMarketInfo = {
|
|
20
|
-
chainIds: [NetworkNumber.Eth],
|
|
21
|
-
label: 'Aave v1',
|
|
22
|
-
shortLabel: 'v1',
|
|
23
|
-
url: '',
|
|
24
|
-
value: AaveVersions.AaveV1,
|
|
25
|
-
assets: aaveV1AssetsDefaultMarket.map((a) => a.underlyingAsset),
|
|
26
|
-
provider: '',
|
|
27
|
-
providerAddress: '',
|
|
28
|
-
lendingPool: '',
|
|
29
|
-
lendingPoolAddress: '',
|
|
30
|
-
protocolData: '',
|
|
31
|
-
protocolDataAddress: '',
|
|
32
|
-
// icon: SvgAdapter(protocolIcons.aave),
|
|
33
|
-
disabled: true,
|
|
34
|
-
protocolName: 'aave',
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
export const AAVE_V2: AaveMarketInfo = {
|
|
38
|
-
chainIds: [NetworkNumber.Eth],
|
|
39
|
-
label: 'Aave v2',
|
|
40
|
-
shortLabel: 'v2',
|
|
41
|
-
value: AaveVersions.AaveV2,
|
|
42
|
-
url: 'default',
|
|
43
|
-
assets: aaveV2AssetsDefaultMarket,
|
|
44
|
-
provider: 'LendingPoolAddressesProvider',
|
|
45
|
-
providerAddress: getConfigContractAddress('LendingPoolAddressesProvider', 1), // rename
|
|
46
|
-
lendingPool: 'AaveLendingPoolV2',
|
|
47
|
-
lendingPoolAddress: getConfigContractAddress('AaveLendingPoolV2', 1),
|
|
48
|
-
protocolData: 'AaveProtocolDataProvider',
|
|
49
|
-
protocolDataAddress: getConfigContractAddress('AaveProtocolDataProvider', 1),
|
|
50
|
-
// icon: SvgAdapter(protocolIcons.aave),
|
|
51
|
-
protocolName: 'aave',
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
export const AAVE_V3 = (networkId: NetworkNumber): AaveMarketInfo => ({
|
|
55
|
-
chainIds: [NetworkNumber.Eth, NetworkNumber.Opt, NetworkNumber.Arb, NetworkNumber.Base, NetworkNumber.Linea, NetworkNumber.Plasma],
|
|
56
|
-
label: networkId === NetworkNumber.Eth ? 'Aave v3 Core' : 'Aave v3',
|
|
57
|
-
shortLabel: 'v3',
|
|
58
|
-
value: AaveVersions.AaveV3,
|
|
59
|
-
url: 'default',
|
|
60
|
-
assets: networkId ? aaveV3AssetsDefaultMarket[networkId] : [],
|
|
61
|
-
provider: 'AaveV3PoolAddressesProvider',
|
|
62
|
-
providerAddress: getConfigContractAddress('AaveV3PoolAddressesProvider', networkId),
|
|
63
|
-
lendingPool: 'AaveV3LendingPool',
|
|
64
|
-
lendingPoolAddress: getConfigContractAddress('AaveV3LendingPool', networkId),
|
|
65
|
-
protocolData: 'AaveV3ProtocolDataProvider',
|
|
66
|
-
protocolDataAddress: getConfigContractAddress('AaveV3ProtocolDataProvider', networkId),
|
|
67
|
-
// icon: SvgAdapter(protocolIcons.aave),
|
|
68
|
-
protocolName: 'aave',
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
export const AAVE_V3_LIDO = (networkId: NetworkNumber): AaveMarketInfo => ({
|
|
72
|
-
chainIds: [NetworkNumber.Eth],
|
|
73
|
-
label: 'Aave v3 Prime',
|
|
74
|
-
shortLabel: 'v3',
|
|
75
|
-
value: AaveVersions.AaveV3Lido,
|
|
76
|
-
url: 'lido',
|
|
77
|
-
assets: networkId ? aaveV3AssetsLidoMarket[networkId] : [],
|
|
78
|
-
provider: 'AaveV3LidoPoolAddressesProvider',
|
|
79
|
-
providerAddress: getConfigContractAddress('AaveV3LidoPoolAddressesProvider', networkId),
|
|
80
|
-
lendingPool: 'AaveV3LidoLendingPool',
|
|
81
|
-
lendingPoolAddress: getConfigContractAddress('AaveV3LidoLendingPool', networkId),
|
|
82
|
-
protocolData: 'AaveV3LidoProtocolDataProvider',
|
|
83
|
-
protocolDataAddress: getConfigContractAddress('AaveV3LidoProtocolDataProvider', networkId),
|
|
84
|
-
// icon: SvgAdapter(protocolIcons.aave),
|
|
85
|
-
protocolName: 'aave',
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
export const AAVE_V3_ETHERFI = (networkId: NetworkNumber): AaveMarketInfo => ({
|
|
89
|
-
chainIds: [NetworkNumber.Eth],
|
|
90
|
-
label: 'Aave v3 EtherFi',
|
|
91
|
-
shortLabel: 'v3',
|
|
92
|
-
value: AaveVersions.AaveV3Etherfi,
|
|
93
|
-
url: 'etherfi',
|
|
94
|
-
assets: networkId ? aaveV3AssetsEtherfiMarket[networkId] : [],
|
|
95
|
-
provider: 'AaveV3EtherfiPoolAddressesProvider',
|
|
96
|
-
providerAddress: getConfigContractAddress('AaveV3EtherfiPoolAddressesProvider', networkId),
|
|
97
|
-
lendingPool: 'AaveV3EtherfiLendingPool',
|
|
98
|
-
lendingPoolAddress: getConfigContractAddress('AaveV3EtherfiLendingPool', networkId),
|
|
99
|
-
protocolData: 'AaveV3EtherfiProtocolDataProvider',
|
|
100
|
-
protocolDataAddress: getConfigContractAddress('AaveV3EtherfiProtocolDataProvider', networkId),
|
|
101
|
-
// icon: SvgAdapter(protocolIcons.aave),
|
|
102
|
-
protocolName: 'aave',
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
export const AaveMarkets = (networkId: NetworkNumber) => ({
|
|
106
|
-
[AaveVersions.AaveV1]: AAVE_V1,
|
|
107
|
-
[AaveVersions.AaveV2]: AAVE_V2,
|
|
108
|
-
[AaveVersions.AaveV3]: AAVE_V3(networkId),
|
|
109
|
-
[AaveVersions.AaveV3Lido]: AAVE_V3_LIDO(networkId),
|
|
110
|
-
[AaveVersions.AaveV3Etherfi]: AAVE_V3_ETHERFI(networkId),
|
|
111
|
-
}) as const;
|
|
112
|
-
|
|
113
|
-
export const getAaveV3MarketByMarketAddress = (marketAddress: string, network = NetworkNumber.Eth): AaveMarketInfo | undefined => {
|
|
114
|
-
const markets = AaveMarkets(network);
|
|
115
|
-
return Object.values(markets).find((m) => compareAddresses(m.providerAddress, marketAddress));
|
|
116
|
-
};
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { getConfigContractAddress } from '../../contracts';
|
|
3
|
+
import { compareAddresses } from '../../services/utils';
|
|
4
|
+
import {
|
|
5
|
+
AaveMarketInfo, AaveVersions,
|
|
6
|
+
} from '../../types';
|
|
7
|
+
import { NetworkNumber } from '../../types/common';
|
|
8
|
+
import {
|
|
9
|
+
aaveV1AssetsDefaultMarket, aaveV2AssetsDefaultMarket, aaveV3AssetsDefaultMarket, aaveV3AssetsEtherfiMarket, aaveV3AssetsLidoMarket,
|
|
10
|
+
} from './marketAssets';
|
|
11
|
+
|
|
12
|
+
export {
|
|
13
|
+
aaveV1AssetsDefaultMarket,
|
|
14
|
+
aaveV2AssetsDefaultMarket,
|
|
15
|
+
aaveV3AssetsDefaultMarket,
|
|
16
|
+
aaveV3AssetsLidoMarket,
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const AAVE_V1: AaveMarketInfo = {
|
|
20
|
+
chainIds: [NetworkNumber.Eth],
|
|
21
|
+
label: 'Aave v1',
|
|
22
|
+
shortLabel: 'v1',
|
|
23
|
+
url: '',
|
|
24
|
+
value: AaveVersions.AaveV1,
|
|
25
|
+
assets: aaveV1AssetsDefaultMarket.map((a) => a.underlyingAsset),
|
|
26
|
+
provider: '',
|
|
27
|
+
providerAddress: '',
|
|
28
|
+
lendingPool: '',
|
|
29
|
+
lendingPoolAddress: '',
|
|
30
|
+
protocolData: '',
|
|
31
|
+
protocolDataAddress: '',
|
|
32
|
+
// icon: SvgAdapter(protocolIcons.aave),
|
|
33
|
+
disabled: true,
|
|
34
|
+
protocolName: 'aave',
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export const AAVE_V2: AaveMarketInfo = {
|
|
38
|
+
chainIds: [NetworkNumber.Eth],
|
|
39
|
+
label: 'Aave v2',
|
|
40
|
+
shortLabel: 'v2',
|
|
41
|
+
value: AaveVersions.AaveV2,
|
|
42
|
+
url: 'default',
|
|
43
|
+
assets: aaveV2AssetsDefaultMarket,
|
|
44
|
+
provider: 'LendingPoolAddressesProvider',
|
|
45
|
+
providerAddress: getConfigContractAddress('LendingPoolAddressesProvider', 1), // rename
|
|
46
|
+
lendingPool: 'AaveLendingPoolV2',
|
|
47
|
+
lendingPoolAddress: getConfigContractAddress('AaveLendingPoolV2', 1),
|
|
48
|
+
protocolData: 'AaveProtocolDataProvider',
|
|
49
|
+
protocolDataAddress: getConfigContractAddress('AaveProtocolDataProvider', 1),
|
|
50
|
+
// icon: SvgAdapter(protocolIcons.aave),
|
|
51
|
+
protocolName: 'aave',
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export const AAVE_V3 = (networkId: NetworkNumber): AaveMarketInfo => ({
|
|
55
|
+
chainIds: [NetworkNumber.Eth, NetworkNumber.Opt, NetworkNumber.Arb, NetworkNumber.Base, NetworkNumber.Linea, NetworkNumber.Plasma],
|
|
56
|
+
label: networkId === NetworkNumber.Eth ? 'Aave v3 Core' : 'Aave v3',
|
|
57
|
+
shortLabel: 'v3',
|
|
58
|
+
value: AaveVersions.AaveV3,
|
|
59
|
+
url: 'default',
|
|
60
|
+
assets: networkId ? aaveV3AssetsDefaultMarket[networkId] : [],
|
|
61
|
+
provider: 'AaveV3PoolAddressesProvider',
|
|
62
|
+
providerAddress: getConfigContractAddress('AaveV3PoolAddressesProvider', networkId),
|
|
63
|
+
lendingPool: 'AaveV3LendingPool',
|
|
64
|
+
lendingPoolAddress: getConfigContractAddress('AaveV3LendingPool', networkId),
|
|
65
|
+
protocolData: 'AaveV3ProtocolDataProvider',
|
|
66
|
+
protocolDataAddress: getConfigContractAddress('AaveV3ProtocolDataProvider', networkId),
|
|
67
|
+
// icon: SvgAdapter(protocolIcons.aave),
|
|
68
|
+
protocolName: 'aave',
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
export const AAVE_V3_LIDO = (networkId: NetworkNumber): AaveMarketInfo => ({
|
|
72
|
+
chainIds: [NetworkNumber.Eth],
|
|
73
|
+
label: 'Aave v3 Prime',
|
|
74
|
+
shortLabel: 'v3',
|
|
75
|
+
value: AaveVersions.AaveV3Lido,
|
|
76
|
+
url: 'lido',
|
|
77
|
+
assets: networkId ? aaveV3AssetsLidoMarket[networkId] : [],
|
|
78
|
+
provider: 'AaveV3LidoPoolAddressesProvider',
|
|
79
|
+
providerAddress: getConfigContractAddress('AaveV3LidoPoolAddressesProvider', networkId),
|
|
80
|
+
lendingPool: 'AaveV3LidoLendingPool',
|
|
81
|
+
lendingPoolAddress: getConfigContractAddress('AaveV3LidoLendingPool', networkId),
|
|
82
|
+
protocolData: 'AaveV3LidoProtocolDataProvider',
|
|
83
|
+
protocolDataAddress: getConfigContractAddress('AaveV3LidoProtocolDataProvider', networkId),
|
|
84
|
+
// icon: SvgAdapter(protocolIcons.aave),
|
|
85
|
+
protocolName: 'aave',
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
export const AAVE_V3_ETHERFI = (networkId: NetworkNumber): AaveMarketInfo => ({
|
|
89
|
+
chainIds: [NetworkNumber.Eth],
|
|
90
|
+
label: 'Aave v3 EtherFi',
|
|
91
|
+
shortLabel: 'v3',
|
|
92
|
+
value: AaveVersions.AaveV3Etherfi,
|
|
93
|
+
url: 'etherfi',
|
|
94
|
+
assets: networkId ? aaveV3AssetsEtherfiMarket[networkId] : [],
|
|
95
|
+
provider: 'AaveV3EtherfiPoolAddressesProvider',
|
|
96
|
+
providerAddress: getConfigContractAddress('AaveV3EtherfiPoolAddressesProvider', networkId),
|
|
97
|
+
lendingPool: 'AaveV3EtherfiLendingPool',
|
|
98
|
+
lendingPoolAddress: getConfigContractAddress('AaveV3EtherfiLendingPool', networkId),
|
|
99
|
+
protocolData: 'AaveV3EtherfiProtocolDataProvider',
|
|
100
|
+
protocolDataAddress: getConfigContractAddress('AaveV3EtherfiProtocolDataProvider', networkId),
|
|
101
|
+
// icon: SvgAdapter(protocolIcons.aave),
|
|
102
|
+
protocolName: 'aave',
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
export const AaveMarkets = (networkId: NetworkNumber) => ({
|
|
106
|
+
[AaveVersions.AaveV1]: AAVE_V1,
|
|
107
|
+
[AaveVersions.AaveV2]: AAVE_V2,
|
|
108
|
+
[AaveVersions.AaveV3]: AAVE_V3(networkId),
|
|
109
|
+
[AaveVersions.AaveV3Lido]: AAVE_V3_LIDO(networkId),
|
|
110
|
+
[AaveVersions.AaveV3Etherfi]: AAVE_V3_ETHERFI(networkId),
|
|
111
|
+
}) as const;
|
|
112
|
+
|
|
113
|
+
export const getAaveV3MarketByMarketAddress = (marketAddress: string, network = NetworkNumber.Eth): AaveMarketInfo | undefined => {
|
|
114
|
+
const markets = AaveMarkets(network);
|
|
115
|
+
return Object.values(markets).find((m) => compareAddresses(m.providerAddress, marketAddress));
|
|
116
|
+
};
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { AssetData, getAssetInfo } from '@defisaver/tokens';
|
|
2
|
-
import { NetworkNumber } from '../../types/common';
|
|
3
|
-
|
|
4
|
-
export const aaveV1AssetsDefaultMarket: AssetData[] = [
|
|
5
|
-
'aETH', 'aDAI', 'aUSDC', 'aSUSD', 'aTUSD', 'aUSDT', 'aBUSD', 'aBAT', 'aLEND',
|
|
6
|
-
'aLINK', 'aMANA', 'aMKR', 'aREP', 'aSNX', 'aWBTC', 'aZRX', 'aENJ', 'aREN', 'aYFI', 'aUNI', 'aAAVE',
|
|
7
|
-
].map((symbol) => getAssetInfo(symbol));
|
|
8
|
-
|
|
9
|
-
export const aaveV2AssetsDefaultMarket = ['USDT', 'WBTC', 'ETH', 'YFI', 'ZRX', 'UNI', 'AAVE', 'BAT', 'BUSD', 'DAI', 'ENJ', 'KNCL', 'LINK', 'MANA', 'MKR', 'REN', 'SNX', 'SUSD', 'TUSD', 'USDC', 'CRV', 'GUSD', 'BAL', 'xSUSHI', 'RENFIL', 'RAI', 'AMPL', 'USDP', 'DPI', 'FRAX', 'FEI', 'stETH', 'ENS', 'UST', 'CVX', '1INCH', 'LUSD'];
|
|
10
|
-
|
|
11
|
-
export const aaveV3AssetsDefaultMarketEth = [
|
|
12
|
-
'ETH', 'wstETH', 'WBTC', 'USDC', 'DAI', 'LINK', 'AAVE', 'cbETH', 'USDT', 'rETH', 'LUSD', 'CRV', 'MKR', 'SNX', 'BAL', 'UNI', 'LDO', 'ENS', '1INCH', 'FRAX', 'GHO', 'RPL', 'sDAI', 'STG', 'KNC', 'FXS', 'crvUSD', 'PYUSD', 'weETH', 'osETH', 'USDe', 'ETHx', 'sUSDe', 'tBTC', 'cbBTC', 'USDS', 'rsETH', 'LBTC', 'eBTC', 'RLUSD', 'PT eUSDe May', 'PT sUSDe July', 'USDtb',
|
|
13
|
-
'eUSDe', 'PT USDe July', 'PT eUSDe Aug', 'EURC', 'FBTC', 'PT sUSDe Sep', 'PT USDe Sep', 'tETH', 'ezETH', 'XAUt', 'PT sUSDe Nov', 'PT USDe Nov',
|
|
14
|
-
];
|
|
15
|
-
export const aaveV3AssetsDefaultMarketOpt = [
|
|
16
|
-
'DAI', 'USDC.e', 'USDT', 'SUSD', 'AAVE', 'LINK', 'WBTC', 'ETH', 'OP', 'wstETH', 'LUSD', 'MAI', 'rETH', 'USDC',
|
|
17
|
-
];
|
|
18
|
-
export const aaveV3AssetsDefaultMarketArb = ['DAI', 'LINK', 'USDC.e', 'WBTC', 'ETH', 'USDT', 'AAVE', 'EURS', 'wstETH', 'MAI', 'rETH', 'LUSD', 'USDC', 'FRAX', 'ARB', 'weETH', 'GHO', 'ezETH', 'rsETH', 'tBTC'];
|
|
19
|
-
export const aaveV3AssetsDefaultMarketBase = ['ETH', 'cbETH', 'USDbC', 'wstETH', 'USDC', 'weETH', 'cbBTC', 'ezETH', 'GHO', 'wrsETH', 'LBTC', 'EURC', 'AAVE', 'tBTC'];
|
|
20
|
-
|
|
21
|
-
export const aaveV3AssetsDefaultMarketLinea = ['ETH', 'USDC', 'weETH', 'ezETH', 'USDT', 'wstETH', 'wrsETH', 'WBTC'];
|
|
22
|
-
|
|
23
|
-
export const aaveV3AssetsDefaultMarketPlasma = ['ETH', 'USDT', 'sUSDe', 'USDe', 'weETH', 'XAUt', 'PT USDe Jan', 'PT sUSDe Jan', 'wrsETH', 'wstETH'];
|
|
24
|
-
|
|
25
|
-
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
26
|
-
export const aaveV3AssetsDefaultMarket = {
|
|
27
|
-
[NetworkNumber.Eth]: aaveV3AssetsDefaultMarketEth,
|
|
28
|
-
[NetworkNumber.Opt]: aaveV3AssetsDefaultMarketOpt,
|
|
29
|
-
[NetworkNumber.Arb]: aaveV3AssetsDefaultMarketArb,
|
|
30
|
-
[NetworkNumber.Base]: aaveV3AssetsDefaultMarketBase,
|
|
31
|
-
[NetworkNumber.Linea]: aaveV3AssetsDefaultMarketLinea,
|
|
32
|
-
[NetworkNumber.Plasma]: aaveV3AssetsDefaultMarketPlasma,
|
|
33
|
-
} as const;
|
|
34
|
-
|
|
35
|
-
export const aaveV3AssetsLidoMarketEth = ['ETH', 'wstETH', 'USDS', 'USDC', 'ezETH', 'sUSDe', 'GHO', 'rsETH', 'tETH'];
|
|
36
|
-
|
|
37
|
-
export const aaveV3AssetsLidoMarket = {
|
|
38
|
-
[NetworkNumber.Eth]: aaveV3AssetsLidoMarketEth,
|
|
39
|
-
[NetworkNumber.Opt]: [],
|
|
40
|
-
[NetworkNumber.Arb]: [],
|
|
41
|
-
[NetworkNumber.Base]: [],
|
|
42
|
-
[NetworkNumber.Linea]: [],
|
|
43
|
-
[NetworkNumber.Plasma]: [],
|
|
44
|
-
} as const;
|
|
45
|
-
|
|
46
|
-
export const aaveV3AssetsEtherfiMarketEth = ['weETH', 'USDC', 'PYUSD', 'FRAX'];
|
|
47
|
-
|
|
48
|
-
export const aaveV3AssetsEtherfiMarket = {
|
|
49
|
-
[NetworkNumber.Eth]: aaveV3AssetsEtherfiMarketEth,
|
|
50
|
-
[NetworkNumber.Opt]: [],
|
|
51
|
-
[NetworkNumber.Arb]: [],
|
|
52
|
-
[NetworkNumber.Base]: [],
|
|
53
|
-
[NetworkNumber.Linea]: [],
|
|
54
|
-
[NetworkNumber.Plasma]: [],
|
|
1
|
+
import { AssetData, getAssetInfo } from '@defisaver/tokens';
|
|
2
|
+
import { NetworkNumber } from '../../types/common';
|
|
3
|
+
|
|
4
|
+
export const aaveV1AssetsDefaultMarket: AssetData[] = [
|
|
5
|
+
'aETH', 'aDAI', 'aUSDC', 'aSUSD', 'aTUSD', 'aUSDT', 'aBUSD', 'aBAT', 'aLEND',
|
|
6
|
+
'aLINK', 'aMANA', 'aMKR', 'aREP', 'aSNX', 'aWBTC', 'aZRX', 'aENJ', 'aREN', 'aYFI', 'aUNI', 'aAAVE',
|
|
7
|
+
].map((symbol) => getAssetInfo(symbol));
|
|
8
|
+
|
|
9
|
+
export const aaveV2AssetsDefaultMarket = ['USDT', 'WBTC', 'ETH', 'YFI', 'ZRX', 'UNI', 'AAVE', 'BAT', 'BUSD', 'DAI', 'ENJ', 'KNCL', 'LINK', 'MANA', 'MKR', 'REN', 'SNX', 'SUSD', 'TUSD', 'USDC', 'CRV', 'GUSD', 'BAL', 'xSUSHI', 'RENFIL', 'RAI', 'AMPL', 'USDP', 'DPI', 'FRAX', 'FEI', 'stETH', 'ENS', 'UST', 'CVX', '1INCH', 'LUSD'];
|
|
10
|
+
|
|
11
|
+
export const aaveV3AssetsDefaultMarketEth = [
|
|
12
|
+
'ETH', 'wstETH', 'WBTC', 'USDC', 'DAI', 'LINK', 'AAVE', 'cbETH', 'USDT', 'rETH', 'LUSD', 'CRV', 'MKR', 'SNX', 'BAL', 'UNI', 'LDO', 'ENS', '1INCH', 'FRAX', 'GHO', 'RPL', 'sDAI', 'STG', 'KNC', 'FXS', 'crvUSD', 'PYUSD', 'weETH', 'osETH', 'USDe', 'ETHx', 'sUSDe', 'tBTC', 'cbBTC', 'USDS', 'rsETH', 'LBTC', 'eBTC', 'RLUSD', 'PT eUSDe May', 'PT sUSDe July', 'USDtb',
|
|
13
|
+
'eUSDe', 'PT USDe July', 'PT eUSDe Aug', 'EURC', 'FBTC', 'PT sUSDe Sep', 'PT USDe Sep', 'tETH', 'ezETH', 'XAUt', 'PT sUSDe Nov', 'PT USDe Nov',
|
|
14
|
+
];
|
|
15
|
+
export const aaveV3AssetsDefaultMarketOpt = [
|
|
16
|
+
'DAI', 'USDC.e', 'USDT', 'SUSD', 'AAVE', 'LINK', 'WBTC', 'ETH', 'OP', 'wstETH', 'LUSD', 'MAI', 'rETH', 'USDC',
|
|
17
|
+
];
|
|
18
|
+
export const aaveV3AssetsDefaultMarketArb = ['DAI', 'LINK', 'USDC.e', 'WBTC', 'ETH', 'USDT', 'AAVE', 'EURS', 'wstETH', 'MAI', 'rETH', 'LUSD', 'USDC', 'FRAX', 'ARB', 'weETH', 'GHO', 'ezETH', 'rsETH', 'tBTC'];
|
|
19
|
+
export const aaveV3AssetsDefaultMarketBase = ['ETH', 'cbETH', 'USDbC', 'wstETH', 'USDC', 'weETH', 'cbBTC', 'ezETH', 'GHO', 'wrsETH', 'LBTC', 'EURC', 'AAVE', 'tBTC'];
|
|
20
|
+
|
|
21
|
+
export const aaveV3AssetsDefaultMarketLinea = ['ETH', 'USDC', 'weETH', 'ezETH', 'USDT', 'wstETH', 'wrsETH', 'WBTC'];
|
|
22
|
+
|
|
23
|
+
export const aaveV3AssetsDefaultMarketPlasma = ['ETH', 'USDT', 'sUSDe', 'USDe', 'weETH', 'XAUt', 'PT USDe Jan', 'PT sUSDe Jan', 'wrsETH', 'wstETH', 'syrupUSDT'];
|
|
24
|
+
|
|
25
|
+
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
26
|
+
export const aaveV3AssetsDefaultMarket = {
|
|
27
|
+
[NetworkNumber.Eth]: aaveV3AssetsDefaultMarketEth,
|
|
28
|
+
[NetworkNumber.Opt]: aaveV3AssetsDefaultMarketOpt,
|
|
29
|
+
[NetworkNumber.Arb]: aaveV3AssetsDefaultMarketArb,
|
|
30
|
+
[NetworkNumber.Base]: aaveV3AssetsDefaultMarketBase,
|
|
31
|
+
[NetworkNumber.Linea]: aaveV3AssetsDefaultMarketLinea,
|
|
32
|
+
[NetworkNumber.Plasma]: aaveV3AssetsDefaultMarketPlasma,
|
|
33
|
+
} as const;
|
|
34
|
+
|
|
35
|
+
export const aaveV3AssetsLidoMarketEth = ['ETH', 'wstETH', 'USDS', 'USDC', 'ezETH', 'sUSDe', 'GHO', 'rsETH', 'tETH'];
|
|
36
|
+
|
|
37
|
+
export const aaveV3AssetsLidoMarket = {
|
|
38
|
+
[NetworkNumber.Eth]: aaveV3AssetsLidoMarketEth,
|
|
39
|
+
[NetworkNumber.Opt]: [],
|
|
40
|
+
[NetworkNumber.Arb]: [],
|
|
41
|
+
[NetworkNumber.Base]: [],
|
|
42
|
+
[NetworkNumber.Linea]: [],
|
|
43
|
+
[NetworkNumber.Plasma]: [],
|
|
44
|
+
} as const;
|
|
45
|
+
|
|
46
|
+
export const aaveV3AssetsEtherfiMarketEth = ['weETH', 'USDC', 'PYUSD', 'FRAX'];
|
|
47
|
+
|
|
48
|
+
export const aaveV3AssetsEtherfiMarket = {
|
|
49
|
+
[NetworkNumber.Eth]: aaveV3AssetsEtherfiMarketEth,
|
|
50
|
+
[NetworkNumber.Opt]: [],
|
|
51
|
+
[NetworkNumber.Arb]: [],
|
|
52
|
+
[NetworkNumber.Base]: [],
|
|
53
|
+
[NetworkNumber.Linea]: [],
|
|
54
|
+
[NetworkNumber.Plasma]: [],
|
|
55
55
|
} as const;
|