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).

Functions

AllQuestIDs

func AllQuestIDs(offset, limit int) []uint64
Ask AI Claude ChatGPT

AllQuestIDs lists ids of all quests, newest first.

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1llc3lq3zmjtjdk29dk52munrzxt5ne746cl7r8/questmaster.AllQuestIDs(,)"

Result

ApproveWork

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

ApproveWork accepts the submitted work and pays the reward to the builder. Only the poster.

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 "ApproveWork" -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 "ApproveWork" -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
  

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
  

ClaimPayout

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

ClaimPayout pays the builder when the poster has not answered within the review window. Only the builder, from the block after the review deadline.

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 "ClaimPayout" -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 "ClaimPayout" -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
  

ClaimQuest

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

ClaimQuest takes an Open quest. The poster cannot claim their own quest.

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 "ClaimQuest" -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 "ClaimQuest" -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
  

CountByBuilder

func CountByBuilder(addr address) int
Ask AI Claude ChatGPT

CountByBuilder returns how many quests addr has ever claimed.

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1llc3lq3zmjtjdk29dk52munrzxt5ne746cl7r8/questmaster.CountByBuilder()"

Result

CountByPoster

func CountByPoster(addr address) int
Ask AI Claude ChatGPT

CountByPoster returns how many quests addr has posted.

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1llc3lq3zmjtjdk29dk52munrzxt5ne746cl7r8/questmaster.CountByPoster()"

Result

OpenQuestIDs

func OpenQuestIDs(offset, limit int) []uint64
Ask AI Claude ChatGPT

OpenQuestIDs lists ids of Open quests, newest first. offset skips that many; at most MaxPageSize ids are returned whatever limit is.

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1llc3lq3zmjtjdk29dk52munrzxt5ne746cl7r8/questmaster.OpenQuestIDs(,)"

Result

PaidQuestIDs

func PaidQuestIDs(offset, limit int) []uint64
Ask AI Claude ChatGPT

PaidQuestIDs lists ids of Paid quests, newest first (by quest id).

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1llc3lq3zmjtjdk29dk52munrzxt5ne746cl7r8/questmaster.PaidQuestIDs(,)"

Result

PostQuest

func PostQuest(cur realm, title, details string, workBlocks int64) uint64
Ask AI Claude ChatGPT

PostQuest creates a quest. Send the reward with the call as exactly one coin of ugnot, at least MinReward. workBlocks is the builder's work window in blocks (escrow.MinWorkBlocks to escrow.MaxWorkBlocks). Returns the new id.

Params

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 "PostQuest" -args $'' -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/g1llc3lq3zmjtjdk29dk52munrzxt5ne746cl7r8/questmaster" -func "PostQuest" -args $'' -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
  

QuestIDsByBuilder

func QuestIDsByBuilder(addr address, offset, limit int) []uint64
Ask AI Claude ChatGPT

QuestIDsByBuilder lists ids of quests addr has ever claimed, newest first. It is a history: a quest stays listed after the builder unclaims it, is released or is rejected, even if someone else builds it later. Use GetQuest(id).Builder for the current builder.

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1llc3lq3zmjtjdk29dk52munrzxt5ne746cl7r8/questmaster.QuestIDsByBuilder(,,)"

Result

QuestIDsByPoster

func QuestIDsByPoster(addr address, offset, limit int) []uint64
Ask AI Claude ChatGPT

QuestIDsByPoster lists ids of quests posted by addr, newest first.

Params

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1llc3lq3zmjtjdk29dk52munrzxt5ne746cl7r8/questmaster.QuestIDsByPoster(,,)"

Result

RejectWork

func RejectWork(cur realm, id uint64, reason string)
Ask AI Claude ChatGPT

RejectWork refuses the submitted work with a reason. Its public reject count goes up. The quest opens again, or, if the poster closed it, ends with a refund to the poster. Only the poster, up to and including the review deadline block.

Params

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

ReleaseQuest

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

ReleaseQuest ends the builder's turn on a Claimed quest whose work deadline has passed. Anyone may call it. The quest opens again, or, if the poster closed it, ends with a refund to the poster.

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 "ReleaseQuest" -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 "ReleaseQuest" -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
  

Render

func Render(path string) string
Ask AI Claude ChatGPT

Render returns the gnoweb page for path, with the footer.

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1llc3lq3zmjtjdk29dk52munrzxt5ne746cl7r8/questmaster.Render()"

Result

SubmitWork

func SubmitWork(cur realm, id uint64, link string)
Ask AI Claude ChatGPT

SubmitWork sends the link to the work (must start with https://). Only the builder, up to and including the work deadline block.

Params

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

UnclaimQuest

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

UnclaimQuest lets the builder give a Claimed quest back. It opens again, or, if the poster closed it, ends with a refund to the poster.

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 "UnclaimQuest" -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 "UnclaimQuest" -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
  

GetQuest

func GetQuest(id uint64) QuestView
Ask AI Claude ChatGPT

GetQuest returns a copy of quest id. It panics on an unknown id.

Param

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1llc3lq3zmjtjdk29dk52munrzxt5ne746cl7r8/questmaster.GetQuest()"

Result

GetTotals

func GetTotals() Totals
Ask AI Claude ChatGPT

GetTotals returns the running totals. Posted == Locked + Paid + Refunded.

Command

gnokey query vm/qeval -remote "https://rpc.onyx.testnets.gno.land" -data "gno.land/r/g1llc3lq3zmjtjdk29dk52munrzxt5ne746cl7r8/questmaster.GetTotals()"

Result

Gno Expression Evaluator

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