Skip to content

Commit

Permalink
using getChainVolumeWithGasToken
Browse files Browse the repository at this point in the history
  • Loading branch information
ftm1337 authored Nov 1, 2023
1 parent 4381473 commit cba4825
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 10 deletions.
4 changes: 2 additions & 2 deletions dexs/knightswap-finance/index.ts
Original file line number Diff line number Diff line change
@@ -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");

Expand All @@ -22,7 +22,7 @@ const v1Graph = getChainVolume({
},
});

const v2Graph = getChainVolume({
const v2Graph = getChainVolumeWithGasToken({
graphUrls: endpoints,
totalVolume: {
factory: "pancakeFactories",
Expand Down
1 change: 1 addition & 0 deletions dexs/morpheus-swap/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const adapters = univ2Adapter({
}, {
factoriesName: "pancakeFactories",
dayData: "pancakeDayData",
gasToken: "coingecko:fantom"
});

adapters.adapter.fantom.start = async () => 1636106400;
Expand Down
1 change: 1 addition & 0 deletions dexs/protofi/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ export default univ2Adapter({
}, {
factoriesName: "pancakeFactories",
dayData: "pancakeDayData",
gasToken : "coingecko:fantom"
});
13 changes: 7 additions & 6 deletions dexs/soulswap/index.ts
Original file line number Diff line number Diff line change
@@ -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: {
Expand All @@ -24,6 +24,7 @@ const graphs = getChainVolume({
factory: "dayData",
field: VOLUME_FIELD,
},
priceToken: "coingecko:fantom"
});

const startTimeQuery = {
Expand All @@ -47,4 +48,4 @@ const adapter: SimpleAdapter = {
adapter: volume,
};

export default adapter;
export default adapter;
2 changes: 1 addition & 1 deletion dexs/spartacus-exchange/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions dexs/wingswap/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const endpoints = {
const adapter = univ2Adapter(endpoints, {
factoriesName: "wingSwapFactories",
dayData: "wingSwapDayData",
gasToken: "coingecko:fantom"
});

adapter.adapter.fantom.start = async () => 1637452800;
Expand Down
3 changes: 2 additions & 1 deletion dexs/yoshi-exchange/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ export default univ2Adapter(endpoints, {
factoriesName: "factories",
dayData: "dayData",
dailyVolume: "volumeUSD",
totalVolume: "volumeUSD"
totalVolume: "volumeUSD",
gasToken: "coingecko:fantom"
});

0 comments on commit cba4825

Please sign in to comment.