Skip to content

Commit

Permalink
add blacklist token uniswap v2
Browse files Browse the repository at this point in the history
  • Loading branch information
dtmkeng committed Oct 12, 2023
1 parent f3b6cb5 commit 0b9c95c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion helpers/getUniSubgraph/index.ts
Expand Up @@ -168,7 +168,7 @@ function getGraphDimensions({

const dailyVolumePairsQuery = blacklistTokens[chain] ? gql`
query daily_volume_byPair ($timestamp_gt: Int, $timestamp_lte: Int) {
pairDayDatas(where:{${graphFieldsDailyVolume.dateField}_gt: $timestamp_gt, ${graphFieldsDailyVolume.dateField}_lte: $timestamp_lte}){
pairDayDatas(where:{${graphFieldsDailyVolume.dateField}_gt: $timestamp_gt, ${graphFieldsDailyVolume.dateField}_lte: $timestamp_lte, ${graphFieldsDailyVolume.field}_not: 0}, orderBy: ${graphFieldsDailyVolume.field}, orderDirection: desc, first: 1000){
date
token0{
symbol
Expand Down
11 changes: 10 additions & 1 deletion protocols/uniswap/index.ts
Expand Up @@ -18,6 +18,14 @@ const v2Endpoints = {
[CHAIN.ETHEREUM]: "https://api.thegraph.com/subgraphs/name/ianlapham/uniswap-v2-dev",
};

const blacklisted = {
[CHAIN.ETHEREUM]: [
'0x637f415687b7b2545ef2cd8dcc1614e1cc175850',
'0xb94acdf8662cd955f137e0c9c9fba535c87b57b4',
'0xb504035a11e672e12a099f32b1672b9c4a78b22f'
]
}

const v3Endpoints = {
[CHAIN.ETHEREUM]: "https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v3",
[CHAIN.OPTIMISM]: "https://api.thegraph.com/subgraphs/name/ianlapham/optimism-post-regenesis?source=uniswap",
Expand Down Expand Up @@ -67,7 +75,8 @@ const v2Graph = getGraphDimensions({
HoldersRevenue: 0,
Revenue: 0,
Fees: 0.3
}
},
blacklistTokens: blacklisted
});

const v3Graphs = getGraphDimensions({
Expand Down

0 comments on commit 0b9c95c

Please sign in to comment.