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.

reputation state

Back to all declarations

apiMaxLimit

untyped bigint

Value

(50 <untyped> bigint)

renderAPI

func(route string, q url.Values) string

renderAPI serves JSON for the web app, under Render("api/..."): api/stats totals, parameters, admin api/top?limit= leaderboard api/profile/<address> one contributor api/records?addr=&kind=work|reviews&page=&limit= newest first; all records without addr api/record/<id> one record api/seeds seed reviewers

Open
OID
0bbacb…6caa:3
renderAPI details

Inspect func

apiProfile

func(addr .uverse.address) string
Open
OID
0bbacb…6caa:5
apiProfile details

Inspect func

apiRecords

func(q url.Values) string
Open
OID
0bbacb…6caa:6
apiRecords details

Inspect func

recordJSON

func(r *reputation.Record) string
Open
OID
0bbacb…6caa:7
recordJSON details

Inspect func

apiError

func(msg string) string
Open
OID
0bbacb…6caa:11
apiError details

Inspect func

realmURL

untyped string

Value

"/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/guildhall/reputation"

pageSize

untyped bigint

Value

(20 <untyped> bigint)

boardSize

untyped bigint

Value

(25 <untyped> bigint)

Render

func(path string) string

Render serves the reputation pages: "" leaderboard and latest records u/<address> contributor profile record/<id> a single record records every record, newest first (?page=N) seeds seed reviewers about scoring rules

Open
OID
0bbacb…6caa:12
Render details

Inspect func

renderProfile

func(addr .uverse.address) string
Open
OID
0bbacb…6caa:15
renderProfile details

Inspect func

renderRecord

func(id uint64) string
Open
OID
0bbacb…6caa:16
renderRecord details

Inspect func

renderRecords

func(page int) string
Open
OID
0bbacb…6caa:17
renderRecords details

Inspect func

recordTable

func(rs []reputation.Record) string
Open
OID
0bbacb…6caa:20
recordTable details

Inspect func

latest

func(offset int, limit int) []reputation.Record
Open
OID
0bbacb…6caa:21
latest details

Inspect func

linkOrText

func(s string) string
Open
OID
0bbacb…6caa:24
linkOrText details

Inspect func

formatAmount

func(amount int64, denom string) string
Open
OID
0bbacb…6caa:25
formatAmount details

Inspect func

decimal

func(amount int64, decimals int) string
Open
OID
0bbacb…6caa:26
decimal details

Inspect func

bpsPercent

func(bps int64) string
Open
OID
0bbacb…6caa:27
bpsPercent details

Inspect func

pager

func(route string, page int, total int) string
Open
OID
0bbacb…6caa:28
pager details

Inspect func

splitQuery

func(path string) (string, url.Values)
Open
OID
0bbacb…6caa:29
splitQuery details

Inspect func

BountiesPath

untyped string

BountiesPath is the escrow realm allowed to write records at launch.

Value

"gno.land/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/guildhall/bounties"

maxReviewers

untyped bigint

Value

(16 <untyped> bigint)

maxTextLen

untyped bigint

Value

(300 <untyped> bigint)

maxRank

untyped bigint

Value

(1000 <untyped> bigint)

entry

type

entry is what a writer realm submits when work is paid for.

Value

reputation.entry

Record

type

Record is a stored, immutable account of paid work. Only Voided can change, and only by the Guildhall admin.

Value

reputation.Record

Profile

type

Profile aggregates a contributor's records.

Value

reputation.Profile

Standing

type

Standing is a leaderboard entry.

Value

reputation.Standing

records

v0.Tree

// padded id -> \*Record

Open
OID
0bbacb…6caa:33
records details

Inspect ref

lastID

uint64

Value

0

profiles

v0.Tree

// address -> \*Profile

Open
OID
0bbacb…6caa:36
profiles details

Inspect ref

leaderboard

v0.Tree

// inverted score key -> address

Open
OID
0bbacb…6caa:38
leaderboard details

Inspect ref

seeds

v0.Tree

// address -> struct{}

Open
OID
0bbacb…6caa:40
seeds details

Inspect ref

writers

v0.Tree

// pkgpath -> struct{}

Open
OID
0bbacb…6caa:42
writers details

Inspect ref

InitialAdmin

.uverse.address

Value

<gnolang.StringValue>

AddRecord

func(worker .uverse.address, poster .uverse.address, reviewers [].uverse.address, shareBps int64, amount int64, denom string, title string, link string, ref string, arbitrated bool) uint64

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

Open
OID
0bbacb…6caa:48
AddRecord details

Inspect func

validateEntry

func(e reputation.entry) .uverse.error
Open
OID
0bbacb…6caa:49
validateEntry details

Inspect func

Score

func(addr .uverse.address) int64

Score returns addr's current reputation score.

Open
OID
0bbacb…6caa:50
Score details

Inspect func

Level

func(addr .uverse.address) string

Level returns a display name for addr's score band.

Open
OID
0bbacb…6caa:51
Level details

Inspect func

HasScore

func(addr .uverse.address, min int64) bool

HasScore reports whether addr's score is at least min.

Open
OID
0bbacb…6caa:52
HasScore details

Inspect func

AssertScore

func(addr .uverse.address, min int64)

AssertScore panics unless addr's score is at least min. It is the one-line gate for realms that want reputation-weighted access.

Open
OID
0bbacb…6caa:53
AssertScore details

Inspect func

CompletedCount

func(addr .uverse.address) int

CompletedCount returns how many paid records addr has as a worker.

Open
OID
0bbacb…6caa:54
CompletedCount details

Inspect func

ReviewCount

func(addr .uverse.address) int

ReviewCount returns how many records addr has vouched for.

Open
OID
0bbacb…6caa:55
ReviewCount details

Inspect func

Earned

func(addr .uverse.address, denom string) int64

Earned returns the total addr has been paid in denom through records.

Open
OID
0bbacb…6caa:56
Earned details

Inspect func

IsSeed

func(addr .uverse.address) bool

IsSeed reports whether addr is a seed reviewer.

Open
OID
0bbacb…6caa:57
IsSeed details

Inspect func

IsWriter

func(pkgPath string) bool

IsWriter reports whether pkgPath may write records.

Open
OID
0bbacb…6caa:58
IsWriter details

Inspect func

RecordCount

func() int

RecordCount returns the number of records ever written.

Open
OID
0bbacb…6caa:59
RecordCount details

Inspect func

ContributorCount

func() int

ContributorCount returns the number of addresses with a positive score.

Open
OID
0bbacb…6caa:60
ContributorCount details

Inspect func

GetRecord

func(id uint64) (reputation.Record, bool)

GetRecord returns a copy of the record with the given id.

Open
OID
0bbacb…6caa:61
GetRecord details

Inspect func

RecordsOf

func(addr .uverse.address, offset int, limit int) []reputation.Record

RecordsOf returns up to limit of addr's work records, newest first, skipping the first offset.

Open
OID
0bbacb…6caa:62
RecordsOf details

Inspect func

ReviewsOf

func(addr .uverse.address, offset int, limit int) []reputation.Record

ReviewsOf returns up to limit of the records addr vouched for, newest first.

Open
OID
0bbacb…6caa:63
ReviewsOf details

Inspect func

Top

func(n int) []reputation.Standing

Top returns the n highest scores, highest first. Ties are ordered by address.

Open
OID
0bbacb…6caa:64
Top details

Inspect func

Rank

func(addr .uverse.address) int

Rank returns addr's 1-based leaderboard position, or 0 if unranked.

Open
OID
0bbacb…6caa:65
Rank details

Inspect func

Params

func() v0.Params

Params returns the scoring parameters in force.

Open
OID
0bbacb…6caa:66
Params details

Inspect func

AddSeed

func(addr .uverse.address)

AddSeed marks addr as a seed reviewer with full trust.

Open
OID
0bbacb…6caa:68
AddSeed details

Inspect func

RemoveSeed

func(addr .uverse.address)

RemoveSeed revokes addr's seed status. Existing records keep the points they were awarded; only future reviews are affected.

Open
OID
0bbacb…6caa:69
RemoveSeed details

Inspect func

AddWriter

func(pkgPath string)

AddWriter allows another realm to write records.

Open
OID
0bbacb…6caa:70
AddWriter details

Inspect func

RemoveWriter

func(pkgPath string)

RemoveWriter revokes a realm's right to write records.

Open
OID
0bbacb…6caa:71
RemoveWriter details

Inspect func

SetParams

func(base int64, trustThreshold int64, trustFloorBps int64, selfFundedFactorBps int64)

SetParams changes the scoring rules for future records.

Open
OID
0bbacb…6caa:72
SetParams details

Inspect func

VoidRecord

func(id uint64, reason string)

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.

Open
OID
0bbacb…6caa:73
VoidRecord details

Inspect func

TransferAdmin

func(newAdmin .uverse.address)

TransferAdmin hands the admin key to another address, such as a multisig.

Open
OID
0bbacb…6caa:74
TransferAdmin details

Inspect func

RenounceAdmin

func()

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.

Open
OID
0bbacb…6caa:75
RenounceAdmin details

Inspect func

addSeed

func(addr .uverse.address)
Open
OID
0bbacb…6caa:76
addSeed details

Inspect func

removeSeed

func(addr .uverse.address)
Open
OID
0bbacb…6caa:77
removeSeed details

Inspect func

removeWriter

func(pkgPath string)
Open
OID
0bbacb…6caa:79
removeWriter details

Inspect func

newParams

func(base int64, trustThreshold int64, trustFloorBps int64, selfFundedFactorBps int64) v0.Params
Open
OID
0bbacb…6caa:80
newParams details

Inspect func

checkVoid

func(id uint64, reason string)
Open
OID
0bbacb…6caa:82
checkVoid details

Inspect func

voidRecord

func(id uint64, reason string)
Open
OID
0bbacb…6caa:83
voidRecord details

Inspect func

getProfile

func(addr .uverse.address) *reputation.Profile
Open
OID
0bbacb…6caa:85
getProfile details

Inspect func

getOrCreateProfile

func(addr .uverse.address) *reputation.Profile
Open
OID
0bbacb…6caa:86
getOrCreateProfile details

Inspect func

getRecord

func(id uint64) *reputation.Record
Open
OID
0bbacb…6caa:87
getRecord details

Inspect func

touch

func(p *reputation.Profile, at time.Time)
Open
OID
0bbacb…6caa:88
touch details

Inspect func

addEarned

func(p *reputation.Profile, denom string, amount int64)
Open
OID
0bbacb…6caa:89
addEarned details

Inspect func

setScore

func(p *reputation.Profile, score int64)
Open
OID
0bbacb…6caa:90
setScore details

Inspect func

boardKey

func(score int64, addr .uverse.address) string

boardKey sorts higher scores first under avl's ascending iteration.

Open
OID
0bbacb…6caa:91
boardKey details

Inspect func

collect

func(ids []uint64, offset int, limit int) []reputation.Record
Open
OID
0bbacb…6caa:94
collect details

Inspect func

copyRecord

func(r *reputation.Record) reputation.Record
Open
OID
0bbacb…6caa:95
copyRecord details

Inspect func
apiMaxLimit : untyped bigint =(50 <untyped> bigint)
renderAPI : func(route string, q url.Values) string Inspect
apiProfile : func(addr .uverse.address) string Inspect
apiRecords : func(q url.Values) string Inspect
recordJSON : func(r *reputation.Record) string Inspect
int64s : func(ns []int64) string Inspect
keys : func(t *v0.Tree) []string Inspect
apiLimit : func(q url.Values) int Inspect
apiError : func(msg string) string Inspect
realmURL : untyped string ="/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/guildhall/reputation"
pageSize : untyped bigint =(20 <untyped> bigint)
boardSize : untyped bigint =(25 <untyped> bigint)
Render : func(path string) string Inspect
renderHome : func() string Inspect
renderProfile : func(addr .uverse.address) string Inspect
renderRecord : func(id uint64) string Inspect
renderRecords : func(page int) string Inspect
renderSeeds : func() string Inspect
renderAbout : func() string Inspect
recordTable : func(rs []reputation.Record) string Inspect
latest : func(offset int, limit int) []reputation.Record Inspect
linkOrText : func(s string) string Inspect
formatAmount : func(amount int64, denom string) string Inspect
decimal : func(amount int64, decimals int) string Inspect
bpsPercent : func(bps int64) string Inspect
pager : func(route string, page int, total int) string Inspect
splitQuery : func(path string) (string, url.Values) Inspect
pageOf : func(q url.Values) int Inspect
notFound : func() string Inspect
BountiesPath : untyped string ="gno.land/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/guildhall/bounties"
maxReviewers : untyped bigint =(16 <untyped> bigint)
maxTextLen : untyped bigint =(300 <untyped> bigint)
maxRank : untyped bigint =(1000 <untyped> bigint)
entry : type =reputation.entry
Record : type =reputation.Record
Profile : type =reputation.Profile
Standing : type =reputation.Standing
records : v0.Tree Inspect
lastID : uint64 =0
profiles : v0.Tree Inspect
leaderboard : v0.Tree Inspect
seeds : v0.Tree Inspect
writers : v0.Tree Inspect
params : v0.Params Inspect
admin : *v0.Ownable Inspect
InitialAdmin : .uverse.address =<gnolang.StringValue>
init.48 : func() Inspect
AddRecord : func(worker .uverse.address, poster .uverse.address, reviewers [].uverse.address, shareBps int64, amount int64, denom string, title string, link string, ref string, arbitrated bool) uint64 Inspect
validateEntry : func(e reputation.entry) .uverse.error Inspect
Score : func(addr .uverse.address) int64 Inspect
Level : func(addr .uverse.address) string Inspect
HasScore : func(addr .uverse.address, min int64) bool Inspect
AssertScore : func(addr .uverse.address, min int64) Inspect
CompletedCount : func(addr .uverse.address) int Inspect
ReviewCount : func(addr .uverse.address) int Inspect
Earned : func(addr .uverse.address, denom string) int64 Inspect
IsSeed : func(addr .uverse.address) bool Inspect
IsWriter : func(pkgPath string) bool Inspect
RecordCount : func() int Inspect
ContributorCount : func() int Inspect
GetRecord : func(id uint64) (reputation.Record, bool) Inspect
RecordsOf : func(addr .uverse.address, offset int, limit int) []reputation.Record Inspect
ReviewsOf : func(addr .uverse.address, offset int, limit int) []reputation.Record Inspect
Top : func(n int) []reputation.Standing Inspect
Rank : func(addr .uverse.address) int Inspect
Params : func() v0.Params Inspect
Admin : func() .uverse.address Inspect
AddSeed : func(addr .uverse.address) Inspect
RemoveSeed : func(addr .uverse.address) Inspect
AddWriter : func(pkgPath string) Inspect
RemoveWriter : func(pkgPath string) Inspect
SetParams : func(base int64, trustThreshold int64, trustFloorBps int64, selfFundedFactorBps int64) Inspect
VoidRecord : func(id uint64, reason string) Inspect
TransferAdmin : func(newAdmin .uverse.address) Inspect
RenounceAdmin : func() Inspect
addSeed : func(addr .uverse.address) Inspect
removeSeed : func(addr .uverse.address) Inspect
addWriter : func(pkgPath string) Inspect
removeWriter : func(pkgPath string) Inspect
newParams : func(base int64, trustThreshold int64, trustFloorBps int64, selfFundedFactorBps int64) v0.Params Inspect
setParams : func(p v0.Params) Inspect
checkVoid : func(id uint64, reason string) Inspect
voidRecord : func(id uint64, reason string) Inspect
assertAdmin : func() Inspect
getProfile : func(addr .uverse.address) *reputation.Profile Inspect
getOrCreateProfile : func(addr .uverse.address) *reputation.Profile Inspect
getRecord : func(id uint64) *reputation.Record Inspect
touch : func(p *reputation.Profile, at time.Time) Inspect
addEarned : func(p *reputation.Profile, denom string, amount int64) Inspect
setScore : func(p *reputation.Profile, score int64) Inspect
boardKey : func(score int64, addr .uverse.address) string Inspect
idKey : func(id uint64) string Inspect
pad : func(n int64, width int) string Inspect
collect : func(ids []uint64, offset int, limit int) []reputation.Record Inspect
copyRecord : func(r *reputation.Record) reputation.Record Inspect