Search Apps Documentation Source Content File Folder Download Copy Actions Download 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

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 "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/pool.GetPoolPath(,,)"

Result