Function swapQuoteByInputTokenWithDevFees

  • Get an estimated swap quote using input token amount while collecting dev fees.

    Parameters

    • whirlpool: Whirlpool

      Whirlpool to perform the swap on

    • inputTokenMint: Address

      PublicKey for the input token mint to swap with

    • tokenAmount: BN

      The amount of input token to swap from

    • slippageTolerance: Percentage

      The amount of slippage to account for in this quote

    • programId: Address

      PublicKey for the Whirlpool ProgramId

    • fetcher: WhirlpoolAccountFetcherInterface
    • devFeePercentage: Percentage

      The percentage amount to send to developer wallet prior to the swap. Percentage num/dem values has to match token decimal.

    • Optionalopts: SimpleAccountFetchOptions

      an WhirlpoolAccountFetchOptions object to define fetch and cache options when accessing on-chain accounts

    Returns Promise<DevFeeSwapQuote>

    a SwapQuote object with slippage adjusted SwapInput parameters & estimates on token amounts, fee & end whirlpool states.