@gearbox-protocol/sdk 2.1.34 → 3.0.0-next.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/lib/apy/convexAPY.d.ts +4 -6
- package/lib/apy/convexAPY.js +15 -16
- package/lib/apy/curveAPY.d.ts +2 -2
- package/lib/apy/curveAPY.js +3 -4
- package/lib/apy/index.d.ts +1 -1
- package/lib/apy/index.js +2 -2
- package/lib/apy/lidoAPY.js +2 -2
- package/lib/apy/yearnAPY.d.ts +1 -1
- package/lib/apy/yearnAPY.js +3 -5
- package/lib/contracts/contractsRegister.d.ts +1 -1
- package/lib/contracts/contractsRegister.js +6 -7
- package/lib/core/creditAccount.js +20 -22
- package/lib/core/creditAccount.spec.js +32 -34
- package/lib/core/creditManager.js +16 -17
- package/lib/core/creditSession.js +12 -13
- package/lib/core/events.js +34 -35
- package/lib/core/pool/data.js +22 -23
- package/lib/core/priceOracle.js +3 -3
- package/lib/core/rewardClaimer.d.ts +1 -3
- package/lib/core/rewardConvex.d.ts +1 -4
- package/lib/core/rewardConvex.js +7 -10
- package/lib/core/rewardConvex.spec.js +15 -16
- package/lib/core/strategy.js +14 -16
- package/lib/core/strategy.spec.js +20 -22
- package/lib/core/trade.d.ts +1 -1
- package/lib/core/trade.js +12 -15
- package/lib/core/transactions.d.ts +1 -1
- package/lib/core/transactions.js +18 -20
- package/lib/index.d.ts +2 -20
- package/lib/index.js +27 -24
- package/lib/parsers/ERC20Parser.d.ts +1 -1
- package/lib/parsers/abstractParser.d.ts +1 -1
- package/lib/parsers/abstractParser.js +3 -4
- package/lib/parsers/convexBaseRewardPoolAdapterParser.d.ts +1 -1
- package/lib/parsers/convexBaseRewardPoolAdapterParser.js +2 -2
- package/lib/parsers/convexBaseRewardPoolAdapterParser.spec.js +4 -4
- package/lib/parsers/convexBoosterAdapterParser.d.ts +1 -1
- package/lib/parsers/convexBoosterAdapterParser.js +3 -3
- package/lib/parsers/convexBoosterAdapterParser.spec.js +3 -3
- package/lib/parsers/convextRewardPoolParser.d.ts +1 -1
- package/lib/parsers/creditFacadeParser.d.ts +1 -1
- package/lib/parsers/creditFacadeParser.spec.js +8 -9
- package/lib/parsers/curveAdapterParser.d.ts +1 -2
- package/lib/parsers/curveAdapterParser.js +5 -5
- package/lib/parsers/curveAdapterParser.spec.js +13 -13
- package/lib/parsers/lidoAdapterParser.d.ts +1 -1
- package/lib/parsers/lidoAdapterParser.spec.js +2 -2
- package/lib/parsers/lidoSTETHParser.d.ts +1 -1
- package/lib/parsers/txParser.d.ts +1 -3
- package/lib/parsers/txParser.js +12 -15
- package/lib/parsers/uniV2AdapterParser.d.ts +1 -1
- package/lib/parsers/uniV2AdapterParser.spec.js +15 -16
- package/lib/parsers/uniV3AdapterParser.d.ts +1 -1
- package/lib/parsers/uniV3AdapterParser.spec.js +15 -16
- package/lib/parsers/wstETHAdapterParser.d.ts +1 -1
- package/lib/parsers/wstETHAdapterParser.spec.js +3 -3
- package/lib/parsers/yearnAdapterParser.spec.js +12 -12
- package/lib/parsers/yearnV2AdapterParser.d.ts +1 -1
- package/lib/parsers/yearnV2AdapterParser.js +2 -2
- package/lib/pathfinder/pathOptions.d.ts +1 -2
- package/lib/pathfinder/pathOptions.js +12 -16
- package/lib/pathfinder/pathOptions.spec.js +36 -36
- package/lib/pathfinder/pathfinder.d.ts +1 -2
- package/lib/pathfinder/pathfinder.js +9 -10
- package/lib/pathfinder/pathfinder.spec.js +11 -12
- package/lib/payload/creditAccount.d.ts +1 -1
- package/lib/payload/creditManager.d.ts +1 -1
- package/lib/payload/pool.d.ts +1 -1
- package/lib/tokens/tokenData.d.ts +0 -4
- package/lib/tokens/tokenData.js +1 -16
- package/lib/utils/formatter.js +3 -3
- package/lib/utils/math.js +5 -5
- package/lib/utils/price.js +4 -4
- package/lib/watchers/creditAccountWatcher.js +2 -2
- package/lib/watchers/creditAccountWatcher.spec.js +18 -18
- package/lib/watchers/creditManagerWatcher.spec.js +19 -19
- package/package.json +2 -1
- package/lib/contracts/adapters.d.ts +0 -24
- package/lib/contracts/adapters.js +0 -28
- package/lib/contracts/contracts.d.ts +0 -112
- package/lib/contracts/contracts.js +0 -654
- package/lib/contracts/protocols.d.ts +0 -12
- package/lib/contracts/protocols.js +0 -16
- package/lib/contracts/utilsContracts.d.ts +0 -7
- package/lib/contracts/utilsContracts.js +0 -28
- package/lib/core/chains.d.ts +0 -23
- package/lib/core/chains.js +0 -63
- package/lib/core/constants.d.ts +0 -21
- package/lib/core/constants.js +0 -31
- package/lib/tokens/aave.d.ts +0 -20
- package/lib/tokens/aave.js +0 -62
- package/lib/tokens/balancer.d.ts +0 -12
- package/lib/tokens/balancer.js +0 -36
- package/lib/tokens/compound.d.ts +0 -11
- package/lib/tokens/compound.js +0 -38
- package/lib/tokens/convex.d.ts +0 -30
- package/lib/tokens/convex.js +0 -262
- package/lib/tokens/curveLP.d.ts +0 -27
- package/lib/tokens/curveLP.js +0 -141
- package/lib/tokens/decimals.d.ts +0 -2
- package/lib/tokens/decimals.js +0 -115
- package/lib/tokens/gear.d.ts +0 -14
- package/lib/tokens/gear.js +0 -47
- package/lib/tokens/normal.d.ts +0 -9
- package/lib/tokens/normal.js +0 -194
- package/lib/tokens/quoted.d.ts +0 -3
- package/lib/tokens/quoted.js +0 -7
- package/lib/tokens/token.d.ts +0 -25
- package/lib/tokens/token.js +0 -305
- package/lib/tokens/tokenType.d.ts +0 -15
- package/lib/tokens/tokenType.js +0 -19
- package/lib/tokens/tokens.spec.d.ts +0 -1
- package/lib/tokens/tokens.spec.js +0 -151
- package/lib/tokens/yearn.d.ts +0 -26
- package/lib/tokens/yearn.js +0 -52
- package/lib/utils/mappers.d.ts +0 -8
- package/lib/utils/mappers.js +0 -13
- package/lib/utils/multicall.d.ts +0 -36
- package/lib/utils/multicall.js +0 -90
- package/lib/utils/safeEnum.d.ts +0 -1
- package/lib/utils/safeEnum.js +0 -10
- package/lib/utils/types.d.ts +0 -10
- package/lib/utils/types.js +0 -2
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MULTISIG = exports.CREATE2FACTORY = exports.DEGEN_NFT = exports.BLACKLIST_HELPER = exports.TIMELOCK = exports.ADDRESS_PROVIDER = void 0;
|
|
4
|
-
const constants_1 = require("../core/constants");
|
|
5
|
-
exports.ADDRESS_PROVIDER = {
|
|
6
|
-
Mainnet: "0xcF64698AFF7E5f27A11dff868AF228653ba53be0",
|
|
7
|
-
Arbitrum: constants_1.NOT_DEPLOYED,
|
|
8
|
-
};
|
|
9
|
-
exports.TIMELOCK = {
|
|
10
|
-
Mainnet: "0xa133C9A92Fb8dDB962Af1cbae58b2723A0bdf23b",
|
|
11
|
-
Arbitrum: constants_1.NOT_DEPLOYED,
|
|
12
|
-
};
|
|
13
|
-
exports.BLACKLIST_HELPER = {
|
|
14
|
-
Mainnet: "0xFfbF344741654a1B9Ab1286Cf05A42f275F67839",
|
|
15
|
-
Arbitrum: constants_1.NOT_DEPLOYED,
|
|
16
|
-
};
|
|
17
|
-
exports.DEGEN_NFT = {
|
|
18
|
-
Mainnet: "0xB829a5b349b01fc71aFE46E50dD6Ec0222A6E599",
|
|
19
|
-
Arbitrum: constants_1.NOT_DEPLOYED,
|
|
20
|
-
};
|
|
21
|
-
exports.CREATE2FACTORY = {
|
|
22
|
-
Mainnet: "0x59b7B8Dd9E6e1F934C9c3Def4a1Eb69Bc17Ec9cc",
|
|
23
|
-
Arbitrum: constants_1.NOT_DEPLOYED,
|
|
24
|
-
};
|
|
25
|
-
exports.MULTISIG = {
|
|
26
|
-
Mainnet: "0xA7D5DDc1b8557914F158076b228AA91eF613f1D5",
|
|
27
|
-
Arbitrum: constants_1.NOT_DEPLOYED,
|
|
28
|
-
};
|
package/lib/core/chains.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ethers } from "ethers";
|
|
2
|
-
export declare const MAINNET_NETWORK = 1;
|
|
3
|
-
export declare const GOERLI_NETWORK = 5;
|
|
4
|
-
export declare const OPTIMISM_NETWORK = 10;
|
|
5
|
-
export declare const POLYGON_NETWORK = 137;
|
|
6
|
-
export declare const LOCAL_NETWORK = 1337;
|
|
7
|
-
export declare const TENDERLY_NETWORK = 123456;
|
|
8
|
-
export declare const HARDHAT_NETWORK = 31337;
|
|
9
|
-
export declare const ARBITRUM_NETWORK = 42161;
|
|
10
|
-
export declare const CHAINS: {
|
|
11
|
-
readonly Mainnet: 1;
|
|
12
|
-
readonly Arbitrum: 42161;
|
|
13
|
-
readonly Local: 1337;
|
|
14
|
-
readonly Hardhat: 31337;
|
|
15
|
-
readonly Tenderly: 123456;
|
|
16
|
-
readonly Optimism: 10;
|
|
17
|
-
readonly Polygon: 137;
|
|
18
|
-
};
|
|
19
|
-
export declare const supportedChains: readonly ["Mainnet", "Arbitrum"];
|
|
20
|
-
export type NetworkType = (typeof supportedChains)[number];
|
|
21
|
-
export declare const getNetworkType: (chainId: number, localAs?: NetworkType) => NetworkType;
|
|
22
|
-
export declare const isSupportedNetwork: (chainId: number | undefined) => chainId is number;
|
|
23
|
-
export declare function detectNetwork(provider: ethers.providers.Provider): Promise<NetworkType>;
|
package/lib/core/chains.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.detectNetwork = exports.isSupportedNetwork = exports.getNetworkType = exports.supportedChains = exports.CHAINS = exports.ARBITRUM_NETWORK = exports.HARDHAT_NETWORK = exports.TENDERLY_NETWORK = exports.LOCAL_NETWORK = exports.POLYGON_NETWORK = exports.OPTIMISM_NETWORK = exports.GOERLI_NETWORK = exports.MAINNET_NETWORK = void 0;
|
|
4
|
-
const token_1 = require("../tokens/token");
|
|
5
|
-
const types_1 = require("../types");
|
|
6
|
-
const constants_1 = require("./constants");
|
|
7
|
-
exports.MAINNET_NETWORK = 1;
|
|
8
|
-
exports.GOERLI_NETWORK = 5;
|
|
9
|
-
exports.OPTIMISM_NETWORK = 10;
|
|
10
|
-
exports.POLYGON_NETWORK = 137;
|
|
11
|
-
exports.LOCAL_NETWORK = 1337;
|
|
12
|
-
exports.TENDERLY_NETWORK = 123456;
|
|
13
|
-
exports.HARDHAT_NETWORK = 31337;
|
|
14
|
-
exports.ARBITRUM_NETWORK = 42161;
|
|
15
|
-
exports.CHAINS = {
|
|
16
|
-
Mainnet: exports.MAINNET_NETWORK,
|
|
17
|
-
Arbitrum: exports.ARBITRUM_NETWORK,
|
|
18
|
-
Local: exports.LOCAL_NETWORK,
|
|
19
|
-
Hardhat: exports.HARDHAT_NETWORK,
|
|
20
|
-
Tenderly: exports.TENDERLY_NETWORK,
|
|
21
|
-
Optimism: exports.OPTIMISM_NETWORK,
|
|
22
|
-
Polygon: exports.POLYGON_NETWORK,
|
|
23
|
-
};
|
|
24
|
-
exports.supportedChains = ["Mainnet", "Arbitrum"];
|
|
25
|
-
const SUPPORTED_CHAINS = {
|
|
26
|
-
[exports.CHAINS.Mainnet]: "Mainnet",
|
|
27
|
-
[exports.CHAINS.Arbitrum]: "Arbitrum",
|
|
28
|
-
[exports.CHAINS.Local]: "Mainnet",
|
|
29
|
-
[exports.CHAINS.Tenderly]: "Mainnet",
|
|
30
|
-
// [CHAINS.Optimism]: "Optimism",
|
|
31
|
-
// [CHAINS.Polygon]: "Polygon",
|
|
32
|
-
};
|
|
33
|
-
const getNetworkType = (chainId, localAs = "Mainnet") => {
|
|
34
|
-
const chainType = SUPPORTED_CHAINS[chainId];
|
|
35
|
-
if (chainId === exports.CHAINS.Local) {
|
|
36
|
-
return localAs;
|
|
37
|
-
}
|
|
38
|
-
else if (chainType) {
|
|
39
|
-
return chainType;
|
|
40
|
-
}
|
|
41
|
-
throw new Error("Unsupported network");
|
|
42
|
-
};
|
|
43
|
-
exports.getNetworkType = getNetworkType;
|
|
44
|
-
const isSupportedNetwork = (chainId) => chainId !== undefined && !!SUPPORTED_CHAINS[chainId];
|
|
45
|
-
exports.isSupportedNetwork = isSupportedNetwork;
|
|
46
|
-
async function detectNetwork(provider) {
|
|
47
|
-
try {
|
|
48
|
-
const usdcMainnet = types_1.IERC20__factory.connect(token_1.tokenDataByNetwork.Mainnet.USDC, provider);
|
|
49
|
-
await usdcMainnet.balanceOf(constants_1.ADDRESS_0X0);
|
|
50
|
-
return "Mainnet";
|
|
51
|
-
}
|
|
52
|
-
catch {
|
|
53
|
-
try {
|
|
54
|
-
const usdcMainnet = types_1.IERC20__factory.connect(token_1.tokenDataByNetwork.Arbitrum.USDC, provider);
|
|
55
|
-
await usdcMainnet.balanceOf(constants_1.ADDRESS_0X0);
|
|
56
|
-
return "Arbitrum";
|
|
57
|
-
}
|
|
58
|
-
catch {
|
|
59
|
-
throw new Error("Unsupported network");
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
exports.detectNetwork = detectNetwork;
|
package/lib/core/constants.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export declare const MAX_INT: bigint;
|
|
2
|
-
export declare const RAY_DECIMALS_POW = 27;
|
|
3
|
-
export declare const RAY: bigint;
|
|
4
|
-
export declare const halfRAY: bigint;
|
|
5
|
-
export declare const WAD_DECIMALS_POW = 18;
|
|
6
|
-
export declare const WAD: bigint;
|
|
7
|
-
export declare const PRICE_DECIMALS_POW = 8;
|
|
8
|
-
export declare const PRICE_DECIMALS: bigint;
|
|
9
|
-
export declare const SECONDS_PER_YEAR: number;
|
|
10
|
-
export declare const MS_PER_YEAR: number;
|
|
11
|
-
export declare const PERCENTAGE_DECIMALS = 100n;
|
|
12
|
-
export declare const PERCENTAGE_FACTOR = 10000n;
|
|
13
|
-
export declare const timeRanges: Record<string, number>;
|
|
14
|
-
export declare const LEVERAGE_DECIMALS = 100n;
|
|
15
|
-
export declare const SLIPPAGE_DECIMALS = 100n;
|
|
16
|
-
export declare const ADDRESS_0X0 = "0x0000000000000000000000000000000000000000";
|
|
17
|
-
export declare const DUMB_ADDRESS = "0xC4375B7De8af5a38a93548eb8453a498222C4fF2";
|
|
18
|
-
export declare const DUMB_ADDRESS2 = "0x93548eB8453a498222C4FF2C4375b7De8af5A38a";
|
|
19
|
-
export declare const DUMB_ADDRESS3 = "0x822293548EB8453A49c4fF2c4375B7DE8AF5a38A";
|
|
20
|
-
export declare const DUMB_ADDRESS4 = "0x498222C4Ff2C4393548eb8453a75B7dE8AF5A38a";
|
|
21
|
-
export declare const NOT_DEPLOYED = "NOT DEPLOYED";
|
package/lib/core/constants.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NOT_DEPLOYED = exports.DUMB_ADDRESS4 = exports.DUMB_ADDRESS3 = exports.DUMB_ADDRESS2 = exports.DUMB_ADDRESS = exports.ADDRESS_0X0 = exports.SLIPPAGE_DECIMALS = exports.LEVERAGE_DECIMALS = exports.timeRanges = exports.PERCENTAGE_FACTOR = exports.PERCENTAGE_DECIMALS = exports.MS_PER_YEAR = exports.SECONDS_PER_YEAR = exports.PRICE_DECIMALS = exports.PRICE_DECIMALS_POW = exports.WAD = exports.WAD_DECIMALS_POW = exports.halfRAY = exports.RAY = exports.RAY_DECIMALS_POW = exports.MAX_INT = void 0;
|
|
4
|
-
exports.MAX_INT = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
|
|
5
|
-
exports.RAY_DECIMALS_POW = 27;
|
|
6
|
-
exports.RAY = 10n ** BigInt(exports.RAY_DECIMALS_POW);
|
|
7
|
-
exports.halfRAY = exports.RAY / 2n;
|
|
8
|
-
exports.WAD_DECIMALS_POW = 18;
|
|
9
|
-
exports.WAD = 10n ** BigInt(exports.WAD_DECIMALS_POW);
|
|
10
|
-
exports.PRICE_DECIMALS_POW = 8;
|
|
11
|
-
exports.PRICE_DECIMALS = 10n ** BigInt(exports.PRICE_DECIMALS_POW);
|
|
12
|
-
exports.SECONDS_PER_YEAR = 365 * 24 * 3600;
|
|
13
|
-
exports.MS_PER_YEAR = exports.SECONDS_PER_YEAR * 1000;
|
|
14
|
-
exports.PERCENTAGE_DECIMALS = 100n;
|
|
15
|
-
exports.PERCENTAGE_FACTOR = 10000n;
|
|
16
|
-
exports.timeRanges = {
|
|
17
|
-
// "1H": 3600,
|
|
18
|
-
"1D": 3600 * 24,
|
|
19
|
-
"1W": 3600 * 24 * 7,
|
|
20
|
-
"1M": 3600 * 24 * 30,
|
|
21
|
-
"1Y": 3600 * 24 * 365,
|
|
22
|
-
};
|
|
23
|
-
exports.LEVERAGE_DECIMALS = 100n;
|
|
24
|
-
exports.SLIPPAGE_DECIMALS = 100n;
|
|
25
|
-
exports.ADDRESS_0X0 = "0x0000000000000000000000000000000000000000";
|
|
26
|
-
// Used in tests
|
|
27
|
-
exports.DUMB_ADDRESS = "0xC4375B7De8af5a38a93548eb8453a498222C4fF2";
|
|
28
|
-
exports.DUMB_ADDRESS2 = "0x93548eB8453a498222C4FF2C4375b7De8af5A38a";
|
|
29
|
-
exports.DUMB_ADDRESS3 = "0x822293548EB8453A49c4fF2c4375B7DE8AF5a38A";
|
|
30
|
-
exports.DUMB_ADDRESS4 = "0x498222C4Ff2C4393548eb8453a75B7dE8AF5A38a";
|
|
31
|
-
exports.NOT_DEPLOYED = "NOT DEPLOYED";
|
package/lib/tokens/aave.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { AaveV2PoolContract } from "../contracts/contracts";
|
|
2
|
-
import { NormalToken } from "./normal";
|
|
3
|
-
import type { TokenBase } from "./token";
|
|
4
|
-
import { TokenType } from "./tokenType";
|
|
5
|
-
export type AaveV2LPToken = "aDAI" | "aUSDC" | "aWETH" | "aUSDT";
|
|
6
|
-
export type WrappedAaveV2LPToken = "waDAI" | "waUSDC" | "waWETH" | "waUSDT";
|
|
7
|
-
export type AaveV2PoolTokenData = {
|
|
8
|
-
symbol: AaveV2LPToken;
|
|
9
|
-
type: TokenType.AAVE_V2_A_TOKEN;
|
|
10
|
-
underlying: NormalToken;
|
|
11
|
-
pool: AaveV2PoolContract;
|
|
12
|
-
} & TokenBase;
|
|
13
|
-
export type WrappedAaveV2PoolTokenData = {
|
|
14
|
-
symbol: WrappedAaveV2LPToken;
|
|
15
|
-
type: TokenType.WRAPPED_AAVE_V2_TOKEN;
|
|
16
|
-
underlying: AaveV2LPToken;
|
|
17
|
-
} & TokenBase;
|
|
18
|
-
export declare const aaveV2Tokens: Record<AaveV2LPToken, AaveV2PoolTokenData>;
|
|
19
|
-
export declare const wrappedAaveV2Tokens: Record<WrappedAaveV2LPToken, WrappedAaveV2PoolTokenData>;
|
|
20
|
-
export declare const isAaveV2LPToken: (t: unknown) => t is AaveV2LPToken;
|
package/lib/tokens/aave.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isAaveV2LPToken = exports.wrappedAaveV2Tokens = exports.aaveV2Tokens = void 0;
|
|
4
|
-
const tokenType_1 = require("./tokenType");
|
|
5
|
-
exports.aaveV2Tokens = {
|
|
6
|
-
aDAI: {
|
|
7
|
-
name: "AaveV2 aDAI",
|
|
8
|
-
symbol: "aDAI",
|
|
9
|
-
type: tokenType_1.TokenType.AAVE_V2_A_TOKEN,
|
|
10
|
-
underlying: "DAI",
|
|
11
|
-
pool: "AAVE_V2_DAI_POOL",
|
|
12
|
-
},
|
|
13
|
-
aUSDC: {
|
|
14
|
-
name: "AaveV2 aUSDC",
|
|
15
|
-
symbol: "aUSDC",
|
|
16
|
-
type: tokenType_1.TokenType.AAVE_V2_A_TOKEN,
|
|
17
|
-
underlying: "USDC",
|
|
18
|
-
pool: "AAVE_V2_USDC_POOL",
|
|
19
|
-
},
|
|
20
|
-
aUSDT: {
|
|
21
|
-
name: "AaveV2 aUSDT",
|
|
22
|
-
symbol: "aUSDT",
|
|
23
|
-
type: tokenType_1.TokenType.AAVE_V2_A_TOKEN,
|
|
24
|
-
underlying: "USDT",
|
|
25
|
-
pool: "AAVE_V2_USDT_POOL",
|
|
26
|
-
},
|
|
27
|
-
aWETH: {
|
|
28
|
-
name: "AaveV2 aWETH",
|
|
29
|
-
symbol: "aWETH",
|
|
30
|
-
type: tokenType_1.TokenType.AAVE_V2_A_TOKEN,
|
|
31
|
-
underlying: "WETH",
|
|
32
|
-
pool: "AAVE_V2_WETH_POOL",
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
exports.wrappedAaveV2Tokens = {
|
|
36
|
-
waDAI: {
|
|
37
|
-
name: "Wrapped AaveV2 aDAI",
|
|
38
|
-
symbol: "waDAI",
|
|
39
|
-
type: tokenType_1.TokenType.WRAPPED_AAVE_V2_TOKEN,
|
|
40
|
-
underlying: "aDAI",
|
|
41
|
-
},
|
|
42
|
-
waUSDC: {
|
|
43
|
-
name: "Wrapped AaveV2 aUSDC",
|
|
44
|
-
symbol: "waUSDC",
|
|
45
|
-
type: tokenType_1.TokenType.WRAPPED_AAVE_V2_TOKEN,
|
|
46
|
-
underlying: "aUSDC",
|
|
47
|
-
},
|
|
48
|
-
waUSDT: {
|
|
49
|
-
name: "Wrapped AaveV2 aUSDT",
|
|
50
|
-
symbol: "waUSDT",
|
|
51
|
-
type: tokenType_1.TokenType.WRAPPED_AAVE_V2_TOKEN,
|
|
52
|
-
underlying: "aUSDT",
|
|
53
|
-
},
|
|
54
|
-
waWETH: {
|
|
55
|
-
name: "Wrapped AaveV2 aWETH",
|
|
56
|
-
symbol: "waWETH",
|
|
57
|
-
type: tokenType_1.TokenType.WRAPPED_AAVE_V2_TOKEN,
|
|
58
|
-
underlying: "aWETH",
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
const isAaveV2LPToken = (t) => typeof t === "string" && !!exports.aaveV2Tokens[t];
|
|
62
|
-
exports.isAaveV2LPToken = isAaveV2LPToken;
|
package/lib/tokens/balancer.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { NormalToken } from "./normal";
|
|
2
|
-
import type { TokenBase } from "./token";
|
|
3
|
-
import { TokenType } from "./tokenType";
|
|
4
|
-
export type BalancerLPToken = "50OHM_50DAI" | "50OHM_50WETH" | "OHM_wstETH" | "USDC_DAI_USDT";
|
|
5
|
-
export type BalancerLpTokenData = {
|
|
6
|
-
symbol: BalancerLPToken;
|
|
7
|
-
type: TokenType.BALANCER_LP_TOKEN;
|
|
8
|
-
underlying: Array<NormalToken | BalancerLPToken>;
|
|
9
|
-
poolId: string;
|
|
10
|
-
} & TokenBase;
|
|
11
|
-
export declare const balancerLpTokens: Record<BalancerLPToken, BalancerLpTokenData>;
|
|
12
|
-
export declare const isBalancerLPToken: (t: unknown) => t is BalancerLPToken;
|
package/lib/tokens/balancer.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isBalancerLPToken = exports.balancerLpTokens = void 0;
|
|
4
|
-
const tokenType_1 = require("./tokenType");
|
|
5
|
-
exports.balancerLpTokens = {
|
|
6
|
-
"50OHM_50DAI": {
|
|
7
|
-
name: "Balancer 50OHM_50DAI",
|
|
8
|
-
symbol: "50OHM_50DAI",
|
|
9
|
-
type: tokenType_1.TokenType.BALANCER_LP_TOKEN,
|
|
10
|
-
underlying: ["OHM", "DAI"],
|
|
11
|
-
poolId: "0x76fcf0e8c7ff37a47a799fa2cd4c13cde0d981c90002000000000000000003d2",
|
|
12
|
-
},
|
|
13
|
-
"50OHM_50WETH": {
|
|
14
|
-
name: "Balancer 50OHM_50WETH",
|
|
15
|
-
symbol: "50OHM_50WETH",
|
|
16
|
-
type: tokenType_1.TokenType.BALANCER_LP_TOKEN,
|
|
17
|
-
underlying: ["OHM", "WETH"],
|
|
18
|
-
poolId: "0xd1ec5e215e8148d76f4460e4097fd3d5ae0a35580002000000000000000003d3",
|
|
19
|
-
},
|
|
20
|
-
OHM_wstETH: {
|
|
21
|
-
name: "Balancer OHM_wstETH",
|
|
22
|
-
symbol: "OHM_wstETH",
|
|
23
|
-
type: tokenType_1.TokenType.BALANCER_LP_TOKEN,
|
|
24
|
-
underlying: ["OHM", "wstETH"],
|
|
25
|
-
poolId: "0xd4f79ca0ac83192693bce4699d0c10c66aa6cf0f00020000000000000000047e",
|
|
26
|
-
},
|
|
27
|
-
USDC_DAI_USDT: {
|
|
28
|
-
name: "Balancer USDC_DAI_USDT",
|
|
29
|
-
symbol: "USDC_DAI_USDT",
|
|
30
|
-
type: tokenType_1.TokenType.BALANCER_LP_TOKEN,
|
|
31
|
-
underlying: ["USDC", "DAI", "USDT"],
|
|
32
|
-
poolId: "0x79c58f70905f734641735bc61e45c19dd9ad60bc0000000000000000000004e7",
|
|
33
|
-
},
|
|
34
|
-
};
|
|
35
|
-
const isBalancerLPToken = (t) => typeof t === "string" && !!exports.balancerLpTokens[t];
|
|
36
|
-
exports.isBalancerLPToken = isBalancerLPToken;
|
package/lib/tokens/compound.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { NormalToken } from "./normal";
|
|
2
|
-
import type { TokenBase } from "./token";
|
|
3
|
-
import { TokenType } from "./tokenType";
|
|
4
|
-
export type CompoundV2LPToken = "cDAI" | "cUSDC" | "cETH" | "cUSDT" | "cLINK";
|
|
5
|
-
export type CompoundV2PoolTokenData = {
|
|
6
|
-
symbol: CompoundV2LPToken;
|
|
7
|
-
type: TokenType.COMPOUND_V2_C_TOKEN;
|
|
8
|
-
underlying: NormalToken;
|
|
9
|
-
} & TokenBase;
|
|
10
|
-
export declare const compoundV2Tokens: Record<CompoundV2LPToken, CompoundV2PoolTokenData>;
|
|
11
|
-
export declare const isCompoundV2LPToken: (t: unknown) => t is CompoundV2LPToken;
|
package/lib/tokens/compound.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isCompoundV2LPToken = exports.compoundV2Tokens = void 0;
|
|
4
|
-
const tokenType_1 = require("./tokenType");
|
|
5
|
-
exports.compoundV2Tokens = {
|
|
6
|
-
cDAI: {
|
|
7
|
-
name: "CompoundV2 cDAI",
|
|
8
|
-
symbol: "cDAI",
|
|
9
|
-
type: tokenType_1.TokenType.COMPOUND_V2_C_TOKEN,
|
|
10
|
-
underlying: "DAI",
|
|
11
|
-
},
|
|
12
|
-
cUSDC: {
|
|
13
|
-
name: "CompoundV2 cUSDC",
|
|
14
|
-
symbol: "cUSDC",
|
|
15
|
-
type: tokenType_1.TokenType.COMPOUND_V2_C_TOKEN,
|
|
16
|
-
underlying: "USDC",
|
|
17
|
-
},
|
|
18
|
-
cUSDT: {
|
|
19
|
-
name: "CompoundV2 cUSDT",
|
|
20
|
-
symbol: "cUSDT",
|
|
21
|
-
type: tokenType_1.TokenType.COMPOUND_V2_C_TOKEN,
|
|
22
|
-
underlying: "USDT",
|
|
23
|
-
},
|
|
24
|
-
cETH: {
|
|
25
|
-
name: "CompoundV2 cETH",
|
|
26
|
-
symbol: "cETH",
|
|
27
|
-
type: tokenType_1.TokenType.COMPOUND_V2_C_TOKEN,
|
|
28
|
-
underlying: "WETH",
|
|
29
|
-
},
|
|
30
|
-
cLINK: {
|
|
31
|
-
name: "CompoundV2 cLINK",
|
|
32
|
-
symbol: "cLINK",
|
|
33
|
-
type: tokenType_1.TokenType.COMPOUND_V2_C_TOKEN,
|
|
34
|
-
underlying: "LINK",
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
const isCompoundV2LPToken = (t) => typeof t === "string" && !!exports.compoundV2Tokens[t];
|
|
38
|
-
exports.isCompoundV2LPToken = isCompoundV2LPToken;
|
package/lib/tokens/convex.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { ConvexPoolContract, SupportedContract } from "../contracts/contracts";
|
|
2
|
-
import type { CurveLPToken } from "./curveLP";
|
|
3
|
-
import type { SupportedToken, TokenBase } from "./token";
|
|
4
|
-
import { TokenType } from "./tokenType";
|
|
5
|
-
export type ConvexLPToken = "cvx3Crv" | "cvxcrvFRAX" | "cvxsteCRV" | "cvxFRAX3CRV" | "cvxLUSD3CRV" | "cvxcrvPlain3andSUSD" | "cvxgusd3CRV" | "cvxOHMFRAXBP" | "cvxMIM_3LP3CRV" | "cvxcrvCRVETH" | "cvxcrvCVXETH" | "cvxcrvUSDTWBTCWETH" | "cvxLDOETH";
|
|
6
|
-
export type ConvexStakedPhantomToken = "stkcvx3Crv" | "stkcvxcrvFRAX" | "stkcvxsteCRV" | "stkcvxFRAX3CRV" | "stkcvxLUSD3CRV" | "stkcvxcrvPlain3andSUSD" | "stkcvxgusd3CRV" | "stkcvxOHMFRAXBP" | "stkcvxMIM_3LP3CRV" | "stkcvxcrvCRVETH" | "stkcvxcrvCVXETH" | "stkcvxcrvUSDTWBTCWETH" | "stkcvxLDOETH";
|
|
7
|
-
type BaseConvexToken = {
|
|
8
|
-
pool: ConvexPoolContract;
|
|
9
|
-
pid: number;
|
|
10
|
-
underlying: CurveLPToken;
|
|
11
|
-
} & TokenBase;
|
|
12
|
-
export type ConvexLPTokenData = {
|
|
13
|
-
symbol: ConvexLPToken;
|
|
14
|
-
type: TokenType.CONVEX_LP_TOKEN;
|
|
15
|
-
stakedToken: ConvexStakedPhantomToken;
|
|
16
|
-
} & BaseConvexToken;
|
|
17
|
-
export type ConvexPhantomTokenData = {
|
|
18
|
-
symbol: ConvexStakedPhantomToken;
|
|
19
|
-
type: TokenType.CONVEX_STAKED_TOKEN;
|
|
20
|
-
lpToken: ConvexLPToken;
|
|
21
|
-
} & BaseConvexToken;
|
|
22
|
-
export declare const convexLpTokens: Record<ConvexLPToken, ConvexLPTokenData>;
|
|
23
|
-
export declare const convexStakedPhantomTokens: Record<ConvexStakedPhantomToken, ConvexPhantomTokenData>;
|
|
24
|
-
export declare const convexTokens: Record<ConvexLPToken | ConvexStakedPhantomToken, ConvexLPTokenData | ConvexPhantomTokenData>;
|
|
25
|
-
export declare const isConvexToken: (t: unknown) => t is ConvexLPToken | ConvexStakedPhantomToken;
|
|
26
|
-
export declare const isConvexLPToken: (t: unknown) => t is ConvexLPToken;
|
|
27
|
-
export declare const isConvexStakedPhantomToken: (t: unknown) => t is ConvexStakedPhantomToken;
|
|
28
|
-
export declare const convexPoolByPid: Record<number, SupportedContract>;
|
|
29
|
-
export declare const convexLpTokenByPid: Record<number, SupportedToken>;
|
|
30
|
-
export {};
|
package/lib/tokens/convex.js
DELETED
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.convexLpTokenByPid = exports.convexPoolByPid = exports.isConvexStakedPhantomToken = exports.isConvexLPToken = exports.isConvexToken = exports.convexTokens = exports.convexStakedPhantomTokens = exports.convexLpTokens = void 0;
|
|
4
|
-
const tokenType_1 = require("./tokenType");
|
|
5
|
-
exports.convexLpTokens = {
|
|
6
|
-
cvx3Crv: {
|
|
7
|
-
name: "Convex cvx3Crv",
|
|
8
|
-
symbol: "cvx3Crv",
|
|
9
|
-
type: tokenType_1.TokenType.CONVEX_LP_TOKEN,
|
|
10
|
-
pool: "CONVEX_3CRV_POOL",
|
|
11
|
-
pid: 9,
|
|
12
|
-
underlying: "3Crv",
|
|
13
|
-
stakedToken: "stkcvx3Crv",
|
|
14
|
-
},
|
|
15
|
-
cvxcrvFRAX: {
|
|
16
|
-
name: "Convex cvxcrvFRAX",
|
|
17
|
-
symbol: "cvxcrvFRAX",
|
|
18
|
-
type: tokenType_1.TokenType.CONVEX_LP_TOKEN,
|
|
19
|
-
pool: "CONVEX_FRAX_USDC_POOL",
|
|
20
|
-
pid: 100,
|
|
21
|
-
underlying: "crvFRAX",
|
|
22
|
-
stakedToken: "stkcvxcrvFRAX",
|
|
23
|
-
},
|
|
24
|
-
cvxsteCRV: {
|
|
25
|
-
name: "Convex cvxsteCRV",
|
|
26
|
-
symbol: "cvxsteCRV",
|
|
27
|
-
type: tokenType_1.TokenType.CONVEX_LP_TOKEN,
|
|
28
|
-
pool: "CONVEX_STECRV_POOL",
|
|
29
|
-
pid: 25,
|
|
30
|
-
underlying: "steCRV",
|
|
31
|
-
stakedToken: "stkcvxsteCRV",
|
|
32
|
-
},
|
|
33
|
-
cvxFRAX3CRV: {
|
|
34
|
-
name: "Convex cvxFRAX3CRV-f",
|
|
35
|
-
symbol: "cvxFRAX3CRV",
|
|
36
|
-
type: tokenType_1.TokenType.CONVEX_LP_TOKEN,
|
|
37
|
-
pool: "CONVEX_FRAX3CRV_POOL",
|
|
38
|
-
pid: 32,
|
|
39
|
-
underlying: "FRAX3CRV",
|
|
40
|
-
stakedToken: "stkcvxFRAX3CRV",
|
|
41
|
-
},
|
|
42
|
-
cvxLUSD3CRV: {
|
|
43
|
-
name: "Convex cvxLUSD3CRV-f",
|
|
44
|
-
symbol: "cvxLUSD3CRV",
|
|
45
|
-
type: tokenType_1.TokenType.CONVEX_LP_TOKEN,
|
|
46
|
-
pool: "CONVEX_LUSD3CRV_POOL",
|
|
47
|
-
pid: 33,
|
|
48
|
-
underlying: "LUSD3CRV",
|
|
49
|
-
stakedToken: "stkcvxLUSD3CRV",
|
|
50
|
-
},
|
|
51
|
-
cvxcrvPlain3andSUSD: {
|
|
52
|
-
name: "Convex cvxcrvPlain3andSUSD",
|
|
53
|
-
symbol: "cvxcrvPlain3andSUSD",
|
|
54
|
-
type: tokenType_1.TokenType.CONVEX_LP_TOKEN,
|
|
55
|
-
pool: "CONVEX_SUSD_POOL",
|
|
56
|
-
pid: 4,
|
|
57
|
-
underlying: "crvPlain3andSUSD",
|
|
58
|
-
stakedToken: "stkcvxcrvPlain3andSUSD",
|
|
59
|
-
},
|
|
60
|
-
cvxgusd3CRV: {
|
|
61
|
-
name: "Convex cvxgusd3CRV",
|
|
62
|
-
symbol: "cvxgusd3CRV",
|
|
63
|
-
type: tokenType_1.TokenType.CONVEX_LP_TOKEN,
|
|
64
|
-
pool: "CONVEX_GUSD_POOL",
|
|
65
|
-
pid: 10,
|
|
66
|
-
underlying: "gusd3CRV",
|
|
67
|
-
stakedToken: "stkcvxgusd3CRV",
|
|
68
|
-
},
|
|
69
|
-
cvxOHMFRAXBP: {
|
|
70
|
-
name: "Convex cvxOHMFRAXBP",
|
|
71
|
-
symbol: "cvxOHMFRAXBP",
|
|
72
|
-
type: tokenType_1.TokenType.CONVEX_LP_TOKEN,
|
|
73
|
-
pool: "CONVEX_OHMFRAXBP_POOL",
|
|
74
|
-
pid: 138,
|
|
75
|
-
underlying: "OHMFRAXBP",
|
|
76
|
-
stakedToken: "stkcvxOHMFRAXBP",
|
|
77
|
-
},
|
|
78
|
-
cvxMIM_3LP3CRV: {
|
|
79
|
-
name: "Convex cvxMIM-3LP3CRV-f",
|
|
80
|
-
symbol: "cvxMIM_3LP3CRV",
|
|
81
|
-
type: tokenType_1.TokenType.CONVEX_LP_TOKEN,
|
|
82
|
-
pool: "CONVEX_MIM3CRV_POOL",
|
|
83
|
-
pid: 40,
|
|
84
|
-
underlying: "MIM_3LP3CRV",
|
|
85
|
-
stakedToken: "stkcvxMIM_3LP3CRV",
|
|
86
|
-
},
|
|
87
|
-
cvxcrvCRVETH: {
|
|
88
|
-
name: "Convex cvxcrvCRVETH",
|
|
89
|
-
symbol: "cvxcrvCRVETH",
|
|
90
|
-
type: tokenType_1.TokenType.CONVEX_LP_TOKEN,
|
|
91
|
-
pool: "CONVEX_CRVETH_POOL",
|
|
92
|
-
pid: 61,
|
|
93
|
-
underlying: "crvCRVETH",
|
|
94
|
-
stakedToken: "stkcvxcrvCRVETH",
|
|
95
|
-
},
|
|
96
|
-
cvxcrvCVXETH: {
|
|
97
|
-
name: "Convex cvxcrvCVXETH",
|
|
98
|
-
symbol: "cvxcrvCVXETH",
|
|
99
|
-
type: tokenType_1.TokenType.CONVEX_LP_TOKEN,
|
|
100
|
-
pool: "CONVEX_CVXETH_POOL",
|
|
101
|
-
pid: 64,
|
|
102
|
-
underlying: "crvCVXETH",
|
|
103
|
-
stakedToken: "stkcvxcrvCVXETH",
|
|
104
|
-
},
|
|
105
|
-
cvxcrvUSDTWBTCWETH: {
|
|
106
|
-
name: "Convex cvxcrvUSDTWBTCWETH",
|
|
107
|
-
symbol: "cvxcrvUSDTWBTCWETH",
|
|
108
|
-
type: tokenType_1.TokenType.CONVEX_LP_TOKEN,
|
|
109
|
-
pool: "CONVEX_3CRYPTO_POOL",
|
|
110
|
-
pid: 188,
|
|
111
|
-
underlying: "crvUSDTWBTCWETH",
|
|
112
|
-
stakedToken: "stkcvxcrvUSDTWBTCWETH",
|
|
113
|
-
},
|
|
114
|
-
cvxLDOETH: {
|
|
115
|
-
name: "Convex cvxLDOETH",
|
|
116
|
-
symbol: "cvxLDOETH",
|
|
117
|
-
type: tokenType_1.TokenType.CONVEX_LP_TOKEN,
|
|
118
|
-
pool: "CONVEX_LDOETH_POOL",
|
|
119
|
-
pid: 149,
|
|
120
|
-
underlying: "LDOETH",
|
|
121
|
-
stakedToken: "stkcvxLDOETH",
|
|
122
|
-
},
|
|
123
|
-
};
|
|
124
|
-
exports.convexStakedPhantomTokens = {
|
|
125
|
-
stkcvx3Crv: {
|
|
126
|
-
name: "Convex stkcvx3Crv",
|
|
127
|
-
symbol: "stkcvx3Crv",
|
|
128
|
-
type: tokenType_1.TokenType.CONVEX_STAKED_TOKEN,
|
|
129
|
-
pool: "CONVEX_3CRV_POOL",
|
|
130
|
-
pid: 9,
|
|
131
|
-
underlying: "3Crv",
|
|
132
|
-
lpToken: "cvx3Crv",
|
|
133
|
-
},
|
|
134
|
-
stkcvxcrvFRAX: {
|
|
135
|
-
name: "Convex stkcvxcrvFRAX",
|
|
136
|
-
symbol: "stkcvxcrvFRAX",
|
|
137
|
-
type: tokenType_1.TokenType.CONVEX_STAKED_TOKEN,
|
|
138
|
-
pool: "CONVEX_FRAX_USDC_POOL",
|
|
139
|
-
pid: 100,
|
|
140
|
-
underlying: "crvFRAX",
|
|
141
|
-
lpToken: "cvxcrvFRAX",
|
|
142
|
-
},
|
|
143
|
-
stkcvxsteCRV: {
|
|
144
|
-
name: "Convex stkcvxsteCRV",
|
|
145
|
-
symbol: "stkcvxsteCRV",
|
|
146
|
-
type: tokenType_1.TokenType.CONVEX_STAKED_TOKEN,
|
|
147
|
-
pool: "CONVEX_STECRV_POOL",
|
|
148
|
-
pid: 25,
|
|
149
|
-
underlying: "steCRV",
|
|
150
|
-
lpToken: "cvxsteCRV",
|
|
151
|
-
},
|
|
152
|
-
stkcvxFRAX3CRV: {
|
|
153
|
-
name: "Convex stkcvxFRAX3CRV-f",
|
|
154
|
-
symbol: "stkcvxFRAX3CRV",
|
|
155
|
-
type: tokenType_1.TokenType.CONVEX_STAKED_TOKEN,
|
|
156
|
-
pool: "CONVEX_FRAX3CRV_POOL",
|
|
157
|
-
pid: 32,
|
|
158
|
-
underlying: "FRAX3CRV",
|
|
159
|
-
lpToken: "cvxFRAX3CRV",
|
|
160
|
-
},
|
|
161
|
-
stkcvxLUSD3CRV: {
|
|
162
|
-
name: "Convex stkcvxLUSD3CRV-f",
|
|
163
|
-
symbol: "stkcvxLUSD3CRV",
|
|
164
|
-
type: tokenType_1.TokenType.CONVEX_STAKED_TOKEN,
|
|
165
|
-
pool: "CONVEX_LUSD3CRV_POOL",
|
|
166
|
-
pid: 33,
|
|
167
|
-
underlying: "LUSD3CRV",
|
|
168
|
-
lpToken: "cvxLUSD3CRV",
|
|
169
|
-
},
|
|
170
|
-
stkcvxcrvPlain3andSUSD: {
|
|
171
|
-
name: "Convex stkcvxcrvPlain3andSUSD",
|
|
172
|
-
symbol: "stkcvxcrvPlain3andSUSD",
|
|
173
|
-
type: tokenType_1.TokenType.CONVEX_STAKED_TOKEN,
|
|
174
|
-
pool: "CONVEX_SUSD_POOL",
|
|
175
|
-
pid: 4,
|
|
176
|
-
underlying: "crvPlain3andSUSD",
|
|
177
|
-
lpToken: "cvxcrvPlain3andSUSD",
|
|
178
|
-
},
|
|
179
|
-
stkcvxgusd3CRV: {
|
|
180
|
-
name: "Convex stkcvxgusd3CRV",
|
|
181
|
-
symbol: "stkcvxgusd3CRV",
|
|
182
|
-
type: tokenType_1.TokenType.CONVEX_STAKED_TOKEN,
|
|
183
|
-
pool: "CONVEX_GUSD_POOL",
|
|
184
|
-
pid: 10,
|
|
185
|
-
underlying: "gusd3CRV",
|
|
186
|
-
lpToken: "cvxgusd3CRV",
|
|
187
|
-
},
|
|
188
|
-
stkcvxOHMFRAXBP: {
|
|
189
|
-
name: "Convex stkcvxOHMFRAXBP",
|
|
190
|
-
symbol: "stkcvxOHMFRAXBP",
|
|
191
|
-
type: tokenType_1.TokenType.CONVEX_STAKED_TOKEN,
|
|
192
|
-
pool: "CONVEX_OHMFRAXBP_POOL",
|
|
193
|
-
pid: 138,
|
|
194
|
-
underlying: "OHMFRAXBP",
|
|
195
|
-
lpToken: "cvxOHMFRAXBP",
|
|
196
|
-
},
|
|
197
|
-
stkcvxMIM_3LP3CRV: {
|
|
198
|
-
name: "Convex stkcvxMIM_3LP3CRV-f",
|
|
199
|
-
symbol: "stkcvxMIM_3LP3CRV",
|
|
200
|
-
type: tokenType_1.TokenType.CONVEX_STAKED_TOKEN,
|
|
201
|
-
pool: "CONVEX_MIM3CRV_POOL",
|
|
202
|
-
pid: 40,
|
|
203
|
-
underlying: "MIM_3LP3CRV",
|
|
204
|
-
lpToken: "cvxMIM_3LP3CRV",
|
|
205
|
-
},
|
|
206
|
-
stkcvxcrvCRVETH: {
|
|
207
|
-
name: "Convex stkcvxcrvCRVETH",
|
|
208
|
-
symbol: "stkcvxcrvCRVETH",
|
|
209
|
-
type: tokenType_1.TokenType.CONVEX_STAKED_TOKEN,
|
|
210
|
-
pool: "CONVEX_CRVETH_POOL",
|
|
211
|
-
pid: 61,
|
|
212
|
-
underlying: "crvCRVETH",
|
|
213
|
-
lpToken: "cvxcrvCRVETH",
|
|
214
|
-
},
|
|
215
|
-
stkcvxcrvCVXETH: {
|
|
216
|
-
name: "Convex stkcvxcrvCVXETH",
|
|
217
|
-
symbol: "stkcvxcrvCVXETH",
|
|
218
|
-
type: tokenType_1.TokenType.CONVEX_STAKED_TOKEN,
|
|
219
|
-
pool: "CONVEX_CVXETH_POOL",
|
|
220
|
-
pid: 64,
|
|
221
|
-
underlying: "crvCVXETH",
|
|
222
|
-
lpToken: "cvxcrvCVXETH",
|
|
223
|
-
},
|
|
224
|
-
stkcvxcrvUSDTWBTCWETH: {
|
|
225
|
-
name: "Convex stkcvxcrv3crypto",
|
|
226
|
-
symbol: "stkcvxcrvUSDTWBTCWETH",
|
|
227
|
-
type: tokenType_1.TokenType.CONVEX_STAKED_TOKEN,
|
|
228
|
-
pool: "CONVEX_3CRYPTO_POOL",
|
|
229
|
-
pid: 188,
|
|
230
|
-
underlying: "crvUSDTWBTCWETH",
|
|
231
|
-
lpToken: "cvxcrvUSDTWBTCWETH",
|
|
232
|
-
},
|
|
233
|
-
stkcvxLDOETH: {
|
|
234
|
-
name: "Convex stkcvxLDOETH",
|
|
235
|
-
symbol: "stkcvxLDOETH",
|
|
236
|
-
type: tokenType_1.TokenType.CONVEX_STAKED_TOKEN,
|
|
237
|
-
pool: "CONVEX_LDOETH_POOL",
|
|
238
|
-
pid: 149,
|
|
239
|
-
underlying: "LDOETH",
|
|
240
|
-
lpToken: "cvxLDOETH",
|
|
241
|
-
},
|
|
242
|
-
};
|
|
243
|
-
exports.convexTokens = {
|
|
244
|
-
...exports.convexLpTokens,
|
|
245
|
-
...exports.convexStakedPhantomTokens,
|
|
246
|
-
};
|
|
247
|
-
const isConvexToken = (t) => typeof t === "string" &&
|
|
248
|
-
!!exports.convexTokens[t];
|
|
249
|
-
exports.isConvexToken = isConvexToken;
|
|
250
|
-
const isConvexLPToken = (t) => typeof t === "string" && !!exports.convexLpTokens[t];
|
|
251
|
-
exports.isConvexLPToken = isConvexLPToken;
|
|
252
|
-
const isConvexStakedPhantomToken = (t) => typeof t === "string" &&
|
|
253
|
-
!!exports.convexStakedPhantomTokens[t];
|
|
254
|
-
exports.isConvexStakedPhantomToken = isConvexStakedPhantomToken;
|
|
255
|
-
exports.convexPoolByPid = Object.values(exports.convexLpTokens).reduce((acc, value) => {
|
|
256
|
-
acc[value.pid] = value.pool;
|
|
257
|
-
return acc;
|
|
258
|
-
}, {});
|
|
259
|
-
exports.convexLpTokenByPid = Object.entries(exports.convexLpTokens).reduce((acc, [token, data]) => {
|
|
260
|
-
acc[data.pid] = token;
|
|
261
|
-
return acc;
|
|
262
|
-
}, {});
|