Accept
Ask AI
Accept takes a standing offer: pulls a stake equal to THE OFFER'S rung — the caller chooses nothing about the money — deletes the offer, records the taker's NONCE and creates the duel. Returns the new duel's ID.
nonce IS THE TAKER'S HALF OF THE COIN AND IT TRAVELS IN THE CLEAR: 32 bytes as 64 lowercase hex characters (checkNonce). No commitment and no reveal from the taker, and therefore NO EXTRA TRANSACTION — one more argument on the call they were already making. Read posterWins for why plaintext is safe from the taker's own side: they choose the nonce WITHOUT the secret, so every nonce they could pick is a coin they cannot evaluate, and choosing among coins you cannot see is not choosing. A CSPRNG is the right source here too, though for a different reason than the poster's: a nonce a poster could have ANTICIPATED (all zeroes, the taker's own address, a counter) lets the poster grind their secret against it at Post time, which is the one way the poster-cannot-grind property can be handed away by the other party.
THE PLAINTEXT NONCE IS ALSO THIS DESIGN'S ONE OPEN WEAKNESS, and the taker should know it at the door they walk through: a poster watching the mempool can read the nonce out of this very transaction before it is committed, compute the outcome, and try to abort the Accept by cancelling or by self-matching. Item (2) of this file's doc comment has the argument, the two moves and why neither is closed here.
AN OFFER WITH NO COMMITMENT IS REFUSED, AND THAT REFUSAL IS THE WHOLE OF REQUIREMENT 5 ON THIS SIDE. A legacy offer (created before 2026-09-30) carries no commitHash, so no secret exists that could ever open it and Reveal could never run. Accepting one would create a duel whose only exit after the window is Forfeit — which pays the TAKER — so anybody could have taken a legacy offer and been handed the poster's stake for nothing. So such an offer cannot be accepted at all; its exit is Cancel, permissionless for exactly this case.
THERE IS NO ROUND, NO BEACON AND NOTHING TO WAIT FOR. Everything this function used to do about randomness is gone: no anchor, no staleness tolerance, no offset, no assertion that the bound round is in the future. Read this file's doc comment for why that binding could not be repaired. The consequence a player sees is that settlement is available IN THE NEXT BLOCK rather than 300 seconds and one 17M-gas relay later.
The caller MAY be the poster (SPEC-03 §7.3): self-matching wins half the time and pays the rake regardless, a guaranteed 3% loss, so a guard would cost code and buy nothing. THAT REASONING NEEDED RE-CHECKING UNDER THE NEW COIN AND IT SURVIVES, in a sharper form worth writing down: a self-matcher holds the secret AND chooses the nonce, so they can grind the nonce and win with CERTAINTY — against themselves. Winner and loser are one address, the pool returns to it less the rake, and certainty about which pocket it lands in is worth nothing. It is still a guaranteed 3% loss, and it is still the case that the only party a self-match can take money from is the self-matcher. An offer ADDRESSED to an opponent is the one exception, and only by construction: then the opponent is the only address that may accept, and the poster is not it unless they named themself.
THE CALLER MUST HOWEVER BE A USER AND NOT A REALM, SINCE 2026-09-30. That is the one thing about WHO may accept that this function refuses, and requireUserCall has the argument: a realm taker that wins cannot call the winner-only Collect, so the pool would have no exit at all — the poster's stake included. It is the raffle's finding-8 reasoning (a package-derived address nothing can spend from) applied to this realm's own escrow rather than only to the raffle entries a duel earns. AUDIT-duel-2026-09-27.md addendum 2, finding D-1.
EVERY CHECK RUNS BEFORE THE PULL. The second of two Accepts on one offer in a block therefore finds no offer and fails before touching the caller's wallet: its stake is never pulled, so there is nothing to return (SPEC-03 §7.4). It cannot join, overwrite or silently succeed.
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" -func "Accept" -args $'' -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" -func "Accept" -args $'' -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