From 39cd34c7727a63f965334aa884915e681da4873b Mon Sep 17 00:00:00 2001 From: LpcAries <291482574@qq.com> Date: Fri, 14 Jul 2023 15:12:42 +0800 Subject: [PATCH 1/2] add zksync config on iziswap dex adapter --- dexs/iziswap/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dexs/iziswap/index.ts b/dexs/iziswap/index.ts index e53c89e8cb..a2a9cf1f91 100644 --- a/dexs/iziswap/index.ts +++ b/dexs/iziswap/index.ts @@ -6,7 +6,7 @@ import customBackfill from "../../helpers/customBackfill"; import { getUniqStartOfTodayTimestamp } from "../../helpers/getUniSubgraphVolume"; -const historicalVolumeEndpoint = (chain_id: number) => `https://izumi.finance/api/v1/izi_swap/summary_record/?chain_id=${chain_id}&type=4&page_size=100000` +const historicalVolumeEndpoint = (chain_id: number) => `https://api.izumi.finance/api/v1/izi_swap/summary_record/?chain_id=${chain_id}&type=4&page_size=100000` interface IVolumeall { volDay: number; @@ -19,6 +19,7 @@ type TChains = { const chains: TChains = { [CHAIN.BSC]: 56, + [CHAIN.ZKSYNC]: 324, }; const fetch = (chain: Chain) => { @@ -54,6 +55,11 @@ const adapter: SimpleAdapter = { start: () => getStartTimestamp(chains[CHAIN.BSC]), customBackfill: customBackfill(CHAIN.BSC as Chain, fetch) }, + [CHAIN.ZKSYNC]: { + fetch: fetch(CHAIN.ZKSYNC), + start: () => getStartTimestamp(chains[CHAIN.ZKSYNC]), + customBackfill: customBackfill(CHAIN.ZKSYNC as Chain, fetch) + }, }, }; From 124d2db4d711a8f7696e8154011ac7a7dfc433cc Mon Sep 17 00:00:00 2001 From: LpcAries <291482574@qq.com> Date: Fri, 14 Jul 2023 20:10:38 +0800 Subject: [PATCH 2/2] change zksync to era --- dexs/iziswap/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dexs/iziswap/index.ts b/dexs/iziswap/index.ts index a2a9cf1f91..3afef1ed6c 100644 --- a/dexs/iziswap/index.ts +++ b/dexs/iziswap/index.ts @@ -19,7 +19,7 @@ type TChains = { const chains: TChains = { [CHAIN.BSC]: 56, - [CHAIN.ZKSYNC]: 324, + [CHAIN.ERA]: 324, }; const fetch = (chain: Chain) => { @@ -55,10 +55,10 @@ const adapter: SimpleAdapter = { start: () => getStartTimestamp(chains[CHAIN.BSC]), customBackfill: customBackfill(CHAIN.BSC as Chain, fetch) }, - [CHAIN.ZKSYNC]: { - fetch: fetch(CHAIN.ZKSYNC), - start: () => getStartTimestamp(chains[CHAIN.ZKSYNC]), - customBackfill: customBackfill(CHAIN.ZKSYNC as Chain, fetch) + [CHAIN.ERA]: { + fetch: fetch(CHAIN.ERA), + start: () => getStartTimestamp(chains[CHAIN.ERA]), + customBackfill: customBackfill(CHAIN.ERA as Chain, fetch) }, }, };