At
At returns the palette name of the cell at (x, y), or "" when out of bounds.
Command
gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/moul/x/daily/pixelcanvas/v0.At(,)"
Result
Package pixelcanvas is a shared 16x16 pixel canvas: anyone can paint one cell at a time from a fixed 9-colour palette, and the canvas renders in gnoweb as a grid of coloured blocks.
The canvas is a flat [Size*Size]int of palette indices held in realm state — a fixed-size array rather than a tree, because every cell exists from the start and the grid is walked in full on every render. Painting is last-write-wins; the realm keeps who painted each cell and a per-address tally, so the board doubles as a contribution leaderboard.
A stateful app with nothing reusable to extract, so it ships as a lone realm rather than a p/ library + demo pair.
At returns the palette name of the cell at (x, y), or "" when out of bounds.
gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/moul/x/daily/pixelcanvas/v0.At(,)"
Paint colours the cell at (x, y) and returns the total number of strokes.
Coordinates are 0-based with (0,0) at the top-left. Colour is a palette name ("red", "blue", …) — see Palette. Painting over an existing cell is allowed: the canvas is last-write-wins, which is the whole point of a shared board.
# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.
gnokey maketx call -pkgpath "gno.land/r/moul/x/daily/pixelcanvas/v0" -func "Paint" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "gnoland-1" -remote "https://rpc.gno.land" ADDRESSgnokey query -remote "https://rpc.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/moul/x/daily/pixelcanvas/v0" -func "Paint" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "gnoland-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.gno.land" call.tx
PainterAt returns the address that last painted (x, y), or "" if untouched.
gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/moul/x/daily/pixelcanvas/v0.PainterAt(,)"
Palette returns the accepted colour names, comma-separated.
gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/moul/x/daily/pixelcanvas/v0.Palette()"
Render renders the canvas for gnoweb.
gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/moul/x/daily/pixelcanvas/v0.Render()"
Strokes returns how many paints the canvas has taken.
gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/moul/x/daily/pixelcanvas/v0.Strokes()"