Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add zksync as supported chain #45

Merged
merged 3 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ export const SupportedChains = [
NetworkEnum.ARBITRUM,
NetworkEnum.AVALANCHE,
NetworkEnum.GNOSIS,
NetworkEnum.COINBASE
NetworkEnum.COINBASE,
NetworkEnum.ZKSYNC
] as const

type UnsupportedChain = Exclude<
Expand Down
22 changes: 18 additions & 4 deletions src/deployments.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {Address, NetworkEnum} from '@1inch/fusion-sdk'

const TrueERC20 = new Address('0xda0000d4000015a526378bb6fafc650cea5966f8')
const ZKTrueERC20 = new Address('0xd66097c27eb8dee404bac235737932260edc6f3b')

export const TRUE_ERC20 = {
[NetworkEnum.ETHEREUM]: TrueERC20,
Expand All @@ -11,18 +12,28 @@ export const TRUE_ERC20 = {
[NetworkEnum.COINBASE]: TrueERC20,
[NetworkEnum.FANTOM]: TrueERC20,
[NetworkEnum.GNOSIS]: TrueERC20,
[NetworkEnum.ARBITRUM]: TrueERC20
[NetworkEnum.ARBITRUM]: TrueERC20,
[NetworkEnum.ZKSYNC]: ZKTrueERC20
}

const ESCROW_FACTORY_ADDRESS = new Address(
'0xa7bcb4eac8964306f9e3764f67db6a7af6ddf99a'
)
const ESCROW_ZK_FACTORY_ADDRESS = new Address(
'0x584aeab186d81dbb52a8a14820c573480c3d4773'
)
const ESCROW_SRC_IMPLEMENTATION_ADDRESS = new Address(
'0xcd70bf33cfe59759851db21c83ea47b6b83bef6a'
)
const ESCROW_ZK_SRC_IMPLEMENTATION_ADDRESS = new Address(
'0xddc60c7babfc55d8030f51910b157e179f7a41fc'
)
const ESCROW_DST_IMPLEMENTATION_ADDRESS = new Address(
'0x9c3e06659f1c34f930ce97fcbce6e04ae88e535b'
)
const ESCROW_ZK_DST_IMPLEMENTATION_ADDRESS = new Address(
'0xdc4ccc2fc2475d0ed3fddd563c44f2bf6a3900c9'
)

export const ESCROW_SRC_IMPLEMENTATION = {
[NetworkEnum.ETHEREUM]: ESCROW_SRC_IMPLEMENTATION_ADDRESS,
Expand All @@ -33,7 +44,8 @@ export const ESCROW_SRC_IMPLEMENTATION = {
[NetworkEnum.COINBASE]: ESCROW_SRC_IMPLEMENTATION_ADDRESS,
[NetworkEnum.FANTOM]: ESCROW_SRC_IMPLEMENTATION_ADDRESS,
[NetworkEnum.GNOSIS]: ESCROW_SRC_IMPLEMENTATION_ADDRESS,
[NetworkEnum.ARBITRUM]: ESCROW_SRC_IMPLEMENTATION_ADDRESS
[NetworkEnum.ARBITRUM]: ESCROW_SRC_IMPLEMENTATION_ADDRESS,
[NetworkEnum.ZKSYNC]: ESCROW_ZK_SRC_IMPLEMENTATION_ADDRESS
}

export const ESCROW_DST_IMPLEMENTATION = {
Expand All @@ -45,7 +57,8 @@ export const ESCROW_DST_IMPLEMENTATION = {
[NetworkEnum.COINBASE]: ESCROW_DST_IMPLEMENTATION_ADDRESS,
[NetworkEnum.FANTOM]: ESCROW_DST_IMPLEMENTATION_ADDRESS,
[NetworkEnum.GNOSIS]: ESCROW_DST_IMPLEMENTATION_ADDRESS,
[NetworkEnum.ARBITRUM]: ESCROW_DST_IMPLEMENTATION_ADDRESS
[NetworkEnum.ARBITRUM]: ESCROW_DST_IMPLEMENTATION_ADDRESS,
[NetworkEnum.ZKSYNC]: ESCROW_ZK_DST_IMPLEMENTATION_ADDRESS
}

export const ESCROW_FACTORY = {
Expand All @@ -57,5 +70,6 @@ export const ESCROW_FACTORY = {
[NetworkEnum.COINBASE]: ESCROW_FACTORY_ADDRESS,
[NetworkEnum.FANTOM]: ESCROW_FACTORY_ADDRESS,
[NetworkEnum.GNOSIS]: ESCROW_FACTORY_ADDRESS,
[NetworkEnum.ARBITRUM]: ESCROW_FACTORY_ADDRESS
[NetworkEnum.ARBITRUM]: ESCROW_FACTORY_ADDRESS,
[NetworkEnum.ZKSYNC]: ESCROW_ZK_FACTORY_ADDRESS
}
Loading