Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(subgraph): include VIRTUAL/GAME pool in V2 Base subgraph #768

Merged
merged 4 commits into from
Nov 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading