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 microblog is a public microblog wall for gno.land.

Readme View source

Microblog Wall

⚠️ 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, append-only microblog for gno.land. Anyone can post a short message (up to 280 bytes); each post records the caller's address and the block height at which it was made. The Render view shows the wall newest-first, 20 posts per page, with total count and prev/next pagination driven by the render path.

  • Realm path: gno.land/r/REPLACE_ADDR/microblog
  • Gno version: 0.9 (sapphire)

API

  • Post(cur realm, msg string) — crossing tx. Panics if msg is empty or longer than 280 bytes. Stores {author, msg, height}.
  • Count() int — total number of posts.
  • Render(path string) string — Markdown wall, newest-first, paginated.

Example calls

Post a message (crossing call via gnokey):

1gnokey maketx call \
2  -pkgpath "gno.land/r/REPLACE_ADDR/microblog" \
3  -func Post \
4  -args "gm gno.land 👋" \
5  -gas-fee 1000000ugnot -gas-wanted 2000000 \
6  -broadcast -chainid sapphire-1 -remote <rpc> mykey

View the wall in gnoweb:

https://gno.land/r/REPLACE_ADDR/microblog          # page 1 (newest 20)
https://gno.land/r/REPLACE_ADDR/microblog:?page=2  # older posts
https://gno.land/r/REPLACE_ADDR/microblog:/2       # same page, path form

From another realm:

1import "gno.land/r/REPLACE_ADDR/microblog"
2
3func Shout(cur realm) {
4    microblog.Post(cross(cur), "posted from another realm")
5}

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 microblog is a public microblog wall for gno.land.

Anyone can Post a short message (<= maxMsgLen chars). Every post records the caller address, the message, and the block height at which it was made. Render displays the wall newest-first, 20 posts per page, with pagination driven by the Render path (e.g. "?page=2" or "/2").

Functions 3

func Count

Action
1func Count() int
source

Count returns the total number of posts on the wall.

func Post

crossing Action
1func Post(cur realm, msg string)
source

Post publishes msg to the wall. It is a crossing function: callers invoke it with Post(cross(cur), "hello"). It panics if msg is empty or longer than maxMsgLen bytes.

func Render

1func Render(path string) string
source

Render renders the wall as Markdown, newest-first, pageSize posts per page. The page is parsed from path: "?page=N", "?p=N", "/N", or a bare "N" all select page N (1-indexed). Anything else defaults to page 1.

Imports 5

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

Source Files 3