Skip to content

Commit

Permalink
Merge pull request #45 from 1inch/feat/zk
Browse files Browse the repository at this point in the history
feat: add zksync as supported chain
  • Loading branch information
rharutyunyan authored Nov 13, 2024
2 parents 813444d + 0545b17 commit d1ac676
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
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
}

0 comments on commit d1ac676

Please sign in to comment.