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

README.md

2.62 Kb Β· 66 lines

πŸ† 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>

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