quote
typequote is a single board entry. Author is stored as a plain string address (realm values are ephemeral and must never be persisted).
Value
v0.quote
board
[]v0.quoteboard is the persistent realm state. A plain slice is fine here: the list only ever grows by append and Render walks it in insertion order, which is deterministic.
- OID
- 01bebc…b06e:13
board details
init.2
func()- OID
- 01bebc…b06e:4
init.2 details
AddQuote
func(text string)AddQuote is the exported, state-mutating entry point. It follows the gno 0.9 interrealm crossing convention: the first parameter is \`cur realm\`. Callers invoke it as AddQuote(cross(cur), "...") over a MsgCall.
- OID
- 01bebc…b06e:6
AddQuote details
maxQuoteLen
untyped bigintmaxQuoteLen caps quote length to keep storage costs bounded and Render tidy.
Value
(280 <untyped> bigint)
validate
func(text string) .uverse.errorvalidate enforces basic content rules. Returns an error describing the problem, or nil when the text is acceptable.
- OID
- 01bebc…b06e:7
validate details
errEmpty
v0.quoteErrorSentinel errors for validation. Kept as package-level vars so tests can compare against them directly.
Value
<gnolang.StringValue>
errTooLong
v0.quoteErrorSentinel errors for validation. Kept as package-level vars so tests can compare against them directly.
Value
<gnolang.StringValue>
quoteError
typequoteError is a trivial string-backed error type (the VM has no host stdlib errors package convenience beyond this).
Value
v0.quoteError
featuredIndex
func(height int64, count int) intfeaturedIndex deterministically picks which quote is "of the moment" for a given block height. Pure function of (height, count) so it is fully deterministic and easy to test.
- OID
- 01bebc…b06e:10
featuredIndex details
Render
func(path string) stringRender produces the Markdown page shown in gnoweb. It is NOT a crossing function (no \`cur realm\` parameter) — it is a read-only view.
- OID
- 01bebc…b06e:11
Render details
authorLabel
func(q v0.quote) stringauthorLabel renders a human-friendly author string. Seeded quotes (empty author) show as the house account.
- OID
- 01bebc…b06e:12