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

SnapshotCumulativesInside

func SnapshotCumulativesInside( poolPath string, tickLower int32, tickUpper int32, ) (int64, string, uint32, error)
Ask AI Claude ChatGPT

SnapshotCumulativesInside returns the tick, seconds-per-liquidity, and seconds cumulatives accrued while the pool price was inside [tickLower, tickUpper). Both boundary ticks must be initialized.

Snapshots are only comparable across an interval during which a position in the range existed, matching Uniswap V3's snapshotCumulativesInside. Parameters:

  • poolPath: Canonical pool path whose oracle snapshot is queried.
  • tickLower: Lower inclusive tick boundary of the position range.
  • tickUpper: Upper exclusive tick boundary of the position range; both boundary ticks must be initialized.

Returns:

  • int64: Tick cumulative accrued while the price was inside the range.
  • string: Seconds-per-liquidity-inside X128 accumulator, serialized as a base-10 string.
  • uint32: Seconds accrued while the price was inside the range.
  • error: Non-nil when the pool, observations, or initialized boundaries are unavailable.

Params

Command

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

Result

Gno Expression Evaluator

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