Skip to content

Commit

Permalink
Merge pull request #619 from izumiFinance/master
Browse files Browse the repository at this point in the history
[izumi] add zksync config on iziswap dex adapter
  • Loading branch information
dtmkeng committed Jul 14, 2023
2 parents 1572e64 + 124d2db commit 8d007eb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dexs/iziswap/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -19,6 +19,7 @@ type TChains = {

const chains: TChains = {
[CHAIN.BSC]: 56,
[CHAIN.ERA]: 324,
};

const fetch = (chain: Chain) => {
Expand Down Expand Up @@ -54,6 +55,11 @@ const adapter: SimpleAdapter = {
start: () => getStartTimestamp(chains[CHAIN.BSC]),
customBackfill: customBackfill(CHAIN.BSC as Chain, fetch)
},
[CHAIN.ERA]: {
fetch: fetch(CHAIN.ERA),
start: () => getStartTimestamp(chains[CHAIN.ERA]),
customBackfill: customBackfill(CHAIN.ERA as Chain, fetch)
},
},
};

Expand Down

0 comments on commit 8d007eb

Please sign in to comment.