TemplateVersion
untyped stringValue
"memba-dao/2"
APIVersion
untyped stringValue
"2.0"
maxMembers
untyped bigintValue
(100 <untyped> bigint)
maxPower
untyped bigint// total \<= 1e11, so x100 stays far below MaxInt64
Value
(1000000000 <untyped> bigint)
maxTitleLen
untyped bigintValue
(128 <untyped> bigint)
maxDescLen
untyped bigintValue
(8000 <untyped> bigint)
maxOpenPerMember
untyped bigintValue
(10 <untyped> bigint)
maxPageSize
untyped bigintValue
(50 <untyped> bigint)
renderPageSize
untyped bigintValue
(20 <untyped> bigint)
kindText
untyped stringValue
"text"
kindAddMember
untyped stringValue
"add_member"
kindRemoveMember
untyped stringValue
"remove_member"
kindSetRoles
untyped stringValue
"set_roles"
kindArchive
untyped stringValue
"archive"
statusActive
untyped stringValue
"ACTIVE"
statusAccepted
untyped stringValue
"ACCEPTED"
statusRejected
untyped stringValue
"REJECTED"
statusExecuted
untyped stringValue
"EXECUTED"
statusExpired
untyped stringValue
"EXPIRED"
statusLapsed
untyped stringValue
"LAPSED"
statusInvalidated
untyped stringValue
"INVALIDATED"
statusArchived
untyped stringValue
"ARCHIVED"
Member
typeValue
friends_surf_club.Member
Action
typeAction is stored by value inside its proposal at propose time. It holds primitives only and is never modified afterwards. The handler for an action is chosen by Kind in Execute; there is no other dispatch.
Value
friends_surf_club.Action
VoteRecord
typeValue
friends_surf_club.VoteRecord
Proposal
typeValue
friends_surf_club.Proposal
name
stringValue
"Friends Surf Club"
description
stringValue
"Let's surf & ride with friends.\n#SurfTrip #Waves\n\nThis DAO is the made for testing purpose of Memba OS implementation, in order to experiment cross-features interactions, UX architecture, and UI implementations in a fun context.\n"
nameJSON
string// JSON-encoded once by the generator
Value
"\"Friends Surf Club\""
descriptionJSON
stringValue
"\"Let's surf & ride with friends.\\n#SurfTrip #Waves\\n\\nThis DAO is the made for testing purpose of Memba OS implementation, in order to experiment cross-features interactions, UX architecture, and UI implementations in a fun context.\\n\""
threshold
int// % of all voting power that must vote YES
Value
51
quorum
int// % of all voting power that must vote (0 = none)
Value
0
votingPeriod
int64// seconds
Value
259200
executionDelay
int64// seconds after acceptance
Value
3600
executionWindow
int64// seconds after the delay
Value
604800
allowedCategories
[]string- OID
- 0f8f11…f22a:13
allowedCategories details
allowedRoles
[]string- OID
- 0f8f11…f22a:15
allowedRoles details
members
*v0.Tree// address -> \*Member
- OID
- 0f8f11…f22a:17
members details
memberTotalPower
intValue
8
proposals
*v0.Tree// zero-padded id -> \*Proposal
- OID
- 0f8f11…f22a:21
proposals details
descriptions
*v0.Tree// zero-padded id -> string (kept apart so list reads stay cheap)
- OID
- 0f8f11…f22a:24
descriptions details
openByAuthor
*v0.Tree// address -> \[]uint64 (ids that may still be open)
- OID
- 0f8f11…f22a:27
openByAuthor details
lastID
uint64Value
2
electorateVersion
int// bumped when a member is added or removed
Value
1
archived
boolValue
false
init.45
func()- OID
- 0f8f11…f22a:32
init.45 details
addGenesisMember
func(addr string, power int, roles []string)- OID
- 0f8f11…f22a:34
addGenesisMember details
checkGenesis
func()- OID
- 0f8f11…f22a:35
checkGenesis details
now
func() int64- OID
- 0f8f11…f22a:36
now details
assertNotArchived
func()- OID
- 0f8f11…f22a:37
assertNotArchived details
getMember
func(addr .uverse.address) *friends_surf_club.Member- OID
- 0f8f11…f22a:38
getMember details
assertMember
func(addr .uverse.address) *friends_surf_club.Member- OID
- 0f8f11…f22a:39
assertMember details
isLowerCase
func(a .uverse.address) boolisLowerCase refuses the upper-case bech32 spelling, which IsValid accepts: it names the same account under a different member key. Only call it on an address that passed IsValid: bech32 refuses mixed case, so the first character decides (a byte loop would cost gas per character per member).
- OID
- 0f8f11…f22a:40
isLowerCase details
contains
func(list []string, s string) bool- OID
- 0f8f11…f22a:41
contains details
checkRoles
func(roles []string)- OID
- 0f8f11…f22a:42
checkRoles details
parseRoles
func(csv string) []string- OID
- 0f8f11…f22a:43
parseRoles details
isControl
func(r int32) bool- OID
- 0f8f11…f22a:44
isControl details
checkTitle
func(title string)- OID
- 0f8f11…f22a:45
checkTitle details
checkDescription
func(desc string)- OID
- 0f8f11…f22a:46
checkDescription details
validateAction
func(a friends_surf_club.Action)validateAction checks an action against the current state. Propose calls it before storing the proposal and Execute calls it again before applying.
- OID
- 0f8f11…f22a:47
validateAction details
padID
func(id uint64) string- OID
- 0f8f11…f22a:48
padID details
getProposal
func(id uint64) *friends_surf_club.Proposal- OID
- 0f8f11…f22a:49
getProposal details
proposalDescription
func(id uint64) string- OID
- 0f8f11…f22a:50
proposalDescription details
mustProposal
func(id uint64) *friends_surf_club.Proposal- OID
- 0f8f11…f22a:51
mustProposal details
derivedStatus
func(p *friends_surf_club.Proposal) stringderivedStatus is the status every read and write relies on. Time-based and membership-based transitions are computed here, never written.
- OID
- 0f8f11…f22a:52
derivedStatus details
openIDs
func(author .uverse.address) []uint64openIDs returns the author's proposals that are still open for voting. The stored list never grows past maxOpenPerMember, so this stays bounded.
- OID
- 0f8f11…f22a:53
openIDs details
propose
func(caller .uverse.address, title string, desc string, category string, a friends_surf_club.Action) uint64- OID
- 0f8f11…f22a:54
propose details
ProposeText
func(title string, desc string, category string) uint64ProposeText creates a proposal with no on-chain effect.
- OID
- 0f8f11…f22a:55
ProposeText details
ProposeAddMember
func(title string, desc string, target .uverse.address, power int, rolesCSV string) uint64ProposeAddMember proposes adding target with power and comma-separated roles.
- OID
- 0f8f11…f22a:56
ProposeAddMember details
ProposeRemoveMember
func(title string, desc string, target .uverse.address) uint64ProposeRemoveMember proposes removing target.
- OID
- 0f8f11…f22a:57
ProposeRemoveMember details
ProposeSetRoles
func(title string, desc string, target .uverse.address, rolesCSV string) uint64ProposeSetRoles proposes replacing target's role labels.
- OID
- 0f8f11…f22a:58
ProposeSetRoles details
ProposeArchive
func(title string, desc string) uint64ProposeArchive proposes archiving the DAO. Archiving is permanent.
- OID
- 0f8f11…f22a:59
ProposeArchive details
reached
func(part int, whole int, pct int) boolreached reports part/whole >= pct/100 without division. part and whole are at most maxMembers\*maxPower (1e11), so part\*100 cannot overflow.
- OID
- 0f8f11…f22a:60
reached details
Vote
func(id uint64, choice string)Vote records the caller's YES, NO or ABSTAIN. A proposal is ACCEPTED once YES alone reaches the threshold of all voting power (and quorum is met), and REJECTED once that has become impossible.
- OID
- 0f8f11…f22a:61
Vote details
Execute
func(id uint64)Execute applies an accepted proposal after the execution delay and before the execution window closes. The stored action is checked again against the current state first; the proposal is marked EXECUTED only after it applied.
- OID
- 0f8f11…f22a:62
Execute details
GetTemplateVersion
func() string- OID
- 0f8f11…f22a:63
GetTemplateVersion details
GetAPIVersion
func() string- OID
- 0f8f11…f22a:64
GetAPIVersion details
IsMember
func(addr .uverse.address) boolIsMember lets a companion realm check membership.
- OID
- 0f8f11…f22a:65
IsMember details
IsArchived
func() bool- OID
- 0f8f11…f22a:66
IsArchived details
HasVoted
func(id uint64, addr .uverse.address) bool- OID
- 0f8f11…f22a:67
HasVoted details
jsonBuf
typeValue
friends_surf_club.jsonBuf
checkPage
func(offset int, limit int)- OID
- 0f8f11…f22a:68
checkPage details
writeConfig
func(j *friends_surf_club.jsonBuf)- OID
- 0f8f11…f22a:69
writeConfig details
GetConfigJSON
func() stringGetConfigJSON returns the DAO's settings and current totals.
- OID
- 0f8f11…f22a:70
GetConfigJSON details
writeMembers
func(j *friends_surf_club.jsonBuf, offset int, limit int)- OID
- 0f8f11…f22a:71
writeMembers details
GetMembersJSON
func(offset int, limit int) stringGetMembersJSON returns one page of members (limit 1..50).
- OID
- 0f8f11…f22a:72
GetMembersJSON details
fixedJSON
func(p *friends_surf_club.Proposal) stringfixedJSON encodes the proposal fields that never change. The action's target is a validated address (or empty) and its roles are identifiers.
- OID
- 0f8f11…f22a:73
fixedJSON details
writeProposalFields
func(j *friends_surf_club.jsonBuf, p *friends_surf_club.Proposal)- OID
- 0f8f11…f22a:74
writeProposalFields details
GetProposalsJSON
func(before uint64, limit int) stringGetProposalsJSON lists proposals newest first (limit 1..50). before=0 starts at the newest; pass the returned next\_before to get the following page (next\_before 0 means there is none). Descriptions are only returned by GetProposalJSON, which keeps a full page small.
- OID
- 0f8f11…f22a:75
GetProposalsJSON details
GetProposalJSON
func(id uint64) stringGetProposalJSON returns one proposal including its description.
- OID
- 0f8f11…f22a:76
GetProposalJSON details
GetVotesJSON
func(id uint64, offset int, limit int) stringGetVotesJSON returns one page of a proposal's votes (limit 1..50).
- OID
- 0f8f11…f22a:77
GetVotesJSON details
GetStateJSON
func(offset int, limit int) stringGetStateJSON exports the settings and one page of members, so the DAO can be recreated elsewhere.
- OID
- 0f8f11…f22a:78
GetStateJSON details
escapeInline
func(s string) stringescapeInline makes a user string safe on one markdown line: markdown punctuation is backslash-escaped and control characters become spaces.
- OID
- 0f8f11…f22a:79
escapeInline details
quoteBlock
func(s string) stringquoteBlock renders multi-line text as a quote, one escaped line at a time.
- OID
- 0f8f11…f22a:80
quoteBlock details
Render
func(path string) string- OID
- 0f8f11…f22a:81
Render details
renderHome
func(page int) string- OID
- 0f8f11…f22a:82
renderHome details
renderProposal
func(p *friends_surf_club.Proposal) string- OID
- 0f8f11…f22a:83