Skip to content

Commit

Permalink
feat(sdk-core): support zksync on V3 (#34)
Browse files Browse the repository at this point in the history
## Description

We have deployed V3 to to ZkSync. We are updating the SDKs to support V3 in FE and BE. First step is to update sdk-core

## How Has This Been Tested?

unit tests

## Are there any breaking changes?

No

## (Optional) Feedback Focus

No

## (Optional) Follow Ups

We will have to create v2-sdk and v3-sdk and universal-router-sdk changes separately, because we still publish individual sdk packages to npm repo.
  • Loading branch information
jsy1218 authored Jun 6, 2024
1 parent 1bb5b88 commit 9cd39ed
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sdks/sdk-core/src/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,16 @@ const BLAST_ADDRESSES: ChainAddresses = {
swapRouter02Address: '0x549FEB8c9bd4c12Ad2AB27022dA12492aC452B66',
}

const ZKSYNC_ADDRESSES: ChainAddresses = {
v3CoreFactoryAddress: '0x8FdA5a7a8dCA67BBcDd10F02Fa0649A937215422',
multicallAddress: '0x0c68a7C72f074d1c45C16d41fa74eEbC6D16a65C',
quoterAddress: '0x8Cb537fc92E26d8EBBb760E632c95484b6Ea3e28',
v3MigratorAddress: '0x611841b24E43C4ACfd290B427a3D6cf1A59dac8E',
nonfungiblePositionManagerAddress: '0x0616e5762c1E7Dc3723c50663dF10a162D690a86',
tickLensAddress: '0xe10FF11b809f8EE07b056B452c3B2caa7FE24f89',
swapRouter02Address: '0x99c56385daBCE3E81d8499d0b8d0257aBC07E8A3',
}

export const CHAIN_TO_ADDRESSES_MAP: Record<SupportedChainsType, ChainAddresses> = {
[ChainId.MAINNET]: MAINNET_ADDRESSES,
[ChainId.OPTIMISM]: OPTIMISM_ADDRESSES,
Expand All @@ -258,6 +268,7 @@ export const CHAIN_TO_ADDRESSES_MAP: Record<SupportedChainsType, ChainAddresses>
[ChainId.ZORA_SEPOLIA]: ZORA_SEPOLIA_ADDRESSES,
[ChainId.ROOTSTOCK]: ROOTSTOCK_ADDRESSES,
[ChainId.BLAST]: BLAST_ADDRESSES,
[ChainId.ZKSYNC]: ZKSYNC_ADDRESSES,
}

/* V3 Contract Addresses */
Expand Down
2 changes: 2 additions & 0 deletions sdks/sdk-core/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export enum ChainId {
ZORA_SEPOLIA = 999999999,
ROOTSTOCK = 30,
BLAST = 81457,
ZKSYNC = 324,
}

export const SUPPORTED_CHAINS = [
Expand All @@ -46,6 +47,7 @@ export const SUPPORTED_CHAINS = [
ChainId.ZORA_SEPOLIA,
ChainId.ROOTSTOCK,
ChainId.BLAST,
ChainId.ZKSYNC,
] as const
export type SupportedChainsType = (typeof SUPPORTED_CHAINS)[number]

Expand Down

0 comments on commit 9cd39ed

Please sign in to comment.