import { TradeType } from '@uniswap/sdk-core'; import { Pool } from '@uniswap/v3-sdk'; import { ImmutableConfiguration } from '@imtbl/config'; import { BigNumberish, BytesLike, Result } from 'ethers'; import { QuoteResult } from '../lib/getQuotesForRoutes'; import { NativeTokenService } from '../lib/nativeTokenService'; import { ExchangeModuleConfiguration, SecondaryFee, CoinAmount, Coin, ERC20, Native, Amount } from '../types'; import { IV3SwapRouter } from '../contracts/types/ImmutableSwapProxy'; import { RoutingContracts } from '../lib'; export declare const TEST_BASE_FEE: bigint; export declare const TEST_MAX_PRIORITY_FEE_PER_GAS: bigint; export declare const TEST_GAS_PRICE: bigint; export declare const TEST_TRANSACTION_GAS_USAGE: bigint; export declare const TEST_CHAIN_ID = 999; export declare const TEST_RPC_URL = "https://0.net"; export declare const TEST_FROM_ADDRESS = "0x94fC2BcA2E71e26D874d7E937d89ce2c9113af6e"; export declare const TEST_FEE_RECIPIENT = "0xe3ece548F1DD4B1536Eb6eE188fE35350bc1dd16"; export declare const TEST_MAX_FEE_BASIS_POINTS = 1000; export declare const TEST_MULTICALL_ADDRESS = "0x66d0aB680ACEe44308edA2062b910405CC51A190"; export declare const TEST_V3_CORE_FACTORY_ADDRESS = "0x23490b262829ACDAD3EF40e555F23d77D1B69e4e"; export declare const TEST_QUOTER_ADDRESS = "0x9B323E56215aAdcD4f45a6Be660f287DE154AFC5"; export declare const TEST_ROUTER_ADDRESS = "0x615FFbea2af24C55d737dD4264895A56624Da072"; export declare const TEST_V3_MIGRATOR_ADDRESSES = "0x0Df0d2d5Cf4739C0b579C33Fdb3d8B04Bee85729"; export declare const TEST_NONFUNGIBLE_POSITION_MANAGER_ADDRESSES = "0x446c78D97b1E78bC35864FC49AcE1f7404F163F6"; export declare const TEST_TICK_LENS_ADDRESSES = "0x3aC4F8094b21A6c5945453007d9c52B7e15340c0"; export declare const TEST_SWAP_PROXY_ADDRESS = "0x8dBE1f0900C5e92ad87A54521902a33ba1598C51"; export declare const TEST_ROUTING_CONTRACTS: RoutingContracts; export declare const IMX_TEST_TOKEN: ERC20; export declare const WIMX_TEST_TOKEN: ERC20; export declare const WETH_TEST_TOKEN: ERC20; export declare const USDC_TEST_TOKEN: ERC20; export declare const USDT_TEST_TOKEN: ERC20; export declare const FUN_TEST_TOKEN: ERC20; export declare const NATIVE_TEST_TOKEN: Native; export declare const nativeTokenService: NativeTokenService; export declare const TEST_IMMUTABLE_CONFIGURATION: ImmutableConfiguration; export declare const TEST_DEX_CONFIGURATION: ExchangeModuleConfiguration; export declare const refundETHFunctionSignature = "0x12210e8a"; export type PromiseOrValue = T | Promise; export type SwapTest = { fromAddress: string; pools: Pool[]; inputToken: string; outputToken: string; intermediaryToken: string | undefined; }; export declare function uniqBy(array: K[], comparator: (arg: K) => T): K[]; export declare function decodePathForExactInput(path: string): { inputToken: string; firstPoolFee: bigint; intermediaryToken: string; secondPoolFee: bigint; outputToken: string; }; export declare function decodePathForExactOutput(path: string): { outputToken: string; firstPoolFee: bigint; intermediaryToken: string; secondPoolFee: bigint; inputToken: string; }; export declare function decodeMulticallExactInputWithFees(data: BytesLike): { secondaryFeeParams: SecondaryFee[]; swapParams: IV3SwapRouter.ExactInputParamsStruct; unwrapTokenParams: Result; deadline: bigint; }; export declare function decodeMulticallExactInputWithoutFees(data: BytesLike): { swapParams: IV3SwapRouter.ExactInputParamsStruct; }; export declare function decodeMulticallExactOutputWithFees(data: BytesLike): { secondaryFeeParams: SecondaryFee[]; swapParams: IV3SwapRouter.ExactOutputParamsStruct; unwrapTokenParams: Result; deadline: bigint; }; export declare function decodeMulticallExactInputSingleWithFees(data: BytesLike): { secondaryFeeParams: SecondaryFee[]; swapParams: IV3SwapRouter.ExactInputSingleParamsStruct; unwrapTokenParams: Result; deadline: bigint; }; export declare function decodeMulticallExactOutputSingleWithFees(data: BytesLike): { secondaryFeeParams: SecondaryFee[]; swapParams: IV3SwapRouter.ExactOutputSingleParamsStruct; unwrapTokenParams: Result; deadline: bigint; }; export declare function decodeMulticallExactInputSingleWithoutFees(data: BytesLike): { swapParams: IV3SwapRouter.ExactInputSingleParamsStruct; }; export declare function decodeMulticallExactOutputSingleWithoutFees(data: BytesLike): { swapParams: IV3SwapRouter.ExactOutputSingleParamsStruct; }; export declare function createPool(tokenIn: ERC20, tokenOut: ERC20): Pool; export declare function setupSwapTxTest(params?: { multiPoolSwap?: boolean; }): SwapTest; type MockParams = { pools: Pool[]; exchangeRate?: number; }; export declare const amountOutFromAmountIn: (amountIn: CoinAmount, tokenOut: ERC20, exchangeRate: number) => CoinAmount; export declare const amountInFromAmountOut: (amountOut: CoinAmount, tokenIn: ERC20, exchangeRate: number) => CoinAmount; export declare function mockRouterImplementation(params: MockParams): jest.Mock, otherToken: ERC20, tradeType: TradeType, secondaryFees: SecondaryFee[], maxHops: number], any>; export declare function expectToBeDefined(x: T): asserts x is NonNullable; export declare function expectToBeString(x: unknown): asserts x is string; export declare function expectERC20(token: Coin, expectedAddress?: string): asserts token is ERC20; export declare function expectNative(token: Coin): asserts token is Native; /** * Takes an arbitrary string and turns it into a valid ethereum address * @param str Arbitrary string to create the address from */ export declare function makeAddr(str: string): string; export declare function formatAmount(amount: CoinAmount | Amount): string; export declare function formatTokenAmount(amount: BigNumberish, token: ERC20): string; export declare function formatEther(bn: PromiseOrValue): string; export declare function newAmountFromString(amount: string, token: T): CoinAmount; export declare const buildBlock: ({ baseFeePerGas }: { baseFeePerGas: bigint | null; }) => { baseFeePerGas: bigint | null; difficulty: bigint; extraData: string; gasLimit: bigint; gasUsed: bigint; hash: string; miner: string; nonce: string; number: number; parentHash: string; timestamp: number; transactions: never[]; }; export {};