Skip to content

Commit

Permalink
fix(subgraph): include VIRTUAL/GAME pool in V2 Base subgraph (#768)
Browse files Browse the repository at this point in the history
* fix(subgraph): include VIRTUAL tokens in V2 subgraph

* add chainId base check

* space

* only allow VIRTUAL/GAME for now
  • Loading branch information
xrsv authored Nov 30, 2024
1 parent 7bd2ff2 commit b701bb5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/providers/v2/subgraph-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,10 +247,14 @@ export class V2SubgraphProvider implements IV2SubgraphProvider {
// TODO: Remove. Temporary fix to ensure tokens without trackedReserveETH are in the list.
const FEI = '0x956f47f50a910163d8bf957cf5846d573e7f87ca';

// TODO: Remove. Temporary fix to allow VIRTUAL/GAME V2 pool to be included in the list.
const VIRTUAL_GAME_3PCT_BASE = '0xD418dfE7670c21F682E041F34250c114DB5D7789'.toLowerCase();

const tracked = pools.filter(
(pool) =>
pool.token0.id == FEI ||
pool.token1.id == FEI ||
(this.chainId === ChainId.BASE && pool.id.toLowerCase() === VIRTUAL_GAME_3PCT_BASE) ||
parseFloat(pool.trackedReserveETH) > this.trackedEthThreshold
);

Expand All @@ -269,6 +273,7 @@ export class V2SubgraphProvider implements IV2SubgraphProvider {
return (
pool.token0.id == FEI ||
pool.token1.id == FEI ||
(this.chainId === ChainId.BASE && pool.id.toLowerCase() === VIRTUAL_GAME_3PCT_BASE) ||
parseFloat(pool.trackedReserveETH) > this.trackedEthThreshold ||
parseFloat(pool.reserveUSD) > this.untrackedUsdThreshold
);
Expand Down

0 comments on commit b701bb5

Please sign in to comment.