const BountiesPath
1const BountiesPath = "gno.land/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/guildhall/bounties"BountiesPath is the escrow realm allowed to write records at launch.
Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.
Package reputation is Guildhall's record of completed work.
Package reputation is Guildhall's record of completed work.
Every record says that a piece of work was paid for, who did it, who vouched for it, how much it paid and where the work lives (a PR, a realm path, a proposal). Records can only be written by allowlisted writer realms, the Guildhall bounty escrow first among them, and only at the moment escrowed funds are released. Each record also keeps the address whose signed transaction released the funds.
Scores are derived from those records with the rules in gno.land/p/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/guildhall/trust: a record is worth more when the people who approved it are themselves trusted. Any realm can consume the result with a single import:
1const BountiesPath = "gno.land/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/guildhall/bounties"BountiesPath is the escrow realm allowed to write records at launch.
1func AddRecord(cur realm, worker, poster address, reviewers []address, shareBps, amount int64, denom, title, link, ref string, arbitrated bool) uint64AddRecord stores a piece of paid work and credits the worker. It may only be called by an allowlisted writer realm, at the moment it releases funds.
worker was paid amount of denom for work funded by poster and approved by reviewers. shareBps is the fraction of the milestone the worker received (10000 unless a dispute split it). title, link and ref describe the work: link points at the PR, realm path or proposal, and ref identifies the work within the writer realm (for bounties, "<id>/<milestone>").
AddSeed marks addr as a seed reviewer with full trust.
AddWriter allows another realm to write records.
AssertScore panics unless addr's score is at least min. It is the one-line gate for realms that want reputation-weighted access.
CompletedCount returns how many paid records addr has as a worker.
ContributorCount returns the number of addresses with a positive score.
Earned returns the total addr has been paid in denom through records.
HasScore reports whether addr's score is at least min.
IsSeed reports whether addr is a seed reviewer.
IsWriter reports whether pkgPath may write records.
Level returns a display name for addr's score band.
Params returns the scoring parameters in force.
Rank returns addr's 1-based leaderboard position, or 0 if unranked.
RecordCount returns the number of records ever written.
RemoveSeed revokes addr's seed status. Existing records keep the points they were awarded; only future reviews are affected.
RemoveWriter revokes a realm's right to write records.
RenounceAdmin gives up the admin key for good. Nothing can curate reputation afterwards: seeds, writers and parameters are frozen and no record can be voided. Prefer TransferAdmin unless that is the intent.
ReviewCount returns how many records addr has vouched for.
Score returns addr's current reputation score.
SetParams changes the scoring rules for future records.
TransferAdmin hands the admin key to another address, such as a multisig.
VoidRecord cancels a fraudulent record and removes its points from the worker. Trust the worker lent to others while holding those points is not unwound; voiding is for correcting abuse, not rewriting history.
GetRecord returns a copy of the record with the given id.
RecordsOf returns up to limit of addr's work records, newest first, skipping the first offset.
ReviewsOf returns up to limit of the records addr vouched for, newest first.
Top returns the n highest scores, highest first. Ties are ordered by address.
Profile aggregates a contributor's records.
1type Record struct {
2 ID uint64
3 Worker address
4 Poster address
5 Reviewers []address
6 ReviewerTrust []int64
7 Points int64
8 ShareBps int64
9 Amount int64
10 Denom string
11 Title string
12 Link string
13 Ref string
14 Source string
15 SignedBy address
16 Arbitrated bool
17 Height int64
18 At time.Time
19 Voided bool
20 VoidReason string
21}Record is a stored, immutable account of paid work. Only Voided can change, and only by the Guildhall admin.
Standing is a leaderboard entry.