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.71 Kb · 62 lines

Rock-Paper-Scissors Arena

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


Best-of-three rock-paper-scissors against the house, played across multiple calls instead of a single stateless throw. Each Throw plays one round of your current match (starting a new one if you don't have one in progress); the house's move is derived deterministically from the current block height, a per-realm nonce, and your address. First to two round wins takes the match, and every player's match record (wins, losses, rounds played) is kept on-chain and viewable per-address.

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

Example calls

 1# Play one round of your current (or a new) match
 2gnokey maketx call \
 3  -pkgpath "gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/rpsmatch" \
 4  -func Throw -args "rock" \
 5  -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast -chainid sapphire-1 <key>
 6
 7# View the arena dashboard
 8gnokey query vm/qrender \
 9  --data "gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/rpsmatch:"
10
11# View one player's record
12gnokey query vm/qrender \
13  --data "gno.land/r/g12cs4cehujpffpjpywmkqj43m6u5ya53nj69sjz/rpsmatch:g1youraddress..."

Toolchain

Written against the sapphire (gno 0.9) stdlib split (chain, chain/runtime, gno.land/p/nt/avl/v0). The gno binary on PATH here is a newer/older mismatch of its own GNOROOT (native-function drift), so tests were run against a gno built from the exact pseudo-version pinned in that binary's own module info (github.com/gnolang/[email protected]). All 5 tests pass (gno test -v .) and gno lint . is clean.


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