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

v0 source realm

Package quotes is a community "Quote of the Moment" board realm.

Readme View source

Quote of the Moment

⚠️ Experimental — generated with no human supervision. This realm was produced automatically by an MCP-driven agent to exercise the gno MCP server and tooling, and to generate test content for gno compilers, linters and formatters. Not audited. Not for production. Full context & folder README: r/moul/x/daily


A community quote board realm for gno.land (sapphire, gno 0.9). Anyone can submit a quote; each entry records the text, the submitter's address, and the block height at submission. The board ships pre-seeded with a handful of Stoic quotes so a fresh deploy renders nicely, and the rendered page rotates a "featured" pick deterministically as the chain advances.

  • Realm path: gno.land/r/REPLACE_ADDR/quotes
  • State-mutating tx: AddQuote(text string) — a gno 0.9 crossing function.
  • View: Render(path string) — Markdown; a blockquote featured pick chosen by ChainHeight() % len(quotes), followed by the full list with author + id.

Example calls

Add a quote (MsgCall dispatches to the crossing function; you do not write cross(cur) on the command line — the chain supplies it):

1gnokey maketx call \
2  -pkgpath "gno.land/r/REPLACE_ADDR/quotes" \
3  -func AddQuote \
4  -args "Luck is what happens when preparation meets opportunity." \
5  -gas-fee 1000000ugnot -gas-wanted 2000000 \
6  -broadcast -chainid sapphire-1 -remote <rpc> <key>

View the rendered board in gnoweb:

https://gno.land/r/REPLACE_ADDR/quotes

Or query the render output directly:

1gnokey query "vm/qrender" -data "gno.land/r/REPLACE_ADDR/quotes:" -remote <rpc>

Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.

🧪 Highly experimental — potentially vibe-coded. Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: DISCLAIMER.

Overview

Package quotes is a community "Quote of the Moment" board realm.

Anyone can submit a quote via the exported crossing function AddQuote. Each quote records its text, the address of the caller who added it, and the block height at submission time. Render deterministically picks a "featured" quote by the current block height (a stable index into the list), shows it as a blockquote, then lists every quote with its author and id below.

Functions 2

func AddQuote

crossing Action
1func AddQuote(cur realm, text string)
source

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.

func Render

1func Render(path string) string
source

Render produces the Markdown page shown in gnoweb. It is NOT a crossing function (no `cur realm` parameter) — it is a read-only view.

Imports 4

  • chain stdlib
  • chain/runtime stdlib
  • strconv stdlib
  • strings stdlib

Source Files 3