Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
f332315d
Unverified
Commit
f332315d
authored
Jul 12, 2021
by
Moody Salem
Committed by
GitHub
Jul 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(routing): updates routing constants for layer 2 networks to use ETH (#2018)
parent
2fbb86ac
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
24 deletions
+41
-24
routing.ts
src/constants/routing.ts
+41
-24
No files found.
src/constants/routing.ts
View file @
f332315d
...
@@ -49,26 +49,23 @@ const mAssetsAdditionalBases: { [tokenAddress: string]: Token[] } = {
...
@@ -49,26 +49,23 @@ const mAssetsAdditionalBases: { [tokenAddress: string]: Token[] } = {
'
0x31c63146a635EB7465e5853020b39713AC356991
'
:
[
MIR
,
UST
],
// mUSO
'
0x31c63146a635EB7465e5853020b39713AC356991
'
:
[
MIR
,
UST
],
// mUSO
'
0xf72FCd9DCF0190923Fadd44811E240Ef4533fc86
'
:
[
MIR
,
UST
],
// mVIXY
'
0xf72FCd9DCF0190923Fadd44811E240Ef4533fc86
'
:
[
MIR
,
UST
],
// mVIXY
}
}
const
WETH_ONLY
:
ChainTokenList
=
{
[
SupportedChainId
.
MAINNET
]:
[
WETH9_EXTENDED
[
SupportedChainId
.
MAINNET
]],
const
WETH_ONLY
:
ChainTokenList
=
Object
.
fromEntries
(
[
SupportedChainId
.
ROPSTEN
]:
[
WETH9_EXTENDED
[
SupportedChainId
.
ROPSTEN
]],
Object
.
entries
(
WETH9_EXTENDED
).
map
(([
key
,
value
])
=>
[
key
,
[
value
]])
[
SupportedChainId
.
RINKEBY
]:
[
WETH9_EXTENDED
[
SupportedChainId
.
RINKEBY
]],
)
[
SupportedChainId
.
GOERLI
]:
[
WETH9_EXTENDED
[
SupportedChainId
.
GOERLI
]],
[
SupportedChainId
.
KOVAN
]:
[
WETH9_EXTENDED
[
SupportedChainId
.
KOVAN
]],
[
SupportedChainId
.
ARBITRUM_ONE
]:
[
WETH9_EXTENDED
[
SupportedChainId
.
ARBITRUM_ONE
]],
}
// used to construct intermediary pairs for trading
// used to construct intermediary pairs for trading
export
const
BASES_TO_CHECK_TRADES_AGAINST
:
ChainTokenList
=
{
export
const
BASES_TO_CHECK_TRADES_AGAINST
:
ChainTokenList
=
{
...
WETH_ONLY
,
...
WETH_ONLY
,
[
1
]:
[...
WETH_ONLY
[
1
],
DAI
,
USDC
,
USDT
,
WBTC
],
[
SupportedChainId
.
MAINNET
]:
[...
WETH_ONLY
[
SupportedChainId
.
MAINNET
],
DAI
,
USDC
,
USDT
,
WBTC
],
}
}
export
const
ADDITIONAL_BASES
:
{
[
chainId
:
number
]:
{
[
tokenAddress
:
string
]:
Token
[]
}
}
=
{
export
const
ADDITIONAL_BASES
:
{
[
chainId
:
number
]:
{
[
tokenAddress
:
string
]:
Token
[]
}
}
=
{
[
1
]:
{
[
SupportedChainId
.
MAINNET
]:
{
...
mAssetsAdditionalBases
,
...
mAssetsAdditionalBases
,
'
0xF16E4d813f4DcfDe4c5b44f305c908742De84eF0
'
:
[
ETH2X_FLI
],
'
0xF16E4d813f4DcfDe4c5b44f305c908742De84eF0
'
:
[
ETH2X_FLI
],
'
0xA948E86885e12Fb09AfEF8C52142EBDbDf73cD18
'
:
[
UNI
[
1
]],
'
0xA948E86885e12Fb09AfEF8C52142EBDbDf73cD18
'
:
[
UNI
[
SupportedChainId
.
MAINNET
]],
'
0x561a4717537ff4AF5c687328c0f7E90a319705C0
'
:
[
UNI
[
1
]],
'
0x561a4717537ff4AF5c687328c0f7E90a319705C0
'
:
[
UNI
[
SupportedChainId
.
MAINNET
]],
'
0xE0360A9e2cdd7d03B9408c7D3001E017BAc2EcD5
'
:
[
UNI
[
1
]],
'
0xE0360A9e2cdd7d03B9408c7D3001E017BAc2EcD5
'
:
[
UNI
[
SupportedChainId
.
MAINNET
]],
'
0xa6e3454fec677772dd771788a079355e43910638
'
:
[
UMA
],
'
0xa6e3454fec677772dd771788a079355e43910638
'
:
[
UMA
],
'
0xB46F57e7Ce3a284d74b70447Ef9352B5E5Df8963
'
:
[
UMA
],
'
0xB46F57e7Ce3a284d74b70447Ef9352B5E5Df8963
'
:
[
UMA
],
[
FEI
.
address
]:
[
TRIBE
],
[
FEI
.
address
]:
[
TRIBE
],
...
@@ -84,8 +81,8 @@ export const ADDITIONAL_BASES: { [chainId: number]: { [tokenAddress: string]: To
...
@@ -84,8 +81,8 @@ export const ADDITIONAL_BASES: { [chainId: number]: { [tokenAddress: string]: To
* tokens.
* tokens.
*/
*/
export
const
CUSTOM_BASES
:
{
[
chainId
:
number
]:
{
[
tokenAddress
:
string
]:
Token
[]
}
}
=
{
export
const
CUSTOM_BASES
:
{
[
chainId
:
number
]:
{
[
tokenAddress
:
string
]:
Token
[]
}
}
=
{
[
1
]:
{
[
SupportedChainId
.
MAINNET
]:
{
[
AMPL
.
address
]:
[
DAI
,
WETH9_EXTENDED
[
1
]],
[
AMPL
.
address
]:
[
DAI
,
WETH9_EXTENDED
[
SupportedChainId
.
MAINNET
]],
},
},
}
}
...
@@ -93,27 +90,47 @@ export const CUSTOM_BASES: { [chainId: number]: { [tokenAddress: string]: Token[
...
@@ -93,27 +90,47 @@ export const CUSTOM_BASES: { [chainId: number]: { [tokenAddress: string]: Token[
* Shows up in the currency select for swap and add liquidity
* Shows up in the currency select for swap and add liquidity
*/
*/
export
const
COMMON_BASES
:
ChainCurrencyList
=
{
export
const
COMMON_BASES
:
ChainCurrencyList
=
{
[
1
]:
[
ExtendedEther
.
onChain
(
1
),
DAI
,
USDC
,
USDT
,
WBTC
,
WETH9_EXTENDED
[
1
]],
[
SupportedChainId
.
MAINNET
]:
[
[
3
]:
[
ExtendedEther
.
onChain
(
3
),
WETH9_EXTENDED
[
3
]],
ExtendedEther
.
onChain
(
SupportedChainId
.
MAINNET
),
[
4
]:
[
ExtendedEther
.
onChain
(
4
),
WETH9_EXTENDED
[
4
]],
DAI
,
[
5
]:
[
ExtendedEther
.
onChain
(
5
),
WETH9_EXTENDED
[
5
]],
USDC
,
[
42
]:
[
ExtendedEther
.
onChain
(
42
),
WETH9_EXTENDED
[
42
]],
USDT
,
WBTC
,
WETH9_EXTENDED
[
SupportedChainId
.
MAINNET
],
],
[
SupportedChainId
.
ROPSTEN
]:
[
ExtendedEther
.
onChain
(
SupportedChainId
.
ROPSTEN
),
WETH9_EXTENDED
[
SupportedChainId
.
ROPSTEN
],
],
[
SupportedChainId
.
RINKEBY
]:
[
ExtendedEther
.
onChain
(
SupportedChainId
.
RINKEBY
),
WETH9_EXTENDED
[
SupportedChainId
.
RINKEBY
],
],
[
SupportedChainId
.
GOERLI
]:
[
ExtendedEther
.
onChain
(
SupportedChainId
.
GOERLI
),
WETH9_EXTENDED
[
SupportedChainId
.
GOERLI
]],
[
SupportedChainId
.
KOVAN
]:
[
ExtendedEther
.
onChain
(
SupportedChainId
.
KOVAN
),
WETH9_EXTENDED
[
SupportedChainId
.
KOVAN
]],
[
SupportedChainId
.
ARBITRUM_ONE
]:
[
[
SupportedChainId
.
ARBITRUM_ONE
]:
[
ExtendedEther
.
onChain
(
SupportedChainId
.
ARBITRUM_ONE
),
ExtendedEther
.
onChain
(
SupportedChainId
.
ARBITRUM_ONE
),
WETH9_EXTENDED
[
SupportedChainId
.
ARBITRUM_ONE
],
WETH9_EXTENDED
[
SupportedChainId
.
ARBITRUM_ONE
],
],
],
[
SupportedChainId
.
OPTIMISM
]:
[
ExtendedEther
.
onChain
(
SupportedChainId
.
OPTIMISM
)],
}
}
// used to construct the list of all pairs we consider by default in the frontend
// used to construct the list of all pairs we consider by default in the frontend
export
const
BASES_TO_TRACK_LIQUIDITY_FOR
:
ChainTokenList
=
{
export
const
BASES_TO_TRACK_LIQUIDITY_FOR
:
ChainTokenList
=
{
...
WETH_ONLY
,
...
WETH_ONLY
,
[
1
]:
[...
WETH_ONLY
[
1
],
DAI
,
USDC
,
USDT
,
WBTC
],
[
SupportedChainId
.
MAINNET
]:
[...
WETH_ONLY
[
SupportedChainId
.
MAINNET
],
DAI
,
USDC
,
USDT
,
WBTC
],
}
}
export
const
PINNED_PAIRS
:
{
readonly
[
chainId
:
number
]:
[
Token
,
Token
][]
}
=
{
export
const
PINNED_PAIRS
:
{
readonly
[
chainId
:
number
]:
[
Token
,
Token
][]
}
=
{
[
1
]:
[
[
SupportedChainId
.
MAINNET
]:
[
[
[
new
Token
(
1
,
'
0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643
'
,
8
,
'
cDAI
'
,
'
Compound Dai
'
),
new
Token
(
SupportedChainId
.
MAINNET
,
'
0x5d3a536E4D6DbD6114cc1Ead35777bAB948E3643
'
,
8
,
'
cDAI
'
,
'
Compound Dai
'
),
new
Token
(
1
,
'
0x39AA39c021dfbaE8faC545936693aC917d5E7563
'
,
8
,
'
cUSDC
'
,
'
Compound USD Coin
'
),
new
Token
(
SupportedChainId
.
MAINNET
,
'
0x39AA39c021dfbaE8faC545936693aC917d5E7563
'
,
8
,
'
cUSDC
'
,
'
Compound USD Coin
'
),
],
],
[
USDC
,
USDT
],
[
USDC
,
USDT
],
[
DAI
,
USDT
],
[
DAI
,
USDT
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment