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.

govdao source realm

Package govdao is an optional, one-way adapter from Guildhall reputation to GovDAO membership. Guildhall does not dep...

Overview

Package govdao is an optional, one-way adapter from Guildhall reputation to GovDAO membership. Guildhall does not depend on it and GovDAO has no authority over it or over any other Guildhall realm; it only reads reputation and builds proposals that GovDAO members may choose to submit.

It turns a contributor's on-chain work records into two inputs for GovDAO:

  • an eligibility check: a minimum reputation score per tier, and
  • a portfolio: a summary of the contributor's paid, reviewed work, with links to every record, generated from chain state rather than written by hand.

GovDAO only accepts proposals created directly by a member's transaction, so this realm never creates proposals itself. It builds the request; the member submits it from a `gnokey maketx run` script:

Example
 1package main
 2
 3import (
 4	"gno.land/r/gov/dao"
 5	guild "gno.land/r/g1lnkytfqcjwllws63gvf0mv9yt04aswy4y9amhm/guildhall/govdao"
 6)
 7
 8func main(cur realm) {
 9	req := guild.NewMemberRequest(cross(cur), "g1candidate...", "T2")
10	dao.MustCreateProposal(cross(cur), req)
11}

The thresholds are set by the Guildhall admin with SetThreshold. They are Guildhall's bar for the candidates it vouches for; GovDAO's vote decides.

Functions 7

func AssertEligible

Action
1func AssertEligible(addr address, tier string)
source

AssertEligible panics unless addr meets the reputation bar for tier.

func Eligible

Action
1func Eligible(addr address, tier string) (bool, string)
source

Eligible reports whether addr meets the reputation bar for tier and, if not, why.

func NewMemberRequest

crossing Action
1func NewMemberRequest(cur realm, addr address, tier string) dao.ProposalRequest
source

NewMemberRequest builds a GovDAO proposal to add addr to tier, with its Guildhall portfolio attached. It panics if addr does not meet the tier's reputation threshold. GovDAO's own rules still apply: the signer must be a member with an invitation point, and only T1 and T2 are proposal-gated.

func Portfolio

Action
1func Portfolio(addr address) string
source

Portfolio renders addr's Guildhall track record as markdown suitable for a GovDAO membership proposal.

func Render

1func Render(path string) string
source

Render shows the thresholds and, for u/<address>, that address's eligibility and generated portfolio.

func SetThreshold

crossing Action
1func SetThreshold(cur realm, tier string, min int64)
source

SetThreshold changes the minimum score for tier. Only the Guildhall admin (reputation.Admin) may call it: the bar is Guildhall's statement of who it vouches for, and GovDAO is free to ignore it.

func Threshold

Action
1func Threshold(tier string) int64
source

Threshold returns the minimum score required to be proposed for tier.

Dependencies

Source Files 2