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

errors.gno

1.51 Kb · 30 lines
 1package planes
 2
 3// The refusals of this realm, as strings. The game and arena realms keep
 4// theirs as error values; this one is published with a 42 KB table and every
 5// byte of state is paid for at deploy. Measured on a mainnet-like node, an
 6// errors.New value costs about 1.15 KB of storage (a pointer, a heap item and
 7// a struct, each with its header) where a string constant costs its length:
 8// twenty of them are 2 GNOT against 0.1. A panic with a string aborts the
 9// call with the same message.
10const (
11	errSpoofedRealm = "gnofly: spoofed realm"
12	errNotAdmin     = "gnofly: caller is not an admin"
13	errBadTable     = "gnofly: the plane table does not run from 1 to 777"
14	errCorruptRow   = "gnofly: corrupt plane row"
15
16	errUnknownPlane  = "gnofly: unknown plane"
17	errNotMinted     = "gnofly: plane not minted"
18	errNotPlaneOwner = "gnofly: caller does not own this plane"
19
20	errMintClosed   = "gnofly: the mint is closed"
21	errSoldOut      = "gnofly: every plane is minted"
22	errCapReached   = "gnofly: this wallet minted as many planes as the cap allows"
23	errNotUserCall  = "gnofly: Mint must be called directly by a user (maketx call)"
24	errInvalidCount = "gnofly: mint 1 to 7 planes at a time"
25
26	errInvalidPrice   = "gnofly: price must be between 1000000 and 10000000000 ugnot"
27	errInvalidCap     = "gnofly: cap must be between 1 and 777"
28	errInvalidBase    = "gnofly: image base must be an https URL ending in /, 12 to 200 characters of [A-Za-z0-9./_-:]"
29	errInvalidRoyalty = "gnofly: royalty must be between 0 and 1000 basis points"
30)