Skip to main content

Documentation Index

Fetch the complete documentation index at: https://tech.ramses.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Functions

createAndInitializePoolIfNecessary

  function createAndInitializePoolIfNecessary(
    address token0,
    address token1,
    int24 tickSpacing,
    uint160 sqrtPriceX96
  ) external returns (address pool)
Creates a new pool if it does not exist, then initializes if not initialized This method can be bundled with others via IMulticall for the first action (e.g. mint) performed against a pool

Parameters:

NameTypeDescription
token0addressThe contract address of token0 of the pool
token1addressThe contract address of token1 of the pool
tickSpacingint24The tick spacing of the v3 pool for the specified token pair
sqrtPriceX96uint160The initial square root price of the pool as a Q64.96 value

Return Values:

NameTypeDescription
pooladdressReturns the pool address based on the pair of tokens and tick spacing, will return the newly created pool address if necessary