QuoterV2

Ethereum Uniswap V3

0x61ffe014ba17989e743c5f6cb21bf9697530b21e

Solidity v0.7.6+commit.7338295f

🤖
Query this contract from your AI
Reference: univ3-quoter-eth 0x61ffe014ba17989e743c5f6cb21bf9697530b21e
Sample prompt: “Tell me the current state of univ3-quoter-eth”
No AI wired up yet? → mcp.smarts.md

Admin & Risk

Who can change the rules?

No admin risk controls detected from the verified ABI.

Overview

Read Functions
3
Write Functions
4
Events
0

Read Functions

Block #25,169,823 · just now
WETH9() view → 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

Returns

Name Type Description
address Returns the address of WETH9
factory() view → 0x1f98431c8ad98523631ae4a59f267346ea31f984

Returns

Name Type Description
address Returns the address of the Uniswap V3 factory
uniswapV3SwapCallback(amount0Delta: int256, amount1Delta: int256, path: bytes) view

Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap.

dev: In the implementation you must pay the pool tokens owed for the swap. The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory. amount0Delta and amount1Delta can both be 0 if no tokens were swapped.

Parameters

Name Type Description
amount0Delta int256 The amount of token0 that was sent (negative) or must be received (positive) by the pool by the end of the swap. If positive, the callback must send that amount of token0 to the pool.
amount1Delta int256 The amount of token1 that was sent (negative) or must be received (positive) by the pool by the end of the swap. If positive, the callback must send that amount of token1 to the pool.
path bytes

Write Functions

quoteExactInput(path: bytes, amountIn: uint256) nonpayable

Returns the amount out received for a given exact input swap without executing the swap

Parameters

Name Type Description
path bytes The path of the swap, i.e. each token pair and the pool fee
amountIn uint256 The amount of the first token to swap

Returns

Name Type Description
amountOut uint256 amountOut The amount of the last token that would be received
sqrtPriceX96AfterList uint160[] sqrtPriceX96AfterList List of the sqrt price after the swap for each pool in the path
initializedTicksCrossedList uint32[] initializedTicksCrossedList List of the initialized ticks that the swap crossed for each pool in the path
gasEstimate uint256 gasEstimate The estimate of the gas that the swap consumes
quoteExactInputSingle(params: tuple) nonpayable

Returns the amount out received for a given exact input but for a swap of a single pool

Parameters

Name Type Description
params tuple The params for the quote, encoded as `QuoteExactInputSingleParams` tokenIn The token being swapped in tokenOut The token being swapped out fee The fee of the token pool to consider for the pair amountIn The desired input amount sqrtPriceLimitX96 The price limit of the pool that cannot be exceeded by the swap

Returns

Name Type Description
amountOut uint256 amountOut The amount of `tokenOut` that would be received
sqrtPriceX96After uint160 sqrtPriceX96After The sqrt price of the pool after the swap
initializedTicksCrossed uint32 initializedTicksCrossed The number of initialized ticks that the swap crossed
gasEstimate uint256 gasEstimate The estimate of the gas that the swap consumes
quoteExactOutput(path: bytes, amountOut: uint256) nonpayable

Returns the amount in required for a given exact output swap without executing the swap

Parameters

Name Type Description
path bytes The path of the swap, i.e. each token pair and the pool fee. Path must be provided in reverse order
amountOut uint256 The amount of the last token to receive

Returns

Name Type Description
amountIn uint256 amountIn The amount of first token required to be paid
sqrtPriceX96AfterList uint160[] sqrtPriceX96AfterList List of the sqrt price after the swap for each pool in the path
initializedTicksCrossedList uint32[] initializedTicksCrossedList List of the initialized ticks that the swap crossed for each pool in the path
gasEstimate uint256 gasEstimate The estimate of the gas that the swap consumes
quoteExactOutputSingle(params: tuple) nonpayable

Returns the amount in required to receive the given exact output amount but for a swap of a single pool

Parameters

Name Type Description
params tuple The params for the quote, encoded as `QuoteExactOutputSingleParams` tokenIn The token being swapped in tokenOut The token being swapped out fee The fee of the token pool to consider for the pair amountOut The desired output amount sqrtPriceLimitX96 The price limit of the pool that cannot be exceeded by the swap

Returns

Name Type Description
amountIn uint256 amountIn The amount required as the input for the swap in order to receive `amountOut`
sqrtPriceX96After uint160 sqrtPriceX96After The sqrt price of the pool after the swap
initializedTicksCrossed uint32 initializedTicksCrossed The number of initialized ticks that the swap crossed
gasEstimate uint256 gasEstimate The estimate of the gas that the swap consumes