# amm v3 factory

## Overview

Factory address supplied for the AMM V3 deployment.

* Contract name: `Fluxionfactory`
* Address: `0xF883162Ed9c7E8EF604214c964c678E40c9B737C`
* Network: Mantle Mainnet (`chainId 5000`)
* Explorer: [`Mantle Explorer`](https://explorer.mantle.xyz/address/0xF883162Ed9c7E8EF604214c964c678E40c9B737C)
* Explorer API: [`address payload`](https://explorer.mantle.xyz/api/v2/addresses/0xF883162Ed9c7E8EF604214c964c678E40c9B737C)
* [`Mantlescan code page`](https://mantlescan.xyz/address/0xF883162Ed9c7E8EF604214c964c678E40c9B737C#code)
* [`UniswapV3Factory.sol`](https://github.com/Uniswap/v3-core/blob/main/contracts/UniswapV3Factory.sol)
* [`Factory interface`](https://github.com/Uniswap/v3-core/blob/main/contracts/interfaces/IUniswapV3Factory.sol)

## Read Functions

### `owner`

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

Returns the current owner of the factory.

This function does not take parameters.

**Return Values**

| Name    | Type      | Description            |
| ------- | --------- | ---------------------- |
| `owner` | `address` | Factory owner address. |

### `feeAmountTickSpacing`

```solidity
function feeAmountTickSpacing(uint24 fee) external view returns (int24 tickSpacing)
```

Returns the enabled tick spacing for a fee tier, or `0` if the fee tier is not enabled.

**Parameters**

| Name  | Type     | Description                                  |
| ----- | -------- | -------------------------------------------- |
| `fee` | `uint24` | Fee tier denominated in hundredths of a bip. |

**Return Values**

| Name          | Type    | Description                    |
| ------------- | ------- | ------------------------------ |
| `tickSpacing` | `int24` | Tick spacing for the fee tier. |

### `getPool`

```solidity
function getPool(address tokenA, address tokenB, uint24 fee) external view returns (address pool)
```

Returns the pool address for a token pair and fee tier, or the zero address if the pool does not exist.

**Parameters**

| Name     | Type      | Description                      |
| -------- | --------- | -------------------------------- |
| `tokenA` | `address` | Address of either pool token.    |
| `tokenB` | `address` | Address of the other pool token. |
| `fee`    | `uint24`  | Fee tier for the target pool.    |

**Return Values**

| Name   | Type      | Description                             |
| ------ | --------- | --------------------------------------- |
| `pool` | `address` | Pool address for the pair and fee tier. |

## Write Functions

### `createPool`

```solidity
function createPool(address tokenA, address tokenB, uint24 fee) external returns (address pool)
```

Creates a new pool for the token pair and fee tier if one does not already exist.

**Parameters**

| Name     | Type      | Description                 |
| -------- | --------- | --------------------------- |
| `tokenA` | `address` | One of the two pool tokens. |
| `tokenB` | `address` | The other pool token.       |
| `fee`    | `uint24`  | Desired pool fee tier.      |

**Return Values**

| Name   | Type      | Description                        |
| ------ | --------- | ---------------------------------- |
| `pool` | `address` | Address of the newly created pool. |

### `setOwner`

```solidity
function setOwner(address _owner) external
```

Updates the factory owner. Only the current owner can call this function.

**Parameters**

| Name     | Type      | Description        |
| -------- | --------- | ------------------ |
| `_owner` | `address` | New owner address. |

This function does not return a value.

### `enableFeeAmount`

```solidity
function enableFeeAmount(uint24 fee, int24 tickSpacing) external
```

Enables a new fee tier and binds it to a fixed tick spacing.

**Parameters**

| Name          | Type     | Description                                                 |
| ------------- | -------- | ----------------------------------------------------------- |
| `fee`         | `uint24` | Fee amount to enable, denominated in hundredths of a bip.   |
| `tickSpacing` | `int24`  | Tick spacing enforced for pools created with this fee tier. |

This function does not return a value.


---

# 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-factory.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.
