Skip to content

Commit

Permalink
Merge pull request #1913 from DefiLlama/debug
Browse files Browse the repository at this point in the history
Debug
  • Loading branch information
waynebruce0x committed Sep 15, 2024
2 parents 1db2f7e + 6c4e75d commit 53f4a2e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 deletions.
8 changes: 2 additions & 6 deletions dexs/sushiswap/v3.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as sdk from "@defillama/sdk";
import { Chain } from "@defillama/sdk/build/general";
import { CHAIN } from "../../helpers/chains";
import { getGraphDimensions } from "../../helpers/getUniSubgraph";
import { getGraphDimensions2 } from "../../helpers/getUniSubgraph";

const endpointsV3 = {
// [CHAIN.ARBITRUM_NOVA]: 'https://subgraphs.sushi.com/subgraphs/name/sushi-v3/v3-arbitrum-nova',
Expand All @@ -23,16 +23,12 @@ const endpointsV3 = {
[CHAIN.BLAST]: "https://api.goldsky.com/api/public/project_clslspm3c0knv01wvgfb2fqyq/subgraphs/sushiswap/v3-blast/gn",
}

const v3Graphs = getGraphDimensions({
const v3Graphs = getGraphDimensions2({
graphUrls: endpointsV3,
totalVolume: {
factory: "factories",
field: "totalVolumeUSD",
},
dailyVolume: {
factory: "uniswapDayData",
field: "volumeUSD",
},
feesPercent: {
type: "fees",
ProtocolRevenue: 0,
Expand Down
18 changes: 4 additions & 14 deletions dexs/traderjoe/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as sdk from "@defillama/sdk";
import { Chain } from "@defillama/sdk/build/general";
import { BreakdownAdapter, FetchOptions, FetchResultVolume } from "../../adapters/types";
import { CHAIN } from "../../helpers/chains";
import { getChainVolume, getUniqStartOfTodayTimestamp } from "../../helpers/getUniSubgraphVolume";
import { getChainVolume2, getUniqStartOfTodayTimestamp } from "../../helpers/getUniSubgraphVolume";
import { httpGet } from "../../utils/fetchURL";

const endpoints = {
Expand Down Expand Up @@ -47,35 +47,25 @@ const mapChain = (chain: Chain): string => {
return chain
}

const graphsV1 = getChainVolume({
const graphsV1 = getChainVolume2({
graphUrls: endpoints,
totalVolume: {
factory: "factories",
field: "volumeUSD",
},
dailyVolume: {
factory: "dayData",
field: "volumeUSD",
dateField: "date"
},
});


const graphsV2 = getChainVolume({
const graphsV2 = getChainVolume2({
graphUrls: endpointsV2,
totalVolume: {
factory: "lbfactories",
field: "volumeUSD",
},
dailyVolume: {
factory: "traderJoeDayData",
field: "volumeUSD",
dateField: "date"
},
});

const adapter: BreakdownAdapter = {
version: 1,
version: 2,
breakdown: {
v1: {
[CHAIN.AVAX]: {
Expand Down

0 comments on commit 53f4a2e

Please sign in to comment.