Skip to content

Commit

Permalink
Merge pull request DefiLlama#1394 from DackieSwap/master
Browse files Browse the repository at this point in the history
DackieSwap on Mode
  • Loading branch information
dtmkeng authored Apr 7, 2024
2 parents 5814d33 + 545279c commit be63b1a
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 @@ -10,6 +10,7 @@ const endpoints: ChainEndpoints = {
[CHAIN.OPTIMISM]: "https://api.studio.thegraph.com/query/50473/v2-optimism/version/latest",
[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",
};

// Fetch function to query the subgraphs
Expand Down Expand Up @@ -53,7 +54,8 @@ const adapter: SimpleAdapter = {
: chain === CHAIN.OPTIMISM ? 1705993200
: chain === CHAIN.ARBITRUM ? 1707885300
: chain === CHAIN.BLAST ? 1709722800
: 0,
: chain === CHAIN.MODE ? 1712371653
: 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 @@ -12,6 +12,8 @@ const v3Endpoint = {
"https://api.studio.thegraph.com/query/50473/v3-arbitrum/version/latest",
[CHAIN.BLAST]:
"https://api.studio.thegraph.com/query/50473/v3-blast/version/latest",
[CHAIN.MODE]:
"https://graph.dackieswap.xyz/mode/subgraphs/name/v3-mode",
};

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

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

0 comments on commit be63b1a

Please sign in to comment.