Computes the exact input or output amount for a swap transaction.
token_in
specified_token_a
true
slippage_tolerance
whirlpool
oracle
tick_arrays
timestamp
transfer_fee_a
transfer_fee_b
The exact input or output amount for the swap transaction.
Optional
Computes the exact input or output amount for a swap transaction.
Arguments
token_in: The input token amount.specified_token_a: Iftrue, 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.