Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

pool package

Function

NewPool

func NewPool( token0Path string, token1Path string, fee uint32, sqrtPriceX96 *u256.Uint, tickSpacing int32, tick int32, slot0FeeProtocol uint8, ) *Pool

NewPool constructs a pool with the supplied token pair, fee, price, and tick configuration.

Parameters:

  • token0Path: path of the pool's token0 asset.
  • token1Path: path of the pool's token1 asset.
  • fee: fee tier used by swaps.
  • sqrtPriceX96: initial sqrt(token1/token0) price scaled by 2^96.
  • tickSpacing: spacing between initialized ticks.
  • tick: initial current tick.
  • slot0FeeProtocol: packed protocol-fee denominator configuration for slot0.

Returns:

  • *Pool: initialized pool with empty balances, fee growth, ticks, bitmaps, and positions.

Params

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/pool.NewPool(,,,,,,)"

Result