V3 QuoterV2
The QuoterV2 contract allows getting the expected amount out or amount in for a given V3 swap without executing the swap. It simulates the swap logic on-chain to return accurate quotes.Key Functions
quoteExactInputSingle
Returns the expected output amount for a single-pool exact input swap.QuoteExactInputSingleParams):
Returns:
quoteExactInput
Returns the expected output amount for a multi-hop exact input swap.
Returns:
quoteExactOutputSingle
Returns the required input amount for a single-pool exact output swap.QuoteExactOutputSingleParams):
quoteExactOutput
Returns the required input amount for a multi-hop exact output swap.Callback
uniswapV3SwapCallback
ABI
Example: Get a Quote
Always use
staticCall (ethers v6) or callStatic (ethers v5) — these functions revert if called as regular transactions.