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 reactions is an emoji reaction board.

Readme View source

Reaction Board

⚠️ 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


An on-chain emoji reaction board. Each topic collects emoji reactions, and each caller may register at most one reaction per topic (voters are tracked in an AVL set). Render lists every topic with its emoji tallies and a total count.

Realm path: gno.land/r/REPLACE_ADDR/reactions

Example calls

# React to a topic (creates the topic on demand). One reaction per caller.
React("gno 0.9 launch", "👍")
React("gno 0.9 launch", "❤️")

# Optionally pre-create an empty topic.
CreateTopic("weekend poll")

# View the board (all topics), or a single topic.
Render("")
Render("gno 0.9 launch")

A topic renders as a row like 👍 3 ❤️ 5 🎉 1 (sorted by count, then emoji), followed by its total. Reacting twice to the same topic from the same address aborts.


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

Dependency graph:

gno.land/r/moul/x/daily/reactions/v0 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.

Overview

Package reactions is an emoji reaction board.

Each topic collects emoji reactions. A caller may register at most one reaction per topic; the emoji they picked increments a per-topic per-emoji tally. Render lists every topic with its emoji tallies and total count.

Functions 4

func CreateTopic

crossing Action
1func CreateTopic(cur realm, name string)
source

CreateTopic registers a new empty topic. It is optional: React auto-creates a topic if it does not exist yet. Panics if the topic already exists or the name is empty.

func React

crossing Action
1func React(cur realm, name, emoji string)
source

React adds the caller's reaction (an emoji) to a topic. Each caller may react at most once per topic. The topic is created on demand if missing. Panics on empty input or when the caller has already reacted to this topic.

func Render

1func Render(path string) string
source

Render returns a Markdown view of the board. If path is a non-empty topic name, only that topic is shown; otherwise all topics are listed.

Imports 6

Source Files 3