Skip to content

Commit

Permalink
feat: Add Avalanche Chain and V3 Contract Addresses (Uniswap#59)
Browse files Browse the repository at this point in the history
* feat: move shared contract addresses to shared repo

* Fix code style issues with Prettier

* remove hardcoded contract

* move chain related info to new file

* Fix code style issues with Prettier

* plural

* remove sepolia from default network

* Fix code style issues with Prettier

* remove deprecated chains

* feat: Add Avalanche Chain and V3 Contract Addresses

* Fix code style issues with Prettier

* Fix code style issues with Prettier

* cleanup merge

* Fix code style issues with Prettier

---------

Co-authored-by: Charles Bachmeier <charlie@genie.xyz>
Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
  • Loading branch information
3 people committed Jun 9, 2023
1 parent 08fdaaf commit a46c395
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
14 changes: 13 additions & 1 deletion src/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,17 @@ const SEPOLIA_ADDRESSES: ChainAddresses = {
tickLensAddress: '0xd7f33bcdb21b359c8ee6f0251d30e94832baad07'
}

// Avalanche v3 addresses
const AVALANCHE_ADDRESSES: ChainAddresses = {
v3CoreFactoryAddress: '0x740b1c1de25031C31FF4fC9A62f554A55cdC1baD',
multicallAddress: '0x0139141Cd4Ee88dF3Cdb65881D411bAE271Ef0C2',
quoterAddress: '0xbe0F5544EC67e9B3b2D979aaA43f18Fd87E6257F',
v3MigratorAddress: '0x44f5f1f5E452ea8d29C890E8F6e893fC0f1f0f97',
nonfungiblePositionManagerAddress: '0x655C406EBFa14EE2006250925e54ec43AD184f8B',
tickLensAddress: '0xEB9fFC8bf81b4fFd11fb6A63a6B0f098c6e21950',
swapRouter02Address: '0xbb00FF08d01D300023C629E8fFfFcb65A5a578cE'
}

export const CHAIN_TO_ADDRESSES_MAP: Record<SupportedChainsType, ChainAddresses> = {
[ChainId.MAINNET]: MAINNET_ADDRESSES,
[ChainId.OPTIMISM]: OPTIMISM_ADDRESSES,
Expand All @@ -125,7 +136,8 @@ export const CHAIN_TO_ADDRESSES_MAP: Record<SupportedChainsType, ChainAddresses>
[ChainId.BNB]: BNB_ADDRESSES,
[ChainId.OPTIMISM_GOERLI]: OPTIMISM_GOERLI_ADDRESSES,
[ChainId.ARBITRUM_GOERLI]: ARBITRUM_GOERLI_ADDRESSES,
[ChainId.SEPOLIA]: SEPOLIA_ADDRESSES
[ChainId.SEPOLIA]: SEPOLIA_ADDRESSES,
[ChainId.AVALANCHE]: AVALANCHE_ADDRESSES
}

/* V3 Contract Addresses */
Expand Down
9 changes: 6 additions & 3 deletions src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export enum ChainId {
CELO_ALFAJORES = 44787,
GNOSIS = 100,
MOONBEAM = 1284,
BNB = 56
BNB = 56,
AVALANCHE = 43114
}

export const SUPPORTED_CHAINS = [
Expand All @@ -27,7 +28,8 @@ export const SUPPORTED_CHAINS = [
ChainId.SEPOLIA,
ChainId.CELO_ALFAJORES,
ChainId.CELO,
ChainId.BNB
ChainId.BNB,
ChainId.AVALANCHE
] as const
export type SupportedChainsType = typeof SUPPORTED_CHAINS[number]

Expand All @@ -38,5 +40,6 @@ export enum NativeCurrencyName {
CELO = 'CELO',
GNOSIS = 'XDAI',
MOONBEAM = 'GLMR',
BNB = 'BNB'
BNB = 'BNB',
AVAX = 'AVAX'
}

0 comments on commit a46c395

Please sign in to comment.