Skip to content

Commit

Permalink
DackieSwap on X Layer volume
Browse files Browse the repository at this point in the history
  • Loading branch information
andreapn committed May 12, 2024
1 parent 95d5dd1 commit 475948f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dexs/dackieswap-v2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const endpoints: ChainEndpoints = {
[CHAIN.ARBITRUM]: "https://api.studio.thegraph.com/query/50473/v2-arbitrum/version/latest",
[CHAIN.BLAST]: "https://api.studio.thegraph.com/query/50473/v2-blast/version/latest",
[CHAIN.MODE]: "https://graph.dackieswap.xyz/mode/subgraphs/name/v2-mode",
[CHAIN.XLAYER]: "https://graph.dackieswap.xyz/xlayer/subgraphs/name/v2-xlayer",
};

// Fetch function to query the subgraphs
Expand Down Expand Up @@ -55,7 +56,8 @@ const adapter: SimpleAdapter = {
: chain === CHAIN.ARBITRUM ? 1707885300
: chain === CHAIN.BLAST ? 1709722800
: chain === CHAIN.MODE ? 1712371653
: 0,
: chain === CHAIN.XLAYER ? 1712369493
: 0,
customBackfill: customBackfill(chain, graphs),
meta: {methodology},
}
Expand Down
7 changes: 7 additions & 0 deletions dexs/dackieswap/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const v3Endpoint = {
"https://api.studio.thegraph.com/query/50473/v3-blast/version/latest",
[CHAIN.MODE]:
"https://graph.dackieswap.xyz/mode/subgraphs/name/v3-mode",
[CHAIN.XLAYER]:
"https://graph.dackieswap.xyz/xlayer/subgraphs/name/v3-xlayer",
};

const VOLUME_USD = "volumeUSD";
Expand Down Expand Up @@ -42,6 +44,7 @@ const v3StartTimes = {
[CHAIN.ARBITRUM]: 1707885300,
[CHAIN.BLAST]: 1709722800,
[CHAIN.MODE]: 1712371653,
[CHAIN.XLAYER]: 1712369493,
} as IJSON<number>;

const adapter: SimpleAdapter = {
Expand All @@ -66,6 +69,10 @@ const adapter: SimpleAdapter = {
fetch: v3Graph(CHAIN.MODE),
start: async () => v3StartTimes[CHAIN.MODE]
},
[CHAIN.XLAYER]: {
fetch: v3Graph(CHAIN.XLAYER),
start: async () => v3StartTimes[CHAIN.XLAYER]
},
},
version: 2
};
Expand Down

0 comments on commit 475948f

Please sign in to comment.