Skip to content

Commit

Permalink
pass down block number to v3 static subgraph provider (Uniswap#248)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsy1218 authored Jun 9, 2023
1 parent cd63ca9 commit 73110e1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/providers/v3/static-subgraph-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ import {

import { IV3PoolProvider } from './pool-provider';
import { IV3SubgraphProvider, V3SubgraphPool } from './subgraph-provider';
import { ProviderConfig } from '../provider';

type ChainTokenList = {
readonly [chainId in ChainId]: Token[];
Expand Down Expand Up @@ -219,7 +220,8 @@ export class StaticV3SubgraphProvider implements IV3SubgraphProvider {

public async getPools(
tokenIn?: Token,
tokenOut?: Token
tokenOut?: Token,
providerConfig?: ProviderConfig
): Promise<V3SubgraphPool[]> {
log.info('In static subgraph provider for V3');
const bases = BASES_TO_CHECK_TRADES_AGAINST[this.chainId];
Expand Down Expand Up @@ -258,7 +260,7 @@ export class StaticV3SubgraphProvider implements IV3SubgraphProvider {
log.info(
`V3 Static subgraph provider about to get ${pairs.length} pools on-chain`
);
const poolAccessor = await this.poolProvider.getPools(pairs);
const poolAccessor = await this.poolProvider.getPools(pairs, providerConfig);
const pools = poolAccessor.getAllPools();

const poolAddressSet = new Set<string>();
Expand Down

0 comments on commit 73110e1

Please sign in to comment.