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 state

Back to all declarations

ink

untyped string

Value

"#0d0d0d"

paper

untyped string

Value

"#fafaf8"

grey

untyped string

Value

"#9a9a96"

accent

untyped string

Value

"#e5432f"

removedTitle

untyped string

removedTitle replaces the details of a concert hidden by moderation.

Value

"Removed by moderation"

concert

type

concert is what a ticket shows of its concert.

Value

nft.concert

shown

func(id int, rec string) (c nft.concert, ok bool)

shown decodes an event record for a ticket: everything while the concert and its artist are visible, a neutral placeholder otherwise. ok is false when the concert is not visible.

Open
OID
007a20…1c42:3
shown details

Inspect func

fields

func(id int) (ev int, serial int, attended bool, ok bool)

fields reads ticket id's event, serial and attended mark (ok false when unknown).

Open
OID
007a20…1c42:5
fields details

Inspect func

EventSVG

func(id int) string

EventSVG is the specimen ticket of a visible concert as a markdown image, or "" when the concert is not visible.

Open
OID
007a20…1c42:6
EventSVG details

Inspect func

TicketSVG

func(id int) string

TicketSVG is a ticket as a markdown image, or "" if unknown.

Open
OID
007a20…1c42:7
TicketSVG details

Inspect func

TokenURI

func(tokenID string) string

TokenURI is a ticket's GRC721 metadata as a data URI, its artwork drawn on the fly. It panics for an unknown ticket.

Open
OID
007a20…1c42:8
TokenURI details

Inspect func

newCanvas

func(w int, h int) *v0.Canvas
Open
OID
007a20…1c42:9
newCanvas details

Inspect func

drawText

func(c *v0.Canvas, x int, y int, s string, fill string, size int, anchor string, class string)
Open
OID
007a20…1c42:10
drawText details

Inspect func

draw

func(e nft.concert, serial int, attended bool) *v0.Canvas

draw draws a ticket; serial 0 is the specimen shown before purchase.

Open
OID
007a20…1c42:11
draw details

Inspect func

stamp

func(c *v0.Canvas, label string)
Open
OID
007a20…1c42:12
stamp details

Inspect func

artistVisible

func(id int) bool

artistVisible reports whether artist id exists and is not hidden.

Open
OID
007a20…1c42:14
artistVisible details

Inspect func

ArtistName

func(id int) string

ArtistName is a visible artist's name, "" otherwise (one data read: the catalog's artist record, through the frozen layout).

Open
OID
007a20…1c42:15
ArtistName details

Inspect func

CEvents

untyped string

// store.Pad(id) -> event record

Value

"tickets/events"

CTickets

untyped string

// store.Pad((id-1)/Chunk) -> Chunk ticket records

Value

"tickets/tickets"

Chunk

untyped bigint

The tickets records this realm reads, written by the tickets writer. Every tickets release keeps this layout: the artwork of existing tickets depends on it.

Value

(16 <untyped> bigint)

ESold

untyped bigint

Event record fields (store.Rec); the one each sale changes comes first.

Value

(0 <untyped> bigint)

EArtist

untyped bigint

Event record fields (store.Rec); the one each sale changes comes first.

Value

(1 <untyped> bigint)

EStart

untyped bigint

Event record fields (store.Rec); the one each sale changes comes first.

Value

(2 <untyped> bigint)

EPrice

untyped bigint

Event record fields (store.Rec); the one each sale changes comes first.

Value

(3 <untyped> bigint)

ECapacity

untyped bigint

Event record fields (store.Rec); the one each sale changes comes first.

Value

(4 <untyped> bigint)

ECancelled

untyped bigint

// "1" or ""

Value

(5 <untyped> bigint)

EHidden

untyped bigint

// "1" or ""

Value

(6 <untyped> bigint)

ERemoved

untyped bigint

// the moderator's public reason while hidden

Value

(7 <untyped> bigint)

ETitle

untyped bigint

Event record fields (store.Rec); the one each sale changes comes first.

Value

(8 <untyped> bigint)

EVenue

untyped bigint

Event record fields (store.Rec); the one each sale changes comes first.

Value

(9 <untyped> bigint)

EFields

untyped bigint

Event record fields (store.Rec); the one each sale changes comes first.

Value

(11 <untyped> bigint)

TEvent

untyped bigint

Ticket record fields.

Value

(0 <untyped> bigint)

TSerial

untyped bigint

Ticket record fields.

Value

(1 <untyped> bigint)

TAttended

untyped bigint

// "1" or ""

Value

(2 <untyped> bigint)

CArtists

untyped string

// store.Pad((id-1)/ArtistChunk) -> ArtistChunk artist heads

Value

"catalog/artists"

ArtistChunk

untyped bigint

The catalog's artist heads, read for a ticket's artist line: every catalog release keeps this layout, since it shares the data realm's records (catalog/v1 records.gno). Reading them here, not through a catalog realm, keeps this permanent realm free of any versioned import.

Value

(8 <untyped> bigint)

AHidden

untyped bigint

// "1" or ""

Value

(0 <untyped> bigint)

AName

untyped bigint

The catalog's artist heads, read for a ticket's artist line: every catalog release keeps this layout, since it shares the data realm's records (catalog/v1 records.gno). Reading them here, not through a catalog realm, keeps this permanent realm free of any versioned import.

Value

(6 <untyped> bigint)

writer

func()

writer lets only the tickets writer through, while its role is not paused.

Open
OID
007a20…1c42:20
writer details

Inspect func

maxID

untyped bigint

maxID is the largest id a data key holds (store.Pad); readers answer "" past it instead of panicking.

Value

(99999999 <untyped> bigint)

Mint

func(to .uverse.address, id int)

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

Open
OID
007a20…1c42:22
Mint details

Inspect func

Transfer

func(from .uverse.address, to .uverse.address, id int)

Transfer moves ticket id from its holder from to to. The tickets writer only, and only in a transaction from signed: no release moves the tickets of a holder who signs nothing (see the package comment for what a malicious release could still do). The rules decide who may gift.

Open
OID
007a20…1c42:23
Transfer details

Inspect func

BalanceOf

func(owner .uverse.address) int64

BalanceOf is how many tickets owner holds.

Open
OID
007a20…1c42:27
BalanceOf details

Inspect func

OwnerOf

func(tokenID string) .uverse.address
Open
OID
007a20…1c42:28
OwnerOf details

Inspect func

Holder

func(id int) .uverse.address
Open
OID
007a20…1c42:29
Holder details

Inspect func

Render

func(string) string

Render shows the collection.

Open
OID
007a20…1c42:30
Render details

Inspect func

ticket

func(id int) string

ticket returns ticket id's record ("" when absent).

Open
OID
007a20…1c42:31
ticket details

Inspect func

artist

func(id int) string

artist returns artist id's head record ("" when absent).

Open
OID
007a20…1c42:32
artist details

Inspect func
ink : untyped string ="#0d0d0d"
paper : untyped string ="#fafaf8"
grey : untyped string ="#9a9a96"
accent : untyped string ="#e5432f"
removedTitle : untyped string ="Removed by moderation"
concert : type =nft.concert
shown : func(id int, rec string) (c nft.concert, ok bool) Inspect
fields : func(id int) (ev int, serial int, attended bool, ok bool) Inspect
EventSVG : func(id int) string Inspect
TicketSVG : func(id int) string Inspect
TokenURI : func(tokenID string) string Inspect
newCanvas : func(w int, h int) *v0.Canvas Inspect
drawText : func(c *v0.Canvas, x int, y int, s string, fill string, size int, anchor string, class string) Inspect
draw : func(e nft.concert, serial int, attended bool) *v0.Canvas Inspect
stamp : func(c *v0.Canvas, label string) Inspect
pad3 : func(n int) string Inspect
artistVisible : func(id int) bool Inspect
ArtistName : func(id int) string Inspect
CEvents : untyped string ="tickets/events"
CTickets : untyped string ="tickets/tickets"
Chunk : untyped bigint =(16 <untyped> bigint)
ESold : untyped bigint =(0 <untyped> bigint)
EArtist : untyped bigint =(1 <untyped> bigint)
EStart : untyped bigint =(2 <untyped> bigint)
EPrice : untyped bigint =(3 <untyped> bigint)
ECapacity : untyped bigint =(4 <untyped> bigint)
ECancelled : untyped bigint =(5 <untyped> bigint)
EHidden : untyped bigint =(6 <untyped> bigint)
ERemoved : untyped bigint =(7 <untyped> bigint)
ETitle : untyped bigint =(8 <untyped> bigint)
EVenue : untyped bigint =(9 <untyped> bigint)
EFields : untyped bigint =(11 <untyped> bigint)
TEvent : untyped bigint =(0 <untyped> bigint)
TSerial : untyped bigint =(1 <untyped> bigint)
TAttended : untyped bigint =(2 <untyped> bigint)
CArtists : untyped string ="catalog/artists"
ArtistChunk : untyped bigint =(8 <untyped> bigint)
AHidden : untyped bigint =(0 <untyped> bigint)
AName : untyped bigint =(6 <untyped> bigint)
token : *v0.Token Inspect
ledger : *v0.PrivateLedger Inspect
init.42 : func() Inspect
writer : func() Inspect
maxID : untyped bigint =(99999999 <untyped> bigint)
tid : func(id int) v0.TokenID Inspect
Mint : func(to .uverse.address, id int) Inspect
Transfer : func(from .uverse.address, to .uverse.address, id int) Inspect
Name : func() string Inspect
Symbol : func() string Inspect
TotalSupply : func() int64 Inspect
BalanceOf : func(owner .uverse.address) int64 Inspect
OwnerOf : func(tokenID string) .uverse.address Inspect
Holder : func(id int) .uverse.address Inspect
Render : func(string) string Inspect
ticket : func(id int) string Inspect
artist : func(id int) string Inspect
event : func(id int) string Inspect