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

Observe

func Observe(poolPath string, secondsAgos []uint32) ([]int64, []string, error)

Observe returns the tick and seconds-per-liquidity cumulatives for each requested lookback, matching Uniswap V3's observe(uint32[] secondsAgos). Parameters:

  • poolPath: Canonical pool path whose oracle history is queried.
  • secondsAgos: Lookback intervals in seconds; one cumulative pair is returned for each value, in the same order.

Returns:

  • []int64: Tick cumulative values corresponding to each requested lookback.
  • []string: Seconds-per-liquidity cumulative X128 values, serialized as base-10 strings, corresponding to each lookback.
  • error: Non-nil when pool or observation data cannot be read.

Params

Command

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

Result