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

Commit

Permalink
feat: adding Blast
Browse files Browse the repository at this point in the history
  • Loading branch information
JackShort committed Mar 8, 2024
1 parent 47aad86 commit 6ce884a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
5 changes: 5 additions & 0 deletions src/addresses.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,10 @@ describe('addresses', () => {
const address = SWAP_ROUTER_02_ADDRESSES(ChainId.SEPOLIA)
expect(address).toEqual('0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E')
})

it('should return the correct address for bast', () => {
const address = SWAP_ROUTER_02_ADDRESSES(ChainId.BLAST)
expect(address).toEqual('0x549FEB8c9bd4c12Ad2AB27022dA12492aC452B66')
})
})
})
19 changes: 16 additions & 3 deletions src/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ export const V2_FACTORY_ADDRESSES: AddressMap = {
[ChainId.BASE]: '0x8909dc15e40173ff4699343b6eb8132c65e18ec6',
[ChainId.BNB]: '0x8909Dc15e40173Ff4699343b6eB8132c65e18eC6',
[ChainId.POLYGON]: '0x9e5A52f57b3038F1B8EeE45F28b3C1967e22799C',
[ChainId.CELO]: '0x79a530c8e2fA8748B7B40dd3629C0520c2cCf03f'
[ChainId.CELO]: '0x79a530c8e2fA8748B7B40dd3629C0520c2cCf03f',
[ChainId.BLAST]: '0x5C346464d33F90bABaf70dB6388507CC889C1070'
}
/**
* @deprecated use V2_ROUTER_ADDRESSES instead
Expand All @@ -60,7 +61,8 @@ export const V2_ROUTER_ADDRESSES: AddressMap = {
[ChainId.BASE]: '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24',
[ChainId.AVALANCHE]: '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24',
[ChainId.BNB]: '0x4752ba5dbc23f44d87826276bf6fd6b1c372ad24',
[ChainId.POLYGON]: '0xedf6066a2b290c185783862c7f4776a2c8077ad1'
[ChainId.POLYGON]: '0xedf6066a2b290c185783862c7f4776a2c8077ad1',
[ChainId.BLAST]: '0xBB66Eb1c5e875933D44DAe661dbD80e5D9B03035'
}

// Networks that share most of the same addresses i.e. Mainnet, Goerli, Optimism, Arbitrum, Polygon
Expand Down Expand Up @@ -223,6 +225,16 @@ const ROOTSTOCK_ADDRESSES: ChainAddresses = {
swapRouter02Address: '0x0B14ff67f0014046b4b99057Aec4509640b3947A'
}

const BLAST_ADDRESSES: ChainAddresses = {
v3CoreFactoryAddress: '0x792edAdE80af5fC680d96a2eD80A44247D2Cf6Fd',
multicallAddress: '0xdC7f370de7631cE9e2c2e1DCDA6B3B5744Cf4705',
quoterAddress: '0x6Cdcd65e03c1CEc3730AeeCd45bc140D57A25C77',
v3MigratorAddress: '0x15CA7043CD84C5D21Ae76Ba0A1A967d42c40ecE0',
nonfungiblePositionManagerAddress: '0xB218e4f7cF0533d4696fDfC419A0023D33345F28',
tickLensAddress: '0x2E95185bCdD928a3e984B7e2D6560Ab1b17d7274',
swapRouter02Address: '0x549FEB8c9bd4c12Ad2AB27022dA12492aC452B66'
}

export const CHAIN_TO_ADDRESSES_MAP: Record<SupportedChainsType, ChainAddresses> = {
[ChainId.MAINNET]: MAINNET_ADDRESSES,
[ChainId.OPTIMISM]: OPTIMISM_ADDRESSES,
Expand All @@ -243,7 +255,8 @@ export const CHAIN_TO_ADDRESSES_MAP: Record<SupportedChainsType, ChainAddresses>
[ChainId.BASE_GOERLI]: BASE_GOERLI_ADDRESSES,
[ChainId.ZORA]: ZORA_ADDRESSES,
[ChainId.ZORA_SEPOLIA]: ZORA_SEPOLIA_ADDRESSES,
[ChainId.ROOTSTOCK]: ROOTSTOCK_ADDRESSES
[ChainId.ROOTSTOCK]: ROOTSTOCK_ADDRESSES,
[ChainId.BLAST]: BLAST_ADDRESSES
}

/* V3 Contract Addresses */
Expand Down
6 changes: 4 additions & 2 deletions src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export enum ChainId {
BASE = 8453,
ZORA = 7777777,
ZORA_SEPOLIA = 999999999,
ROOTSTOCK = 30
ROOTSTOCK = 30,
BLAST = 81457
}

export const SUPPORTED_CHAINS = [
Expand All @@ -43,7 +44,8 @@ export const SUPPORTED_CHAINS = [
ChainId.BASE_GOERLI,
ChainId.ZORA,
ChainId.ZORA_SEPOLIA,
ChainId.ROOTSTOCK
ChainId.ROOTSTOCK,
ChainId.BLAST
] as const
export type SupportedChainsType = typeof SUPPORTED_CHAINS[number]

Expand Down

0 comments on commit 6ce884a

Please sign in to comment.