PathrockNetwork Gno Explorer
HomeBlocksTransactionsTokensRealmsPackagesValidatorsAnalytics

PathrockNetwork Gno Explorer — an independent explorer for Gno.land Mainnet (gnoland-1), operated by PathrockNetwork. Not an official Gno.land service.

gnowebarchive RPC

gno.land/r/moul/x/daily/dice/v0

Realm
Open in gnoweb ↗

Overview

Kind
Realm (renderable)
Name
v0
Namespace
moul / x / daily / dice
Files
3 (README)(gnomod.toml)
Exported functions
5
Module
gno.land/r/moul/x/daily/dice/v0
gno
0.9

Files (3)

  • README.mdmarkdown
  • gnomod.tomltoml
  • dice.gnogno
README.mdPreviewRaw
# 🎲 Provably-Fair Dice

> ⚠️ **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](https://github.com/moul/gno-contracts/blob/main/r/moul/x/daily/README.md)

---


A dice game realm for gno.land where every roll is verifiable. There is no true
randomness on-chain, so each roll's 1-6 face is derived **deterministically** from
public block entropy (the block height) mixed with the caller's address and their
running roll count. Anyone can recompute a roll from public data and confirm it was
never tampered with — that is what "provably fair" means here. The realm keeps a
per-caller roll history and a global distribution across the six faces.

- **Realm path:** `gno.land/r/REPLACE_ADDR/dice`
- **Network:** sapphire (gno 0.9)

## Example calls

```sh
# Roll the dice (state-changing crossing call, returns the 1-6 face)
gnokey maketx call -pkgpath "gno.land/r/REPLACE_ADDR/dice" \
  -func Roll -gas-fee 1000000ugnot -gas-wanted 2000000 -broadcast ...

# Query the current view (distribution chart + recent rolls)
gnokey query "vm/qrender" -data "gno.land/r/REPLACE_ADDR/dice:"

# Read one account's roll history (read-only helper)
gnokey query "vm/qeval" \
  -data 'gno.land/r/REPLACE_ADDR/dice.RollsOf("g1...")'
```

`Render(path)` output shows the total rolls, a `▓░` distribution bar chart for
faces 1-6 with percentages, and the most recent rolls.

<!-- BEGIN GNOCONTRACTS FOOTER (generated by `make readmes`; do not edit below) -->

---

Part of **[moul/gno-contracts](https://github.com/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/dice/v0 dependency graph](https://raw.githubusercontent.com/moul/gno-contracts/main/_assets/gno.land/r/moul/x/daily/dice/v0/deps.png)

> 🧪 **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](https://github.com/moul/gno-contracts/blob/main/DISCLAIMER.md).

<!-- END GNOCONTRACTS FOOTER -->

Functions

  • Distribution() [6]int

  • Render(path string) string

  • Roll(cur interface {.seal func(); Address func() .uverse.address; IsCode func() bool; IsCurrent func() bool; IsEphemeral func() bool; IsUser func() bool; IsUserCall func() bool; IsUserRun func() bool; PkgPath func() string; Previous func() .uverse.realm; String func() string; Sub func(string) .uverse.realm; Subpath func() string}) int

  • RollsOf(addr string) []int

  • Total() int

Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.

Rendered

RenderedRawgnoweb ↗

vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.