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

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

goldenticket/v2 package

Overview

Package goldenticket is a 1/1 GRC721 NFT: one golden ticket, minted to the publisher when the package is added. It checks that a gno.land collection shows in the Adena wallet, built the way gnofly's planes are:

  • the collection is a gno.land/p/nt/grc721/v0 token made with NewToken, whose NewToken and Transfer events Adena finds on its indexer;
  • the read functions take a grc721.TokenID and return (value, error), as Adena calls them: OwnerOf("1"), BalanceOf("g1..."), TokenURI("1") as the <img src>, TokenMetadata("1") as JSON with camelCase traitType.

v2 of goldenticket: the image is no longer a constant. The publisher is the admin and moves it with SetImage, as the planes' SetImageBase does, so it can live where both Adena (any https: image) and gno.land's pages (an allowlist: GitHub, imgur, IPFS) load it.

Transfer moves the ticket, so it can reach any Adena account.

Function

TokenURI

func TokenURI(tid grc721.TokenID) (string, error)
Ask AI Claude ChatGPT

TokenURI returns the image of the ticket: what Adena shows.

Param

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/g1sw5xklxjjuv0yvuxy5f5s3l3mnj0nqq626a9wr/goldenticket/v2.TokenURI()"

Result