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.

bounties source realm

Package bounties is Guildhall's escrowed bounty board.

Overview

Package bounties is Guildhall's escrowed bounty board.

Anyone can post a task, fund it with GNOT (or any native coin) or any token in the grc20 registry, and split it into milestones. Funds sit in this realm until the bounty's reviewers approve a milestone, at which point the milestone is paid to the contributor and a record of the work is written to gno.land/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/guildhall/reputation. Contested milestones go to an arbiter, who can pay the worker, refund the poster, or split the difference.

The rules live in gno.land/p/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/guildhall/bounty. This realm holds the funds, authenticates callers, moves coins, and renders the board.

Functions 18

func Apply

crossing Action
1func Apply(cur realm, id uint64, pitch string)
source

Apply asks the poster to be assigned to an open bounty.

func Approve

crossing Action
1func Approve(cur realm, id uint64, milestone int)
source

Approve records a reviewer's approval of a submitted milestone. The approval that reaches the quorum releases the milestone's funds to the contributor and writes a reputation record.

func Assign

crossing Action
1func Assign(cur realm, id uint64, assignee address)
source

Assign hands an open bounty to a contributor. Poster only.

func Cancel

crossing Action
1func Cancel(cur realm, id uint64)
source

Cancel withdraws an open bounty and refunds every unpaid milestone to the poster. Active bounties must be unassigned first.

func CountByStatus

Action
1func CountByStatus(status string) int
source

CountByStatus returns the number of bounties in status ("open", "active", "completed" or "cancelled").

func Escrowed

Action
1func Escrowed(denom string) int64
source

Escrowed returns what the board currently holds for denom (a native denom or a grc20reg key).

func OpenDispute

crossing Action
1func OpenDispute(cur realm, id uint64, milestone int, reason string)
source

OpenDispute escalates a submitted or rejected milestone to the arbiter. The poster or the contributor who submitted it may open one.

func PostBounty

crossing Action
1func PostBounty(cur realm, title, description, link, tags, reviewers string, quorum int, milestones, arbiter string, workWindowDays int) uint64
source

PostBounty posts a bounty funded with the native coins sent along with the call. milestones is "Title=amount;Title=amount" and must add up to exactly what was sent; leave it empty for a single milestone worth the whole amount. reviewers is a comma-separated address list (empty means the poster reviews alone) and quorum is how many of them must approve each milestone. An empty arbiter delegates disputes to the Guildhall council.

func PostBountyGRC20

crossing Action
1func PostBountyGRC20(cur realm, tokenKey, title, description, link, tags, reviewers string, quorum int, milestones, arbiter string, workWindowDays int) uint64
source

PostBountyGRC20 posts a bounty funded with a registered GRC20 token. The caller must first approve this realm's address for the milestone total on the token; this call pulls the funds into escrow.

func Render

1func Render(path string) string
source

Render serves the bounty board:

Example
1""             the board (?status=open|active|completed|cancelled|all, ?tag=x, ?page=N)
2<id>           a bounty with its milestones and next actions
3u/<address>    bounties an address posted, works on, reviews or applied to
4post           how to post a bounty

func RequestChanges

crossing Action
1func RequestChanges(cur realm, id uint64, milestone int, feedback string)
source

RequestChanges sends a submitted milestone back with feedback.

func Resolve

crossing Action
1func Resolve(cur realm, id uint64, milestone int, workerBps int, ruling string)
source

Resolve settles a disputed milestone. workerBps is the share, in basis points (0..10000), paid to the contributor; the rest is refunded to the poster. Arbiter only.

func SetPaused

crossing Action
1func SetPaused(cur realm, p bool)
source

SetPaused stops (or resumes) the posting of new bounties. Work on existing bounties, payouts and refunds are never paused.

func Submit

crossing Action
1func Submit(cur realm, id uint64, milestone int, link string)
source

Submit hands milestone (1-based) in for review, pointing at the work.

func TransferCouncil

crossing Action
1func TransferCouncil(cur realm, newCouncil address)
source

TransferCouncil hands the council seat to a new address, typically an arbitration committee's multisig. Bounties posted with the council as arbiter follow. Only the current council can move the seat.

func Unassign

crossing Action
1func Unassign(cur realm, id uint64)
source

Unassign returns an active bounty to the open pool. The assignee may step back at any time; the poster may reclaim it once the work window has passed. Milestones awaiting review or arbitration must be settled first.

Dependencies

Source Files 4