Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

/r/moul/x/daily/kingofdice/v0

Directory · 3 Files
README.md Open

👑 King of the Dice

⚠️ 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 "king of the hill" dice game for gno.land (sapphire / gno 0.9). Call Roll() to throw a deterministic 1-100 die; beat the reigning king's roll and you dethrone them, becoming king yourself. Unlike a typical leaderboard that just sums points, this one ranks players by accumulated reign length in blocks — a single lucky high roll only pays off for as long as nobody beats it, so outlasting the field matters more than the roll itself.

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

Public API

Function Kind Description
Roll(cur realm) crossing (tx) Roll 1-100; dethrones the king on a higher roll.
Render(path string) string view Current king + reign-length leaderboard.

Example calls

1gnokey maketx call \
2  -pkgpath "gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/kingofdice" \
3  -func Roll \
4  -gas-fee 1000000ugnot -gas-wanted 2000000 \
5  -broadcast -chainid sapphire-1 -remote <rpc> <keyname>

View the dashboard in gnoweb at /r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/kingofdice, or query it:

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

Toolchain status

Verified locally: gno test . passes (built against a gnolang/gno checkout as GNOROOT, since the machine's configured GNOROOT pointed at a stale, deleted path). Tests avoid gno.land/p/nt/uassert/v0 — the cached copy of that package uses the bare cross builtin as a function value, which the locally installed gno (master) rejects; plain testing.T calls sidestep that unrelated cache/toolchain drift.


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/kingofdice/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.