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 trivia is a rotating multiple-choice trivia quiz realm.

Readme View source

Trivia Quiz

⚠️ 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 rotating on-chain multiple-choice trivia quiz. One question is live at a time; anyone can submit a choice via Answer. The first correct answer scores a point on the lifetime leaderboard and the quiz immediately advances to the next question. The starting question is picked deterministically from the deploy-time block height, so repeated deploys don't always open on question one.

Realm path: gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/trivia

Example calls

# answer the live question (choice index 0-3, shown in Render)
gnokey maketx call -pkgpath gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/trivia \
  -func Answer -args 2 -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast -chainid sapphire-1 <key>

View Render("") (or just the realm path in gnoweb) to see the current question, its lettered choices, the leaderboard, and the total number of questions answered correctly so far.

Toolchain status

gno test . passes locally against a gnolang/gno checkout (GNOROOT set explicitly — the default env had a stale GNOROOT from an unrelated checkout). Local gno is master.3130+bf5b31eda, newer than sapphire (gno 0.9); code sticks to the documented sapphire-safe surface (chain, chain/runtime, crossing functions with cur realm, gno.land/p/nt/avl/v0) per the gno skill's stdlib reference.


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/trivia/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 trivia is a rotating multiple-choice trivia quiz realm.

One question is live at a time. Anyone can call Answer with a choice index; the first caller to answer correctly scores a point and the quiz advances to the next question. The starting question is picked deterministically from the block height at deploy time so repeated deploys don't always open on question one.

Functions 2

func Answer

crossing Action
1func Answer(cur realm, choiceIdx int) string
source

Answer submits a choice (0..3) for the current question. Crossing function: caller invokes as Answer(cross(cur), choiceIdx).

func Render

1func Render(path string) string
source

Render produces the gnoweb Markdown view of the quiz.

Imports 5

Source Files 3