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

nft package

Overview

Package nft holds GnoRadio's concert tickets as GRC721 NFTs. It is permanent, like the data realm: a tickets release changes the rules, never this ledger, so no ticket ever moves to a new contract.

Only the realm that writes the tickets role now (data.Writer("tickets")) mints and transfers, only while that role is not paused, and only for the wallet that signs the transaction (OriginCaller): a release can never move the ticket of a holder who signs nothing. That is the whole guarantee. The signature proves the holder sent some transaction through the tickets writer, not that they asked for this move: a malicious tickets release (it takes over only after the data realm's public 72 h window, which the guardian can cancel) could move every ticket of a holder who then signs any call to it. This realm cannot see further up the call stack. Anyone reads.

A ticket's metadata and artwork are drawn on the fly from the tickets data (art.gno), whose record layout below is frozen for that reason.

Function

Mint

func Mint(cur realm, to address, id int)

Mint creates ticket id for to, the wallet that signed the transaction. The tickets writer only.

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/nym-alexiscolin000/gnoradio/tickets/nft" -func "Mint" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "onyx-1" -remote "https://rpc.onyx.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.onyx.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nym-alexiscolin000/gnoradio/tickets/nft" -func "Mint" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "onyx-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.onyx.testnets.gno.land" call.tx