Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
feat: add v2 factory chains (#85)
Browse files Browse the repository at this point in the history
* feat: add v2 factory chains

* Fix code style issues with Prettier

---------

Co-authored-by: Lint Action <lint-action@samuelmeuli.com>
  • Loading branch information
just-toby and lint-action authored Sep 13, 2023
1 parent e8ae633 commit 046d0f8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type ChainAddresses = {
v1MixedRouteQuoterAddress?: string
}

const DEFAULT_NETWORKS = [ChainId.MAINNET, ChainId.GOERLI]
const DEFAULT_NETWORKS = [ChainId.MAINNET, ChainId.GOERLI, ChainId.SEPOLIA]

function constructSameAddressMap(address: string, additionalNetworks: ChainId[] = []): AddressMap {
return DEFAULT_NETWORKS.concat(additionalNetworks).reduce<AddressMap>((memo, chainId) => {
Expand All @@ -33,7 +33,15 @@ export const UNI_ADDRESSES: AddressMap = constructSameAddressMap('0x1f9840a85d5a
export const UNISWAP_NFT_AIRDROP_CLAIM_ADDRESS = '0x8B799381ac40b838BBA4131ffB26197C432AFe78'

export const V2_FACTORY_ADDRESS = '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f'
export const V2_FACTORY_ADDRESSES: AddressMap = constructSameAddressMap(V2_FACTORY_ADDRESS)
export const V2_FACTORY_ADDRESSES: AddressMap = constructSameAddressMap(V2_FACTORY_ADDRESS, [
ChainId.POLYGON,
ChainId.OPTIMISM,
ChainId.CELO,
ChainId.ARBITRUM_ONE,
ChainId.BNB,
ChainId.AVALANCHE,
ChainId.BASE
])
export const V2_ROUTER_ADDRESS = '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D'
export const V2_ROUTER_ADDRESSES: AddressMap = constructSameAddressMap(V2_ROUTER_ADDRESS)

Expand Down

0 comments on commit 046d0f8

Please sign in to comment.