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

GetPoolPath

func GetPoolPath(token0Path, token1Path string, fee uint32) string
Ask AI Claude ChatGPT

GetPoolPath generates a unique pool path string based on the token paths and fee tier. Parameters:

  • token0Path: path of the first token contract; it is reordered with token1Path when needed to form canonical pool order.
  • token1Path: path of the second token contract; it is reordered with token0Path when it sorts earlier.
  • fee: pool fee tier encoded as its decimal uint32 value in the path.

Returns:

  • poolPath: canonical token0:token1:fee identifier with token paths in lexicographical order.

Params

Command

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

Result

Gno Expression Evaluator

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