@defisaver/positions-sdk 2.1.2 → 2.1.4-dev-plasma-1
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/aaveV3/merit.js +3 -0
- package/cjs/config/contracts.d.ts +17 -0
- package/cjs/config/contracts.js +17 -0
- package/cjs/helpers/aaveHelpers/index.js +8 -7
- package/cjs/helpers/morphoBlueHelpers/index.js +66 -66
- 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/eligibility.d.ts +4 -2
- package/cjs/staking/eligibility.js +3 -4
- package/cjs/staking/staking.d.ts +2 -1
- package/cjs/staking/staking.js +5 -4
- package/cjs/types/common.d.ts +3 -2
- package/cjs/types/common.js +2 -1
- 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/helpers/aaveHelpers/index.js +8 -7
- package/esm/helpers/morphoBlueHelpers/index.js +66 -66
- 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/eligibility.d.ts +4 -2
- package/esm/staking/eligibility.js +3 -4
- package/esm/staking/staking.d.ts +2 -1
- package/esm/staking/staking.js +5 -4
- package/esm/types/common.d.ts +3 -2
- package/esm/types/common.js +2 -1
- 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 -94
- 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 +1245 -1228
- package/src/constants/index.ts +10 -10
- package/src/contracts.ts +120 -120
- package/src/curveUsd/index.ts +250 -250
- package/src/eulerV2/index.ts +324 -324
- package/src/exchange/index.ts +25 -25
- package/src/fluid/index.ts +1638 -1638
- package/src/helpers/aaveHelpers/index.ts +185 -183
- 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 +155 -155
- 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 -49
- package/src/markets/compound/index.ts +238 -227
- package/src/markets/compound/marketsAssets.ts +97 -90
- package/src/markets/curveUsd/index.ts +69 -69
- package/src/markets/euler/index.ts +26 -26
- package/src/markets/fluid/index.ts +2456 -2456
- 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 -11
- 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 +99 -99
- package/src/services/viem.ts +34 -32
- package/src/setup.ts +8 -8
- package/src/spark/index.ts +445 -445
- package/src/staking/eligibility.ts +59 -60
- package/src/staking/index.ts +1 -1
- package/src/staking/staking.ts +170 -170
- package/src/types/aave.ts +189 -189
- package/src/types/claiming.ts +109 -109
- package/src/types/common.ts +106 -105
- package/src/types/compound.ts +136 -136
- package/src/types/curveUsd.ts +121 -121
- package/src/types/euler.ts +175 -175
- package/src/types/fluid.ts +448 -448
- 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 +135 -135
- package/src/umbrella/index.ts +69 -69
- package/src/umbrella/umbrellaUtils.ts +29 -29
- package/CLAUDE.md +0 -32
|
@@ -15,6 +15,7 @@ export const aaveV3AssetsDefaultMarketOpt = [
|
|
|
15
15
|
export const aaveV3AssetsDefaultMarketArb = ['DAI', 'LINK', 'USDC.e', 'WBTC', 'ETH', 'USDT', 'AAVE', 'EURS', 'wstETH', 'MAI', 'rETH', 'LUSD', 'USDC', 'FRAX', 'ARB', 'weETH', 'GHO', 'ezETH', 'rsETH', 'tBTC'];
|
|
16
16
|
export const aaveV3AssetsDefaultMarketBase = ['ETH', 'cbETH', 'USDbC', 'wstETH', 'USDC', 'weETH', 'cbBTC', 'ezETH', 'GHO', 'wrsETH', 'LBTC', 'EURC', 'AAVE', 'tBTC'];
|
|
17
17
|
export const aaveV3AssetsDefaultMarketLinea = ['ETH', 'USDC', 'weETH', 'ezETH', 'USDT', 'wstETH', 'wrsETH', 'WBTC'];
|
|
18
|
+
export const aaveV3AssetsDefaultMarketPlasma = ['ETH', 'USDT', 'sUSDe', 'USDe', 'weETH', 'XAUt'];
|
|
18
19
|
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
19
20
|
export const aaveV3AssetsDefaultMarket = {
|
|
20
21
|
[NetworkNumber.Eth]: aaveV3AssetsDefaultMarketEth,
|
|
@@ -22,6 +23,7 @@ export const aaveV3AssetsDefaultMarket = {
|
|
|
22
23
|
[NetworkNumber.Arb]: aaveV3AssetsDefaultMarketArb,
|
|
23
24
|
[NetworkNumber.Base]: aaveV3AssetsDefaultMarketBase,
|
|
24
25
|
[NetworkNumber.Linea]: aaveV3AssetsDefaultMarketLinea,
|
|
26
|
+
[NetworkNumber.Plasma]: aaveV3AssetsDefaultMarketPlasma,
|
|
25
27
|
};
|
|
26
28
|
export const aaveV3AssetsLidoMarketEth = ['ETH', 'wstETH', 'USDS', 'USDC', 'ezETH', 'sUSDe', 'GHO', 'rsETH', 'tETH'];
|
|
27
29
|
export const aaveV3AssetsLidoMarket = {
|
|
@@ -30,6 +32,7 @@ export const aaveV3AssetsLidoMarket = {
|
|
|
30
32
|
[NetworkNumber.Arb]: [],
|
|
31
33
|
[NetworkNumber.Base]: [],
|
|
32
34
|
[NetworkNumber.Linea]: [],
|
|
35
|
+
[NetworkNumber.Plasma]: [],
|
|
33
36
|
};
|
|
34
37
|
export const aaveV3AssetsEtherfiMarketEth = ['weETH', 'USDC', 'PYUSD', 'FRAX'];
|
|
35
38
|
export const aaveV3AssetsEtherfiMarket = {
|
|
@@ -38,4 +41,5 @@ export const aaveV3AssetsEtherfiMarket = {
|
|
|
38
41
|
[NetworkNumber.Arb]: [],
|
|
39
42
|
[NetworkNumber.Base]: [],
|
|
40
43
|
[NetworkNumber.Linea]: [],
|
|
44
|
+
[NetworkNumber.Plasma]: [],
|
|
41
45
|
};
|
|
@@ -65,6 +65,17 @@ const BULKER_OPTIONS = {
|
|
|
65
65
|
[CompoundVersions.CompoundV3wstETH]: EMPTY_BULKER_OPTIONS,
|
|
66
66
|
[CompoundVersions.CompoundV3USDS]: EMPTY_BULKER_OPTIONS,
|
|
67
67
|
},
|
|
68
|
+
[NetworkNumber.Plasma]: {
|
|
69
|
+
// Non-existing markets, keeping it because of typescript
|
|
70
|
+
[CompoundVersions.CompoundV3USDC]: EMPTY_BULKER_OPTIONS,
|
|
71
|
+
[CompoundVersions.CompoundV3USDT]: EMPTY_BULKER_OPTIONS,
|
|
72
|
+
[CompoundVersions.CompoundV3ETH]: EMPTY_BULKER_OPTIONS,
|
|
73
|
+
[CompoundVersions.CompoundV3USDbC]: EMPTY_BULKER_OPTIONS,
|
|
74
|
+
[CompoundVersions.CompoundV2]: EMPTY_BULKER_OPTIONS,
|
|
75
|
+
[CompoundVersions.CompoundV3USDCe]: EMPTY_BULKER_OPTIONS,
|
|
76
|
+
[CompoundVersions.CompoundV3wstETH]: EMPTY_BULKER_OPTIONS,
|
|
77
|
+
[CompoundVersions.CompoundV3USDS]: EMPTY_BULKER_OPTIONS,
|
|
78
|
+
},
|
|
68
79
|
};
|
|
69
80
|
export const COMPOUND_V2 = {
|
|
70
81
|
chainIds: [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
|
};
|
|
@@ -15,6 +15,7 @@ export const v3USDCCollAssets = {
|
|
|
15
15
|
[NetworkNumber.Arb]: v3USDCCollAssetsArb,
|
|
16
16
|
[NetworkNumber.Base]: v3USDCCollAssetsBase,
|
|
17
17
|
[NetworkNumber.Linea]: [],
|
|
18
|
+
[NetworkNumber.Plasma]: [],
|
|
18
19
|
};
|
|
19
20
|
export const v3USDCeCollAssetsArb = ['ARB', 'ETH', 'GMX', 'WBTC'];
|
|
20
21
|
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
@@ -24,6 +25,7 @@ export const v3USDCeCollAssets = {
|
|
|
24
25
|
[NetworkNumber.Arb]: v3USDCeCollAssetsArb,
|
|
25
26
|
[NetworkNumber.Base]: [],
|
|
26
27
|
[NetworkNumber.Linea]: [],
|
|
28
|
+
[NetworkNumber.Plasma]: [],
|
|
27
29
|
};
|
|
28
30
|
export const v3ETHCollAssetsEth = ['cbETH', 'wstETH', 'rETH', 'rsETH', 'weETH', 'osETH', 'WBTC', 'ezETH', 'cbBTC', 'rswETH', 'tBTC', 'ETHx', 'tETH', 'pufETH', 'wOETH'];
|
|
29
31
|
export const v3ETHCollAssetsBase = ['cbETH', 'ezETH', 'wstETH', 'USDC', 'weETH', 'wrsETH', 'cbBTC', 'wsuperOETHb'];
|
|
@@ -36,6 +38,7 @@ export const v3ETHCollAssets = {
|
|
|
36
38
|
[NetworkNumber.Arb]: v3ETHCollAssetsArb,
|
|
37
39
|
[NetworkNumber.Base]: v3ETHCollAssetsBase,
|
|
38
40
|
[NetworkNumber.Linea]: [],
|
|
41
|
+
[NetworkNumber.Plasma]: [],
|
|
39
42
|
};
|
|
40
43
|
export const v3USDbCCollAssetsBase = ['ETH', 'cbETH'];
|
|
41
44
|
// @dev Keep assets in array, do not assign directly, so we can parse it and edit it programmatically with `scripts/updateMarkets`
|
|
@@ -45,6 +48,7 @@ export const v3USDbCCollAssets = {
|
|
|
45
48
|
[NetworkNumber.Arb]: [],
|
|
46
49
|
[NetworkNumber.Base]: v3USDbCCollAssetsBase,
|
|
47
50
|
[NetworkNumber.Linea]: [],
|
|
51
|
+
[NetworkNumber.Plasma]: [],
|
|
48
52
|
};
|
|
49
53
|
export const v3USDTCollAssetsEth = ['COMP', 'ETH', 'WBTC', 'UNI', 'LINK', 'wstETH', 'cbBTC', 'tBTC', 'wUSDM', 'sFRAX', 'mETH', 'weETH', 'sdeUSD', 'deUSD'];
|
|
50
54
|
export const v3USDTCollAssetsArb = ['ETH', 'WBTC', 'wstETH', 'ARB', 'GMX'];
|
|
@@ -56,6 +60,7 @@ export const v3USDTCollAssets = {
|
|
|
56
60
|
[NetworkNumber.Arb]: v3USDTCollAssetsArb,
|
|
57
61
|
[NetworkNumber.Base]: [],
|
|
58
62
|
[NetworkNumber.Linea]: [],
|
|
63
|
+
[NetworkNumber.Plasma]: [],
|
|
59
64
|
};
|
|
60
65
|
export const v3USDSCollAssetsEth = ['wstETH', 'ETH', 'sUSDS', 'cbETH', 'tBTC', 'USDe'];
|
|
61
66
|
export const v3USDSCollAssetsBase = ['sUSDS', 'cbBTC'];
|
|
@@ -65,6 +70,7 @@ export const v3USDSCollAssets = {
|
|
|
65
70
|
[NetworkNumber.Arb]: [],
|
|
66
71
|
[NetworkNumber.Base]: v3USDSCollAssetsBase,
|
|
67
72
|
[NetworkNumber.Linea]: [],
|
|
73
|
+
[NetworkNumber.Plasma]: [],
|
|
68
74
|
};
|
|
69
75
|
export const v3wstETHCollAssetsEth = ['rsETH', 'ezETH'];
|
|
70
76
|
export const v3wstETHCollAssets = {
|
|
@@ -73,4 +79,5 @@ export const v3wstETHCollAssets = {
|
|
|
73
79
|
[NetworkNumber.Arb]: [],
|
|
74
80
|
[NetworkNumber.Base]: [],
|
|
75
81
|
[NetworkNumber.Linea]: [],
|
|
82
|
+
[NetworkNumber.Plasma]: [],
|
|
76
83
|
};
|
package/esm/services/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Dec from 'decimal.js';
|
|
2
2
|
import { getAssetInfo, getAssetInfoByAddress } from '@defisaver/tokens';
|
|
3
3
|
import { NetworkNumber } from '../types/common';
|
|
4
|
-
export const isLayer2Network = (networkId) => [NetworkNumber.Opt, NetworkNumber.Arb, NetworkNumber.Base, NetworkNumber.Linea].includes(+networkId);
|
|
4
|
+
export const isLayer2Network = (networkId) => [NetworkNumber.Opt, NetworkNumber.Arb, NetworkNumber.Base, NetworkNumber.Linea, NetworkNumber.Plasma].includes(+networkId);
|
|
5
5
|
export const addToObjectIf = (condition, item) => (condition ? item : {});
|
|
6
6
|
export const addToArrayIf = (condition, ...items) => (condition ? items : []);
|
|
7
7
|
export const ethToWeth = (maybeEth) => maybeEth === null || maybeEth === void 0 ? void 0 : maybeEth.replace(/^ETH$/, 'WETH');
|
package/esm/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<import("viem/_types/utils/ccip").CcipRequestReturnType>;
|
|
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: import("viem/_types/actions/siwe/verifySiweMessage").VerifySiweMessageParameters) => Promise<import("viem/_types/actions/siwe/verifySiweMessage").VerifySiweMessageReturnType>;
|
|
7584
7622
|
verifyTypedData: (args: import("viem").VerifyTypedDataActionParameters) => Promise<import("viem").VerifyTypedDataActionReturnType>;
|
|
@@ -7596,6 +7634,7 @@ export declare const getViemProvider: (provider: EthereumProvider, network: Netw
|
|
|
7596
7634
|
cacheTime?: undefined;
|
|
7597
7635
|
ccipRead?: undefined;
|
|
7598
7636
|
chain?: undefined;
|
|
7637
|
+
experimental_blockTag?: undefined;
|
|
7599
7638
|
key?: undefined;
|
|
7600
7639
|
name?: undefined;
|
|
7601
7640
|
pollingInterval?: undefined;
|
package/esm/services/viem.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createPublicClient, custom } from 'viem';
|
|
2
|
-
import { arbitrum, base, mainnet, optimism, linea, } from 'viem/chains';
|
|
2
|
+
import { arbitrum, base, mainnet, optimism, linea, plasma, } from 'viem/chains';
|
|
3
3
|
import { NetworkNumber } from '../types/common';
|
|
4
4
|
export const getViemChain = (network) => {
|
|
5
5
|
switch (network) {
|
|
@@ -13,6 +13,8 @@ export const getViemChain = (network) => {
|
|
|
13
13
|
return base;
|
|
14
14
|
case NetworkNumber.Linea:
|
|
15
15
|
return linea;
|
|
16
|
+
case NetworkNumber.Plasma:
|
|
17
|
+
return plasma;
|
|
16
18
|
default:
|
|
17
19
|
throw new Error(`Unsupported network: ${network}`);
|
|
18
20
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { IncentiveEligibilityId, MMUsedAssets } from '../types/common';
|
|
2
|
-
export declare const isEligibleForEthenaUSDeRewards: (usedAssets: MMUsedAssets
|
|
2
|
+
export declare const isEligibleForEthenaUSDeRewards: (usedAssets: MMUsedAssets, { healthRatio }: {
|
|
3
|
+
healthRatio: string;
|
|
4
|
+
}) => {
|
|
3
5
|
isEligible: boolean;
|
|
4
6
|
eligibleUSDAmount: string;
|
|
5
7
|
};
|
|
@@ -12,7 +14,7 @@ export declare const isEligibleForAaveV3ArbitrumETHLSBorrow: (usedAssets: MMUsed
|
|
|
12
14
|
eligibleUSDAmount: string;
|
|
13
15
|
};
|
|
14
16
|
export declare const EligibilityMapping: {
|
|
15
|
-
[key in IncentiveEligibilityId]: (usedAssets: MMUsedAssets) => {
|
|
17
|
+
[key in IncentiveEligibilityId]: (usedAssets: MMUsedAssets, optionalData: any) => {
|
|
16
18
|
isEligible: boolean;
|
|
17
19
|
eligibleUSDAmount: string;
|
|
18
20
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Dec from 'decimal.js';
|
|
2
2
|
import { IncentiveEligibilityId } from '../types/common';
|
|
3
|
-
export const isEligibleForEthenaUSDeRewards = (usedAssets) => {
|
|
3
|
+
export const isEligibleForEthenaUSDeRewards = (usedAssets, { healthRatio }) => {
|
|
4
4
|
var _a, _b;
|
|
5
5
|
const USDeUSDAmountSupplied = ((_a = usedAssets.USDe) === null || _a === void 0 ? void 0 : _a.suppliedUsd) || '0';
|
|
6
6
|
const sUSDeUSDAmountSupplied = ((_b = usedAssets.sUSDe) === null || _b === void 0 ? void 0 : _b.suppliedUsd) || '0';
|
|
@@ -24,9 +24,8 @@ export const isEligibleForEthenaUSDeRewards = (usedAssets) => {
|
|
|
24
24
|
}
|
|
25
25
|
return acc;
|
|
26
26
|
}, new Dec(0)).toString();
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return { isEligible: false, eligibleUSDAmount: '0' }; // must be looped at least once
|
|
27
|
+
if (new Dec(healthRatio).gte(2.5))
|
|
28
|
+
return { isEligible: false, eligibleUSDAmount: '0' }; // health ratio must be below 2.5
|
|
30
29
|
const halfAmountSupplied = new Dec(totalAmountSupplied).div(2).toString();
|
|
31
30
|
const USDeAmountEligibleForRewards = Dec.min(USDeUSDAmountSupplied, halfAmountSupplied).toString(); // rewards are given to amount of USDe supplied up to half of total amount supplied
|
|
32
31
|
return { isEligible: true, eligibleUSDAmount: USDeAmountEligibleForRewards };
|
package/esm/staking/staking.d.ts
CHANGED
|
@@ -3,9 +3,10 @@ import { MMAssetsData, MMUsedAssets } from '../types/common';
|
|
|
3
3
|
export declare const STAKING_ASSETS: string[];
|
|
4
4
|
export declare const getStakingApy: ((asset: string) => Promise<string>) & memoize.Memoized<(asset: string) => Promise<string>>;
|
|
5
5
|
export declare const calculateInterestEarned: (principal: string, interest: string, type: string, apy?: boolean) => number;
|
|
6
|
-
export declare const calculateNetApy: ({ usedAssets, assetsData, }: {
|
|
6
|
+
export declare const calculateNetApy: ({ usedAssets, assetsData, optionalData, }: {
|
|
7
7
|
usedAssets: MMUsedAssets;
|
|
8
8
|
assetsData: MMAssetsData;
|
|
9
|
+
optionalData?: any;
|
|
9
10
|
}) => {
|
|
10
11
|
netApy: string;
|
|
11
12
|
totalInterestUsd: string;
|
package/esm/staking/staking.js
CHANGED
|
@@ -48,12 +48,13 @@ const getSuperOETHApy = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
50
|
const getApyFromDfsApi = (asset) => __awaiter(void 0, void 0, void 0, function* () {
|
|
51
|
+
var _a;
|
|
51
52
|
try {
|
|
52
53
|
const res = yield fetch(`https://fe.defisaver.com/api/staking/apy?asset=${asset}`, { signal: AbortSignal.timeout(DEFAULT_TIMEOUT) });
|
|
53
54
|
if (!res.ok)
|
|
54
55
|
throw new Error(`Failed to fetch APY for ${asset}`);
|
|
55
56
|
const data = yield res.json();
|
|
56
|
-
return String(data.apy);
|
|
57
|
+
return String((_a = data.apy) !== null && _a !== void 0 ? _a : '0');
|
|
57
58
|
}
|
|
58
59
|
catch (e) {
|
|
59
60
|
console.error(`External API Failure: Failed to fetch APY for ${asset} from DFS API`, e);
|
|
@@ -129,7 +130,7 @@ export const calculateInterestEarned = (principal, interest, type, apy = false)
|
|
|
129
130
|
}
|
|
130
131
|
return (+principal * (Math.pow(((1 + (+interest / 100) / BLOCKS_IN_A_YEAR)), (BLOCKS_IN_A_YEAR * interval)))) - +principal; // eslint-disable-line
|
|
131
132
|
};
|
|
132
|
-
export const calculateNetApy = ({ usedAssets, assetsData, }) => {
|
|
133
|
+
export const calculateNetApy = ({ usedAssets, assetsData, optionalData, }) => {
|
|
133
134
|
const sumValues = Object.values(usedAssets).reduce((_acc, usedAsset) => {
|
|
134
135
|
var _a;
|
|
135
136
|
const acc = Object.assign({}, _acc);
|
|
@@ -144,7 +145,7 @@ export const calculateNetApy = ({ usedAssets, assetsData, }) => {
|
|
|
144
145
|
const { apy, eligibilityId } = supplyIncentive;
|
|
145
146
|
const eligibilityCheck = eligibilityId ? EligibilityMapping[eligibilityId] : null;
|
|
146
147
|
if (eligibilityCheck) {
|
|
147
|
-
const { isEligible, eligibleUSDAmount } = eligibilityCheck(usedAssets);
|
|
148
|
+
const { isEligible, eligibleUSDAmount } = eligibilityCheck(usedAssets, optionalData);
|
|
148
149
|
const incentiveInterest = isEligible ? calculateInterestEarned(eligibleUSDAmount, apy, 'year', true) : '0';
|
|
149
150
|
acc.incentiveUsd = new Dec(acc.incentiveUsd).add(incentiveInterest).toString();
|
|
150
151
|
}
|
|
@@ -164,7 +165,7 @@ export const calculateNetApy = ({ usedAssets, assetsData, }) => {
|
|
|
164
165
|
const { apy, eligibilityId } = borrowIncentive;
|
|
165
166
|
const eligibilityCheck = eligibilityId ? EligibilityMapping[eligibilityId] : null;
|
|
166
167
|
if (eligibilityCheck) {
|
|
167
|
-
const { isEligible, eligibleUSDAmount } = eligibilityCheck(usedAssets);
|
|
168
|
+
const { isEligible, eligibleUSDAmount } = eligibilityCheck(usedAssets, optionalData);
|
|
168
169
|
const incentiveInterest = isEligible ? calculateInterestEarned(eligibleUSDAmount, apy, 'year', true) : '0';
|
|
169
170
|
acc.incentiveUsd = new Dec(acc.incentiveUsd).add(incentiveInterest).toString();
|
|
170
171
|
}
|
package/esm/types/common.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare enum IncentiveKind {
|
|
|
3
3
|
Reward = "reward"
|
|
4
4
|
}
|
|
5
5
|
export declare enum IncentiveEligibilityId {
|
|
6
|
-
AaveV3EthenaLiquidLeverage = "
|
|
6
|
+
AaveV3EthenaLiquidLeverage = "0x7361e6f04060154e0268a8402b073cbf97e11ae3BORROW_BL",
|
|
7
7
|
AaveV3ArbitrumEthSupply = "0x5d16261c6715a653248269861bbacf68a9774cde",
|
|
8
8
|
AaveV3ArbitrumETHLSBorrow = "0x0c84331e39d6658Cd6e6b9ba04736cC4c4734351"
|
|
9
9
|
}
|
|
@@ -23,7 +23,8 @@ export declare enum NetworkNumber {
|
|
|
23
23
|
Opt = 10,
|
|
24
24
|
Arb = 42161,
|
|
25
25
|
Base = 8453,
|
|
26
|
-
Linea = 59144
|
|
26
|
+
Linea = 59144,
|
|
27
|
+
Plasma = 9745
|
|
27
28
|
}
|
|
28
29
|
export type Networkish = string | NetworkNumber;
|
|
29
30
|
export interface MMAssetData {
|
package/esm/types/common.js
CHANGED
|
@@ -5,7 +5,7 @@ export var IncentiveKind;
|
|
|
5
5
|
})(IncentiveKind || (IncentiveKind = {}));
|
|
6
6
|
export var IncentiveEligibilityId;
|
|
7
7
|
(function (IncentiveEligibilityId) {
|
|
8
|
-
IncentiveEligibilityId["AaveV3EthenaLiquidLeverage"] = "
|
|
8
|
+
IncentiveEligibilityId["AaveV3EthenaLiquidLeverage"] = "0x7361e6f04060154e0268a8402b073cbf97e11ae3BORROW_BL";
|
|
9
9
|
IncentiveEligibilityId["AaveV3ArbitrumEthSupply"] = "0x5d16261c6715a653248269861bbacf68a9774cde";
|
|
10
10
|
IncentiveEligibilityId["AaveV3ArbitrumETHLSBorrow"] = "0x0c84331e39d6658Cd6e6b9ba04736cC4c4734351";
|
|
11
11
|
})(IncentiveEligibilityId || (IncentiveEligibilityId = {}));
|
|
@@ -16,4 +16,5 @@ export var NetworkNumber;
|
|
|
16
16
|
NetworkNumber[NetworkNumber["Arb"] = 42161] = "Arb";
|
|
17
17
|
NetworkNumber[NetworkNumber["Base"] = 8453] = "Base";
|
|
18
18
|
NetworkNumber[NetworkNumber["Linea"] = 59144] = "Linea";
|
|
19
|
+
NetworkNumber[NetworkNumber["Plasma"] = 9745] = "Plasma";
|
|
19
20
|
})(NetworkNumber || (NetworkNumber = {}));
|
package/package.json
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@defisaver/positions-sdk",
|
|
3
|
-
"version": "2.1.
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "./cjs/index.js",
|
|
6
|
-
"module": "./esm/index.js",
|
|
7
|
-
"types": "./esm/index.d.ts",
|
|
8
|
-
"scripts": {
|
|
9
|
-
"build:esm": "rm -rf esm && tsc -p tsconfig.esm.json",
|
|
10
|
-
"build:cjs": "rm -rf cjs && tsc -p tsconfig.cjs.json",
|
|
11
|
-
"build": "npm run lint && npm run build:cjs && npm run build:esm",
|
|
12
|
-
"dev": "tsc -p tsconfig.json --watch",
|
|
13
|
-
"lint": "eslint src/ --fix",
|
|
14
|
-
"lint-check": "eslint src/",
|
|
15
|
-
"test": "mocha tests
|
|
16
|
-
"test-single": "mocha ./tests/$npm_config_name.ts",
|
|
17
|
-
"test:debugger": "mocha --inspect-brk tests/*",
|
|
18
|
-
"version-bump": "git commit -am \"Version bump to $(npm version patch | cut -c 2-)\""
|
|
19
|
-
},
|
|
20
|
-
"keywords": [],
|
|
21
|
-
"author": "",
|
|
22
|
-
"license": "ISC",
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@defisaver/tokens": "^1.7.
|
|
25
|
-
"@types/lodash": "^4.17.15",
|
|
26
|
-
"@types/memoizee": "^0.4.12",
|
|
27
|
-
"decimal.js": "^10.6.0",
|
|
28
|
-
"lodash": "^4.17.21",
|
|
29
|
-
"memoizee": "^0.4.17",
|
|
30
|
-
"viem": "^2.
|
|
31
|
-
},
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"@defisaver/eslint-config": "^1.0.1",
|
|
34
|
-
"@metamask/eth-json-rpc-middleware": "^15.0.1",
|
|
35
|
-
"@metamask/eth-json-rpc-provider": "^4.1.6",
|
|
36
|
-
"@types/chai": "^5.0.0",
|
|
37
|
-
"@types/mocha": "^10.0.9",
|
|
38
|
-
"chai": "^4.3.8",
|
|
39
|
-
"dotenv": "^16.3.1",
|
|
40
|
-
"eslint": "^8.49.0",
|
|
41
|
-
"eslint-plugin-import": "^2.31.0",
|
|
42
|
-
"mocha": "^10.2.0",
|
|
43
|
-
"nock": "^14.0.0",
|
|
44
|
-
"ts-node": "^10.9.2",
|
|
45
|
-
"typescript": "^5.2.2"
|
|
46
|
-
}
|
|
47
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@defisaver/positions-sdk",
|
|
3
|
+
"version": "2.1.4-dev-plasma-1",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "./cjs/index.js",
|
|
6
|
+
"module": "./esm/index.js",
|
|
7
|
+
"types": "./esm/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build:esm": "rm -rf esm && tsc -p tsconfig.esm.json",
|
|
10
|
+
"build:cjs": "rm -rf cjs && tsc -p tsconfig.cjs.json",
|
|
11
|
+
"build": "npm run lint && npm run build:cjs && npm run build:esm",
|
|
12
|
+
"dev": "tsc -p tsconfig.json --watch",
|
|
13
|
+
"lint": "eslint src/ --fix",
|
|
14
|
+
"lint-check": "eslint src/",
|
|
15
|
+
"test": "mocha tests/portfolio.ts",
|
|
16
|
+
"test-single": "mocha ./tests/$npm_config_name.ts",
|
|
17
|
+
"test:debugger": "mocha --inspect-brk tests/*",
|
|
18
|
+
"version-bump": "git commit -am \"Version bump to $(npm version patch | cut -c 2-)\""
|
|
19
|
+
},
|
|
20
|
+
"keywords": [],
|
|
21
|
+
"author": "",
|
|
22
|
+
"license": "ISC",
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@defisaver/tokens": "^1.7.3",
|
|
25
|
+
"@types/lodash": "^4.17.15",
|
|
26
|
+
"@types/memoizee": "^0.4.12",
|
|
27
|
+
"decimal.js": "^10.6.0",
|
|
28
|
+
"lodash": "^4.17.21",
|
|
29
|
+
"memoizee": "^0.4.17",
|
|
30
|
+
"viem": "^2.37.9"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@defisaver/eslint-config": "^1.0.1",
|
|
34
|
+
"@metamask/eth-json-rpc-middleware": "^15.0.1",
|
|
35
|
+
"@metamask/eth-json-rpc-provider": "^4.1.6",
|
|
36
|
+
"@types/chai": "^5.0.0",
|
|
37
|
+
"@types/mocha": "^10.0.9",
|
|
38
|
+
"chai": "^4.3.8",
|
|
39
|
+
"dotenv": "^16.3.1",
|
|
40
|
+
"eslint": "^8.49.0",
|
|
41
|
+
"eslint-plugin-import": "^2.31.0",
|
|
42
|
+
"mocha": "^10.2.0",
|
|
43
|
+
"nock": "^14.0.0",
|
|
44
|
+
"ts-node": "^10.9.2",
|
|
45
|
+
"typescript": "^5.2.2"
|
|
46
|
+
}
|
|
47
|
+
}
|