Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

pool package

Function

OracleConsult

func OracleConsult(poolPath string, secondsAgo uint32) (int32, string, error)
Ask AI Claude ChatGPT

OracleConsult returns the arithmetic mean tick and harmonic mean liquidity over a lookback, following Uniswap V3 OracleLibrary's consult convention. Parameters:

  • poolPath: Canonical pool path whose oracle data is queried.
  • secondsAgo: Lookback duration in seconds used to compute the time-weighted values.

Returns:

  • int32: Arithmetic mean tick over the requested lookback.
  • string: Harmonic mean liquidity over the lookback, serialized as a base-10 unsigned integer.
  • error: Non-nil when the pool or required observation history is unavailable.

Params

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/gnoswap/pool.OracleConsult(,)"

Result

Gno Expression Evaluator

Evaluate any read-only Gno expression against gno.land/r/gnoswap/pool, for example a function call with arguments.