From cba4825aebea0adef31a9ff6000b274fac4fb073 Mon Sep 17 00:00:00 2001 From: ftm1337 <84405345+ftm1337@users.noreply.github.com> Date: Wed, 1 Nov 2023 04:14:33 +0000 Subject: [PATCH] using getChainVolumeWithGasToken --- dexs/knightswap-finance/index.ts | 4 ++-- dexs/morpheus-swap/index.ts | 1 + dexs/protofi/index.ts | 1 + dexs/soulswap/index.ts | 13 +++++++------ dexs/spartacus-exchange/index.ts | 2 +- dexs/wingswap/index.ts | 1 + dexs/yoshi-exchange/index.ts | 3 ++- 7 files changed, 15 insertions(+), 10 deletions(-) diff --git a/dexs/knightswap-finance/index.ts b/dexs/knightswap-finance/index.ts index 6e24fd2017..3e66f08fd7 100644 --- a/dexs/knightswap-finance/index.ts +++ b/dexs/knightswap-finance/index.ts @@ -1,7 +1,7 @@ import { SimpleAdapter } from "../../adapters/types"; import { CHAIN } from "../../helpers/chains"; const { - getChainVolume, + getChainVolume,getChainVolumeWithGasToken } = require("../../helpers/getUniSubgraphVolume"); const { getStartTimestamp } = require("../../helpers/getStartTimestamp"); @@ -22,7 +22,7 @@ const v1Graph = getChainVolume({ }, }); -const v2Graph = getChainVolume({ +const v2Graph = getChainVolumeWithGasToken({ graphUrls: endpoints, totalVolume: { factory: "pancakeFactories", diff --git a/dexs/morpheus-swap/index.ts b/dexs/morpheus-swap/index.ts index f53d6b56ed..11f29c08fc 100644 --- a/dexs/morpheus-swap/index.ts +++ b/dexs/morpheus-swap/index.ts @@ -6,6 +6,7 @@ const adapters = univ2Adapter({ }, { factoriesName: "pancakeFactories", dayData: "pancakeDayData", + gasToken: "coingecko:fantom" }); adapters.adapter.fantom.start = async () => 1636106400; diff --git a/dexs/protofi/index.ts b/dexs/protofi/index.ts index cc9cceea60..010e856593 100644 --- a/dexs/protofi/index.ts +++ b/dexs/protofi/index.ts @@ -6,4 +6,5 @@ export default univ2Adapter({ }, { factoriesName: "pancakeFactories", dayData: "pancakeDayData", + gasToken : "coingecko:fantom" }); diff --git a/dexs/soulswap/index.ts b/dexs/soulswap/index.ts index e3e64150eb..fe4a658be1 100644 --- a/dexs/soulswap/index.ts +++ b/dexs/soulswap/index.ts @@ -1,19 +1,19 @@ -import { getChainVolume } from "../../helpers/getUniSubgraphVolume"; +import { getChainVolumeWithGasToken } from "../../helpers/getUniSubgraphVolume"; import { getStartTimestamp } from "../../helpers/getStartTimestamp"; -import { FANTOM } from "../../helpers/chains"; +import { /*AVAX,*/ FANTOM } from "../../helpers/chains"; import { SimpleAdapter } from "../../adapters/types"; import { Chain } from "@defillama/sdk/build/general"; const endpoints = { -// [AVAX]: "https://api.thegraph.com/subgraphs/name/soulswapfinance/avalanche-exchange + //[AVAX]: "https://api.thegraph.com/subgraphs/name/soulswapfinance/avalanche-exchange", [FANTOM]: "https://api.thegraph.com/subgraphs/name/soulswapfinance/fantom-exchange", }; const VOLUME_FIELD = "volumeUSD"; -const graphs = getChainVolume({ +const graphs = getChainVolumeWithGasToken({ graphUrls: { - // [AVAX]: endpoints[AVAX], + //[AVAX]: endpoints[AVAX], [FANTOM]: endpoints[FANTOM] }, totalVolume: { @@ -24,6 +24,7 @@ const graphs = getChainVolume({ factory: "dayData", field: VOLUME_FIELD, }, + priceToken: "coingecko:fantom" }); const startTimeQuery = { @@ -47,4 +48,4 @@ const adapter: SimpleAdapter = { adapter: volume, }; -export default adapter; +export default adapter; \ No newline at end of file diff --git a/dexs/spartacus-exchange/index.ts b/dexs/spartacus-exchange/index.ts index bdfe08cfbd..5a7aef98d7 100644 --- a/dexs/spartacus-exchange/index.ts +++ b/dexs/spartacus-exchange/index.ts @@ -4,7 +4,7 @@ import { univ2Adapter } from "../../helpers/getUniSubgraphVolume"; const endpoints = { [CHAIN.FANTOM]: "https://api.thegraph.com/subgraphs/name/spartacus-finance/spadexinfo", }; -const adapter = univ2Adapter(endpoints, {}); +const adapter = univ2Adapter(endpoints, {"gasToken" : "coingecko:fantom"}); adapter.adapter.fantom.start = async () => 1650883041; export default adapter diff --git a/dexs/wingswap/index.ts b/dexs/wingswap/index.ts index 2b394c4eca..55a593206f 100644 --- a/dexs/wingswap/index.ts +++ b/dexs/wingswap/index.ts @@ -8,6 +8,7 @@ const endpoints = { const adapter = univ2Adapter(endpoints, { factoriesName: "wingSwapFactories", dayData: "wingSwapDayData", + gasToken: "coingecko:fantom" }); adapter.adapter.fantom.start = async () => 1637452800; diff --git a/dexs/yoshi-exchange/index.ts b/dexs/yoshi-exchange/index.ts index bf3c544d1a..b3321375c7 100644 --- a/dexs/yoshi-exchange/index.ts +++ b/dexs/yoshi-exchange/index.ts @@ -11,5 +11,6 @@ export default univ2Adapter(endpoints, { factoriesName: "factories", dayData: "dayData", dailyVolume: "volumeUSD", - totalVolume: "volumeUSD" + totalVolume: "volumeUSD", + gasToken: "coingecko:fantom" });