GetObservationAt
GetObservationAt returns a safe copy of the observation stored at index. An in-range but uninitialized slot returns the zero observation, matching Uniswap V3's fixed observation-array getter.
ref: uniswap v3 IUniswapV3PoolState.observations(uint256 index) Parameters:
- poolPath: Canonical pool path identifying the pool containing the observation.
- index: Zero-based observation-array index; values at or above the fixed cardinality bound return an error.
Returns:
- Observation: Observation at index, or the zero observation when the slot is in range but has never been written.
- error: Non-nil when the pool is missing or index is out of range.
Command
gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/pool.GetObservationAt(,)"
Result