Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(routing): Set wstETH as a base token #637

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/providers/token-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ export const LIDO_MAINNET = new Token(
'Lido DAO Token'
);

export const WSTETH_MAINNET = new Token(
ChainId.MAINNET,
'0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',
18,
'wstETH',
'Wrapped liquid staked Ether'
);

export const USDC_SEPOLIA = new Token(
ChainId.SEPOLIA,
'0x6f14C02Fc1F78322cFd7d707aB90f18baD3B54f5',
Expand Down
4 changes: 3 additions & 1 deletion src/providers/v2/static-subgraph-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ import {
WBTC_MOONBEAM,
WBTC_OPTIMISM,
WETH_POLYGON,
WMATIC_POLYGON
WMATIC_POLYGON,
WSTETH_MAINNET
} from '../token-provider';

import { IV2SubgraphProvider, V2SubgraphPool } from './subgraph-provider';
Expand All @@ -56,6 +57,7 @@ const BASES_TO_CHECK_TRADES_AGAINST: ChainTokenList = {
USDC_MAINNET,
USDT_MAINNET,
WBTC_MAINNET,
WSTETH_MAINNET,
],
[ChainId.GOERLI]: [WRAPPED_NATIVE_CURRENCY[ChainId.GOERLI]!],
[ChainId.SEPOLIA]: [WRAPPED_NATIVE_CURRENCY[ChainId.SEPOLIA]!],
Expand Down
4 changes: 3 additions & 1 deletion src/providers/v3/static-subgraph-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ import {
WETH_POLYGON,
WMATIC_POLYGON,
WMATIC_POLYGON_MUMBAI,
WXDAI_GNOSIS
WXDAI_GNOSIS,
WSTETH_MAINNET
} from '../token-provider';

import { IV3PoolProvider } from './pool-provider';
Expand All @@ -78,6 +79,7 @@ const BASES_TO_CHECK_TRADES_AGAINST: ChainTokenList = {
USDC_MAINNET,
USDT_MAINNET,
WBTC_MAINNET,
WSTETH_MAINNET,
],
[ChainId.GOERLI]: [
WRAPPED_NATIVE_CURRENCY[ChainId.GOERLI]!,
Expand Down
2 changes: 2 additions & 0 deletions src/routers/alpha-router/functions/get-candidate-pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ import {
WMATIC_POLYGON,
WMATIC_POLYGON_MUMBAI,
WXDAI_GNOSIS,
WSTETH_MAINNET,
} from '../../../providers/token-provider';
import {
IV2PoolProvider,
Expand Down Expand Up @@ -140,6 +141,7 @@ const baseTokensByChain: { [chainId in ChainId]?: Token[] } = {
DAI_MAINNET,
WRAPPED_NATIVE_CURRENCY[1]!,
FEI_MAINNET,
WSTETH_MAINNET,
],
[ChainId.OPTIMISM]: [
DAI_OPTIMISM,
Expand Down
Loading