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

gnft package

Overview

Package gnft implements the position-NFT surface used by GnoSwap.

It provides GRC721-compatible ownership, transfer, approval, and metadata operations for LP positions. Generated parameter-format URIs become SVG data URIs on read; custom non-empty URIs are returned unchanged. Enumeration and safeTransferFrom are not exposed by this package.

Function

BalanceOf

func BalanceOf(owner address) (int64, error)

BalanceOf returns the number of NFTs owned by the specified address.

Parameters:

  • owner: address whose NFT balance is queried

Returns:

  • balance: number of NFTs owned by owner
  • error: token-ledger balance lookup error; an invalid owner address panics before the lookup

Param

Command

gnokey query vm/qeval -remote "http://127.0.0.1:26657" -data "gno.land/r/gnoswap/gnft.BalanceOf()"

Result