Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

gnometavern state

Back to all declarations

RealmPath

untyped string

RealmPath is this realm's on-chain address, used in help text.

Value

"gno.land/r/g17dvvky49vjqj6a4cjhwcvzctteqjm9stee000h/gnometavern"

MaxWallNotes

untyped bigint

MaxWallNotes caps how many wall notes are kept (oldest are dropped).

Value

(30 <untyped> bigint)

WallNote

type

WallNote is one message pinned to the tavern wall.

Value

gnometavern.WallNote

gnomes

map[.uverse.address]*tavernlogic.Gnome
Open
OID
0acab4…580e:4
gnomes details

Inspect map

totalServes

int

Value

18

currentDay

func() int64

currentDay returns the current tavern day, derived from chain height.

Open
OID
0acab4…580e:10
currentDay details

Inspect func

mustGnome

func(addr .uverse.address) *tavernlogic.Gnome
Open
OID
0acab4…580e:11
mustGnome details

Inspect func

validName

func(name string) bool
Open
OID
0acab4…580e:12
validName details

Inspect func

Register

func(name string) string

Register creates a gnome for the caller's address. One gnome per address, and names are unique across the tavern.

Open
OID
0acab4…580e:13
Register details

Inspect func

Serve

func(itemID int) string

Serve serves one menu item to a tavern guest. The item is chosen by its menu ID (see the menu page). Pays coins and XP per the menu.

Open
OID
0acab4…580e:14
Serve details

Inspect func

ClaimQuest

func(slot int) string

ClaimQuest claims the reward for today's quest in board slot 0, 1 or 2, once its requirement has been met by serving.

Open
OID
0acab4…580e:15
ClaimQuest details

Inspect func

Feast

func() string

Feast spends 50 coins on a Gnome Feast, gaining 15 XP. Once per day.

Open
OID
0acab4…580e:16
Feast details

Inspect func

PostNote

func(text string) string

PostNote pins a one-line note (max 140 chars) to the tavern wall.

Open
OID
0acab4…580e:17
PostNote details

Inspect func

GnomeCount

func() int

GnomeCount returns how many gnomes are registered.

Open
OID
0acab4…580e:18
GnomeCount details

Inspect func

TotalServes

func() int

TotalServes returns how many items have been served, all time.

Open
OID
0acab4…580e:19
TotalServes details

Inspect func

CurrentDay

func() int64

CurrentDay returns the current tavern day number.

Open
OID
0acab4…580e:20
CurrentDay details

Inspect func

Profile

func(addr .uverse.address) string

Profile returns a one-line summary of the gnome at addr.

Open
OID
0acab4…580e:21
Profile details

Inspect func

Render

func(path string) string

Render draws the tavern for gnoweb. Pages: "" the tavern board (stats, today's quests, top 10, wall) "menu" the full menu with level requirements "quests" today's quest board in detail "leaderboard" every gnome, ranked "wall" the full message wall "gnome/<addr>" one gnome's card

Open
OID
0acab4…580e:22
Render details

Inspect func

entry

type

Value

gnometavern.entry

ranked

func() []gnometavern.entry

ranked returns all gnomes sorted by XP (then lifetime serves), best first. Insertion sort: the tavern is small and this stays dependency-free and deterministic (join order breaks full ties).

Open
OID
0acab4…580e:24
ranked details

Inspect func

ranksBefore

func(a gnometavern.entry, b gnometavern.entry) bool
Open
OID
0acab4…580e:25
ranksBefore details

Inspect func

leaderboardTable

func(limit int) string
Open
OID
0acab4…580e:26
leaderboardTable details

Inspect func

questList

func(day int64) string
Open
OID
0acab4…580e:29
questList details

Inspect func

renderLeaderboard

func() string
Open
OID
0acab4…580e:31
renderLeaderboard details

Inspect func

renderGnome

func(addrStr string) string
Open
OID
0acab4…580e:34
renderGnome details

Inspect func
RealmPath : untyped string ="gno.land/r/g17dvvky49vjqj6a4cjhwcvzctteqjm9stee000h/gnometavern"
MaxWallNotes : untyped bigint =(30 <untyped> bigint)
WallNote : type =gnometavern.WallNote
gnomes : map[.uverse.address]*tavernlogic.Gnome Inspect
joinOrder : [].uverse.address (len=2) Inspect
wall : []gnometavern.WallNote (len=3) Inspect
totalServes : int =18
callerOf : func() .uverse.address Inspect
currentDay : func() int64 Inspect
mustGnome : func(addr .uverse.address) *tavernlogic.Gnome Inspect
validName : func(name string) bool Inspect
Register : func(name string) string Inspect
Serve : func(itemID int) string Inspect
ClaimQuest : func(slot int) string Inspect
Feast : func() string Inspect
PostNote : func(text string) string Inspect
GnomeCount : func() int Inspect
TotalServes : func() int Inspect
CurrentDay : func() int64 Inspect
Profile : func(addr .uverse.address) string Inspect
Render : func(path string) string Inspect
entry : type =gnometavern.entry
ranked : func() []gnometavern.entry Inspect
ranksBefore : func(a gnometavern.entry, b gnometavern.entry) bool Inspect
leaderboardTable : func(limit int) string Inspect
renderHome : func() string Inspect
renderMenu : func() string Inspect
questList : func(day int64) string Inspect
renderQuests : func() string Inspect
renderLeaderboard : func() string Inspect
wallList : func(limit int) string Inspect
renderWall : func() string Inspect
renderGnome : func(addrStr string) string Inspect