func Count
ActionCount returns the total number of signatures. Read-only, non-crossing.
Package guestbook is a public, on-chain guestbook realm for gno.land.
⚠️ 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 public, on-chain guestbook realm for gno.land. Anyone can leave a signed
message; every entry records the signer's address, the message, and the block
height at which it was signed. The realm's Render page shows all entries as a
Markdown table, newest-first, with a running total.
Built for the sapphire testnet (gno 0.9).
gno.land/r/REPLACE_ADDR/guestbook
(REPLACE_ADDR is substituted with the deployer's address at publish time.)
Sign(cur realm, message string) — crossing tx. Appends an entry attributed
to the immediate caller. Panics on an empty or over-long (>280 bytes) message.Count() int — total number of signatures (read-only).Render(path string) string — Markdown table of all entries, newest-first.Sign the guestbook (from an EOA via gnokey):
1gnokey maketx call \
2 -pkgpath "gno.land/r/REPLACE_ADDR/guestbook" \
3 -func Sign \
4 -args "gm gno.land!" \
5 -gas-fee 1000000ugnot -gas-wanted 2000000 \
6 -broadcast -chainid sapphire-1 -remote <rpc> mykey
From another realm, invoke it as a crossing call:
1guestbook.Sign(cross(cur), "hello from my realm")
View the rendered guestbook:
1gnokey query vm/qrender --data "gno.land/r/REPLACE_ADDR/guestbook:"
1# Guestbook
2
3**Total signatures:** 2
4
5| # | Who | Message | Height |
6|---|-----|---------|--------|
7| 2 | g1v9jxgu…0gh | hello from my realm | 4210 |
8| 1 | g1jg8mtu…qf5 | gm gno.land! | 4180 |
Sign is a crossing
function that checks cur.IsCurrent() before deriving the author from
cur.Previous().Address().chain/runtime.ChainHeight() — deterministic.gno.land/p/nt/avl/v0 tree keyed by a zero-padded
sequence number so iteration order is deterministic and matches insertion
order (reversed for newest-first rendering).
<!-- BEGIN GNOCONTRACTS FOOTER (generated by `make readmes`; do not edit below) -->
---
Part of **[moul/gno-contracts](https://github.com/moul/gno-contracts)** — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.
**Dependency graph:**

> 🧪 **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](https://github.com/moul/gno-contracts/blob/main/DISCLAIMER.md).
<!-- END GNOCONTRACTS FOOTER -->
Package guestbook is a public, on-chain guestbook realm for gno.land.
Anyone can sign the guestbook with a short message via the Sign crossing function. Every entry records the caller's address, the message, and the block height at which it was signed. Render lists all entries newest-first as a Markdown table.
Count returns the total number of signatures. Read-only, non-crossing.
Render lists every entry newest-first as a Markdown table plus a total count.
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.