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

RollsOf

func RollsOf(addr string) []int

RollsOf returns the recorded roll history for an address (oldest first). Read-only helper, safe to call as a query.

Param

Command

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

Result