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/leaderboard/v1

Directory · 5 Files
README.md Open

🏆 Leaderboard

⚠️ 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 score leaderboard realm for gno.land (sapphire / gno 0.9). Any account can accumulate points with AddPoints(n) and optionally attach a display name with SetName(name). Render returns a Markdown table ranked by points descending — gold/silver/bronze medals for the top three — plus the total player count. State is kept in an avl.Tree so rendering is deterministic across nodes.

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

Public API

Function Kind Description
AddPoints(cur realm, n int) crossing (tx) Add n (> 0) points to the caller's total.
SetName(cur realm, name string) crossing (tx) Set the caller's display name (≤ 32 bytes; empty clears it).
Render(path string) string view Ranked Markdown leaderboard.

Example calls

 1# Add 10 points to your total
 2gnokey maketx call \
 3  -pkgpath "gno.land/r/REPLACE_ADDR/leaderboard" \
 4  -func AddPoints -args 10 \
 5  -gas-fee 1000000ugnot -gas-wanted 2000000 \
 6  -broadcast -chainid sapphire-1 -remote <rpc> <keyname>
 7
 8# Set your display name
 9gnokey maketx call \
10  -pkgpath "gno.land/r/REPLACE_ADDR/leaderboard" \
11  -func SetName -args "Alice" \
12  -gas-fee 1000000ugnot -gas-wanted 2000000 \
13  -broadcast -chainid sapphire-1 -remote <rpc> <keyname>

View the rendered leaderboard in gnoweb at /r/REPLACE_ADDR/leaderboard, or query it:

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

What changed in v1

Identical behaviour to v0 apart from rendering, which now goes through p/moul/kit/ui instead of the local medal helper.

One podium. ui.Podium replaces the medal switch three realms each had a copy of. Same output.

The rendering change means the output differs from v0, which under this repo's versioning rule is a compatibility change, hence a new version rather than an edit in place. v0 stays live and untouched.


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/leaderboard/v1 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.