Finding The Best Quote
Introduction
Find The Best Quote From Amount In
function findBestPathFromAmountIn(address[] calldata route, uint128 amountIn)
public
view
returns (Quote memory quote)struct Quote {
address[] route; // Path in the form of an array of token address to go through
address[] pairs; // Address of the different pairs to do through
uint256[] binSteps; // Bin step for each pair (0 for V1 pairs)
ILBRouter.Version[] versions; // Versions to use for each pair
uint128[] amounts; // The amounts for every step of the swap
uint128[] virtualAmountsWithoutSlippage; // The virtual amounts of every step of the swap without slippage
uint128[] fees; // The fees to pay for every step of the swap
}Code Example
Find The Best Quote From Amount Out
Code Example
Last updated