# amm v3 quoterv2

## Overview

Quote helper address supplied for the AMM V3 deployment.

* Contract name: `QuoterV2`
* Address: `0x3E4eE18Ac7280813236a1EB850679Da5322E14CE`
* Network: Mantle Mainnet (`chainId 5000`)
* Explorer: [`Mantle Explorer`](https://explorer.mantle.xyz/address/0x3E4eE18Ac7280813236a1EB850679Da5322E14CE)
* Explorer API: [`address payload`](https://explorer.mantle.xyz/api/v2/addresses/0x3E4eE18Ac7280813236a1EB850679Da5322E14CE)
* [`Mantlescan code page`](https://mantlescan.xyz/address/0x3E4eE18Ac7280813236a1EB850679Da5322E14CE#code)
* [`QuoterV2.sol`](https://github.com/Uniswap/v3-periphery/blob/main/contracts/lens/QuoterV2.sol)

## Read Functions

These methods are quote-style entrypoints. In the matched source they are not marked `view`, because the contract simulates swaps and decodes revert payloads, but they are intended for off-chain quoting rather than persistent state updates.

### `factory`

```solidity
function factory() external view returns (address factory)
```

Returns the factory address used for pool lookups during quote simulation.

This function does not take parameters.

Return Values

| Name      | Type      | Description                         |
| --------- | --------- | ----------------------------------- |
| `factory` | `address` | Factory address used by the quoter. |

### `WETH9`

```solidity
function WETH9() external view returns (address weth9)
```

Returns the wrapped native token address configured for the quoter.

This function does not take parameters.

Return Values

| Name    | Type      | Description                   |
| ------- | --------- | ----------------------------- |
| `weth9` | `address` | Wrapped native token address. |

### `quoteExactInput`

```solidity
function quoteExactInput(bytes path, uint256 amountIn) external returns (uint256 amountOut, uint160[] sqrtPriceX96AfterList, uint32[] initializedTicksCrossedList, uint256 gasEstimate)
```

Simulates an exact-input swap across a multi-hop path without executing it.

Parameters

| Name       | Type      | Description                                         |
| ---------- | --------- | --------------------------------------------------- |
| `path`     | `bytes`   | Encoded token and fee path for the simulated route. |
| `amountIn` | `uint256` | Input amount to simulate.                           |

Return Values

| Name                          | Type        | Description                                   |
| ----------------------------- | ----------- | --------------------------------------------- |
| `amountOut`                   | `uint256`   | Quoted output amount.                         |
| `sqrtPriceX96AfterList`       | `uint160[]` | Per-pool post-swap square-root prices.        |
| `initializedTicksCrossedList` | `uint32[]`  | Per-pool counts of initialized ticks crossed. |
| `gasEstimate`                 | `uint256`   | Estimated gas consumed by the simulated swap. |

### `quoteExactInputSingle`

```solidity
function quoteExactInputSingle((address tokenIn, address tokenOut, uint256 amountIn, uint24 fee, uint160 sqrtPriceLimitX96) params) external returns (uint256 amountOut, uint160 sqrtPriceX96After, uint32 initializedTicksCrossed, uint256 gasEstimate)
```

Simulates an exact-input swap against a single pool.

Parameters

| Name                       | Type      | Description                              |
| -------------------------- | --------- | ---------------------------------------- |
| `params.tokenIn`           | `address` | Input token address.                     |
| `params.tokenOut`          | `address` | Output token address.                    |
| `params.amountIn`          | `uint256` | Input amount to simulate.                |
| `params.fee`               | `uint24`  | Fee tier of the pool.                    |
| `params.sqrtPriceLimitX96` | `uint160` | Optional price limit for the simulation. |

Return Values

| Name                      | Type      | Description                                      |
| ------------------------- | --------- | ------------------------------------------------ |
| `amountOut`               | `uint256` | Quoted output amount.                            |
| `sqrtPriceX96After`       | `uint160` | Pool square-root price after the simulated swap. |
| `initializedTicksCrossed` | `uint32`  | Initialized ticks crossed during the simulation. |
| `gasEstimate`             | `uint256` | Estimated gas consumed by the simulated swap.    |

### `quoteExactOutput`

```solidity
function quoteExactOutput(bytes path, uint256 amountOut) external returns (uint256 amountIn, uint160[] sqrtPriceX96AfterList, uint32[] initializedTicksCrossedList, uint256 gasEstimate)
```

Simulates the input amount required to receive an exact output amount across a multi-hop route.

Parameters

| Name        | Type      | Description                                  |
| ----------- | --------- | -------------------------------------------- |
| `path`      | `bytes`   | Encoded token and fee path in reverse order. |
| `amountOut` | `uint256` | Output amount to target.                     |

Return Values

| Name                          | Type        | Description                                   |
| ----------------------------- | ----------- | --------------------------------------------- |
| `amountIn`                    | `uint256`   | Quoted input amount required.                 |
| `sqrtPriceX96AfterList`       | `uint160[]` | Per-pool post-swap square-root prices.        |
| `initializedTicksCrossedList` | `uint32[]`  | Per-pool counts of initialized ticks crossed. |
| `gasEstimate`                 | `uint256`   | Estimated gas consumed by the simulated swap. |

### `quoteExactOutputSingle`

```solidity
function quoteExactOutputSingle((address tokenIn, address tokenOut, uint256 amount, uint24 fee, uint160 sqrtPriceLimitX96) params) external returns (uint256 amountIn, uint160 sqrtPriceX96After, uint32 initializedTicksCrossed, uint256 gasEstimate)
```

Simulates the input amount required to receive an exact output amount from a single pool.

Parameters

| Name                       | Type      | Description                              |
| -------------------------- | --------- | ---------------------------------------- |
| `params.tokenIn`           | `address` | Input token address.                     |
| `params.tokenOut`          | `address` | Output token address.                    |
| `params.amount`            | `uint256` | Target output amount.                    |
| `params.fee`               | `uint24`  | Fee tier of the pool.                    |
| `params.sqrtPriceLimitX96` | `uint160` | Optional price limit for the simulation. |

Return Values

| Name                      | Type      | Description                                      |
| ------------------------- | --------- | ------------------------------------------------ |
| `amountIn`                | `uint256` | Quoted input amount required.                    |
| `sqrtPriceX96After`       | `uint160` | Pool square-root price after the simulated swap. |
| `initializedTicksCrossed` | `uint32`  | Initialized ticks crossed during the simulation. |
| `gasEstimate`             | `uint256` | Estimated gas consumed by the simulated swap.    |

## Write Functions

No end-user state-changing entrypoints are documented for this quoter. The matched source also exposes `uniswapV3SwapCallback(...)`, but that callback is protocol plumbing rather than part of the normal quote API surface.

No write-oriented functions are documented for this contract.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://fluxion-network.gitbook.io/fluxion-network/developer-resources/technical-overview-and-api/amm-v3-quoterv2.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
