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 wordle is a daily five-letter word puzzle realm for gno.land.

Readme View source

Daily Word Puzzle

⚠️ 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 Wordle-like realm for gno.land (gno 0.9 / sapphire). Every "day" — a span of blocks derived deterministically from the block height — the realm picks one secret 5-letter word from a built-in 15-word dictionary. Players submit guesses and get per-letter emoji feedback (🟩 correct spot, 🟨 wrong spot, ⬜ absent), with up to 6 attempts per day and a per-caller board rendered as Markdown.

Realm path

gno.land/r/REPLACE_ADDR/wordle

How it works

  • The day index is ChainHeight() / blocksPerDay; the secret word is words[day % len(words)] — fully deterministic, no randomness.
  • Guess(word) is a crossing function (Guess(cross(cur), word)) that records a guess for the caller against today's word. Boards reset automatically when a new day rolls over.
  • Render(path) shows the calling viewer's board, attempts left, win/lose state, and the rules legend.

Example calls

1# submit a guess (crossing tx)
2gnokey maketx call \
3  -pkgpath "gno.land/r/REPLACE_ADDR/wordle" \
4  -func Guess -args "crane" \
5  -gas-fee 1000000ugnot -gas-wanted 2000000 \
6  -broadcast -chainid sapphire-1 <keyname>

View the board in gnoweb at:

https://gno.land/r/REPLACE_ADDR/wordle

Test

1gno test .

Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.

🧪 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 wordle is a daily five-letter word puzzle realm for gno.land.

The day's secret word is picked deterministically from the current block height (a "day index"), so every player faces the same word for the same span of blocks. Players submit guesses with Guess; each guess is scored letter-by-letter with emoji feedback (🟩 correct spot, 🟨 wrong spot, ⬜ absent). Render shows the caller's board, attempts left, and rules.

Functions 2

func Guess

crossing Action
1func Guess(cur realm, word string)
source

Guess records a five-letter guess for the caller against today's word.

It is a crossing (state-mutating) function: callers invoke it as Guess(cross(cur), "crane"). Identity is taken from the live crossing frame after the IsCurrent authentication check.

func Render

1func Render(path string) string
source

Render returns the caller's board as Markdown. It is NOT a crossing function (no cur realm parameter). It reads the viewer via the stack-walking unsafe.PreviousRealm(); an unknown viewer simply sees an empty board.

Imports 3

  • chain/runtime stdlib
  • chain/runtime/unsafe stdlib
  • strings stdlib

Source Files 3