Skip to content

Commit

Permalink
Adding avalanche swap router address
Browse files Browse the repository at this point in the history
  • Loading branch information
sismanis committed Feb 9, 2024
1 parent 3b69042 commit 9328a0b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
3 changes: 2 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
"@types/brotli": "^1.3.4",
"@uniswap/default-token-list": "^11.2.0",
"@uniswap/permit2-sdk": "^1.2.0",
"@uniswap/sdk-core": "^4.0.9",
"@uniswap/router-sdk": "^1.7.5",
"@uniswap/sdk-core": "^4.0.9",
"@uniswap/swap-router-contracts": "^1.3.0",
"@uniswap/token-lists": "^1.0.0-beta.31",
"@uniswap/universal-router": "^1.6.0",
Expand Down
14 changes: 9 additions & 5 deletions src/util/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,16 @@ export const UNISWAP_MULTICALL_ADDRESSES: AddressMap = {
};

export const SWAP_ROUTER_02_ADDRESSES = (chainId: number): string => {
if (chainId == ChainId.BNB) {
return BNB_SWAP_ROUTER_02_ADDRESS;
} else if (chainId == ChainId.BASE) {
return CHAIN_TO_ADDRESSES_MAP[ChainId.BASE].swapRouter02Address!;
switch (chainId) {
case ChainId.BNB:
return BNB_SWAP_ROUTER_02_ADDRESS;
case ChainId.BASE:
return CHAIN_TO_ADDRESSES_MAP[ChainId.BASE].swapRouter02Address!;
case ChainId.AVALANCHE:
return CHAIN_TO_ADDRESSES_MAP[ChainId.AVALANCHE].swapRouter02Address!;
default:
return '0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45';
}
return '0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45';
};

export const OVM_GASPRICE_ADDRESS =
Expand Down

0 comments on commit 9328a0b

Please sign in to comment.