Skip to content Search Apps Documentation Source Content Run Reset Eval Playground 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.

questmaster package

Overview

Package questmaster is a GNOT bounty board. A poster locks GNOT on a quest, a builder takes it and submits a link to the work, and the poster approves (paying the builder) or rejects (reopening the quest). If the poster stays silent past the review window (about 7 days), the builder can claim the payout. A poster can cancel an open quest for a refund, or close a claimed or submitted one: the builder keeps their turn, and if it ends without approval the reward goes back to the poster.

The rules live in the pure package p/escrow. This realm stores quests, holds the coins and moves them only as an escrow move tells it to.

Callers (v1): every state-changing function accepts only a direct user call (`gnokey maketx call`, i.e. cur.Previous().IsUserCall()). Calls from other realms and from `maketx run` scripts are refused. This is what makes the unsafe.OriginSend() checks sound: for a direct user call, the coins sent with the call are guaranteed to have landed in this realm. Realm or DAO callers may be supported in a later version.

There is no admin, owner, pause, upgrade or sweep function. Nobody can move escrowed coins except through the quest moves below.

Coins sent straight to the realm address with a bank send (not through PostQuest) are not tracked by any quest and cannot be moved by anyone, so they are lost. On chain the guarantee is therefore: realm balance >= the locked total, with equality when nobody sends coins outside PostQuest. The pages and GetTotals use only the tracked numbers, never the balance.

Nothing here hands out a pointer to stored state: read functions return plain values (QuestView, Totals, []uint64, strings).

Function

CancelQuest

func CancelQuest(cur realm, id uint64)
Ask AI Claude ChatGPT

CancelQuest is the poster's way out. Only the poster.

  • Open quest: it ends at once and the reward is refunded.
  • Claimed or Submitted quest: it is marked as closing and no coins move. The builder keeps their turn (submit, approval, timeout payout); when the turn ends without approval (unclaim, release after the work deadline, or reject), the quest ends and the reward goes back to the poster instead of the quest opening again.

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/g1llc3lq3zmjtjdk29dk52munrzxt5ne746cl7r8/questmaster" -func "CancelQuest" -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/g1llc3lq3zmjtjdk29dk52munrzxt5ne746cl7r8/questmaster" -func "CancelQuest" -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
  

Gno Expression Evaluator

Evaluate any read-only Gno expression against gno.land/r/g1llc3lq3zmjtjdk29dk52munrzxt5ne746cl7r8/questmaster, for example a function call with arguments.