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

NewSlot0

func NewSlot0( sqrtPriceX96 *u256.Uint, tick int32, feeProtocol uint8, unlocked bool, ) Slot0

NewSlot0 constructs slot0 with the supplied price, tick, protocol fee, and lock state. Observation metadata starts with index zero and cardinality one.

Parameters:

  • sqrtPriceX96: initial sqrt(token1/token0) price scaled by 2^96.
  • tick: initial current pool tick.
  • feeProtocol: packed token0/token1 protocol-fee denominator configuration.
  • unlocked: initial reentrancy-lock state.

Returns:

  • Slot0: initialized slot0 value with one observation slot.

Params

Command

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

Result