# IPoolInitializer

## IPoolInitializer

Creates and initializes V3 Pools Provides a method for creating and initializing a pool, if necessary, for bundling with other methods that require the pool to exist.

### Functions

#### createAndInitializePoolIfNecessary

`createAndInitializePoolIfNecessary(address,address,uint160)` payable external

Creates a new pool if it does not exist, then initializes if not initialized

| Name         | Type    | Description                                                 |
| ------------ | ------- | ----------------------------------------------------------- |
| token0       | address | The contract address of token0 of the pool                  |
| token1       | address | The contract address of token1 of the pool                  |
| sqrtPriceX96 | uint160 | The initial square root price of the pool as a Q64.96 value |

**Returns:**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| pool | address |             |

***

## IPoolInitializer

Creates and initializes V3 Pools Provides a method for creating and initializing a pool, if necessary, for bundling with other methods that require the pool to exist.

### Functions

#### createAndInitializePoolIfNecessary

`createAndInitializePoolIfNecessary(address,address,uint160)` payable external

Creates a new pool if it does not exist, then initializes if not initialized

| Name         | Type    | Description                                                 |
| ------------ | ------- | ----------------------------------------------------------- |
| token0       | address | The contract address of token0 of the pool                  |
| token1       | address | The contract address of token1 of the pool                  |
| sqrtPriceX96 | uint160 | The initial square root price of the pool as a Q64.96 value |

**Returns:**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| pool | address |             |

***

## IPoolInitializer

Creates and initializes V3 Pools Provides a method for creating and initializing a pool, if necessary, for bundling with other methods that require the pool to exist.

### Functions

#### createAndInitializePoolIfNecessary

`createAndInitializePoolIfNecessary(address,address,uint160)` payable external

Creates a new pool if it does not exist, then initializes if not initialized

| Name         | Type    | Description                                                 |
| ------------ | ------- | ----------------------------------------------------------- |
| token0       | address | The contract address of token0 of the pool                  |
| token1       | address | The contract address of token1 of the pool                  |
| sqrtPriceX96 | uint160 | The initial square root price of the pool as a Q64.96 value |

**Returns:**

| Name | Type    | Description |
| ---- | ------- | ----------- |
| pool | address |             |

***


---

# 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://docs.algebra.finance/algebra-integral-documentation/algebra-v1-technical-reference/contracts/api-reference-v1.0/v1.0-periphery/ipoolinitializer.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.
