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

gnofly state

Back to all declarations

errSpoofedRealm

untyped string

The refusals of this realm, as strings: a string constant costs its length in storage where an errors.New value costs about a kilobyte (see the planes realm's errors.gno). A panic with a string aborts the call with it.

Value

"gnofly market: spoofed realm"

errNotAdmin

untyped string

The refusals of this realm, as strings: a string constant costs its length in storage where an errors.New value costs about a kilobyte (see the planes realm's errors.gno). A panic with a string aborts the call with it.

Value

"gnofly market: caller is not an admin"

errNotUserCall

untyped string

The refusals of this realm, as strings: a string constant costs its length in storage where an errors.New value costs about a kilobyte (see the planes realm's errors.gno). A panic with a string aborts the call with it.

Value

"gnofly market: call it directly from a wallet (maketx call or Adena)"

errUnknownPlane

untyped string

The refusals of this realm, as strings: a string constant costs its length in storage where an errors.New value costs about a kilobyte (see the planes realm's errors.gno). A panic with a string aborts the call with it.

Value

"gnofly market: no such plane"

errNotOwner

untyped string

The refusals of this realm, as strings: a string constant costs its length in storage where an errors.New value costs about a kilobyte (see the planes realm's errors.gno). A panic with a string aborts the call with it.

Value

"gnofly market: caller does not own this plane"

errNotSeller

untyped string

The refusals of this realm, as strings: a string constant costs its length in storage where an errors.New value costs about a kilobyte (see the planes realm's errors.gno). A panic with a string aborts the call with it.

Value

"gnofly market: caller is not the seller of this plane"

errListed

untyped string

The refusals of this realm, as strings: a string constant costs its length in storage where an errors.New value costs about a kilobyte (see the planes realm's errors.gno). A panic with a string aborts the call with it.

Value

"gnofly market: this plane is listed"

errNotListed

untyped string

The refusals of this realm, as strings: a string constant costs its length in storage where an errors.New value costs about a kilobyte (see the planes realm's errors.gno). A panic with a string aborts the call with it.

Value

"gnofly market: this plane is not listed"

errOwnListing

untyped string

The refusals of this realm, as strings: a string constant costs its length in storage where an errors.New value costs about a kilobyte (see the planes realm's errors.gno). A panic with a string aborts the call with it.

Value

"gnofly market: a seller cannot buy their own listing"

errPaused

untyped string

The refusals of this realm, as strings: a string constant costs its length in storage where an errors.New value costs about a kilobyte (see the planes realm's errors.gno). A panic with a string aborts the call with it.

Value

"gnofly market: new listings are paused"

errBadPrice

untyped string

The refusals of this realm, as strings: a string constant costs its length in storage where an errors.New value costs about a kilobyte (see the planes realm's errors.gno). A panic with a string aborts the call with it.

Value

"gnofly market: price must be between 1000000 and 1000000000000 ugnot"

errNotApproved

untyped string

The refusals of this realm, as strings: a string constant costs its length in storage where an errors.New value costs about a kilobyte (see the planes realm's errors.gno). A panic with a string aborts the call with it.

Value

"gnofly market: approve the market on the planes realm first (Approve or SetApprovalForAll)"

errBadRecipient

untyped string

The refusals of this realm, as strings: a string constant costs its length in storage where an errors.New value costs about a kilobyte (see the planes realm's errors.gno). A panic with a string aborts the call with it.

Value

"gnofly market: invalid recipient address"

errNotStray

untyped string

The refusals of this realm, as strings: a string constant costs its length in storage where an errors.New value costs about a kilobyte (see the planes realm's errors.gno). A panic with a string aborts the call with it.

Value

"gnofly market: this plane is not held by the market outside a listing"

payDenom

untyped string

Value

"ugnot"

minPrice

int64

Value

1000000

maxPrice

int64

Value

1000000000000

supply

untyped bigint

// plane ids run from 1 to 777

Value

(777 <untyped> bigint)

listing

type

listing is one plane for sale. The plane itself is held by this realm (escrow) until it is bought or the listing is cancelled.

Value

gnofly.listing

paused

bool

Value

false

self

.uverse.address

Value

<gnolang.StringValue>

List

func(id int, priceUgnot int64)

List puts plane id up for sale at priceUgnot. The caller must own it and have approved this realm on the planes realm (Approve for this plane, or SetApprovalForAll): the plane moves here, in escrow, until it is bought or the listing is cancelled.

Open
OID
009420…34f0:9
List details

Inspect func

UpdatePrice

func(id int, priceUgnot int64)

UpdatePrice changes the price of a plane the caller listed.

Open
OID
009420…34f0:10
UpdatePrice details

Inspect func

Cancel

func(id int)

Cancel takes a listing down and gives the plane back to its seller. It works while the market is paused.

Open
OID
009420…34f0:11
Cancel details

Inspect func

Buy

func(id int)

Buy buys a listed plane: send exactly its price in ugnot. The royalty of the planes realm (RoyaltyInfo: 5% to the gnofly treasury) is paid out of the price, the seller receives the rest, and the plane goes to the buyer. It works while the market is paused.

Open
OID
009420…34f0:12
Buy details

Inspect func

Transfer

func(to .uverse.address, id int)

Transfer gives a plane the caller owns, not listed, to another address, through this realm: the call Bazaar's site makes. It needs the same approval as List. A plane can always be moved on the planes realm itself.

Open
OID
009420…34f0:13
Transfer details

Inspect func

SetPaused

func(p bool)

SetPaused stops (or resumes) new listings and price changes. Admin of the game realm only. Cancel and Buy keep working, so a move to a newer market never strands a plane: sellers cancel here and list there.

Open
OID
009420…34f0:14
SetPaused details

Inspect func

ReturnStray

func(id int, to .uverse.address)

ReturnStray gives back a plane this realm holds outside any listing: one someone sent here by mistake. Admin of the game realm only; to is who it came from, as the chain's transfer events show.

Open
OID
009420…34f0:15
ReturnStray details

Inspect func

Paused

func() bool

Paused reports whether new listings are stopped.

Open
OID
009420…34f0:16
Paused details

Inspect func

checkPrice

func(p int64)

checkPrice panics unless p is a price this market takes.

Open
OID
009420…34f0:17
checkPrice details

Inspect func

mustListing

func(id int) *gnofly.listing

mustListing returns the listing of plane id, or panics.

Open
OID
009420…34f0:18
mustListing details

Inspect func

getListing

func(id int) *gnofly.listing

getListing returns the listing of plane id, or nil.

Open
OID
009420…34f0:19
getListing details

Inspect func

ownerOf

func(id int) .uverse.address
Open
OID
009420…34f0:20
ownerOf details

Inspect func

key

func(id int) string

key is the listings key of plane id: three digits, "042".

Open
OID
009420…34f0:21
key details

Inspect func

slug

untyped string

slug is the last element of this realm's path.

Value

"gnofly"

maxOpen

untyped bigint

maxOpen is the most listings ListOpen returns, as Bazaar's own realms do.

Value

(50 <untyped> bigint)

Name

func() string

Name and Symbol are the planes collection's: the market sells nothing else.

Open
OID
009420…34f0:23
Name details

Inspect func

Minted

func() int

Minted returns how many planes were minted.

Open
OID
009420…34f0:26
Minted details

Inspect func

OwnerOf

func(tid string) (.uverse.address, .uverse.error)
Open
OID
009420…34f0:27
OwnerOf details

Inspect func

TokenURI

func(tid string) string

TokenURI returns the image of a plane, an https URL.

Open
OID
009420…34f0:28
TokenURI details

Inspect func

TokensOf

func(owner string) string

TokensOf returns the ids of the planes owner holds, comma-separated, in id order: "3,42,700". A listed plane is not among them: it is held here.

Open
OID
009420…34f0:29
TokensOf details

Inspect func

ListOpen

func() string

ListOpen returns the listings, one line each, in id order, at most 50.

Open
OID
009420…34f0:30
ListOpen details

Inspect func

ItemLine

func(id int) string

ItemLine returns the line of plane id, listed or not. It panics for an id that is not a minted plane: Bazaar's site skips the ids it cannot read.

Open
OID
009420…34f0:31
ItemLine details

Inspect func

line

func(id int, l *gnofly.listing) string

line builds the line of plane id; l is its listing, nil when it has none.

Open
OID
009420…34f0:32
line details

Inspect func

plane

type

Value

gnofly.plane

planeInfo

func(id int) gnofly.plane

planeInfo reads plane id from the planes realm's PlaneJSON.

Open
OID
009420…34f0:33
planeInfo details

Inspect func

clean

func(s string) string

clean keeps a field from breaking a line: no "|" and no line break. The planes realm's names and URLs have none; this is a guard, not a filter.

Open
OID
009420…34f0:34
clean details

Inspect func

Render

func(string) string

Render shows the listings on gnoweb.

Open
OID
009420…34f0:35
Render details

Inspect func

gnot

func(ugnot int64) string

gnot writes ugnot as GNOT: 1000000 is "1 GNOT", 1500000 "1.5 GNOT".

Open
OID
009420…34f0:36
gnot details

Inspect func

authority

type

authority is the one question this realm asks about roles.

Value

gnofly.authority

gameRoles

type

gameRoles answers with the roles of the game realm.

Value

gnofly.gameRoles

roles

gnofly.gameRoles

roles is the authority of this realm. It is a variable only so that the tests can answer for the game realm, which has no admin under \`gno test\`.

Open
OID
009420…34f0:39
roles details

Inspect ref

callerOf

func(int, rlm .uverse.realm) .uverse.address
Open
OID
009420…34f0:40
callerOf details

Inspect func

userOf

func(int, rlm .uverse.realm) .uverse.address
Open
OID
009420…34f0:42
userOf details

Inspect func

assertAdmin

func(int, rlm .uverse.realm) .uverse.address
Open
OID
009420…34f0:43
assertAdmin details

Inspect func
errSpoofedRealm : untyped string ="gnofly market: spoofed realm"
errNotAdmin : untyped string ="gnofly market: caller is not an admin"
errNotUserCall : untyped string ="gnofly market: call it directly from a wallet (maketx call or Adena)"
errUnknownPlane : untyped string ="gnofly market: no such plane"
errNotOwner : untyped string ="gnofly market: caller does not own this plane"
errNotSeller : untyped string ="gnofly market: caller is not the seller of this plane"
errListed : untyped string ="gnofly market: this plane is listed"
errNotListed : untyped string ="gnofly market: this plane is not listed"
errOwnListing : untyped string ="gnofly market: a seller cannot buy their own listing"
errPaused : untyped string ="gnofly market: new listings are paused"
errBadPrice : untyped string ="gnofly market: price must be between 1000000 and 1000000000000 ugnot"
errNotApproved : untyped string ="gnofly market: approve the market on the planes realm first (Approve or SetApprovalForAll)"
errBadRecipient : untyped string ="gnofly market: invalid recipient address"
errNotStray : untyped string ="gnofly market: this plane is not held by the market outside a listing"
payDenom : untyped string ="ugnot"
minPrice : int64 =1000000
maxPrice : int64 =1000000000000
supply : untyped bigint =(777 <untyped> bigint)
listing : type =gnofly.listing
listings : v0.BPTree Inspect
paused : bool =false
self : .uverse.address =<gnolang.StringValue>
init.22 : func() Inspect
List : func(id int, priceUgnot int64) Inspect
UpdatePrice : func(id int, priceUgnot int64) Inspect
Cancel : func(id int) Inspect
Buy : func(id int) Inspect
Transfer : func(to .uverse.address, id int) Inspect
SetPaused : func(p bool) Inspect
ReturnStray : func(id int, to .uverse.address) Inspect
Paused : func() bool Inspect
checkPrice : func(p int64) Inspect
mustListing : func(id int) *gnofly.listing Inspect
getListing : func(id int) *gnofly.listing Inspect
ownerOf : func(id int) .uverse.address Inspect
key : func(id int) string Inspect
tid : func(id int) v0.TokenID Inspect
slug : untyped string ="gnofly"
maxOpen : untyped bigint =(50 <untyped> bigint)
Name : func() string Inspect
Symbol : func() string Inspect
Minted : func() int Inspect
OwnerOf : func(tid string) (.uverse.address, .uverse.error) Inspect
TokenURI : func(tid string) string Inspect
TokensOf : func(owner string) string Inspect
ListOpen : func() string Inspect
ItemLine : func(id int) string Inspect
line : func(id int, l *gnofly.listing) string Inspect
plane : type =gnofly.plane
planeInfo : func(id int) gnofly.plane Inspect
clean : func(s string) string Inspect
Render : func(string) string Inspect
gnot : func(ugnot int64) string Inspect
Address : func() .uverse.address Inspect
authority : type =gnofly.authority
gameRoles : type =gnofly.gameRoles
roles : gnofly.gameRoles Inspect
callerOf : func(int, rlm .uverse.realm) .uverse.address Inspect
userOf : func(int, rlm .uverse.realm) .uverse.address Inspect
assertAdmin : func(int, rlm .uverse.realm) .uverse.address Inspect