Skip to main content

PoolInitializer_v4

Git Source - Generated with forge doc

Inherits: ImmutableState, IPoolInitializer_v4

Initializes a Uniswap v4 Pool

Enables create pool + mint liquidity in a single transaction with multicall

Functions

initializePool

Initialize a Uniswap v4 Pool

If the pool is already initialized, this function will not revert and just return type(int24).max

function initializePool(PoolKey calldata key, uint160 sqrtPriceX96) external payable returns (int24);

Parameters

NameTypeDescription
keyPoolKeyThe PoolKey of the pool to initialize
sqrtPriceX96uint160The initial starting price of the pool, expressed as a sqrtPriceX96

Returns

NameTypeDescription
<none>int24The current tick of the pool, or type(int24).max if the pool creation failed, or the pool already existed