import { Interface } from '@ethersproject/abi'; import { NumberAsString } from '@paraswap/core'; import { Address } from '../../types'; export type PoolContextConstants = { isFeeOnTransferSupported: boolean; isWrapNative: boolean; isLending: boolean; isStable?: boolean; N_COINS: number; BI_N_COINS: bigint; FEE_DENOMINATOR: bigint; PRECISION: bigint; PRECISION_MUL?: bigint[]; LENDING_PRECISION?: bigint; A_PRECISION?: bigint; USE_LENDING?: boolean[]; RATES?: bigint[]; MAX_COIN?: number; BASE_N_COINS?: number; }; export type PoolConstants = { COINS: Address[]; coins_decimals: number[]; rate_multipliers: bigint[]; lpTokenAddress?: Address; }; export type PoolState = { blockNumber: number; updatedAtMs: number; A: bigint; balances: bigint[]; fee: bigint; constants: PoolConstants; virtualPrice?: bigint; totalSupply?: bigint; exchangeRateCurrent?: (bigint | undefined)[]; offpeg_fee_multiplier?: bigint; basePoolState?: PoolState; storedRates?: bigint[]; n_coins?: number; }; export type PoolStateWithUpdateInfo = { blockNumber: number; lastUpdatedAt: number; poolState: T; }; export type CurveV1FactoryData = { path: { tokenIn: Address; tokenOut: Address; exchange: Address; i: number; j: number; underlyingSwap: boolean; n_coins: number; }[]; isApproved?: boolean; }; export declare enum FactoryImplementationNames { FACTORY_V1_META_BTC = "factory_v1_meta_btc", FACTORY_V1_META_USD = "factory_v1_meta_usd", FACTORY_META_BTC = "factory_meta_btc", FACTORY_META_BTC_BALANCES = "factory_meta_btc_balances", FACTORY_META_BTC_SBTC2 = "factory_meta_btc_sbtc2", FACTORY_META_BTC_BALANCES_SBTC2 = "factory_meta_btc_balances_sbtc2", FACTORY_META_BTC_REN = "factory_meta_btc_ren", FACTORY_META_BTC_BALANCES_REN = "factory_meta_btc_balances_ren", FACTORY_META_USD = "factory_meta_usd", FACTORY_META_USD_BALANCES = "factory_meta_usd_balances", FACTORY_META_USD_FRAX_USDC = "factory_meta_usd_frax_usdc", FACTORY_META_USD_BALANCES_FRAX_USDC = "factory_meta_usd_balances_frax_usdc", FACTORY_PLAIN_2_BALANCES = "factory_plain_2_balances", FACTORY_PLAIN_2_BASIC = "factory_plain_2_basic", FACTORY_PLAIN_2_BASIC_EMA = "factory_plain_2_basic_ema", FACTORY_PLAIN_2_ETH = "factory_plain_2_eth", FACTORY_PLAIN_2_ETH_EMA = "factory_plain_2_eth_ema", FACTORY_PLAIN_2_ETH_EMA2 = "factory_plain_2_eth_ema2", FACTORY_PLAIN_2_OPTIMIZED = "factory_plain_2_optimized", FACTORY_PLAIN_2_CRV_EMA = "factory_plain_2_crv_ema", FACTORY_PLAIN_3_BALANCES = "factory_plain_3_balances", FACTORY_PLAIN_3_BASIC = "factory_plain_3_basic", FACTORY_PLAIN_3_ETH = "factory_plain_3_eth", FACTORY_PLAIN_3_OPTIMIZED = "factory_plain_3_optimized", FACTORY_PLAIN_4_BALANCES = "factory_plain_4_balances", FACTORY_PLAIN_4_BASIC = "factory_plain_4_basic", FACTORY_PLAIN_4_ETH = "factory_plain_4_eth", FACTORY_PLAIN_4_OPTIMIZED = "factory_plain_4_optimized", FACTORY_STABLE_NG = "factory_stable_ng" } export declare enum CustomImplementationNames { CUSTOM_PLAIN_2COIN_FRAX = "custom_plain_2coin_frax", CUSTOM_PLAIN_2COIN_RENBTC = "custom_plain_2coin_renbtc", CUSTOM_PLAIN_3COIN_SBTC = "custom_plain_3coin_sbtc", CUSTOM_PLAIN_3COIN_THREE = "custom_plain_3coin_three", CUSTOM_PLAIN_2COIN_WBTC = "custom_plain_2coin_wbtc", CUSTOM_ARBITRUM_2COIN_USD = "custom_arbitrum_2coin_usd", CUSTOM_ARBITRUM_2COIN_BTC = "custom_arbitrum_2coin_btc", CUSTOM_AVALANCHE_3COIN_LENDING = "custom_avalanche_3coin_lending", CUSTOM_FANTOM_2COIN_USD = "custom_fantom_2coin_usd", CUSTOM_FANTOM_2COIN_BTC = "custom_fantom_2coin_btc", CUSTOM_FANTOM_3COIN_LENDING = "custom_fantom_3coin_lending", CUSTOM_OPTIMISM_3COIN_USD = "custom_optimism_3coin_usd", CUSTOM_POLYGON_2COIN_LENDING = "custom_polygon_2coin_lending", CUSTOM_POLYGON_3COIN_LENDING = "custom_polygon_3coin_lending" } export declare const ImplementationNames: { FACTORY_V1_META_BTC: FactoryImplementationNames.FACTORY_V1_META_BTC; FACTORY_V1_META_USD: FactoryImplementationNames.FACTORY_V1_META_USD; FACTORY_META_BTC: FactoryImplementationNames.FACTORY_META_BTC; FACTORY_META_BTC_BALANCES: FactoryImplementationNames.FACTORY_META_BTC_BALANCES; FACTORY_META_BTC_SBTC2: FactoryImplementationNames.FACTORY_META_BTC_SBTC2; FACTORY_META_BTC_BALANCES_SBTC2: FactoryImplementationNames.FACTORY_META_BTC_BALANCES_SBTC2; FACTORY_META_BTC_REN: FactoryImplementationNames.FACTORY_META_BTC_REN; FACTORY_META_BTC_BALANCES_REN: FactoryImplementationNames.FACTORY_META_BTC_BALANCES_REN; FACTORY_META_USD: FactoryImplementationNames.FACTORY_META_USD; FACTORY_META_USD_BALANCES: FactoryImplementationNames.FACTORY_META_USD_BALANCES; FACTORY_META_USD_FRAX_USDC: FactoryImplementationNames.FACTORY_META_USD_FRAX_USDC; FACTORY_META_USD_BALANCES_FRAX_USDC: FactoryImplementationNames.FACTORY_META_USD_BALANCES_FRAX_USDC; FACTORY_PLAIN_2_BALANCES: FactoryImplementationNames.FACTORY_PLAIN_2_BALANCES; FACTORY_PLAIN_2_BASIC: FactoryImplementationNames.FACTORY_PLAIN_2_BASIC; FACTORY_PLAIN_2_BASIC_EMA: FactoryImplementationNames.FACTORY_PLAIN_2_BASIC_EMA; FACTORY_PLAIN_2_ETH: FactoryImplementationNames.FACTORY_PLAIN_2_ETH; FACTORY_PLAIN_2_ETH_EMA: FactoryImplementationNames.FACTORY_PLAIN_2_ETH_EMA; FACTORY_PLAIN_2_ETH_EMA2: FactoryImplementationNames.FACTORY_PLAIN_2_ETH_EMA2; FACTORY_PLAIN_2_OPTIMIZED: FactoryImplementationNames.FACTORY_PLAIN_2_OPTIMIZED; FACTORY_PLAIN_2_CRV_EMA: FactoryImplementationNames.FACTORY_PLAIN_2_CRV_EMA; FACTORY_PLAIN_3_BALANCES: FactoryImplementationNames.FACTORY_PLAIN_3_BALANCES; FACTORY_PLAIN_3_BASIC: FactoryImplementationNames.FACTORY_PLAIN_3_BASIC; FACTORY_PLAIN_3_ETH: FactoryImplementationNames.FACTORY_PLAIN_3_ETH; FACTORY_PLAIN_3_OPTIMIZED: FactoryImplementationNames.FACTORY_PLAIN_3_OPTIMIZED; FACTORY_PLAIN_4_BALANCES: FactoryImplementationNames.FACTORY_PLAIN_4_BALANCES; FACTORY_PLAIN_4_BASIC: FactoryImplementationNames.FACTORY_PLAIN_4_BASIC; FACTORY_PLAIN_4_ETH: FactoryImplementationNames.FACTORY_PLAIN_4_ETH; FACTORY_PLAIN_4_OPTIMIZED: FactoryImplementationNames.FACTORY_PLAIN_4_OPTIMIZED; FACTORY_STABLE_NG: FactoryImplementationNames.FACTORY_STABLE_NG; CUSTOM_PLAIN_2COIN_FRAX: CustomImplementationNames.CUSTOM_PLAIN_2COIN_FRAX; CUSTOM_PLAIN_2COIN_RENBTC: CustomImplementationNames.CUSTOM_PLAIN_2COIN_RENBTC; CUSTOM_PLAIN_3COIN_SBTC: CustomImplementationNames.CUSTOM_PLAIN_3COIN_SBTC; CUSTOM_PLAIN_3COIN_THREE: CustomImplementationNames.CUSTOM_PLAIN_3COIN_THREE; CUSTOM_PLAIN_2COIN_WBTC: CustomImplementationNames.CUSTOM_PLAIN_2COIN_WBTC; CUSTOM_ARBITRUM_2COIN_USD: CustomImplementationNames.CUSTOM_ARBITRUM_2COIN_USD; CUSTOM_ARBITRUM_2COIN_BTC: CustomImplementationNames.CUSTOM_ARBITRUM_2COIN_BTC; CUSTOM_AVALANCHE_3COIN_LENDING: CustomImplementationNames.CUSTOM_AVALANCHE_3COIN_LENDING; CUSTOM_FANTOM_2COIN_USD: CustomImplementationNames.CUSTOM_FANTOM_2COIN_USD; CUSTOM_FANTOM_2COIN_BTC: CustomImplementationNames.CUSTOM_FANTOM_2COIN_BTC; CUSTOM_FANTOM_3COIN_LENDING: CustomImplementationNames.CUSTOM_FANTOM_3COIN_LENDING; CUSTOM_OPTIMISM_3COIN_USD: CustomImplementationNames.CUSTOM_OPTIMISM_3COIN_USD; CUSTOM_POLYGON_2COIN_LENDING: CustomImplementationNames.CUSTOM_POLYGON_2COIN_LENDING; CUSTOM_POLYGON_3COIN_LENDING: CustomImplementationNames.CUSTOM_POLYGON_3COIN_LENDING; }; export type ImplementationNames = CustomImplementationNames | FactoryImplementationNames; export type FactoryPoolImplementations = { name: FactoryImplementationNames; address: Address; basePoolAddress?: Address; customGasCost?: number; isStoreRateSupported?: boolean; liquidityApiSlug?: string; }; export type CustomPoolConfig = { name: CustomImplementationNames | FactoryImplementationNames; address: Address; lpTokenAddress: Address; liquidityApiSlug: string; coinsInputType: string; balancesInputType: string; useForPricing: boolean; }; type DexParamFactory = { address: string; maxPlainCoins?: number; isStableNg?: boolean; }; export type DexParams = { factories: DexParamFactory[] | null; router: Address; stateUpdatePeriodMs: number; factoryPoolImplementations: Record; customPools: Record; disabledPools: Set
; disabledImplementations: Set
; }; export declare enum CurveSwapFunctions { exchange = "exchange", exchange_underlying = "exchange_underlying" } export declare enum CurveRouterSwapType { exchange = 1, exchange_underlying = 2 } export declare enum CurveRouterPoolType { non_stable = 0, stable = 10 } export type CurveV1FactoryIfaces = { exchangeRouter: Interface; curveV1Router: Interface; factory: Interface; erc20: Interface; threePool: Interface; }; export type LiquidityInCache = Record; export declare enum CurveV1SwapType { EXCHANGE = 0, EXCHANGE_UNDERLYING = 1 } export type DirectCurveV1Param = [ fromToken: Address, toToken: Address, exchange: Address, fromAmount: NumberAsString, toAmount: NumberAsString, expectedAmount: NumberAsString, feePercent: NumberAsString, i: NumberAsString, j: NumberAsString, partner: Address, isApproved: boolean, swapType: CurveV1SwapType, beneficiary: Address, needWrapNative: boolean, permit: string, uuid: string ]; export type CurveV1RouterSwapParam = [ number, number, number, CurveRouterPoolType, number ]; export type CurveV1RouterParam = { path: string[]; swapParams: CurveV1RouterSwapParam[]; srcAmount: string; min_dy: string; pools: string[]; }; export type DirectCurveV1FactoryParamV6 = [ curveData: NumberAsString, curveAssets: NumberAsString, srcToken: Address, destToken: Address, fromAmount: NumberAsString, toAmount: NumberAsString, quotedAmount: NumberAsString, metadata: string, beneficiary: Address ]; export type CurveV1FactoryDirectSwap = [ params: DirectCurveV1FactoryParamV6, partnerAndFee: string, permit: string ]; export {};