Trade Tokens
Get A Quote
/// @notice Parameters for quoting the output amount for a given input
struct QuoteExactInputParams {
/// @notice The address of the input token (use address(0) for native asset)
address inputToken;
/// @notice The address of the output token (use address(0) for native asset)
address outputToken;
/// @notice The amount of input token to swap (in input token decimals)
uint256 inputAmount;
}
/// @notice Quote the output amount for a given input
/// @param params The quote parameters
/// @return outputAmount The quoted output amount
/// @dev refer to the swapExactInput method for the scenarios
function quoteExactInput(QuoteExactInputParams calldata params) external returns (uint256 outputAmount);Swap
How to construct the permitData in ExactInputParams ?
Events
TokenBought
TokenBoughtTokenSold
TokenSoldLaunchedToDEX
LaunchedToDEXFlapTokenCLPoolCreated
FlapTokenCLPoolCreatedFlapTokenProgressChanged
How To Do An Off-Chain Quote?
[Off-Chain Quote] 1. The Preliminary
[Off-Chain Quote] 2. The Curve Library
[Off-Chain Quote] 3. Quote With The Curve Instance
[Off-Chain Quote] 4. Quote for tax tokens
Last updated