Skip to content

Commit

Permalink
Merge branch 'feat/base-zk-swap' into devop/release-1-40
Browse files Browse the repository at this point in the history
  • Loading branch information
kvhnuke committed May 8, 2024
2 parents 0676512 + aa7bf57 commit f5b124d
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 0 deletions.
24 changes: 24 additions & 0 deletions packages/swap/src/common/supportedNetworks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ const NetworkDetails: Record<SupportedNetworkName, NetworkInfo> = {
signerType: [SignerType.secp256k1],
type: NetworkType.EVM,
},
[SupportedNetworkName.MaticZK]: {
id: SupportedNetworkName.MaticZK,
cgId: "matic-network",
decimals: 18,
logoURI:
"https://tokens.1inch.io/0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0.png",
name: "Polygon ZK",
symbol: "MATIC",
rank: 4,
signerType: [SignerType.secp256k1],
type: NetworkType.EVM,
},
[SupportedNetworkName.Optimism]: {
id: SupportedNetworkName.Optimism,
cgId: "optimism",
Expand All @@ -62,6 +74,18 @@ const NetworkDetails: Record<SupportedNetworkName, NetworkInfo> = {
signerType: [SignerType.secp256k1],
type: NetworkType.EVM,
},
[SupportedNetworkName.Base]: {
id: SupportedNetworkName.Base,
cgId: "ethereum",
decimals: 18,
logoURI:
"https://assets.coingecko.com/asset_platforms/images/131/large/base.jpeg",
name: "Base",
signerType: [SignerType.secp256k1],
type: NetworkType.EVM,
rank: 6,
symbol: "ETH",
},
[SupportedNetworkName.Arbitrum]: {
id: SupportedNetworkName.Arbitrum,
cgId: "ethereum",
Expand Down
2 changes: 2 additions & 0 deletions packages/swap/src/configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ const TOKEN_LISTS: {
[NetworkNames.Gnosis]: `https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/swaplists/${SupportedNetworkName.Gnosis}.json`,
[NetworkNames.Klaytn]: `https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/swaplists/${SupportedNetworkName.Klaytn}.json`,
[NetworkNames.ZkSync]: `https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/swaplists/${SupportedNetworkName.Zksync}.json`,
[NetworkNames.Base]: `https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/swaplists/${SupportedNetworkName.Base}.json`,
[NetworkNames.MaticZK]: `https://raw.githubusercontent.com/enkryptcom/dynamic-data/main/swaplists/${SupportedNetworkName.MaticZK}.json`,
};

const CHANGELLY_LIST =
Expand Down
4 changes: 4 additions & 0 deletions packages/swap/src/providers/oneInch/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ const supportedNetworks: {
approvalAddress: ONEINCH_APPROVAL_ADDRESS,
chainId: "42161",
},
[SupportedNetworkName.Base]: {
approvalAddress: ONEINCH_APPROVAL_ADDRESS,
chainId: "8453",
},
[SupportedNetworkName.Zksync]: {
approvalAddress: "0x6fd4383cb451173d5f9304f041c7bcbf27d561ff",
chainId: "324",
Expand Down
8 changes: 8 additions & 0 deletions packages/swap/src/providers/paraswap/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ const supportedNetworks: {
approvalAddress: PARASWAP_APPROVAL_ADDRESS,
chainId: "42161",
},
[SupportedNetworkName.Base]: {
approvalAddress: "0x93aAAe79a53759cD164340E4C8766E4Db5331cD7",
chainId: "8453",
},
[SupportedNetworkName.MaticZK]: {
approvalAddress: "0xc8a21fcd5a100c3ecc037c97e2f9c53a8d3a02a1",
chainId: "1101",
},
};

const BASE_URL = "https://apiv5.paraswap.io/";
Expand Down
4 changes: 4 additions & 0 deletions packages/swap/src/providers/zerox/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ const supportedNetworks: {
approvalAddress: "0xdef1c0ded9bec7f1a1670819833240f027b25eff",
chainId: "42161",
},
[SupportedNetworkName.Base]: {
approvalAddress: "0xdef1c0ded9bec7f1a1670819833240f027b25eff",
chainId: "1101",
},
};

const BASE_URL = "https://partners.mewapi.io/zerox/";
Expand Down
2 changes: 2 additions & 0 deletions packages/swap/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ export enum SupportedNetworkName {
Klaytn = NetworkNames.Klaytn,
Aurora = NetworkNames.Aurora,
Zksync = NetworkNames.ZkSync,
Base = NetworkNames.Base,
MaticZK = NetworkNames.MaticZK,
}

// eslint-disable-next-line no-shadow
Expand Down

1 comment on commit f5b124d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.