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

Entry

type

Entry is a single signed guestbook line.

Value

v0.Entry

maxMessageLen

untyped bigint

Value

(280 <untyped> bigint)

count

int

Value

0

Sign

func(message string)

Sign appends a new entry to the guestbook attributed to the immediate caller. It is a crossing function (gno 0.9 interrealm convention): callers invoke it as Sign(cross(cur), "hello"). The cur.IsCurrent() guard is the authentication primitive — without it a stale/forged realm value could spoof the author.

Open
OID
0a85e0…668b:7
Sign details

Inspect func

addEntry

func(author string, message string, height int64) *v0.Entry

addEntry validates the message and appends an entry. Non-crossing internal helper so the append/validation logic is unit-testable without a realm frame. Panics (aborting the tx, reverting state) on an invalid message.

Open
OID
0a85e0…668b:9
addEntry details

Inspect func

Count

func() int

Count returns the total number of signatures. Read-only, non-crossing.

Open
OID
0a85e0…668b:10
Count details

Inspect func

Render

func(path string) string

Render lists every entry newest-first as a Markdown table plus a total count.

Open
OID
0a85e0…668b:11
Render details

Inspect func

seqKey

func(n int) string

seqKey renders a sequence number as a fixed-width, zero-padded string so avl's lexicographic key order matches numeric order.

Open
OID
0a85e0…668b:12
seqKey details

Inspect func

shortAddr

func(addr string) string

shortAddr abbreviates a bech32 address for compact display.

Open
OID
0a85e0…668b:13
shortAddr details

Inspect func

escapeCell

func(s string) string

escapeCell neutralizes characters that would break a Markdown table cell.

Open
OID
0a85e0…668b:14
escapeCell details

Inspect func
Entry : type =v0.Entry
maxMessageLen : untyped bigint =(280 <untyped> bigint)
entries : *v0.Tree Inspect
count : int =0
Sign : func(message string) Inspect
addEntry : func(author string, message string, height int64) *v0.Entry Inspect
Count : func() int Inspect
Render : func(path string) string Inspect
seqKey : func(n int) string Inspect
shortAddr : func(addr string) string Inspect
escapeCell : func(s string) string Inspect