Skip to content

Commit

Permalink
add warpgate
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmkeng committed Mar 22, 2024
1 parent 1369962 commit 491c775
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
31 changes: 31 additions & 0 deletions dexs/warpgate/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { SimpleAdapter } from "../../adapters/types";
import { getChainVolume } from "../../helpers/getUniSubgraphVolume";
import { CHAIN } from "../../helpers/chains";

const endpoints = {
[CHAIN.IMX]: "https://subgraph.warpgate.pro/subgraphs/name/warpgate/subgraph-v3",
};

const graphs = getChainVolume({
graphUrls: endpoints,
totalVolume: {
factory: "factories",
field: "totalVolumeUSD",
},
dailyVolume: {
factory: "uniswapDayData",
field: "volumeUSD",
},
});

const adapter: SimpleAdapter = {
version: 2,
adapter: {
[CHAIN.IMX]: {
fetch: graphs(CHAIN.IMX),
start: 1708041600
},
},
};

export default adapter;
3 changes: 2 additions & 1 deletion helpers/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ export enum CHAIN {
ZETA = "zeta",
ASTAR_ZKEVM = "astrzk",
FILECOIN = "filecoin",
FRAXTAL = "fraxtal"
FRAXTAL = "fraxtal",
IMX = "imx",
}

// Don´t use
Expand Down

0 comments on commit 491c775

Please sign in to comment.