import { Interface } from '@ethersproject/abi'; import { AdapterExchangeParam, Address, DexExchangeParam, ExchangePrices, ExchangeTxInfo, GetDexParamOptions, Logger, NumberAsString, PoolLiquidity, PoolPrices, PreprocessTransactionOptions, SimpleExchangeParam, Token, TxInfo } from '../../types'; import { Network, SwapSide } from '../../constants'; import { IDex } from '../idex'; import { IDexHelper } from '../../dex-helper'; import { DexParams, OutputResult, PoolState, UniswapV3Data, UniswapV3Param, UniswapV3ParamsDirect } from './types'; import { SimpleExchange } from '../simple-exchange'; import { UniswapV3EventPool } from './uniswap-v3-pool'; import { DeepReadonly } from 'ts-essentials'; import { Contract } from 'web3-eth-contract'; import { OptimalSwapExchange } from '@paraswap/core'; import { OnPoolCreatedCallback, UniswapV3Factory } from './uniswap-v3-factory'; export declare const PoolsRegistryHashKey = "dl_poolsRegistry"; export declare const UNISWAPV3_CLEAN_NOT_EXISTING_POOL_TTL_MS: number; export declare const UNISWAPV3_CLEAN_NOT_EXISTING_POOL_INTERVAL_MS: number; export declare const UNISWAPV3_QUOTE_GASLIMIT = 200000; export declare class UniswapV3 extends SimpleExchange implements IDex { protected network: Network; protected dexHelper: IDexHelper; protected adapters: import("../../types").AdapterMappings; readonly quoterIface: Interface; protected config: DexParams; protected poolsToPreload: { token0: Address; token1: Address; }[]; protected subgraphType: 'subgraphs' | 'deployments' | undefined; protected readonly factory: UniswapV3Factory; readonly routerIface: Interface; readonly isFeeOnTransferSupported: boolean; readonly eventPools: Partial>; private poolInitPromises; protected totalPoolsCount: number; protected nonNullPoolsCount: number; readonly hasConstantPriceLargeAmounts = false; readonly needWrapNative = true; readonly directSwapIface: Interface; intervalTask?: NodeJS.Timeout; static dexKeysWithNetwork: { key: string; networks: Network[]; }[]; logger: Logger; protected stateMultiContract: Contract; protected notExistingPoolSetKey: string; constructor(network: Network, dexKey: string, dexHelper: IDexHelper, adapters?: import("../../types").AdapterMappings, quoterIface?: Interface, config?: DexParams, poolsToPreload?: { token0: Address; token1: Address; }[], subgraphType?: 'subgraphs' | 'deployments' | undefined); get supportedFees(): bigint[]; getAdapters(side: SwapSide): { name: string; index: number; }[] | null; getPoolIdentifier(srcAddress: Address, destAddress: Address, fee: bigint, tickSpacing?: bigint): string; initializePricing(blockNumber: number): Promise; protected onPoolCreatedDeleteFromNonExistingSet(): OnPoolCreatedCallback; getPool(srcAddress: Address, destAddress: Address, fee: bigint, blockNumber: number, tickSpacing?: bigint): Promise; private _initPool; protected getPoolInstance(token0: string, token1: string, fee: bigint, tickSpacing?: bigint): UniswapV3EventPool; protected getFactoryInstance(): UniswapV3Factory; addMasterPool(poolKey: string, blockNumber: number): Promise; getPoolIdentifiers(srcToken: Token, destToken: Token, side: SwapSide, blockNumber: number): Promise; protected getPoolsForIdentifiers(srcAddress: string, destAddress: string, blockNumber: number): Promise<(UniswapV3EventPool | null)[]>; getPricingFromRpc(from: Token, to: Token, amounts: bigint[], side: SwapSide, pools: UniswapV3EventPool[], blockNumber?: number): Promise | null>; protected getSelectedPools(srcAddress: string, destAddress: string, blockNumber: number): Promise<(UniswapV3EventPool | null)[]>; getPricesVolume(srcToken: Token, destToken: Token, amounts: bigint[], side: SwapSide, blockNumber: number, limitPools?: string[]): Promise>; protected prepareData(srcAddress: string, destAddress: string, pool: UniswapV3EventPool, state: PoolState): UniswapV3Data; getCalldataGasCost(poolPrices: PoolPrices): number | number[]; preProcessTransaction(optimalSwapExchange: OptimalSwapExchange, srcToken: Token, _0: Token, _1: SwapSide, options: PreprocessTransactionOptions): Promise<[OptimalSwapExchange, ExchangeTxInfo]>; getDirectParam(srcToken: Address, destToken: Address, srcAmount: NumberAsString, destAmount: NumberAsString, expectedAmount: NumberAsString, data: UniswapV3Data, side: SwapSide, permit: string, uuid: string, feePercent: NumberAsString, deadline: NumberAsString, partner: string, beneficiary: string, contractMethod: string): TxInfo; static getDirectFunctionName(): string[]; getDirectParamV6(srcToken: Address, destToken: Address, fromAmount: NumberAsString, toAmount: NumberAsString, quotedAmount: NumberAsString, data: UniswapV3Data, side: SwapSide, permit: string, uuid: string, partnerAndFee: string, beneficiary: string, blockNumber: number, contractMethod: string): { params: UniswapV3ParamsDirect; encoder: (...params: (string | UniswapV3ParamsDirect)[]) => string; networkFee: string; }; static getDirectFunctionNameV6(): string[]; getAdapterParam(srcToken: string, destToken: string, srcAmount: string, destAmount: string, data: UniswapV3Data, side: SwapSide): AdapterExchangeParam; getDexParam(srcToken: Address, destToken: Address, srcAmount: NumberAsString, destAmount: NumberAsString, recipient: Address, data: UniswapV3Data, side: SwapSide, _executorAddress?: Address, options?: GetDexParamOptions): DexExchangeParam; getSimpleParam(srcToken: string, destToken: string, srcAmount: string, destAmount: string, data: UniswapV3Data, side: SwapSide): Promise; getTopPoolsForToken(tokenAddress: Address, limit: number): Promise; protected _getPoolBalances(pools: [pool: string, token0: string, token1: string][]): Promise<[balanceToken0: bigint | null, balanceToken1: bigint | null][]>; protected _getLoweredAddresses(srcToken: Token, destToken: Token): string[]; protected _sortTokens(srcAddress: Address, destAddress: Address): string[]; private _toLowerForAllConfigAddresses; protected _getOutputs(state: DeepReadonly, amounts: bigint[], zeroForOne: boolean, side: SwapSide, destTokenBalance: bigint): OutputResult | null; protected _querySubgraph(query: string, variables: Object, timeout?: number): Promise; protected _encodePath(path: { tokenIn: Address; tokenOut: Address; fee: NumberAsString; }[], side: SwapSide): string; private _encodePathV6; private _encodePool; releaseResources(): void; }