Documentation
    Preparing search index...

    Function swapQuoteByInputToken

    • Computes the exact input or output amount for a swap transaction.

      Arguments

      • token_in: The input token amount.
      • specified_token_a: If true, the input token is token A. Otherwise, it is token B.
      • slippage_tolerance: The slippage tolerance in basis points.
      • whirlpool: The whirlpool state.
      • oracle: The oracle data for the whirlpool.
      • tick_arrays: The tick arrays needed for the swap.
      • timestamp: The timestamp for the swap.
      • transfer_fee_a: The transfer fee for token A.
      • transfer_fee_b: The transfer fee for token B.

      Returns

      The exact input or output amount for the swap transaction.

      Parameters

      Returns ExactInSwapQuote