import { BigNumber } from "@ethersproject/bignumber"; import { Options as RetryOptions } from "async-retry"; import { ChainId, Currency } from "@onyxcoindev/sdk-core-test"; import { Pool as V3Pool } from "@onyxcoindev/pool-sdk-test"; import { IMulticallProvider, Result } from "./multicall-provider"; import { ProviderConfig } from "./provider"; export type PoolConstruct = [ TCurrency, TCurrency, ...Array ]; export type Pool = V3Pool; export type ISlot0 = { sqrtPriceX96: BigNumber; tick: number; unlocked: boolean; }; export type ILiquidity = { liquidity: BigNumber; }; export declare abstract class PoolProvider, TISlot0 extends ISlot0, TILiquidity extends ILiquidity, TPoolAccessor> { protected chainId: ChainId; protected multicall2Provider: IMulticallProvider; protected retryOptions: RetryOptions; /** * Creates an instance of V4PoolProvider. * @param chainId The chain id to use. * @param multicall2Provider The multicall provider to use to get the pools. * @param retryOptions The retry options for each call to the multicall. */ constructor(chainId: ChainId, multicall2Provider: IMulticallProvider, retryOptions?: RetryOptions); protected getPoolsInternal(poolConstructs: TPoolConstruct[], providerConfig?: ProviderConfig): Promise; protected abstract getLiquidityFunctionName(): string; protected abstract getSlot0FunctionName(): string; protected abstract getPoolsData(poolAddresses: string[], functionName: string, providerConfig?: ProviderConfig): Promise[]>; protected abstract getPoolIdentifier(pool: TPoolConstruct): { poolAddress: string; token0: TCurrency; token1: TCurrency; }; protected abstract instantiatePool(pool: TPoolConstruct, slot0: TISlot0, liquidity: TILiquidity): V3Pool; protected abstract instantiatePoolAccessor(poolIdentifierToPool: { [poolId: string]: V3Pool; }): TPoolAccessor; }