@defisaver/positions-sdk 2.1.3 → 2.1.4-dev-plasma-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/aaveV3/index.js +1 -1
- package/cjs/aaveV3/merit.js +3 -0
- package/cjs/config/contracts.d.ts +17 -0
- package/cjs/config/contracts.js +17 -0
- package/cjs/markets/aave/index.js +1 -1
- package/cjs/markets/aave/marketAssets.d.ts +4 -0
- package/cjs/markets/aave/marketAssets.js +5 -1
- package/cjs/markets/compound/index.js +11 -0
- package/cjs/markets/compound/marketsAssets.d.ts +7 -0
- package/cjs/markets/compound/marketsAssets.js +7 -0
- package/cjs/markets/spark/marketAssets.d.ts +1 -0
- package/cjs/markets/spark/marketAssets.js +1 -0
- package/cjs/services/utils.js +1 -1
- package/cjs/services/viem.d.ts +54 -15
- package/cjs/services/viem.js +2 -0
- package/cjs/staking/staking.js +2 -1
- package/cjs/types/common.d.ts +2 -1
- package/cjs/types/common.js +1 -0
- package/esm/aaveV3/index.js +1 -1
- package/esm/aaveV3/merit.js +3 -0
- package/esm/config/contracts.d.ts +17 -0
- package/esm/config/contracts.js +17 -0
- package/esm/markets/aave/index.js +1 -1
- package/esm/markets/aave/marketAssets.d.ts +4 -0
- package/esm/markets/aave/marketAssets.js +4 -0
- package/esm/markets/compound/index.js +11 -0
- package/esm/markets/compound/marketsAssets.d.ts +7 -0
- package/esm/markets/compound/marketsAssets.js +7 -0
- package/esm/markets/spark/marketAssets.d.ts +1 -0
- package/esm/markets/spark/marketAssets.js +1 -0
- package/esm/services/utils.js +1 -1
- package/esm/services/viem.d.ts +54 -15
- package/esm/services/viem.js +3 -1
- package/esm/staking/staking.js +2 -1
- package/esm/types/common.d.ts +2 -1
- package/esm/types/common.js +1 -0
- package/package.json +4 -4
- package/src/aaveV3/index.ts +1 -1
- package/src/aaveV3/merit.ts +3 -0
- package/src/config/contracts.ts +17 -0
- package/src/markets/aave/index.ts +1 -1
- package/src/markets/aave/marketAssets.ts +5 -0
- package/src/markets/compound/index.ts +11 -0
- package/src/markets/compound/marketsAssets.ts +7 -0
- package/src/markets/spark/marketAssets.ts +1 -0
- package/src/services/utils.ts +1 -1
- package/src/services/viem.ts +3 -1
- package/src/staking/staking.ts +1 -1
- package/src/types/common.ts +1 -0
package/cjs/aaveV3/index.js
CHANGED
|
@@ -63,7 +63,7 @@ function _getAaveV3MarketData(provider_1, network_1, market_1) {
|
|
|
63
63
|
const loanInfoContract = (0, contracts_1.AaveV3ViewContractViem)(provider, network);
|
|
64
64
|
const aaveIncentivesContract = (0, contracts_1.AaveIncentiveDataProviderV3ContractViem)(provider, network);
|
|
65
65
|
const marketAddress = market.providerAddress;
|
|
66
|
-
const networksWithIncentives = [common_1.NetworkNumber.Eth, common_1.NetworkNumber.Arb, common_1.NetworkNumber.Opt, common_1.NetworkNumber.Linea];
|
|
66
|
+
const networksWithIncentives = [common_1.NetworkNumber.Eth, common_1.NetworkNumber.Arb, common_1.NetworkNumber.Opt, common_1.NetworkNumber.Linea, common_1.NetworkNumber.Plasma];
|
|
67
67
|
// eslint-disable-next-line prefer-const
|
|
68
68
|
let [loanInfo, eModesInfo, isBorrowAllowed, rewardInfo, merkleRewardsMap, meritRewardsMap] = yield Promise.all([
|
|
69
69
|
loanInfoContract.read.getFullTokensInfo([marketAddress, _addresses], (0, viem_1.setViemBlockNumber)(blockNumber)),
|
package/cjs/aaveV3/merit.js
CHANGED
|
@@ -28303,6 +28303,11 @@ export declare const AaveV3View: {
|
|
|
28303
28303
|
};
|
|
28304
28304
|
};
|
|
28305
28305
|
};
|
|
28306
|
+
readonly "9745": {
|
|
28307
|
+
readonly address: "0xD8E67968d8a0df4beCf2D50daE1e34d4d80C701C";
|
|
28308
|
+
readonly createdBlock: 1880799;
|
|
28309
|
+
readonly oldVersions: {};
|
|
28310
|
+
};
|
|
28306
28311
|
};
|
|
28307
28312
|
};
|
|
28308
28313
|
export declare const AaveV3PoolAddressesProvider: {
|
|
@@ -28763,6 +28768,9 @@ export declare const AaveV3PoolAddressesProvider: {
|
|
|
28763
28768
|
readonly "59144": {
|
|
28764
28769
|
readonly address: "0x89502c3731F69DDC95B65753708A07F8Cd0373F4";
|
|
28765
28770
|
};
|
|
28771
|
+
readonly "9745": {
|
|
28772
|
+
readonly address: "0x061D8e131F26512348ee5FA42e2DF1bA9d6505E9";
|
|
28773
|
+
};
|
|
28766
28774
|
};
|
|
28767
28775
|
};
|
|
28768
28776
|
export declare const AaveV3LidoPoolAddressesProvider: {
|
|
@@ -31133,6 +31141,9 @@ export declare const AaveV3LendingPool: {
|
|
|
31133
31141
|
readonly "59144": {
|
|
31134
31142
|
readonly address: "0xc47b8C00b0f69a36fa203Ffeac0334874574a8Ac";
|
|
31135
31143
|
};
|
|
31144
|
+
readonly "9745": {
|
|
31145
|
+
readonly address: "0x925a2A7214Ed92428B5b1B090F80b25700095e12";
|
|
31146
|
+
};
|
|
31136
31147
|
};
|
|
31137
31148
|
};
|
|
31138
31149
|
export declare const AaveV3LidoLendingPool: {
|
|
@@ -34467,6 +34478,9 @@ export declare const AaveV3ProtocolDataProvider: {
|
|
|
34467
34478
|
readonly "59144": {
|
|
34468
34479
|
readonly address: "0x47cd4b507B81cB831669c71c7077f4daF6762FF4";
|
|
34469
34480
|
};
|
|
34481
|
+
readonly "9745": {
|
|
34482
|
+
readonly address: "0xf2D6E38B407e31E7E7e4a16E6769728b76c7419F";
|
|
34483
|
+
};
|
|
34470
34484
|
};
|
|
34471
34485
|
};
|
|
34472
34486
|
export declare const AaveV3LidoProtocolDataProvider: {
|
|
@@ -35805,6 +35819,9 @@ export declare const AaveUiIncentiveDataProviderV3: {
|
|
|
35805
35819
|
readonly "59144": {
|
|
35806
35820
|
readonly address: "0x117684358D990E42Eb1649E7e8C4691951dc1E71";
|
|
35807
35821
|
};
|
|
35822
|
+
readonly "9745": {
|
|
35823
|
+
readonly address: "0xcb85C501B3A5e9851850d66648d69B26A4c90942";
|
|
35824
|
+
};
|
|
35808
35825
|
};
|
|
35809
35826
|
};
|
|
35810
35827
|
export declare const cUSDCv3: {
|
package/cjs/config/contracts.js
CHANGED
|
@@ -231,6 +231,11 @@ exports.AaveV3View = {
|
|
|
231
231
|
"address": "0xc9D6EfA6e08B66a5Cdc516Bcd5807c2fa69E0f2A"
|
|
232
232
|
}
|
|
233
233
|
},
|
|
234
|
+
},
|
|
235
|
+
"9745": {
|
|
236
|
+
"address": "0xD8E67968d8a0df4beCf2D50daE1e34d4d80C701C",
|
|
237
|
+
"createdBlock": 1880799,
|
|
238
|
+
"oldVersions": {},
|
|
234
239
|
}
|
|
235
240
|
}
|
|
236
241
|
};
|
|
@@ -251,6 +256,9 @@ exports.AaveV3PoolAddressesProvider = {
|
|
|
251
256
|
},
|
|
252
257
|
"59144": {
|
|
253
258
|
"address": "0x89502c3731F69DDC95B65753708A07F8Cd0373F4"
|
|
259
|
+
},
|
|
260
|
+
"9745": {
|
|
261
|
+
"address": "0x061D8e131F26512348ee5FA42e2DF1bA9d6505E9"
|
|
254
262
|
}
|
|
255
263
|
}
|
|
256
264
|
};
|
|
@@ -287,6 +295,9 @@ exports.AaveV3LendingPool = {
|
|
|
287
295
|
},
|
|
288
296
|
"59144": {
|
|
289
297
|
"address": "0xc47b8C00b0f69a36fa203Ffeac0334874574a8Ac"
|
|
298
|
+
},
|
|
299
|
+
"9745": {
|
|
300
|
+
"address": "0x925a2A7214Ed92428B5b1B090F80b25700095e12"
|
|
290
301
|
}
|
|
291
302
|
}
|
|
292
303
|
};
|
|
@@ -323,6 +334,9 @@ exports.AaveV3ProtocolDataProvider = {
|
|
|
323
334
|
},
|
|
324
335
|
"59144": {
|
|
325
336
|
"address": "0x47cd4b507B81cB831669c71c7077f4daF6762FF4"
|
|
337
|
+
},
|
|
338
|
+
"9745": {
|
|
339
|
+
"address": "0xf2D6E38B407e31E7E7e4a16E6769728b76c7419F"
|
|
326
340
|
}
|
|
327
341
|
}
|
|
328
342
|
};
|
|
@@ -359,6 +373,9 @@ exports.AaveUiIncentiveDataProviderV3 = {
|
|
|
359
373
|
},
|
|
360
374
|
"59144": {
|
|
361
375
|
"address": "0x117684358D990E42Eb1649E7e8C4691951dc1E71"
|
|
376
|
+
},
|
|
377
|
+
"9745": {
|
|
378
|
+
"address": "0xcb85C501B3A5e9851850d66648d69B26A4c90942"
|
|
362
379
|
}
|
|
363
380
|
}
|
|
364
381
|
};
|
|
@@ -45,7 +45,7 @@ exports.AAVE_V2 = {
|
|
|
45
45
|
protocolName: 'aave',
|
|
46
46
|
};
|
|
47
47
|
const AAVE_V3 = (networkId) => ({
|
|
48
|
-
chainIds: [common_1.NetworkNumber.Eth, common_1.NetworkNumber.Opt, common_1.NetworkNumber.Arb, common_1.NetworkNumber.Base, common_1.NetworkNumber.Linea],
|
|
48
|
+
chainIds: [common_1.NetworkNumber.Eth, common_1.NetworkNumber.Opt, common_1.NetworkNumber.Arb, common_1.NetworkNumber.Base, common_1.NetworkNumber.Linea, common_1.NetworkNumber.Plasma],
|
|
49
49
|
label: networkId === common_1.NetworkNumber.Eth ? 'Aave v3 Core' : 'Aave v3',
|
|
50
50
|
shortLabel: 'v3',
|
|
51
51
|
value: types_1.AaveVersions.AaveV3,
|
|
@@ -6,12 +6,14 @@ export declare const aaveV3AssetsDefaultMarketOpt: string[];
|
|
|
6
6
|
export declare const aaveV3AssetsDefaultMarketArb: string[];
|
|
7
7
|
export declare const aaveV3AssetsDefaultMarketBase: string[];
|
|
8
8
|
export declare const aaveV3AssetsDefaultMarketLinea: string[];
|
|
9
|
+
export declare const aaveV3AssetsDefaultMarketPlasma: string[];
|
|
9
10
|
export declare const aaveV3AssetsDefaultMarket: {
|
|
10
11
|
readonly 1: string[];
|
|
11
12
|
readonly 10: string[];
|
|
12
13
|
readonly 42161: string[];
|
|
13
14
|
readonly 8453: string[];
|
|
14
15
|
readonly 59144: string[];
|
|
16
|
+
readonly 9745: string[];
|
|
15
17
|
};
|
|
16
18
|
export declare const aaveV3AssetsLidoMarketEth: string[];
|
|
17
19
|
export declare const aaveV3AssetsLidoMarket: {
|
|
@@ -20,6 +22,7 @@ export declare const aaveV3AssetsLidoMarket: {
|
|
|
20
22
|
readonly 42161: readonly [];
|
|
21
23
|
readonly 8453: readonly [];
|
|
22
24
|
readonly 59144: readonly [];
|
|
25
|
+
readonly 9745: readonly [];
|
|
23
26
|
};
|
|
24
27
|
export declare const aaveV3AssetsEtherfiMarketEth: string[];
|
|
25
28
|
export declare const aaveV3AssetsEtherfiMarket: {
|
|
@@ -28,4 +31,5 @@ export declare const aaveV3AssetsEtherfiMarket: {
|
|
|
28
31
|
readonly 42161: readonly [];
|
|
29
32
|
readonly 8453: readonly [];
|
|
30
33
|
readonly 59144: readonly [];
|
|
34
|
+
readonly 9745: readonly [];
|
|
31
35
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.aaveV3AssetsEtherfiMarket = exports.aaveV3AssetsEtherfiMarketEth = exports.aaveV3AssetsLidoMarket = exports.aaveV3AssetsLidoMarketEth = exports.aaveV3AssetsDefaultMarket = exports.aaveV3AssetsDefaultMarketLinea = exports.aaveV3AssetsDefaultMarketBase = exports.aaveV3AssetsDefaultMarketArb = exports.aaveV3AssetsDefaultMarketOpt = exports.aaveV3AssetsDefaultMarketEth = exports.aaveV2AssetsDefaultMarket = exports.aaveV1AssetsDefaultMarket = void 0;
|
|
3
|
+
exports.aaveV3AssetsEtherfiMarket = exports.aaveV3AssetsEtherfiMarketEth = exports.aaveV3AssetsLidoMarket = exports.aaveV3AssetsLidoMarketEth = exports.aaveV3AssetsDefaultMarket = exports.aaveV3AssetsDefaultMarketPlasma = exports.aaveV3AssetsDefaultMarketLinea = exports.aaveV3AssetsDefaultMarketBase = exports.aaveV3AssetsDefaultMarketArb = exports.aaveV3AssetsDefaultMarketOpt = exports.aaveV3AssetsDefaultMarketEth = exports.aaveV2AssetsDefaultMarket = exports.aaveV1AssetsDefaultMarket = void 0;
|
|
4
4
|
const tokens_1 = require("@defisaver/tokens");
|
|
5
5
|
const common_1 = require("../../types/common");
|
|
6
6
|
exports.aaveV1AssetsDefaultMarket = [
|
|
@@ -18,6 +18,7 @@ exports.aaveV3AssetsDefaultMarketOpt = [
|
|
|
18
18
|
exports.aaveV3AssetsDefaultMarketArb = ['DAI', 'LINK', 'USDC.e', 'WBTC', 'ETH', 'USDT', 'AAVE', 'EURS', 'wstETH', 'MAI', 'rETH', 'LUSD', 'USDC', 'FRAX', 'ARB', 'weETH', 'GHO', 'ezETH', 'rsETH', 'tBTC'];
|
|
19
19
|
exports.aaveV3AssetsDefaultMarketBase = ['ETH', 'cbETH', 'USDbC', 'wstETH', 'USDC', 'weETH', 'cbBTC', 'ezETH', 'GHO', 'wrsETH', 'LBTC', 'EURC', 'AAVE', 'tBTC'];
|
|
20
20
|
exports.aaveV3AssetsDefaultMarketLinea = ['ETH', 'USDC', 'weETH', 'ezETH', 'USDT', 'wstETH', 'wrsETH', 'WBTC'];
|
|
21
|
+
exports.aaveV3AssetsDefaultMarketPlasma = ['ETH', 'USDT', 'sUSDe', 'USDe', 'weETH', 'XAUt'];
|
|
21
22
|
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
22
23
|
exports.aaveV3AssetsDefaultMarket = {
|
|
23
24
|
[common_1.NetworkNumber.Eth]: exports.aaveV3AssetsDefaultMarketEth,
|
|
@@ -25,6 +26,7 @@ exports.aaveV3AssetsDefaultMarket = {
|
|
|
25
26
|
[common_1.NetworkNumber.Arb]: exports.aaveV3AssetsDefaultMarketArb,
|
|
26
27
|
[common_1.NetworkNumber.Base]: exports.aaveV3AssetsDefaultMarketBase,
|
|
27
28
|
[common_1.NetworkNumber.Linea]: exports.aaveV3AssetsDefaultMarketLinea,
|
|
29
|
+
[common_1.NetworkNumber.Plasma]: exports.aaveV3AssetsDefaultMarketPlasma,
|
|
28
30
|
};
|
|
29
31
|
exports.aaveV3AssetsLidoMarketEth = ['ETH', 'wstETH', 'USDS', 'USDC', 'ezETH', 'sUSDe', 'GHO', 'rsETH', 'tETH'];
|
|
30
32
|
exports.aaveV3AssetsLidoMarket = {
|
|
@@ -33,6 +35,7 @@ exports.aaveV3AssetsLidoMarket = {
|
|
|
33
35
|
[common_1.NetworkNumber.Arb]: [],
|
|
34
36
|
[common_1.NetworkNumber.Base]: [],
|
|
35
37
|
[common_1.NetworkNumber.Linea]: [],
|
|
38
|
+
[common_1.NetworkNumber.Plasma]: [],
|
|
36
39
|
};
|
|
37
40
|
exports.aaveV3AssetsEtherfiMarketEth = ['weETH', 'USDC', 'PYUSD', 'FRAX'];
|
|
38
41
|
exports.aaveV3AssetsEtherfiMarket = {
|
|
@@ -41,4 +44,5 @@ exports.aaveV3AssetsEtherfiMarket = {
|
|
|
41
44
|
[common_1.NetworkNumber.Arb]: [],
|
|
42
45
|
[common_1.NetworkNumber.Base]: [],
|
|
43
46
|
[common_1.NetworkNumber.Linea]: [],
|
|
47
|
+
[common_1.NetworkNumber.Plasma]: [],
|
|
44
48
|
};
|
|
@@ -73,6 +73,17 @@ const BULKER_OPTIONS = {
|
|
|
73
73
|
[types_1.CompoundVersions.CompoundV3wstETH]: EMPTY_BULKER_OPTIONS,
|
|
74
74
|
[types_1.CompoundVersions.CompoundV3USDS]: EMPTY_BULKER_OPTIONS,
|
|
75
75
|
},
|
|
76
|
+
[common_1.NetworkNumber.Plasma]: {
|
|
77
|
+
// Non-existing markets, keeping it because of typescript
|
|
78
|
+
[types_1.CompoundVersions.CompoundV3USDC]: EMPTY_BULKER_OPTIONS,
|
|
79
|
+
[types_1.CompoundVersions.CompoundV3USDT]: EMPTY_BULKER_OPTIONS,
|
|
80
|
+
[types_1.CompoundVersions.CompoundV3ETH]: EMPTY_BULKER_OPTIONS,
|
|
81
|
+
[types_1.CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
|
|
82
|
+
[types_1.CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
|
|
83
|
+
[types_1.CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
|
|
84
|
+
[types_1.CompoundVersions.CompoundV3wstETH]: EMPTY_BULKER_OPTIONS,
|
|
85
|
+
[types_1.CompoundVersions.CompoundV3USDS]: EMPTY_BULKER_OPTIONS,
|
|
86
|
+
},
|
|
76
87
|
};
|
|
77
88
|
exports.COMPOUND_V2 = {
|
|
78
89
|
chainIds: [common_1.NetworkNumber.Eth],
|
|
@@ -10,6 +10,7 @@ export declare const v3USDCCollAssets: {
|
|
|
10
10
|
readonly 42161: string[];
|
|
11
11
|
readonly 8453: string[];
|
|
12
12
|
readonly 59144: readonly [];
|
|
13
|
+
readonly 9745: readonly [];
|
|
13
14
|
};
|
|
14
15
|
export declare const v3USDCeCollAssetsArb: string[];
|
|
15
16
|
export declare const v3USDCeCollAssets: {
|
|
@@ -18,6 +19,7 @@ export declare const v3USDCeCollAssets: {
|
|
|
18
19
|
readonly 42161: string[];
|
|
19
20
|
readonly 8453: readonly [];
|
|
20
21
|
readonly 59144: readonly [];
|
|
22
|
+
readonly 9745: readonly [];
|
|
21
23
|
};
|
|
22
24
|
export declare const v3ETHCollAssetsEth: string[];
|
|
23
25
|
export declare const v3ETHCollAssetsBase: string[];
|
|
@@ -29,6 +31,7 @@ export declare const v3ETHCollAssets: {
|
|
|
29
31
|
readonly 42161: string[];
|
|
30
32
|
readonly 8453: string[];
|
|
31
33
|
readonly 59144: readonly [];
|
|
34
|
+
readonly 9745: readonly [];
|
|
32
35
|
};
|
|
33
36
|
export declare const v3USDbCCollAssetsBase: string[];
|
|
34
37
|
export declare const v3USDbCCollAssets: {
|
|
@@ -37,6 +40,7 @@ export declare const v3USDbCCollAssets: {
|
|
|
37
40
|
42161: never[];
|
|
38
41
|
8453: string[];
|
|
39
42
|
59144: never[];
|
|
43
|
+
9745: never[];
|
|
40
44
|
};
|
|
41
45
|
export declare const v3USDTCollAssetsEth: string[];
|
|
42
46
|
export declare const v3USDTCollAssetsArb: string[];
|
|
@@ -47,6 +51,7 @@ export declare const v3USDTCollAssets: {
|
|
|
47
51
|
42161: string[];
|
|
48
52
|
8453: never[];
|
|
49
53
|
59144: never[];
|
|
54
|
+
9745: never[];
|
|
50
55
|
};
|
|
51
56
|
export declare const v3USDSCollAssetsEth: string[];
|
|
52
57
|
export declare const v3USDSCollAssetsBase: string[];
|
|
@@ -56,6 +61,7 @@ export declare const v3USDSCollAssets: {
|
|
|
56
61
|
42161: never[];
|
|
57
62
|
8453: string[];
|
|
58
63
|
59144: never[];
|
|
64
|
+
9745: never[];
|
|
59
65
|
};
|
|
60
66
|
export declare const v3wstETHCollAssetsEth: string[];
|
|
61
67
|
export declare const v3wstETHCollAssets: {
|
|
@@ -64,4 +70,5 @@ export declare const v3wstETHCollAssets: {
|
|
|
64
70
|
42161: never[];
|
|
65
71
|
8453: never[];
|
|
66
72
|
59144: never[];
|
|
73
|
+
9745: never[];
|
|
67
74
|
};
|
|
@@ -18,6 +18,7 @@ exports.v3USDCCollAssets = {
|
|
|
18
18
|
[common_1.NetworkNumber.Arb]: exports.v3USDCCollAssetsArb,
|
|
19
19
|
[common_1.NetworkNumber.Base]: exports.v3USDCCollAssetsBase,
|
|
20
20
|
[common_1.NetworkNumber.Linea]: [],
|
|
21
|
+
[common_1.NetworkNumber.Plasma]: [],
|
|
21
22
|
};
|
|
22
23
|
exports.v3USDCeCollAssetsArb = ['ARB', 'ETH', 'GMX', 'WBTC'];
|
|
23
24
|
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
@@ -27,6 +28,7 @@ exports.v3USDCeCollAssets = {
|
|
|
27
28
|
[common_1.NetworkNumber.Arb]: exports.v3USDCeCollAssetsArb,
|
|
28
29
|
[common_1.NetworkNumber.Base]: [],
|
|
29
30
|
[common_1.NetworkNumber.Linea]: [],
|
|
31
|
+
[common_1.NetworkNumber.Plasma]: [],
|
|
30
32
|
};
|
|
31
33
|
exports.v3ETHCollAssetsEth = ['cbETH', 'wstETH', 'rETH', 'rsETH', 'weETH', 'osETH', 'WBTC', 'ezETH', 'cbBTC', 'rswETH', 'tBTC', 'ETHx', 'tETH', 'pufETH', 'wOETH'];
|
|
32
34
|
exports.v3ETHCollAssetsBase = ['cbETH', 'ezETH', 'wstETH', 'USDC', 'weETH', 'wrsETH', 'cbBTC', 'wsuperOETHb'];
|
|
@@ -39,6 +41,7 @@ exports.v3ETHCollAssets = {
|
|
|
39
41
|
[common_1.NetworkNumber.Arb]: exports.v3ETHCollAssetsArb,
|
|
40
42
|
[common_1.NetworkNumber.Base]: exports.v3ETHCollAssetsBase,
|
|
41
43
|
[common_1.NetworkNumber.Linea]: [],
|
|
44
|
+
[common_1.NetworkNumber.Plasma]: [],
|
|
42
45
|
};
|
|
43
46
|
exports.v3USDbCCollAssetsBase = ['ETH', 'cbETH'];
|
|
44
47
|
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
@@ -48,6 +51,7 @@ exports.v3USDbCCollAssets = {
|
|
|
48
51
|
[common_1.NetworkNumber.Arb]: [],
|
|
49
52
|
[common_1.NetworkNumber.Base]: exports.v3USDbCCollAssetsBase,
|
|
50
53
|
[common_1.NetworkNumber.Linea]: [],
|
|
54
|
+
[common_1.NetworkNumber.Plasma]: [],
|
|
51
55
|
};
|
|
52
56
|
exports.v3USDTCollAssetsEth = ['COMP', 'ETH', 'WBTC', 'UNI', 'LINK', 'wstETH', 'cbBTC', 'tBTC', 'wUSDM', 'sFRAX', 'mETH', 'weETH', 'sdeUSD', 'deUSD'];
|
|
53
57
|
exports.v3USDTCollAssetsArb = ['ETH', 'WBTC', 'wstETH', 'ARB', 'GMX'];
|
|
@@ -59,6 +63,7 @@ exports.v3USDTCollAssets = {
|
|
|
59
63
|
[common_1.NetworkNumber.Arb]: exports.v3USDTCollAssetsArb,
|
|
60
64
|
[common_1.NetworkNumber.Base]: [],
|
|
61
65
|
[common_1.NetworkNumber.Linea]: [],
|
|
66
|
+
[common_1.NetworkNumber.Plasma]: [],
|
|
62
67
|
};
|
|
63
68
|
exports.v3USDSCollAssetsEth = ['wstETH', 'ETH', 'sUSDS', 'cbETH', 'tBTC', 'USDe'];
|
|
64
69
|
exports.v3USDSCollAssetsBase = ['sUSDS', 'cbBTC'];
|
|
@@ -68,6 +73,7 @@ exports.v3USDSCollAssets = {
|
|
|
68
73
|
[common_1.NetworkNumber.Arb]: [],
|
|
69
74
|
[common_1.NetworkNumber.Base]: exports.v3USDSCollAssetsBase,
|
|
70
75
|
[common_1.NetworkNumber.Linea]: [],
|
|
76
|
+
[common_1.NetworkNumber.Plasma]: [],
|
|
71
77
|
};
|
|
72
78
|
exports.v3wstETHCollAssetsEth = ['rsETH', 'ezETH'];
|
|
73
79
|
exports.v3wstETHCollAssets = {
|
|
@@ -76,4 +82,5 @@ exports.v3wstETHCollAssets = {
|
|
|
76
82
|
[common_1.NetworkNumber.Arb]: [],
|
|
77
83
|
[common_1.NetworkNumber.Base]: [],
|
|
78
84
|
[common_1.NetworkNumber.Linea]: [],
|
|
85
|
+
[common_1.NetworkNumber.Plasma]: [],
|
|
79
86
|
};
|
package/cjs/services/utils.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.convertHybridArraysToObjects = exports.DEFAULT_TIMEOUT = exports.isMainn
|
|
|
7
7
|
const decimal_js_1 = __importDefault(require("decimal.js"));
|
|
8
8
|
const tokens_1 = require("@defisaver/tokens");
|
|
9
9
|
const common_1 = require("../types/common");
|
|
10
|
-
const isLayer2Network = (networkId) => [common_1.NetworkNumber.Opt, common_1.NetworkNumber.Arb, common_1.NetworkNumber.Base, common_1.NetworkNumber.Linea].includes(+networkId);
|
|
10
|
+
const isLayer2Network = (networkId) => [common_1.NetworkNumber.Opt, common_1.NetworkNumber.Arb, common_1.NetworkNumber.Base, common_1.NetworkNumber.Linea, common_1.NetworkNumber.Plasma].includes(+networkId);
|
|
11
11
|
exports.isLayer2Network = isLayer2Network;
|
|
12
12
|
const addToObjectIf = (condition, item) => (condition ? item : {});
|
|
13
13
|
exports.addToObjectIf = addToObjectIf;
|
package/cjs/services/viem.d.ts
CHANGED
|
@@ -7,14 +7,11 @@ export declare const getViemChain: (network: NetworkNumber) => {
|
|
|
7
7
|
readonly apiUrl: "https://api.etherscan.io/api";
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
|
-
blockTime
|
|
10
|
+
blockTime: 12000;
|
|
11
11
|
contracts: {
|
|
12
|
-
readonly ensRegistry: {
|
|
13
|
-
readonly address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";
|
|
14
|
-
};
|
|
15
12
|
readonly ensUniversalResolver: {
|
|
16
|
-
readonly address: "
|
|
17
|
-
readonly blockCreated:
|
|
13
|
+
readonly address: "0xeeeeeeee14d718c2b47d9923deab1335e144eeee";
|
|
14
|
+
readonly blockCreated: 23085558;
|
|
18
15
|
};
|
|
19
16
|
readonly multicall3: {
|
|
20
17
|
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
@@ -29,6 +26,7 @@ export declare const getViemChain: (network: NetworkNumber) => {
|
|
|
29
26
|
readonly symbol: "ETH";
|
|
30
27
|
readonly decimals: 18;
|
|
31
28
|
};
|
|
29
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
32
30
|
rpcUrls: {
|
|
33
31
|
readonly default: {
|
|
34
32
|
readonly http: readonly ["https://eth.merkle.io"];
|
|
@@ -101,6 +99,7 @@ export declare const getViemChain: (network: NetworkNumber) => {
|
|
|
101
99
|
readonly symbol: "ETH";
|
|
102
100
|
readonly decimals: 18;
|
|
103
101
|
};
|
|
102
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
104
103
|
rpcUrls: {
|
|
105
104
|
readonly default: {
|
|
106
105
|
readonly http: readonly ["https://mainnet.optimism.io"];
|
|
@@ -174,16 +173,16 @@ export declare const getViemChain: (network: NetworkNumber) => {
|
|
|
174
173
|
r: import("viem").Hex;
|
|
175
174
|
s: import("viem").Hex;
|
|
176
175
|
v: bigint;
|
|
176
|
+
value: bigint;
|
|
177
|
+
gas: bigint;
|
|
177
178
|
to: import("viem").Address | null;
|
|
178
179
|
from: import("viem").Address;
|
|
179
|
-
gas: bigint;
|
|
180
180
|
nonce: number;
|
|
181
|
-
value: bigint;
|
|
182
181
|
blockHash: `0x${string}` | null;
|
|
183
182
|
blockNumber: bigint | null;
|
|
183
|
+
transactionIndex: number | null;
|
|
184
184
|
hash: import("viem").Hash;
|
|
185
185
|
input: import("viem").Hex;
|
|
186
|
-
transactionIndex: number | null;
|
|
187
186
|
typeHex: import("viem").Hex | null;
|
|
188
187
|
accessList?: undefined | undefined;
|
|
189
188
|
authorizationList?: undefined | undefined;
|
|
@@ -352,7 +351,7 @@ export declare const getViemChain: (network: NetworkNumber) => {
|
|
|
352
351
|
readonly apiUrl: "https://api.arbiscan.io/api";
|
|
353
352
|
};
|
|
354
353
|
};
|
|
355
|
-
blockTime
|
|
354
|
+
blockTime: 250;
|
|
356
355
|
contracts: {
|
|
357
356
|
readonly multicall3: {
|
|
358
357
|
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
@@ -367,6 +366,7 @@ export declare const getViemChain: (network: NetworkNumber) => {
|
|
|
367
366
|
readonly symbol: "ETH";
|
|
368
367
|
readonly decimals: 18;
|
|
369
368
|
};
|
|
369
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
370
370
|
rpcUrls: {
|
|
371
371
|
readonly default: {
|
|
372
372
|
readonly http: readonly ["https://arb1.arbitrum.io/rpc"];
|
|
@@ -441,6 +441,7 @@ export declare const getViemChain: (network: NetworkNumber) => {
|
|
|
441
441
|
readonly symbol: "ETH";
|
|
442
442
|
readonly decimals: 18;
|
|
443
443
|
};
|
|
444
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
444
445
|
rpcUrls: {
|
|
445
446
|
readonly default: {
|
|
446
447
|
readonly http: readonly ["https://mainnet.base.org"];
|
|
@@ -514,16 +515,16 @@ export declare const getViemChain: (network: NetworkNumber) => {
|
|
|
514
515
|
r: import("viem").Hex;
|
|
515
516
|
s: import("viem").Hex;
|
|
516
517
|
v: bigint;
|
|
518
|
+
value: bigint;
|
|
519
|
+
gas: bigint;
|
|
517
520
|
to: import("viem").Address | null;
|
|
518
521
|
from: import("viem").Address;
|
|
519
|
-
gas: bigint;
|
|
520
522
|
nonce: number;
|
|
521
|
-
value: bigint;
|
|
522
523
|
blockHash: `0x${string}` | null;
|
|
523
524
|
blockNumber: bigint | null;
|
|
525
|
+
transactionIndex: number | null;
|
|
524
526
|
hash: import("viem").Hash;
|
|
525
527
|
input: import("viem").Hex;
|
|
526
|
-
transactionIndex: number | null;
|
|
527
528
|
typeHex: import("viem").Hex | null;
|
|
528
529
|
accessList?: undefined | undefined;
|
|
529
530
|
authorizationList?: undefined | undefined;
|
|
@@ -703,8 +704,8 @@ export declare const getViemChain: (network: NetworkNumber) => {
|
|
|
703
704
|
readonly blockCreated: 6682888;
|
|
704
705
|
};
|
|
705
706
|
readonly ensUniversalResolver: {
|
|
706
|
-
readonly address: "
|
|
707
|
-
readonly blockCreated:
|
|
707
|
+
readonly address: "0x4D41762915F83c76EcaF6776d9b08076aA32b492";
|
|
708
|
+
readonly blockCreated: 22222151;
|
|
708
709
|
};
|
|
709
710
|
};
|
|
710
711
|
ensTlds: readonly [".linea.eth"];
|
|
@@ -715,6 +716,7 @@ export declare const getViemChain: (network: NetworkNumber) => {
|
|
|
715
716
|
readonly symbol: "ETH";
|
|
716
717
|
readonly decimals: 18;
|
|
717
718
|
};
|
|
719
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
718
720
|
rpcUrls: {
|
|
719
721
|
readonly default: {
|
|
720
722
|
readonly http: readonly ["https://rpc.linea.build"];
|
|
@@ -730,6 +732,40 @@ export declare const getViemChain: (network: NetworkNumber) => {
|
|
|
730
732
|
};
|
|
731
733
|
formatters?: undefined;
|
|
732
734
|
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
735
|
+
} | {
|
|
736
|
+
blockExplorers: {
|
|
737
|
+
readonly default: {
|
|
738
|
+
readonly name: "PlasmaScan";
|
|
739
|
+
readonly url: "https://plasmascan.to";
|
|
740
|
+
};
|
|
741
|
+
};
|
|
742
|
+
blockTime?: number | undefined | undefined;
|
|
743
|
+
contracts: {
|
|
744
|
+
readonly multicall3: {
|
|
745
|
+
readonly address: "0xcA11bde05977b3631167028862bE2a173976CA11";
|
|
746
|
+
readonly blockCreated: 0;
|
|
747
|
+
};
|
|
748
|
+
};
|
|
749
|
+
ensTlds?: readonly string[] | undefined;
|
|
750
|
+
id: 9745;
|
|
751
|
+
name: "Plasma";
|
|
752
|
+
nativeCurrency: {
|
|
753
|
+
readonly name: "Plasma";
|
|
754
|
+
readonly symbol: "XPL";
|
|
755
|
+
readonly decimals: 18;
|
|
756
|
+
};
|
|
757
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
758
|
+
rpcUrls: {
|
|
759
|
+
readonly default: {
|
|
760
|
+
readonly http: readonly ["https://rpc.plasma.to"];
|
|
761
|
+
};
|
|
762
|
+
};
|
|
763
|
+
sourceId?: number | undefined | undefined;
|
|
764
|
+
testnet?: boolean | undefined | undefined;
|
|
765
|
+
custom?: Record<string, unknown> | undefined;
|
|
766
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
767
|
+
formatters?: undefined;
|
|
768
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
733
769
|
};
|
|
734
770
|
export declare const getViemProvider: (provider: EthereumProvider, network: NetworkNumber, options?: any) => {
|
|
735
771
|
account: undefined;
|
|
@@ -741,6 +777,7 @@ export declare const getViemProvider: (provider: EthereumProvider, network: Netw
|
|
|
741
777
|
request?: (parameters: import("viem").CcipRequestParameters) => Promise<`0x${string}`>;
|
|
742
778
|
} | undefined;
|
|
743
779
|
chain: undefined;
|
|
780
|
+
experimental_blockTag?: import("viem").BlockTag | undefined;
|
|
744
781
|
key: string;
|
|
745
782
|
name: string;
|
|
746
783
|
pollingInterval: number;
|
|
@@ -7579,6 +7616,7 @@ export declare const getViemProvider: (provider: EthereumProvider, network: Netw
|
|
|
7579
7616
|
simulateBlocks: <const calls extends readonly unknown[]>(args: import("viem").SimulateBlocksParameters<calls>) => Promise<import("viem").SimulateBlocksReturnType<calls>>;
|
|
7580
7617
|
simulateCalls: <const calls extends readonly unknown[]>(args: import("viem").SimulateCallsParameters<calls>) => Promise<import("viem").SimulateCallsReturnType<calls>>;
|
|
7581
7618
|
simulateContract: <const abi extends import("viem").Abi | readonly unknown[], functionName extends import("viem").ContractFunctionName<abi, "nonpayable" | "payable">, const args_1 extends import("viem").ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends import("viem").Chain | undefined, accountOverride extends import("viem").Account | import("viem").Address | undefined = undefined>(args: import("viem").SimulateContractParameters<abi, functionName, args_1, undefined, chainOverride, accountOverride>) => Promise<import("viem").SimulateContractReturnType<abi, functionName, args_1, undefined, import("viem").Account | undefined, chainOverride, accountOverride>>;
|
|
7619
|
+
verifyHash: (args: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>;
|
|
7582
7620
|
verifyMessage: (args: import("viem").VerifyMessageActionParameters) => Promise<import("viem").VerifyMessageActionReturnType>;
|
|
7583
7621
|
verifySiweMessage: (args: {
|
|
7584
7622
|
blockNumber?: bigint | undefined | undefined;
|
|
@@ -7606,6 +7644,7 @@ export declare const getViemProvider: (provider: EthereumProvider, network: Netw
|
|
|
7606
7644
|
cacheTime?: undefined;
|
|
7607
7645
|
ccipRead?: undefined;
|
|
7608
7646
|
chain?: undefined;
|
|
7647
|
+
experimental_blockTag?: undefined;
|
|
7609
7648
|
key?: undefined;
|
|
7610
7649
|
name?: undefined;
|
|
7611
7650
|
pollingInterval?: undefined;
|
package/cjs/services/viem.js
CHANGED
|
@@ -16,6 +16,8 @@ const getViemChain = (network) => {
|
|
|
16
16
|
return chains_1.base;
|
|
17
17
|
case common_1.NetworkNumber.Linea:
|
|
18
18
|
return chains_1.linea;
|
|
19
|
+
case common_1.NetworkNumber.Plasma:
|
|
20
|
+
return chains_1.plasma;
|
|
19
21
|
default:
|
|
20
22
|
throw new Error(`Unsupported network: ${network}`);
|
|
21
23
|
}
|
package/cjs/staking/staking.js
CHANGED
|
@@ -54,12 +54,13 @@ const getSuperOETHApy = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
54
54
|
}
|
|
55
55
|
});
|
|
56
56
|
const getApyFromDfsApi = (asset) => __awaiter(void 0, void 0, void 0, function* () {
|
|
57
|
+
var _a;
|
|
57
58
|
try {
|
|
58
59
|
const res = yield fetch(`https://fe.defisaver.com/api/staking/apy?asset=${asset}`, { signal: AbortSignal.timeout(utils_1.DEFAULT_TIMEOUT) });
|
|
59
60
|
if (!res.ok)
|
|
60
61
|
throw new Error(`Failed to fetch APY for ${asset}`);
|
|
61
62
|
const data = yield res.json();
|
|
62
|
-
return String(data.apy);
|
|
63
|
+
return String((_a = data.apy) !== null && _a !== void 0 ? _a : '0');
|
|
63
64
|
}
|
|
64
65
|
catch (e) {
|
|
65
66
|
console.error(`External API Failure: Failed to fetch APY for ${asset} from DFS API`, e);
|
package/cjs/types/common.d.ts
CHANGED
package/cjs/types/common.js
CHANGED
|
@@ -19,4 +19,5 @@ var NetworkNumber;
|
|
|
19
19
|
NetworkNumber[NetworkNumber["Arb"] = 42161] = "Arb";
|
|
20
20
|
NetworkNumber[NetworkNumber["Base"] = 8453] = "Base";
|
|
21
21
|
NetworkNumber[NetworkNumber["Linea"] = 59144] = "Linea";
|
|
22
|
+
NetworkNumber[NetworkNumber["Plasma"] = 9745] = "Plasma";
|
|
22
23
|
})(NetworkNumber || (exports.NetworkNumber = NetworkNumber = {}));
|
package/esm/aaveV3/index.js
CHANGED
|
@@ -52,7 +52,7 @@ export function _getAaveV3MarketData(provider_1, network_1, market_1) {
|
|
|
52
52
|
const loanInfoContract = AaveV3ViewContractViem(provider, network);
|
|
53
53
|
const aaveIncentivesContract = AaveIncentiveDataProviderV3ContractViem(provider, network);
|
|
54
54
|
const marketAddress = market.providerAddress;
|
|
55
|
-
const networksWithIncentives = [NetworkNumber.Eth, NetworkNumber.Arb, NetworkNumber.Opt, NetworkNumber.Linea];
|
|
55
|
+
const networksWithIncentives = [NetworkNumber.Eth, NetworkNumber.Arb, NetworkNumber.Opt, NetworkNumber.Linea, NetworkNumber.Plasma];
|
|
56
56
|
// eslint-disable-next-line prefer-const
|
|
57
57
|
let [loanInfo, eModesInfo, isBorrowAllowed, rewardInfo, merkleRewardsMap, meritRewardsMap] = yield Promise.all([
|
|
58
58
|
loanInfoContract.read.getFullTokensInfo([marketAddress, _addresses], setViemBlockNumber(blockNumber)),
|
package/esm/aaveV3/merit.js
CHANGED
|
@@ -28303,6 +28303,11 @@ export declare const AaveV3View: {
|
|
|
28303
28303
|
};
|
|
28304
28304
|
};
|
|
28305
28305
|
};
|
|
28306
|
+
readonly "9745": {
|
|
28307
|
+
readonly address: "0xD8E67968d8a0df4beCf2D50daE1e34d4d80C701C";
|
|
28308
|
+
readonly createdBlock: 1880799;
|
|
28309
|
+
readonly oldVersions: {};
|
|
28310
|
+
};
|
|
28306
28311
|
};
|
|
28307
28312
|
};
|
|
28308
28313
|
export declare const AaveV3PoolAddressesProvider: {
|
|
@@ -28763,6 +28768,9 @@ export declare const AaveV3PoolAddressesProvider: {
|
|
|
28763
28768
|
readonly "59144": {
|
|
28764
28769
|
readonly address: "0x89502c3731F69DDC95B65753708A07F8Cd0373F4";
|
|
28765
28770
|
};
|
|
28771
|
+
readonly "9745": {
|
|
28772
|
+
readonly address: "0x061D8e131F26512348ee5FA42e2DF1bA9d6505E9";
|
|
28773
|
+
};
|
|
28766
28774
|
};
|
|
28767
28775
|
};
|
|
28768
28776
|
export declare const AaveV3LidoPoolAddressesProvider: {
|
|
@@ -31133,6 +31141,9 @@ export declare const AaveV3LendingPool: {
|
|
|
31133
31141
|
readonly "59144": {
|
|
31134
31142
|
readonly address: "0xc47b8C00b0f69a36fa203Ffeac0334874574a8Ac";
|
|
31135
31143
|
};
|
|
31144
|
+
readonly "9745": {
|
|
31145
|
+
readonly address: "0x925a2A7214Ed92428B5b1B090F80b25700095e12";
|
|
31146
|
+
};
|
|
31136
31147
|
};
|
|
31137
31148
|
};
|
|
31138
31149
|
export declare const AaveV3LidoLendingPool: {
|
|
@@ -34467,6 +34478,9 @@ export declare const AaveV3ProtocolDataProvider: {
|
|
|
34467
34478
|
readonly "59144": {
|
|
34468
34479
|
readonly address: "0x47cd4b507B81cB831669c71c7077f4daF6762FF4";
|
|
34469
34480
|
};
|
|
34481
|
+
readonly "9745": {
|
|
34482
|
+
readonly address: "0xf2D6E38B407e31E7E7e4a16E6769728b76c7419F";
|
|
34483
|
+
};
|
|
34470
34484
|
};
|
|
34471
34485
|
};
|
|
34472
34486
|
export declare const AaveV3LidoProtocolDataProvider: {
|
|
@@ -35805,6 +35819,9 @@ export declare const AaveUiIncentiveDataProviderV3: {
|
|
|
35805
35819
|
readonly "59144": {
|
|
35806
35820
|
readonly address: "0x117684358D990E42Eb1649E7e8C4691951dc1E71";
|
|
35807
35821
|
};
|
|
35822
|
+
readonly "9745": {
|
|
35823
|
+
readonly address: "0xcb85C501B3A5e9851850d66648d69B26A4c90942";
|
|
35824
|
+
};
|
|
35808
35825
|
};
|
|
35809
35826
|
};
|
|
35810
35827
|
export declare const cUSDCv3: {
|