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/coinflipduel/v1

Realm
Open in gnoweb ↗

Overview

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

Files (5)

  • README.mdmarkdown
  • gnomod.tomltoml
  • coinflipduel.gnogno
  • coinflipduel_test.gnogno
  • render_example_test.gnogno
render_example_test.gnogno
1package coinflipduel23// ExampleRender pins the realm's Render output as a testable example.4func ExampleRender() {5	print(Render(""))6	// Output:7	// # Coin-Flip Duel8	//9	// Challenge another address to a coin flip. You call heads or tails up front; they accept and the block decides. No stakes -- just a record.10	//11	// - Total duels resolved: 012	// - No champion yet -- be the first to win a duel.13	//14	// ## How to play15	//16	// 1. `Challenge(opponentAddr, "heads"|"tails")` -- opens a duel, returns its ID.17	// 2. The opponent calls `Accept(id)` -- flips the coin and settles it on the spot.18	// 3. The challenger may `Cancel(id)` while it's still pending.19	//20	// View a duel at this realm's path plus its ID (e.g. `.../coinflipduel:3`), or a player's record plus their address (e.g. `.../coinflipduel:g1youraddress...`).21	//22	// ## Pending duels23	//24	// _none right now_25}26

Functions

  • Accept(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}, id string) string

  • Cancel(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}, id string) string

  • Challenge(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}, opponentAddr string, call string) string

  • Render(path string) string

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.