func Add
crossing ActionAdd appends a new item authored by the caller and returns its id.
Crossing function: takes `cur realm` first (gno 0.9 interrealm convention), authenticates with cur.IsCurrent() before trusting cur.Previous().
Package todos is a shared, on-chain to-do board realm.
⚠️ 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, shared to-do list realm for the gno.land sapphire testnet (gno 0.9).
Anyone can add an item to the board; each item records the caller's address as
its author, and can be toggled open/done or removed. Render shows the board as
Markdown checkboxes with live open/done counts, newest item first.
gno.land/r/REPLACE_ADDR/todos (replace REPLACE_ADDR with your deploy address)| Function | Effect |
|---|---|
Add(text string) int |
Adds an item authored by the caller, returns its id |
Toggle(id int) |
Flips an item between open and done |
Remove(id int) |
Deletes an item |
All three are gno 0.9 crossing functions (cur realm first parameter) and must
be invoked with cross(cur) from another realm, or directly via MsgCall.
1# Add an item (returns the new id)
2gnokey maketx call -pkgpath "gno.land/r/REPLACE_ADDR/todos" \
3 -func Add -args "buy milk" -gas-fee 1000000ugnot -gas-wanted 2000000 \
4 -broadcast -chainid sapphire-1 -remote <rpc> mykey
5
6# Mark item #3 done (toggle)
7gnokey maketx call -pkgpath "gno.land/r/REPLACE_ADDR/todos" \
8 -func Toggle -args 3 -gas-fee 1000000ugnot -gas-wanted 2000000 \
9 -broadcast -chainid sapphire-1 -remote <rpc> mykey
10
11# Remove item #3
12gnokey maketx call -pkgpath "gno.land/r/REPLACE_ADDR/todos" \
13 -func Remove -args 3 -gas-fee 1000000ugnot -gas-wanted 2000000 \
14 -broadcast -chainid sapphire-1 -remote <rpc> mykey
1# Shared To-Do Board
2
32 open · 1 done · 3 total
4
5- [ ] #3 walk dog (g1abc…)
6- [x] #2 buy milk (g1abc…)
7- [ ] #1 write realm (g1def…)
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:

🧪 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.
Package todos is a shared, on-chain to-do board realm.
Anyone can add an item; the caller's address is recorded as the author. Items can be toggled (open/done) or removed. Render exposes the board as Markdown checkboxes with open/done counts, newest item first.
Add appends a new item authored by the caller and returns its id.
Crossing function: takes `cur realm` first (gno 0.9 interrealm convention), authenticates with cur.IsCurrent() before trusting cur.Previous().
Remove deletes the item with the given id.
Render returns the board as Markdown. Newest item (highest id) first.
Render is NOT a crossing function (no `cur realm` param) — it is read-only and invoked by gnoweb, not via MsgCall.
Toggle flips the done state of the item with the given id.