VotingPeriod
time.DurationThe policy's durations, in their own file so a node fixture, which cannot wait days, can replace this file alone and run the real rules faster.
Value
<zero>
ExecutionWindow
time.DurationThe policy's durations, in their own file so a node fixture, which cannot wait days, can replace this file alone and run the real rules faster.
Value
<zero>
WeightedDelay
time.Duration// critical, weight route
Value
<zero>
HeadcountDelay
time.Duration// critical, headcount route
Value
<zero>
RosterDelay
time.DurationThe policy's durations, in their own file so a node fixture, which cannot wait days, can replace this file alone and run the real rules faster.
Value
<zero>
InactiveDelay
time.DurationThe policy's durations, in their own file so a node fixture, which cannot wait days, can replace this file alone and run the real rules faster.
Value
<zero>
InactiveAfter
time.DurationThe policy's durations, in their own file so a node fixture, which cannot wait days, can replace this file alone and run the real rules faster.
Value
<zero>
SeedInviteTTL
time.DurationThe policy's durations, in their own file so a node fixture, which cannot wait days, can replace this file alone and run the real rules faster.
Value
<zero>
VotedInviteTTL
time.DurationThe policy's durations, in their own file so a node fixture, which cannot wait days, can replace this file alone and run the real rules faster.
Value
<zero>
corePath
untyped stringValue
"gno.land/r/samcrew/memba_gov"
MaxSeats
untyped bigintValue
(25 <untyped> bigint)
MinSeats
untyped bigintValue
(2 <untyped> bigint)
MaxScope
untyped bigintValue
(160 <untyped> bigint)
MaxNote
untyped bigintValue
(280 <untyped> bigint)
MaxAction
untyped bigintValue
(64 <untyped> bigint)
actAddMember
untyped stringValue
"AddMember"
actRemoveMember
untyped stringValue
"RemoveMember"
actSetWeight
untyped stringValue
"SetWeight"
actRecover
untyped stringValue
"Recover"
actRemoveInactive
untyped stringValue
"RemoveInactive"
actUninvite
untyped stringValue
"Uninvite"
voteYes
untyped stringValue
"yes"
voteNo
untyped stringValue
"no"
voteAbstain
untyped stringValue
"abstain"
person
typeValue
memba_gov.person
invite
typeinvite seats addr as id (a new person) or, for a recovery, gives the existing person id the new key addr, once addr itself calls Join.
Value
memba_gov.invite
ballot
typeValue
memba_gov.ballot
proposal
typeValue
memba_gov.proposal
seated
[]*memba_gov.person- OID
- 04a5d3…0fc8:80
seated details
invites
[]*memba_gov.invite- OID
- 04a5d3…0fc8:91
invites details
proposals
*avl.Tree// padded id -> \*proposal
- OID
- 04a5d3…0fc8:6
proposals details
scopes
*avl.Tree// target + "\\n" + scope -> uint64 generation
- OID
- 04a5d3…0fc8:9
scopes details
lastID
uint64Value
0
globalGen
uint64Value
0
init.34
func()- OID
- 04a5d3…0fc8:13
init.34 details
seedRoster
func()- OID
- 04a5d3…0fc8:15
seedRoster details
now
func() int64now is the block time in unix seconds; every stored time uses it.
- OID
- 04a5d3…0fc8:16
now details
secs
func(d time.Duration) int64- OID
- 04a5d3…0fc8:17
secs details
Propose
func(target string, action string, args string, scope string, class int, note string) uint64Propose files one action. target is the realm that will consume it, or this realm for a roster action; scope is the invalidation key that realm computes for the action; class is at least the class it requires.
- OID
- 04a5d3…0fc8:18
Propose details
Vote
func(pid uint64, choice string)Vote records yes, no or abstain until the voting deadline. After it, a YES can still be withdrawn while the proposal is not executed or expired, so members can stop an approval they no longer back.
- OID
- 04a5d3…0fc8:19
Vote details
Join
func()Join seats the caller's invitation: a new person, or a recovered key.
- OID
- 04a5d3…0fc8:20
Join details
Execute
func(pid uint64)Execute runs a ready roster action of this realm. The roster it was checked against at Propose is unchanged: any change would have invalidated it.
- OID
- 04a5d3…0fc8:21
Execute details
Consume
func(pid uint64, action string, args string, scope string, minClass int, executor .uverse.address)Consume is crossing-called by a governed realm right before the step a proposal approved. It panics unless the caller is exactly the proposal's target, the action, arguments and scope are the voted ones byte for byte, the class is at least minClass, the proposal is ready, and executor, the account that called the target directly, is a seated member. It marks the proposal used and invalidates the other open proposals of (target, scope).
- OID
- 04a5d3…0fc8:22
Consume details
IsMember
func(addr .uverse.address) boolIsMember reports whether addr is a seated member's current key.
- OID
- 04a5d3…0fc8:23
IsMember details
PersonOf
func(addr .uverse.address) stringPersonOf returns the id of the seated member whose current key is addr, or "". The id survives a key recovery.
- OID
- 04a5d3…0fc8:24
PersonOf details
user
func() .uverse.address- OID
- 04a5d3…0fc8:25
user details
member
func() *memba_gov.person- OID
- 04a5d3…0fc8:26
member details
rosterClass
func(action string) introsterClass and rosterDelay fix how each roster action passes.
- OID
- 04a5d3…0fc8:27
rosterClass details
rosterDelay
func(action string) time.Duration- OID
- 04a5d3…0fc8:28
rosterDelay details
checkRosterAction
func(action string, f []daoauth.Field)checkRosterAction validates a roster action's fields against the roster.
- OID
- 04a5d3…0fc8:29
checkRosterAction details
weightField
func(f daoauth.Field) int- OID
- 04a5d3…0fc8:30
weightField details
addInvite
func(id string, addr .uverse.address, weight int, ttl time.Duration)- OID
- 04a5d3…0fc8:31
addInvite details
dropInvite
func(id string)- OID
- 04a5d3…0fc8:32
dropInvite details
removePerson
func(id string)- OID
- 04a5d3…0fc8:33
removePerson details
checkRoster
func()checkRoster enforces the bounds, valid ids, addresses and weights, and the uniqueness of ids and of addresses across seats and open invitations. An invitation may name a seated id: that is a recovery, with no weight.
- OID
- 04a5d3…0fc8:34
checkRoster details
addrTaken
func(a .uverse.address, id string) booladdrTaken reports whether a is seated, or invited for someone other than id: a newer invitation for id replaces id's own.
- OID
- 04a5d3…0fc8:35
addrTaken details
invited
func(id string) bool- OID
- 04a5d3…0fc8:36
invited details
personByAddr
func(a .uverse.address) *memba_gov.person- OID
- 04a5d3…0fc8:37
personByAddr details
personByID
func(id string) *memba_gov.person- OID
- 04a5d3…0fc8:38
personByID details
weightOf
func(id string) int- OID
- 04a5d3…0fc8:39
weightOf details
seatedTotals
func() (w int, n int)- OID
- 04a5d3…0fc8:40
seatedTotals details
scopeGen
func(target string, scope string) uint64- OID
- 04a5d3…0fc8:41
scopeGen details
isOpen
func(pid uint64) bool- OID
- 04a5d3…0fc8:42
isOpen details
mustGet
func(pid uint64) *memba_gov.proposal- OID
- 04a5d3…0fc8:43
mustGet details
key
func(id uint64) string- OID
- 04a5d3…0fc8:44
key details
validTarget
func(t string) boolvalidTarget accepts a realm path: no user ("") or MsgRun (gno.land/e/) identity, no sub-realm ("#"), lowercase path characters only.
- OID
- 04a5d3…0fc8:45
validTarget details
validAction
func(a string) bool- OID
- 04a5d3…0fc8:46
validAction details
validID
func(id string) bool- OID
- 04a5d3…0fc8:47
validID details
lower
untyped stringValue
"abcdefghijklmnopqrstuvwxyz"
upper
untyped stringValue
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
digits
untyped stringValue
"0123456789"
only
func(s string, set string) boolonly reports whether every byte of s is in set.
- OID
- 04a5d3…0fc8:48
only details
Routine
untyped bigintClasses. A target hard-codes the minimum class of each action it governs.
Value
(1 <untyped> bigint)
Financial
untyped bigintClasses. A target hard-codes the minimum class of each action it governs.
Value
(2 <untyped> bigint)
Critical
untyped bigintClasses. A target hard-codes the minimum class of each action it governs.
Value
(3 <untyped> bigint)
route
typeA route is one way a proposal passes: a rule on the YES votes of the seated roster and the delay that follows. Thresholds are fractions of the seated weight W and persons N. Every rule needs at least two persons: the critical ones because N is at least 2.
Value
memba_gov.route
ruleRoutine
untyped bigintValue
(0 <untyped> bigint)
ruleFinancial
untyped bigintValue
(1 <untyped> bigint)
ruleWeighted
untyped bigintValue
(2 <untyped> bigint)
ruleHeadcount
untyped bigintValue
(3 <untyped> bigint)
meets
func(rule int, w int, p int, W int, N int) bool- OID
- 04a5d3…0fc8:49
meets details
routes
func(p *memba_gov.proposal) []memba_gov.routeroutes returns the ways proposal p passes: its class sets the rules, and a roster action of this realm has its own delay on every route.
- OID
- 04a5d3…0fc8:51
routes details
streak
typeA streak is one current YES ballot: when it began and its voter's weight.
Value
memba_gov.streak
yesStreaks
func(p *memba_gov.proposal) []memba_gov.streakyesStreaks returns p's current YES ballots, oldest streak first.
- OID
- 04a5d3…0fc8:52
yesStreaks details
qualifiedSince
func(ys []memba_gov.streak, rule int, W int, N int) int64qualifiedSince returns when (unix seconds) the earliest coalition still voting YES without interruption first met rule, or 0. The coalition of a start time is every YES streak begun no later; every rule only grows with more votes, so the first prefix of ys that meets it ends on that time (streaks begun in the same second share it). A voter the rest of the coalition does not need cannot postpone the clock by withdrawing and rejoining.
- OID
- 04a5d3…0fc8:53
qualifiedSince details
stExecuted
untyped stringProposal states, in the order a reader checks them.
Value
"executed"
stInvalidated
untyped stringProposal states, in the order a reader checks them.
Value
"invalidated"
stExpired
untyped stringProposal states, in the order a reader checks them.
Value
"expired"
stReady
untyped stringProposal states, in the order a reader checks them.
Value
"ready"
stTimelocked
untyped stringProposal states, in the order a reader checks them.
Value
"timelocked"
stVoting
untyped stringProposal states, in the order a reader checks them.
Value
"voting"
state
func(p *memba_gov.proposal) (string, int64)state returns p's status and, once some route qualified, the earliest unix time it is or becomes executable (0 before). Voting ends just before the deadline second; readyAt and the end of the execution window are inclusive.
- OID
- 04a5d3…0fc8:54
state details
vetoed
func(p *memba_gov.proposal) boolvetoed reports whether the member a RemoveInactive names has been active since the proposal: proposing, voting, executing or joining vetoes it.
- OID
- 04a5d3…0fc8:55
vetoed details
MaxListed
untyped bigintMaxListed is the most proposals ProposalsJSON and Render return at once.
Value
(20 <untyped> bigint)
RosterJSON
func() stringRosterJSON lists seated members and open invitations.
- OID
- 04a5d3…0fc8:56
RosterJSON details
ProposalJSON
func(pid uint64) stringProposalJSON returns one proposal with its ballots and current status, or null for an unknown id.
- OID
- 04a5d3…0fc8:58
ProposalJSON details
ConstantsJSON
func() stringConstantsJSON returns the fixed policy: durations in seconds, roster bounds.
- OID
- 04a5d3…0fc8:59
ConstantsJSON details
ProposalsJSON
func(before uint64, limit int) stringProposalsJSON lists up to limit proposals (at most MaxListed) with ids below before, newest first; before = 0 starts from the newest.
- OID
- 04a5d3…0fc8:60
ProposalsJSON details
proposalJSON
func(b []uint8, p *memba_gov.proposal) []uint8- OID
- 04a5d3…0fc8:61
proposalJSON details
Render
func(string) stringRender shows the roster and the latest proposals. Each proposal's line holds only fields the realm sets (id, status, class, proposer id); every value a proposer wrote follows as its own labelled, escaped item, so none can forge a field.
- OID
- 04a5d3…0fc8:62
Render details
unix
func(t int64) stringunix formats a unix-second time (0 = none).
- OID
- 04a5d3…0fc8:63
unix details
grow
func(b []uint8, n int) []uint8grow makes room for n more bytes. The VM's append reallocates to the exact length, so appending byte by byte past capacity would copy the whole buffer each time; doubling keeps the escapers linear.
- OID
- 04a5d3…0fc8:64
grow details
qClass
untyped stringEscaper classes of each ASCII byte, one table lookup per byte: '.' is copied, 'b' gets a backslash, 'u' becomes \\u00XX, 'e' a numeric character reference. Stored text is printable ASCII (0x7f masks the index; no other byte reaches here).
Value
"uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu..b...u.....................u.u.............................b..................................u"
mdClass
untyped stringEscaper classes of each ASCII byte, one table lookup per byte: '.' is copied, 'b' gets a backslash, 'u' becomes \\u00XX, 'e' a numeric character reference. Stored text is printable ASCII (0x7f masks the index; no other byte reaches here).
Value
"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.bbbb.ebbbbb.bbb..........b.ebe.b..........................bbbbbb......e...................bbbbe"
hexDigits
untyped stringEscaper classes of each ASCII byte, one table lookup per byte: '.' is copied, 'b' gets a backslash, 'u' becomes \\u00XX, 'e' a numeric character reference. Stored text is printable ASCII (0x7f masks the index; no other byte reaches here).
Value
"0123456789abcdef"
q
func(b []uint8, s string) []uint8q appends s as a JSON string; \< > & are escaped so the text stays inert in HTML.
- OID
- 04a5d3…0fc8:65
q details
md
func(b []uint8, s string) []uint8md appends s with every character Markdown, HTML or gnoweb could act on made literal.
- OID
- 04a5d3…0fc8:66
md details
seat
typeValue
memba_gov.seat
seedSeated
[]memba_gov.seat- OID
- 04a5d3…0fc8:68
seedSeated details
seedInvited
[]memba_gov.seat- OID
- 04a5d3…0fc8:75