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

dice/v0 package

Overview

Package dice implements a provably-fair on-chain dice game for gno.land.

There is no true randomness on-chain: every node must reach the same result deterministically. Instead, each roll derives its 1-6 face from public block entropy (chain height) mixed with the caller address and the caller's roll count. The derivation is fully reproducible from public data, which is what "provably fair" means here — anyone can recompute a roll and verify it.

Function

Distribution

func Distribution() [6]int

Distribution returns the global per-face counts, faces 1-6.

Command

gnokey query vm/qeval -remote "https://rpc.gno.land" -data "gno.land/r/moul/x/daily/dice/v0.Distribution()"

Result