← Back to Realms

Realm

gno.land/r/g1t2kg2vtr3fukg43eujkn6x53gfdyakhngt4sfd/gnofly/nfts/planes

Overview

Realm Path
gno.land/r/g1t2kg2vtr3fukg43eujkn6x53gfdyakhngt4sfd/gnofly/nfts/planes
Exported Functions
25
State Entries
55
Source Files
11
Total Package Entries
128

Exported Functions

25 exported functions

State

55 state entries

Source Code

FILES
doc.gno
go
1// v0 - Unaudited: This is an initial version that has not yet been formally audited.
2// Use in production at your own risk.
3//
4// Package planes is a collection of 777 plane NFTs that pilots fly in
5// gnofly, a multiplayer plane game. It is a GRC721 token built on
6// gno.land/p/nt/grc721/v0 with the royalty extension.
7//
8// Every plane is drawn in a table committed with the realm (table.gno): a
9// name, one of the nine models the game client draws, a pilot (none or a
10// gnome), three colours, a tier and the colour of its laser, the shots
11// every pilot sees it fire. The designs stay procedural in the client; the
12// token stores only these traits. Id 777 is the super-gnome, a
13// 1/1 that is a gnome flying like a superhero rather than a plane. The table
14// is public; which ids a mint gets is drawn at random among the ones left,
15// 1 to 7 per call (draw.gno).
16//
17// Three kinds of callers write to it:
18//
19//   - anyone mints the next plane with the price attached (Mint), transfers,
20//     approves and burns their planes (TransferFrom, Approve,
21//     SetApprovalForAll, Burn);
22//   - the admins of the game realm open and close the mint and tune its
23//     price, its per-wallet cap, the image URL and the royalty (SetMintOpen,
24//     SetPrice, SetMintCap, SetImageBase, SetRoyaltyBps);
25//   - nobody else: there is no reserve and no airdrop.
26//
27// The realm keeps no roles and no money of its own. The admins are those of
28// gno.land/r/g1t2kg2vtr3fukg43eujkn6x53gfdyakhngt4sfd/gnofly/game/v0, asked
29// at the time of each call, and every mint is forwarded to its treasury in
30// the same transaction. The royalty of a resale, 5% by default, names the
31// treasury too.
32//
33// Reads are plain functions meant for vm/qeval. The ones ending in JSON
34// return a single string holding a JSON document. PlanesOf and OwnerOf are
35// what the game server reads: ownership is the only on-chain fact of a
36// plane, which one a pilot flies is picked in the game's hangar and checked
37// against OwnerOf by the server. Render exposes the
38// same data as markdown for gnoweb. The read side of the token and of its
39// royalty extension is exported as Token and Royalties, for other realms.
40// No metadata is stored per token: TokenMetadata and TokenURI are computed
41// from the table and the image base on every read.
42//
43// Storage is paid for at deploy, so the realm is kept small: the table is one
44// string read in place, refusals are string constants, and the settings are
45// read through CollectionJSON rather than one getter each.
46package planes
47

Raw Package Data

Raw JSON data