Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

duel/v4 package

Overview

Package duel implements the first slice of Splash Play I, the Duel, settled from r/splash/beacon instead of a two-party commit-reveal (SPEC-09-duel-beacon.md v1.0, ../../../../SPEC-09-duel-beacon.md).

TEMPORARY NAME. "duel" is scratch space, built beside the LIVE r/splash/arcade/duel so that realm keeps working while this one is proven. The two are swapped in one commit once this one is ready, and the deploy path is decided then (SPEC-09 is silent on it on purpose). Nothing here should be linked to, or depended on, from outside this directory.

THIS SLICE IS Post, Cancel, Accept AND THE ROUND PIN. No Resolve — that is slice 2 (SPEC-09 §3 describes the whole lifecycle; the part after Accept is not built yet). A duel created here therefore has no payout path: it exists so the pin itself, SPEC-09's "only subtle part" (§3.1), can be built and proved on its own before anything is wired to money leaving the realm.

WHY COMMIT-REVEAL IS GONE RATHER THAN CARRIED OVER (SPEC-09 §1). The old duel moved OFF the beacon on 2026-09-30 because Accept needed an UPPER bound on drand's head ("round R is not signed yet"), and no arithmetic over a RELAYED round could ever establish one: a signature proves a round EXISTS (a lower bound), and the absence of one is not provable on chain, because withholding a relay is free and invisible. beacon.CurrentRound(), added 2026-10-08, derives drand's round from the BLOCK'S OWN CLOCK instead — no relayer in the path — so that upper bound now exists, and the whole reason commit-reveal's complexity existed is gone with it. What carries over is not the lifecycle but four audit findings about THIS REALM'S OWN escrow and money handling that were never specific to commit-reveal (SPEC-09 §8): rejectAttachedCoin and requireUserCall below, no transfer destination ever being a caller-supplied argument, and (for later slices) one clock/one derived value and no sentinel field standing in for a height.

THE STAKE IS WRAPPED GNOT, exactly as in r/splash/arcade/duel: this realm escrows gno.land/r/gnoland/wugnot and touches no other token.

NO Resolved, NO Winner, NO Secret, NO Nonce, NO NonceRevealedAt, NO TakerCommit, AND NO DEADLINE OF ANY KIND IN THIS SLICE'S STATE (SPEC-09 §4, §8). Resolve (slice 2) pays and deletes a duel in one call, so a resolved duel will never exist to be recorded; there is nothing here for a sentinel "never happened yet" value to be confused with a real height.

Function

Cancel

func Cancel(cur realm, offerID int64)
Ask AI Claude ChatGPT

Cancel returns an unaccepted offer's stake to its poster, exactly and with no fee, and deletes the record. Poster only.

An accepted offer no longer exists — Accept deletes it in the same transaction that creates the duel — so "Cancel of an accepted offer" and "Cancel of an unknown offer" are the same refusal: whichever of Cancel or Accept lands first in block order removes the offer, and the other finds nothing. THE DESTINATION IS READ FROM THE RECORD, never a caller-supplied argument (SPEC-09 §8): a canceller can only ever recover the poster's own stake to the poster's own address.

Param

Command

# 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/g1r4aw43kagaaquhegxw6xr346h9f2qu2ezf0jar/arcade/duel/v4" -func "Cancel" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "onyx-1" -remote "https://rpc.onyx.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.onyx.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1r4aw43kagaaquhegxw6xr346h9f2qu2ezf0jar/arcade/duel/v4" -func "Cancel" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "onyx-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.onyx.testnets.gno.land" call.tx