Skip to content Search Apps Documentation Source Content 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.

v0 state

Back to all declarations

realmPath

untyped string

realmPath is this realm's own path. Passed explicitly to config rather than relying on its zero-argument helpers. Both work (a plain read is borrowed, so config sees this realm as the caller), but a constant cannot be wrong, and spelling it out is what a reader copying this file needs to see.

Value

"gno.land/r/moul/x/allinone/devtools/v0"

maxNotes

untyped bigint

maxNotes bounds the guest list. fifo drops the oldest rather than growing, because storage on chain is paid for and never refunded: an unbounded list in a demo anyone can write to is a bill with no ceiling.

Value

(10 <untyped> bigint)

authors

*v0.Board

authors counts notes per writer. A tally.Board rather than a map: gno map iteration order is unspecified, so a leaderboard built by ranging one is not reproducible between calls.

Open
OID
0a096f…dfca:7
authors details

Inspect pointer

depositPerByte

untyped bigint

depositPerByte is what the chain charges to keep a byte, in ugnot. Used only to price the note list on the page, never to settle anything.

Value

(100 <untyped> bigint)

Add

func(body string)

Add appends a note. It is the only mutating function here, and it carries both guards a real one should.

Open
OID
0a096f…dfca:11
Add details

Inspect func

Reset

func()

Reset empties the list, so the realm can be put back to a known state without a redeploy. Not gated by the pause switch: clearing up is the thing you still want to do while paused.

Open
OID
0a096f…dfca:13
Reset details

Inspect func

Render

func(path string) string

Render shows every package at work. The root view is deliberately free of anything that moves on its own, so an example test can pin it; the live numbers live under "chain".

Open
OID
0a096f…dfca:14
Render details

Inspect func

renderHome

func(path string) string
Open
OID
0a096f…dfca:15
renderHome details

Inspect func

renderBoard

func() string

renderBoard shows who has written the most notes, and what the list costs to keep. Both numbers come from a package rather than from arithmetic here.

Open
OID
0a096f…dfca:16
renderBoard details

Inspect func

notesBytes

func() int

notesBytes is the length of every note currently held.

Open
OID
0a096f…dfca:17
notesBytes details

Inspect func

renderChain

func() string

renderChain is everything that moves: the height, and the links built from it. Kept off the root view so the root can be pinned by an example.

Open
OID
0a096f…dfca:18
renderChain details

Inspect func
realmPath : untyped string ="gno.land/r/moul/x/allinone/devtools/v0"
maxNotes : untyped bigint =(10 <untyped> bigint)
notes : *v0.List Inspect
authors : *v0.Board Inspect
depositPerByte : untyped bigint =(100 <untyped> bigint)
Add : func(body string) Inspect
Reset : func() Inspect
Render : func(path string) string Inspect
renderHome : func(path string) string Inspect
renderBoard : func() string Inspect
notesBytes : func() int Inspect
renderChain : func() string Inspect
renderNotes : func() string Inspect