import { AbiParametersToPrimitiveTypes, ExtractAbiFunction } from "abitype"; import { Address, PublicClient } from "viem"; import { EphemeralPoolPositions__factory } from "../../typechain"; import { AutomatedMarketMakerEnum } from "./amm"; export type PoolKeyStruct = { currency0: `0x${string}`; currency1: `0x${string}`; fee: number; tickSpacing: number; hooks: `0x${string}`; }; export type PoolKeyStructPCSV4 = Omit & { parameters: `0x${string}`; poolManager: Address; }; /** * Fetches the liquidity within the tick range for the specified pool by deploying an ephemeral contract via `eth_call`. * Each tick consumes about 100k gas, so this method may fail if the number of ticks exceeds 3k assuming the provider * gas limit is 300m. * @param pool The liquidity pool to fetch the tick to liquidity map for. * @param tickLower The lower tick to fetch liquidity for. * @param tickUpper The upper tick to fetch liquidity for. * @param publicClient Viem public client. * @param blockNumber Optional block number to query. */ export declare function getPopulatedTicksInRange(amm: AutomatedMarketMakerEnum, pool: Address, tickLower: number, tickUpper: number, publicClient: PublicClient, blockNumber?: bigint): Promise; /** * Fetches the liquidity within the tick range for the specified pool by deploying an ephemeral contract via `eth_call`. * Each tick consumes about 100k gas, so this method may fail if the number of ticks exceeds 3k assuming the provider * gas limit is 300m. * @param poolManagerAddress The liquidity pool to fetch the tick to liquidity map for. * @param tickLower The lower tick to fetch liquidity for. * @param tickUpper The upper tick to fetch liquidity for. * @param publicClient Viem public client. * @param blockNumber Optional block number to query. */ export declare function getPopulatedTicksInRangeV4(poolManagerAddress: Address, poolKey: PoolKeyStruct, tickLower: number, tickUpper: number, publicClient: PublicClient, blockNumber?: bigint): Promise; /** * Fetches the liquidity within the tick range for the specified pool by deploying an ephemeral contract via `eth_call`. * Each tick consumes about 100k gas, so this method may fail if the number of ticks exceeds 3k assuming the provider * gas limit is 300m. * @param poolManagerAddress The liquidity pool to fetch the tick to liquidity map for. * @param tickLower The lower tick to fetch liquidity for. * @param tickUpper The upper tick to fetch liquidity for. * @param publicClient Viem public client. * @param blockNumber Optional block number to query. */ export declare function getPopulatedTicksInRangePCSV4(poolManagerAddress: Address, poolKey: PoolKeyStructPCSV4, tickLower: number, tickUpper: number, publicClient: PublicClient, blockNumber?: bigint): Promise; export declare function getStaticSlots(amm: AutomatedMarketMakerEnum, pool: Address, publicClient: PublicClient, blockNumber?: bigint): Promise; export declare function getTicksSlots(amm: AutomatedMarketMakerEnum, pool: Address, tickLower: number, tickUpper: number, publicClient: PublicClient, blockNumber?: bigint): Promise; export declare function getTickBitmapSlots(amm: AutomatedMarketMakerEnum, pool: Address, publicClient: PublicClient, blockNumber?: bigint): Promise; export type PositionKey = AbiParametersToPrimitiveTypes["inputs"], "inputs">[2][0]; export declare function getPositionsSlots(amm: AutomatedMarketMakerEnum, pool: Address, keys: PositionKey[], publicClient: PublicClient, blockNumber?: bigint): Promise;