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

pool package

Function

GetBalances

func GetBalances(poolPath string) (int64, int64, error)
Ask AI Claude ChatGPT

GetBalances returns the balances of the pool. Parameters:

  • poolPath: Canonical pool path identifying the pool whose balances are read.

Returns:

  • int64: Current token0 balance held by the pool, in token base units.
  • int64: Current token1 balance held by the pool, in token base units.
  • error: Non-nil when poolPath does not identify an existing pool.

Param

Command

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

Result