Interface SimulateSwapParams

Parameters for simulating a swap

interface SimulateSwapParams {
    pool: `0x${string}`;
    recipient: `0x${string}`;
    zeroForOne: boolean;
    amountSpecified: bigint;
    sqrtPriceLimitX96: bigint;
    ammType: AMMType;
    tokenIn: `0x${string}`;
    tokenOut: `0x${string}`;
    fee: number;
    quoterAddress?: `0x${string}`;
}

Properties

pool: `0x${string}`

Address of the pool

recipient: `0x${string}`

Address that will receive the swap output (or address(this) for simulation)

zeroForOne: boolean

true if swapping token0 → token1, else false

amountSpecified: bigint

Value from calculateSwapAmount

sqrtPriceLimitX96: bigint

Slippage-adjusted limit price

ammType: AMMType

AMM type

tokenIn: `0x${string}`

Input token address (required for Quoter)

tokenOut: `0x${string}`

Output token address (required for Quoter)

fee: number

Pool fee (required for Quoter)

quoterAddress?: `0x${string}`

Quoter contract address (optional - will use default if not provided)