pkgPath
untyped stringpkgPath is this realm's package path, fixed regardless of quarantine location. DAO treasury addresses derive from it, so they are stable across a SAME-PATH redeploy. Moving to a different package path (e.g. .../v1) changes cur.Sub derivation and would strand existing treasuries unless a drain executor ran first (see gnovm/adr/pr5890\_realm\_sub.md §Cross-host identity); this realm ships no such migration executor.
Value
"gno.land/r/nt/commondao/v0"
CommonDAOID
uint64CommonDAOID is the ID of the realm's DAO.
Value
1
daoID
v0.IDValue
<zero>
realmLink
v0.RealmValue
<gnolang.StringValue>
daos
*v0.BPTree// string(ID) -> \*commondao.CommonDAO
- OID
- 0fddab…6d94:6
daos details
invites
*v0.BPTree// string(address) -> address(inviter)
- OID
- 0fddab…6d94:9
invites details
creators
*v0.BPTree// string(address) -> struct{}; consumed-invite marker
- OID
- 0fddab…6d94:12
creators details
listed
*v0.BPTree// string(ID) -> uint64(ID); home-index opt-in
- OID
- 0fddab…6d94:15
listed details
getDAO
func(daoID uint64) *v0.CommonDAO- OID
- 0fddab…6d94:17
getDAO details
mustGetDAO
func(daoID uint64) *v0.CommonDAO- OID
- 0fddab…6d94:19
mustGetDAO details
makeIDKey
func(daoID uint64) string- OID
- 0fddab…6d94:20
makeIDKey details
isCreator
func(addr .uverse.address) boolisCreator reports whether an address has already consumed an invite and may create further DAOs without another one.
- OID
- 0fddab…6d94:21
isCreator details
isListed
func(daoID uint64) boolisListed reports whether a DAO opted into the realm's public home index.
- OID
- 0fddab…6d94:22
isListed details
setListed
func(daoID uint64, v bool)setListed adds or removes a DAO from the realm's public home index.
- OID
- 0fddab…6d94:23
setListed details
subpathOf
func(daoID uint64) stringsubpathOf returns the realm sub-identity subpath that acts for a DAO.
- OID
- 0fddab…6d94:24
subpathOf details
daoAddress
func(daoID uint64) .uverse.address- OID
- 0fddab…6d94:25
daoAddress details
createDAO
func(name string, purpose string, description string, members [].uverse.address) *v0.CommonDAO- OID
- 0fddab…6d94:26
createDAO details
createSubDAO
func(parent *v0.CommonDAO, name string, purpose string, description string, members [].uverse.address) *v0.CommonDAO- OID
- 0fddab…6d94:27
createSubDAO details
newDAOOptions
func(id uint64, name string, purpose string, description string, parent *v0.CommonDAO, members [].uverse.address) []v0.Option- OID
- 0fddab…6d94:28
newDAOOptions details
init.19
func()- OID
- 0fddab…6d94:29
init.19 details
bylawsSets
*v0.BPTree// string(ID) -> \*bylaws.Bylaws
- OID
- 0fddab…6d94:32
bylawsSets details
bylawsView
func(daoID uint64) *v0.BylawsbylawsView returns a DAO's document set or nil when it has none. Read paths (render, public getters, payload building) use this — it never writes realm state, so it is safe under read-only query evaluation.
- OID
- 0fddab…6d94:34
bylawsView details
bylawsOf
func(daoID uint64) *v0.BylawsbylawsOf returns a DAO's document set, creating an empty one on first use. Only proposal creation calls it; an empty set left behind by a failed proposal is harmless.
- OID
- 0fddab…6d94:36
bylawsOf details
isMandatesPath
func(path string) boolisMandatesPath reports whether a document path is in the reserved mandates/ folder (or is the bare "mandates" file). Mandates are not council-self-amendable; see amendBylawsKind.New.
- OID
- 0fddab…6d94:37
isMandatesPath details
amendBylawsProposal
typeamendBylawsProposal is both the amend-bylaws args struct and the proposal definition it produces (one type serves both roles, like manageKindsProposal). set is the host DAO's document set the executor patches: New receives only a readonly view, so the trusted wrapper passes the mutable set through args (from its own bylawsOf) together with the host daoID for the identity pin. display is the human-readable change, rendered at New against the then-current document.
Value
v0.amendBylawsProposal
amendBylawsKind
typeamendBylawsKind creates proposals that add, amend or remove one of the host DAO's bylaws/mandates documents with a verifiable diff patch. The patch pins the sha256 of the document text it was diffed against, so a passed amendment that raced a concurrent change to the same document fails cleanly (StatusFailed) instead of clobbering it. Decided by supermajority: this is the council amending its OWN governing documents, which the Constitution grants with no special threshold, so the default council rule applies. (The Constitution's simple-majority clause for charter/bylaws/mandate changes is an ANCESTOR power — a parent amending a descendant's documents — which this realm does not implement yet.)
Value
v0.amendBylawsKind
newCouncilUpdatePropDefinition
func(dao *v0.CommonDAO, add [].uverse.address, remove [].uverse.address) v0.councilUpdatePropDefinitionnewCouncilUpdatePropDefinition creates a new proposal definition for adding/removing council members.
- OID
- 0fddab…6d94:38
newCouncilUpdatePropDefinition details
councilUpdatePropDefinition
typecouncilUpdatePropDefinition defines a proposal type for adding/removing council members. Adds and removes apply as idempotent set operations, so concurrently passed updates merge in execution order; an update whose final set would empty a non-empty council fails at execution.
Value
v0.councilUpdatePropDefinition
newAncestorCouncilUpdatePropDefinition
func(dao *v0.CommonDAO, target *v0.CommonDAO, add [].uverse.address, remove [].uverse.address) v0.ancestorCouncilUpdatePropDefinitionnewAncestorCouncilUpdatePropDefinition creates a proposal definition for an ancestor DAO to modify a descendant's council membership (docs/CONSTITUTION.md :1531-1532). It is hosted and voted in the ancestor; ancestry is verified at proposal validation.
- OID
- 0fddab…6d94:40
newAncestorCouncilUpdatePropDefinition details
ancestorCouncilUpdatePropDefinition
typeancestorCouncilUpdatePropDefinition defines a proposal type for an ancestor DAO to add and/or remove members of a descendant's council. This is the spec's rescue path for a stuck or empty descendant council (:1531-1532): decided by the ancestor's own supermajority, validated as strictly proper ancestry so a DAO can never mutate its own council through this path (that is the self-mutating councilUpdate).
Value
v0.ancestorCouncilUpdatePropDefinition
addrStrings
func(addrs [].uverse.address) []stringaddrStrings converts addresses for markdown list rendering.
- OID
- 0fddab…6d94:41
addrStrings details
kindText
untyped stringProposal kind names: the per-DAO registry keys for every proposal type this realm can host. A DAO accepts proposals of exactly the kinds registered on it. The default kinds are registered at DAO creation and the kind set is managed afterwards through the manage-kinds kind (CreateRegisterKindProposal / CreateDeregisterKindProposal).
Value
"text"
kindCouncilUpdate
untyped stringProposal kind names: the per-DAO registry keys for every proposal type this realm can host. A DAO accepts proposals of exactly the kinds registered on it. The default kinds are registered at DAO creation and the kind set is managed afterwards through the manage-kinds kind (CreateRegisterKindProposal / CreateDeregisterKindProposal).
Value
"council-update"
kindAncestorCouncilUpdate
untyped stringProposal kind names: the per-DAO registry keys for every proposal type this realm can host. A DAO accepts proposals of exactly the kinds registered on it. The default kinds are registered at DAO creation and the kind set is managed afterwards through the manage-kinds kind (CreateRegisterKindProposal / CreateDeregisterKindProposal).
Value
"ancestor-council-update"
kindSubDAO
untyped stringProposal kind names: the per-DAO registry keys for every proposal type this realm can host. A DAO accepts proposals of exactly the kinds registered on it. The default kinds are registered at DAO creation and the kind set is managed afterwards through the manage-kinds kind (CreateRegisterKindProposal / CreateDeregisterKindProposal).
Value
"subdao"
kindDissolve
untyped stringProposal kind names: the per-DAO registry keys for every proposal type this realm can host. A DAO accepts proposals of exactly the kinds registered on it. The default kinds are registered at DAO creation and the kind set is managed afterwards through the manage-kinds kind (CreateRegisterKindProposal / CreateDeregisterKindProposal).
Value
"dissolve"
kindTreasurySpend
untyped stringProposal kind names: the per-DAO registry keys for every proposal type this realm can host. A DAO accepts proposals of exactly the kinds registered on it. The default kinds are registered at DAO creation and the kind set is managed afterwards through the manage-kinds kind (CreateRegisterKindProposal / CreateDeregisterKindProposal).
Value
"treasury-spend"
kindTreasuryClawback
untyped stringProposal kind names: the per-DAO registry keys for every proposal type this realm can host. A DAO accepts proposals of exactly the kinds registered on it. The default kinds are registered at DAO creation and the kind set is managed afterwards through the manage-kinds kind (CreateRegisterKindProposal / CreateDeregisterKindProposal).
Value
"treasury-clawback"
kindTreasuryFreeze
untyped stringProposal kind names: the per-DAO registry keys for every proposal type this realm can host. A DAO accepts proposals of exactly the kinds registered on it. The default kinds are registered at DAO creation and the kind set is managed afterwards through the manage-kinds kind (CreateRegisterKindProposal / CreateDeregisterKindProposal).
Value
"treasury-freeze"
kindManageKinds
untyped stringProposal kind names: the per-DAO registry keys for every proposal type this realm can host. A DAO accepts proposals of exactly the kinds registered on it. The default kinds are registered at DAO creation and the kind set is managed afterwards through the manage-kinds kind (CreateRegisterKindProposal / CreateDeregisterKindProposal).
Value
"manage-kinds"
kindAmendBylaws
untyped stringProposal kind names: the per-DAO registry keys for every proposal type this realm can host. A DAO accepts proposals of exactly the kinds registered on it. The default kinds are registered at DAO creation and the kind set is managed afterwards through the manage-kinds kind (CreateRegisterKindProposal / CreateDeregisterKindProposal).
Value
"amend-bylaws"
kindExecution
untyped stringProposal kind names: the per-DAO registry keys for every proposal type this realm can host. A DAO accepts proposals of exactly the kinds registered on it. The default kinds are registered at DAO creation and the kind set is managed afterwards through the manage-kinds kind (CreateRegisterKindProposal / CreateDeregisterKindProposal).
Value
"execution"
errInvalidProposalArgs
*errors.errorStringerrInvalidProposalArgs reports a proposal kind invoked with the wrong args type. Wrappers and kinds live in the same package, so this only fires on a realm bug, never on user input.
- OID
- 0fddab…6d94:43
errInvalidProposalArgs details
defaultProposalKinds
[]v0.ProposalKinddefaultProposalKinds lists the proposal kinds seeded on every new DAO (genesis, user-created or sub-DAO). Kinds are stateless singletons that wrap the definition constructors. This is the DAO's starting governance surface; the kind set is managed afterwards through the manage-kinds kind. Ordering here is immaterial — render.gno owns the presentation order.
- OID
- 0fddab…6d94:46
defaultProposalKinds details
optInProposalKinds
[]v0.ProposalKindoptInProposalKinds lists the opt-in proposal kinds: they are part of the catalog but NOT default-seeded, so a DAO gains them only after a supermajority manage-kinds register. The execution kind is realm-side (executionKind), not the bare /p/ ExecutionKind, so it can carry the realm's freeze policy (see kindExecution).
- OID
- 0fddab…6d94:58
optInProposalKinds details
proposalKindCatalog
[]v0.ProposalKindproposalKindCatalog lists every proposal kind this realm can host: the default-seeded kinds plus the opt-in kind (execution). catalogKind resolves against this list, so manage-kinds can register an opt-in kind by name that is not seeded. The executor set stays closed because only catalog kinds are ever registered on a DAO by name. Ordering here is immaterial — render.gno owns the presentation order.
- OID
- 0fddab…6d94:61
proposalKindCatalog details
catalogKind
func(name string) v0.ProposalKindcatalogKind returns a catalog kind by name, or nil when the name is not part of the catalog.
- OID
- 0fddab…6d94:73
catalogKind details
HasProposalKind
func(daoID uint64, name string) boolHasProposalKind reports whether a proposal kind is registered on a DAO.
- OID
- 0fddab…6d94:75
HasProposalKind details
textArgs
typetextArgs carries CreateTextProposal parameters to the text kind.
Value
v0.textArgs
textKind
typetextKind creates general text proposals.
Value
v0.textKind
councilUpdateArgs
typecouncilUpdateArgs carries CreateCouncilUpdateProposal parameters to the council-update kind. dao is the host DAO whose own council the executor mutates: New receives only a readonly view, so the trusted wrapper passes the mutable host handle through args (captured from its own mustGetDAO).
Value
v0.councilUpdateArgs
councilUpdateKind
typecouncilUpdateKind creates proposals that add and/or remove members of the host DAO's own council.
Value
v0.councilUpdateKind
ancestorCouncilUpdateArgs
typeancestorCouncilUpdateArgs carries CreateAncestorCouncilUpdateProposal parameters to the ancestor-council-update kind. host is the proposing ancestor DAO (read for the ancestry check); target is the descendant whose council the executor mutates. Both handles come from the trusted wrapper via args, since New receives only a readonly view.
Value
v0.ancestorCouncilUpdateArgs
ancestorCouncilUpdateKind
typeancestorCouncilUpdateKind creates proposals for the host DAO, as an ancestor, to add and/or remove members of a descendant's council.
Value
v0.ancestorCouncilUpdateKind
subDAOArgs
typesubDAOArgs carries CreateSubDAOProposal parameters to the subdao kind. parent is the host DAO the new SubDAO is created under; the executor mutates it (wiring the child in), so the trusted wrapper passes the mutable host handle through args, since New receives only a readonly view.
Value
v0.subDAOArgs
subDAOKind
typesubDAOKind creates proposals that add a SubDAO under the host DAO.
Value
v0.subDAOKind
dissolveArgs
typedissolveArgs carries CreateDissolutionProposal parameters to the dissolve kind, including the DAO being dissolved: the proposal is hosted in the nearest live ancestor (the host DAO that Propose passes to New), so the definition must operate on the dissolved descendant carried here, never on the host.
Value
v0.dissolveArgs
dissolveKind
typedissolveKind creates proposals that dissolve a DAO or SubDAO.
Value
v0.dissolveKind
treasurySpendArgs
typetreasurySpendArgs carries CreateTreasurySpendProposal parameters to the treasury-spend kind. dao is the host DAO whose own treasury funds the spend (its sub is the funding source, see FundingDAOID); the trusted wrapper passes the mutable host handle through args, since New receives only a readonly view.
Value
v0.treasurySpendArgs
treasurySpendKind
typetreasurySpendKind creates proposals that send coins from the host DAO's own treasury.
Value
v0.treasurySpendKind
treasuryClawbackArgs
typetreasuryClawbackArgs carries CreateTreasuryClawbackProposal parameters to the treasury-clawback kind. host is the proposing ancestor DAO (read for the ancestry check); target is the descendant whose treasury the executor sweeps (its sub is the funding source, see FundingDAOID). Both handles come from the trusted wrapper via args, since New receives only a readonly view.
Value
v0.treasuryClawbackArgs
treasuryClawbackKind
typetreasuryClawbackKind creates proposals for the host DAO, as an ancestor, to sweep a descendant DAO's treasury to the descendant's parent.
Value
v0.treasuryClawbackKind
treasuryFreezeArgs
typetreasuryFreezeArgs carries CreateTreasuryFreezeProposal parameters to the treasury-freeze kind. host is the proposing ancestor DAO (read for the ancestry / orphan-rescue check); target is the descendant whose treasury the executor freezes or unfreezes. Both handles come from the trusted wrapper via args, since New receives only a readonly view.
Value
v0.treasuryFreezeArgs
treasuryFreezeKind
typetreasuryFreezeKind creates proposals for the host DAO, as an ancestor, to freeze or unfreeze a descendant DAO's treasury.
Value
v0.treasuryFreezeKind
errTreasuryFrozen
*errors.errorStringerrTreasuryFrozen reports an execution proposal blocked because the host DAO's treasury is frozen. It is a sentinel so the freeze gate is greppable and testable (the create-time panic and the Validate-time failure share this one message).
- OID
- 0fddab…6d94:77
errTreasuryFrozen details
executionArgs
typeexecutionArgs carries CreateExecutionProposal parameters to the execution kind: a title, a body, and the closure executed on approval. Unlike the governance kinds, the execution kind captures no mutable handle — its only use of the DAO is a freeze-flag read, so its definition holds the readonly host view Propose passes to New rather than a \*CommonDAO from args.
Value
v0.executionArgs
executionKind
typeexecutionKind creates proposals that run an arbitrary ExecFunc as the host DAO's own sub on approval. It is the realm-side counterpart of the /p/ commondao.ExecutionKind: identical arbitrary-exec mechanism, but wrapped with the realm's Validable freeze policy (executionPropDefinition.Validate) so a frozen DAO cannot drain its own treasury through it — the /p/ kind carries no such policy. This is the pattern the /p/ extension docs recommend for an arbitrary-exec closure: wrap it with your realm's own checks.
Value
v0.executionKind
executionPropDefinition
typeexecutionPropDefinition defines a proposal that runs an arbitrary ExecFunc as the host DAO's own sub on approval. Its Validate blocks execution while the host treasury is frozen, so an execution proposal can never move funds out of a frozen DAO — matching the treasury-spend freeze gate.
Value
v0.executionPropDefinition
manageKindsProposal
typemanageKindsProposal is both the manage-kinds args struct and the proposal definition it produces: manageKindsKind.New validates it and returns it unchanged (one type serves both the args and definition roles). dao is the host DAO whose registry the executor mutates: New receives only a readonly view, so the trusted wrapper passes the mutable host handle through args (captured from its own mustGetDAO). A proposal is one of two shapes, both populated only by a trusted wrapper and both by name (the name resolves against the realm catalog): - register: remove=false, name set; - deregister: remove=true, name set. Registering a foreign kind by value is intentionally not offered here: on this realm such a kind would be inert (no propose path). The by-value capability stays available in /p/ (WithProposalKind / RegisterKind) for a downstream realm that authors its own propose wrapper (see /p/ doc.gno, "Extending commondao in your own realm").
Value
v0.manageKindsProposal
manageKindsKind
typemanageKindsKind creates governance proposals that register or deregister a catalog proposal kind on the host DAO by name — the DAO's one permanent capability to manage which kinds it accepts. Registering adds a kind; deregistering removes one, which blocks new proposals of that kind while in-flight ones still vote and execute. It is decided by supermajority and cannot itself be deregistered (the self-brick guard below), so a DAO always keeps the ability to manage its kind set.
Value
v0.manageKindsKind
newSubDAOPropDefinition
func(parent *v0.CommonDAO, name string, purpose string, description string, members [].uverse.address) v0.subDAOPropDefinitionnewSubDAOPropDefinition creates a new proposal definition for adding a SubDAO.
- OID
- 0fddab…6d94:79
newSubDAOPropDefinition details
subDAOPropDefinition
typesubDAOPropDefinition defines a proposal type for adding a SubDAO.
Value
v0.subDAOPropDefinition
newDissolvePropDefinition
func(dao *v0.CommonDAO, destination .uverse.address) v0.dissolvePropDefinitionnewDissolvePropDefinition creates a new proposal definition for dissolving a DAO. Dissolution sweeps any remaining treasury balance: sub-DAO sweeps go to the parent (fixed, not nameable — the same place a clawback would put the funds); a root DAO has no parent, so its dissolution requires an explicit destination. Both rules are state-independent: parent pointers never change after construction.
- OID
- 0fddab…6d94:81
newDissolvePropDefinition details
dissolvePropDefinition
typedissolvePropDefinition defines a proposal type for dissolving a SubDAO.
Value
v0.dissolvePropDefinition
maxTextBody
untyped bigintValue
(15000 <untyped> bigint)
maxTextTitle
untyped bigintValue
(255 <untyped> bigint)
minTextVotingPeriod
time.DurationValue
<zero>
newTextPropDefinition
func(title string, body string, votingPeriod time.Duration) v0.textPropDefinitionnewTextPropDefinition creates a new general text proposal definition.
- OID
- 0fddab…6d94:82
newTextPropDefinition details
textPropDefinition
typetextPropDefinition defines a proposal type for general text proposals. These type of proposals are not executable so nothing happens when they pass.
Value
v0.textPropDefinition
hasLiveProperAncestor
func(dao *v0.CommonDAO) boolhasLiveProperAncestor checks if any proper ancestor of dao is not dissolved.
- OID
- 0fddab…6d94:84
hasLiveProperAncestor details
isProperAncestor
func(dao *v0.CommonDAO, target *v0.CommonDAO) boolisProperAncestor checks if dao is a proper ancestor of target. Parent pointers are set only at construction and no re-parenting path exists, so ancestry is stable for the lifetime of a proposal.
- OID
- 0fddab…6d94:86
isProperAncestor details
assertIsProperAncestor
func(dao *v0.CommonDAO, target *v0.CommonDAO) .uverse.errorassertIsProperAncestor validates the ancestor relation that authorizes treasury controls over a descendant (docs/CONSTITUTION.md :1507). The relation is strictly proper: a DAO can never claw back or unfreeze itself.
- OID
- 0fddab…6d94:87
assertIsProperAncestor details
treasuryBalance
func(dao *v0.CommonDAO) chain.CoinstreasuryBalance returns the current balance of a DAO's treasury address.
- OID
- 0fddab…6d94:88
treasuryBalance details
newTreasurySpendPropDefinition
func(dao *v0.CommonDAO, to .uverse.address, coin chain.Coin) v0.treasurySpendPropDefinitionnewTreasurySpendPropDefinition creates a proposal definition that sends coins from the DAO's own treasury.
- OID
- 0fddab…6d94:89
newTreasurySpendPropDefinition details
treasurySpendPropDefinition
typetreasurySpendPropDefinition defines a proposal type for spending funds from the DAO's own treasury (docs/CONSTITUTION.md :1542-1543).
Value
v0.treasurySpendPropDefinition
newTreasuryClawbackPropDefinition
func(dao *v0.CommonDAO, target *v0.CommonDAO) v0.treasuryClawbackPropDefinitionnewTreasuryClawbackPropDefinition creates a proposal definition that sweeps a descendant DAO's treasury one step up the tree.
- OID
- 0fddab…6d94:90
newTreasuryClawbackPropDefinition details
treasuryClawbackPropDefinition
typetreasuryClawbackPropDefinition defines a proposal type for an ancestor DAO to reclaim a descendant's treasury. The destination is fixed — the target's parent — so funds move one step up the tree toward their origin and can never be drained out of the tree entirely. Clawback remains valid against soft-deleted and frozen descendants.
Value
v0.treasuryClawbackPropDefinition
newTreasuryFreezePropDefinition
func(dao *v0.CommonDAO, target *v0.CommonDAO, frozen bool) v0.treasuryFreezePropDefinitionnewTreasuryFreezePropDefinition creates a proposal definition that freezes or unfreezes a descendant DAO's treasury.
- OID
- 0fddab…6d94:91
newTreasuryFreezePropDefinition details
treasuryFreezePropDefinition
typetreasuryFreezePropDefinition defines a proposal type for an ancestor DAO to freeze or unfreeze a descendant's treasury. Freezing does not cascade: ancestors freeze each descendant explicitly. Only a proper ancestor can unfreeze — the frozen DAO's own council cannot.
Value
v0.treasuryFreezePropDefinition
daoMDLink
func(dao *v0.CommonDAO) stringdaoMDLink returns a markdown link to a DAO's page.
- OID
- 0fddab…6d94:92
daoMDLink details
assertCurrent
func()assertCurrent guards every public crossing entry. Authentication reads cur.Previous() and Execute mints cur.Sub(...) for the executor; both require cur to be the live top-of-frame realm (AGENTS.md / interrealm-v2). Every entry is only reachable via a cross today, so this is defense-in-depth against a future non-crossing caller.
- OID
- 0fddab…6d94:93
assertCurrent details
assertRunningPath
func()assertRunningPath fails closed if this realm is deployed at a package path other than pkgPath. Treasury addresses derive from the pkgPath const (daoAddress), while Execute mints the DAO sub under the running realm's own path (cur.Sub). Those agree only when the running path is pkgPath; a copy deployed elsewhere would read balances at one address and send from another, turning a clean StatusFailed into a mismatch. We reject that at genesis rather than silently diverge.
- OID
- 0fddab…6d94:95
assertRunningPath details
assertCallerIsUser
func()assertCallerIsUser rejects a code realm creating a DAO on someone's behalf. New keys the invite and the creators set on the caller, and invites are granted to people, so the caller must be the user itself: either a direct MsgCall (IsUserCall) or that user's own MsgRun frame (IsUserRun, whose address is the signer's own). Both are IsUser; a published realm is neither. Relaying is what this excludes. If a realm could redeem an invite, one invited realm would become a DAO factory for un-invited callers — the vector pr6012\_commondao\_ownership\_rescope.md closed by keying on the transaction origin. Keying on the caller closes it too, but only while the caller cannot be a realm. It bounds who may \*create\* a DAO, not who may sit on one: the members argument may still name realm addresses, and sub-DAO councils are set by proposal (see CreateSubDAOProposal). Handing a DAO to a realm is a council decision, not a creation-time one.
- OID
- 0fddab…6d94:96
assertCallerIsUser details
Invite
func(invitee .uverse.address)Invite invites a user to the realm. A user invitation is required to start creating new DAOs.
- OID
- 0fddab…6d94:97
Invite details
IsInvited
func(addr .uverse.address) boolIsInvited checks if an address has an invitation to the realm.
- OID
- 0fddab…6d94:98
IsInvited details
New
func(name string, purpose string, description string, members string) uint64New creates a new CommonDAO and returns its ID. The caller must be a user, not a realm (see assertCallerIsUser), and must hold an invite. The invite is consumed when that caller creates a DAO for the first time, after which the caller may create further DAOs freely. The caller becomes a council member along with any additional member addresses listed on separate lines; those may be realm addresses, so a DAO can be handed to a realm by seating it here and resigning. DAOs with a parent are created through proposals (see CreateSubDAOProposal).
- OID
- 0fddab…6d94:99
New details
parseInitialMembers
func(caller .uverse.address, members string) [].uverse.address- OID
- 0fddab…6d94:100
parseInitialMembers details
SetListed
func(daoID uint64, listed bool)SetListed adds or removes a DAO from the realm's public home index. Listing is cosmetic — it affects only how this realm presents the DAO in its own UI — so any single council member of the DAO may toggle it, like Resign. It defaults to off.
- OID
- 0fddab…6d94:101
SetListed details
IsListed
func(daoID uint64) boolIsListed reports whether a DAO appears in the realm's public home index.
- OID
- 0fddab…6d94:102
IsListed details
GetView
func(daoID uint64) v0.ReadonlyCommonDAOGetView returns a read only view of a common DAO searched by ID.
- OID
- 0fddab…6d94:103
GetView details
GetBylawsDoc
func(daoID uint64, path string) stringGetBylawsDoc returns the text of a DAO's bylaws/mandates document, or an empty string when the document does not exist (a stored document is never empty).
- OID
- 0fddab…6d94:104
GetBylawsDoc details
ListBylawsDocs
func(daoID uint64, prefix string) []stringListBylawsDocs returns the sorted paths of a DAO's bylaws/mandates documents under a prefix (empty prefix lists all).
- OID
- 0fddab…6d94:105
ListBylawsDocs details
Vote
func(daoID uint64, proposalID uint64, vote v0.VoteChoice, reason string)Vote submits a vote for a DAO proposal. Voting is allowed to the members of the proposal's electorate: the council snapshot taken when the proposal was created.
- OID
- 0fddab…6d94:106
Vote details
Funded
typeFunded is the optional contract a proposal definition implements when its executor moves funds from a DAO other than the proposal's host: it names, by ID, the DAO whose sub-identity address funds the executor. Execute resolves that DAO, mints its terminal RealmSend-only sub and passes it to the ExecFunc; a definition that does not implement Funded receives the host DAO's own sub by default. The returned ID must identify the DAO the definition validates its fund movement against (e.g. the DAO being spent, swept or dissolved). It lives realm-side, not in /p/: minting a DAO sub needs the host realm's cur (cur.Sub), so only the host — never the package — can honor it. /p/ dispatches CapExempt/Executable/Validable itself, but Execute (the host) is the sole consumer of Funded, so the package has no reason to know it.
Value
v0.Funded
Execute
func(daoID uint64, proposalID uint64)Execute executes a DAO proposal. Executing a proposal that passed early (decided by the default Council rules before its voting deadline) requires the caller to be a council member. Once the voting deadline has passed execution is permissionless: the tally is deterministic, so anyone can finalize the proposal.
- OID
- 0fddab…6d94:107
Execute details
Withdraw
func(daoID uint64, proposalID uint64)Withdraw withdraws an active DAO proposal that has no votes. Only the proposal creator can withdraw it.
- OID
- 0fddab…6d94:108
Withdraw details
Resign
func(daoID uint64)Resign removes the caller from a DAO council. The last remaining council member cannot resign.
- OID
- 0fddab…6d94:109
Resign details
isInvited
func(addr .uverse.address) bool- OID
- 0fddab…6d94:110
isInvited details
assertIsInvited
func(addr .uverse.address)- OID
- 0fddab…6d94:111
assertIsInvited details
assertDAONameIsValid
func(name string)- OID
- 0fddab…6d94:112
assertDAONameIsValid details
assertDAOPurposeIsValid
func(purpose string)- OID
- 0fddab…6d94:113
assertDAOPurposeIsValid details
assertDAODescriptionIsValid
func(description string)- OID
- 0fddab…6d94:114
assertDAODescriptionIsValid details
assertCallerIsCouncilMember
func(caller .uverse.address, dao *v0.CommonDAO)- OID
- 0fddab…6d94:115
assertCallerIsCouncilMember details
CreateTextProposal
func(daoID uint64, title string, body string, votingDays uint8) uint64CreateTextProposal creates a new general text proposal. Parameters: - daoID: ID of the DAO (required) - title: Title of the proposal (required) - body: Body of the proposal (required) - votingDays: The number of days where proposal accepts votes. The default voting period is 7 days.
- OID
- 0fddab…6d94:116
CreateTextProposal details
CreateCouncilUpdateProposal
func(daoID uint64, newMembers string, removeMembers string) uint64CreateCouncilUpdateProposal creates a new proposal to add and/or remove council members. Parameters: - daoID: ID of the DAO (required) - newMembers: Newline separated list of addresses to add to the council - removeMembers: Newline separated list of council addresses to remove
- OID
- 0fddab…6d94:118
CreateCouncilUpdateProposal details
CreateAncestorCouncilUpdateProposal
func(daoID uint64, targetID uint64, newMembers string, removeMembers string) uint64CreateAncestorCouncilUpdateProposal creates a proposal for an ancestor DAO to add and/or remove members of a descendant's council (docs/CONSTITUTION.md :1531-1532) — the rescue path for a stuck or empty descendant council. It is hosted and voted in the ancestor (daoID) and decided by supermajority; the proposing DAO must be a proper ancestor of the target, verified at proposal validation. Parameters: - daoID: ID of the proposing ancestor DAO (required) - targetID: ID of the descendant DAO whose council changes (required) - newMembers: Newline separated list of addresses to add to the council - removeMembers: Newline separated list of council addresses to remove
- OID
- 0fddab…6d94:119
CreateAncestorCouncilUpdateProposal details
CreateSubDAOProposal
func(daoID uint64, name string, purpose string, description string, members string) uint64CreateSubDAOProposal creates a new proposal to create a new SubDAO. Parameters: - daoID: ID of the parent DAO (required) - name: A name for the SubDAO (required) - purpose: A purpose for the SubDAO (required) - description: A description for the SubDAO - members: Newline separated list of initial SubDAO council addresses (required)
- OID
- 0fddab…6d94:120
CreateSubDAOProposal details
CreateDissolutionProposal
func(daoID uint64, destination .uverse.address) uint64CreateDissolutionProposal creates a new proposal to dissolve a DAO or SubDAO. SubDAOs can only be dissolved by the parent DAO, which owns and controls its sub-DAOs (docs/CONSTITUTION.md :1507). When the parent is itself already dissolved, the proposal is hosted in the nearest non-dissolved ancestor, so orphans below a dissolved middle DAO remain dissolvable. Dissolution sweeps any remaining treasury balance. A sub-DAO's sweep goes to its parent and destination must be empty; a root DAO has no parent, so a valid destination address is required. Parameters: - daoID: ID of the DAO to dissolve (required) - destination: sweep destination, root DAOs only
- OID
- 0fddab…6d94:121
CreateDissolutionProposal details
CreateTreasurySpendProposal
func(daoID uint64, to .uverse.address, denom string, amount int64) uint64CreateTreasurySpendProposal creates a new proposal to send coins from the DAO's own treasury (docs/CONSTITUTION.md :1542-1543). Parameters: - daoID: ID of the DAO whose treasury is spent (required) - to: recipient address (required) - denom: coin denomination, e.g. "ugnot" (required) - amount: coin amount, must be positive (required)
- OID
- 0fddab…6d94:122
CreateTreasurySpendProposal details
CreateTreasuryClawbackProposal
func(daoID uint64, targetID uint64) uint64CreateTreasuryClawbackProposal creates a new proposal for an ancestor DAO to sweep a descendant DAO's full treasury balance to the target's parent (docs/CONSTITUTION.md :1507). The proposing DAO must be a proper ancestor of the target; a target's own options can never block an ancestor's clawback. Parameters: - daoID: ID of the proposing ancestor DAO (required) - targetID: ID of the descendant DAO to claw back (required)
- OID
- 0fddab…6d94:123
CreateTreasuryClawbackProposal details
CreateTreasuryFreezeProposal
func(daoID uint64, targetID uint64, frozen bool) uint64CreateTreasuryFreezeProposal creates a new proposal for an ancestor DAO to freeze or unfreeze a descendant DAO's treasury. While frozen, no treasury spend can execute. Only a proper ancestor can unfreeze — the frozen DAO's own council cannot. Parameters: - daoID: ID of the proposing ancestor DAO (required) - targetID: ID of the descendant DAO to freeze or unfreeze (required) - frozen: true to freeze the target's treasury, false to unfreeze
- OID
- 0fddab…6d94:124
CreateTreasuryFreezeProposal details
CreateExecutionProposal
func(daoID uint64, title string, body string, fn v0.ExecFunc) uint64CreateExecutionProposal creates a proposal that runs an arbitrary ExecFunc as the DAO's own sub on approval, through the realm's execution kind. The execution kind is opt-in: it is not seeded on new DAOs and must be registered first through a supermajority CreateRegisterKindProposal. Freeze policy: an execution proposal moves value under the DAO's own authority, so it is subject to the treasury freeze exactly like a spend. This wrapper fails fast when the treasury is already frozen, and the definition re-checks at Execute (so a freeze landing after the proposal passed fails it cleanly, StatusFailed, no funds leaving). An ancestor's clawback/dissolution is a separate power and is not blocked by freeze. Sharp edges (known limitations): - The fn closure cannot be encoded in a CLI transaction, so this wrapper is reachable only from a PERSISTENT realm that imports this one and is a council member of the DAO (a realm-in-council). The closure must be authored in that realm so it survives Propose→Execute; a \`maketx run\` script's closure does not persist and cannot execute later. - A closure that panics or runs out of gas aborts the whole Execute tx, so the proposal is stuck Active (every retry re-aborts) and can never finalize. The only recovery is dissolving the DAO (Dissolve dismisses in-flight proposals). Author closures that return an error instead of panicking so a bad execution fails cleanly (StatusFailed) and releases. Parameters: - daoID: ID of the DAO (required) - title: proposal title (raw text, escaped when rendered) - body: proposal body (raw text, escaped when rendered) - fn: the closure executed on approval (required, non-nil)
- OID
- 0fddab…6d94:125
CreateExecutionProposal details
CreateRegisterKindProposal
func(daoID uint64, kindName string) uint64CreateRegisterKindProposal creates a proposal to register one of the realm's catalog proposal kinds on a DAO by name, through the permanent manage-kinds kind (e.g. register "execution"). The proposal is hosted and voted in the DAO itself and decided by supermajority; on approval the named catalog kind is registered, so new proposals of that kind can be created. The manage-kinds kind is seeded on every DAO, so this path is always available. Parameters: - daoID: ID of the DAO (required) - kindName: name of the catalog proposal kind to register (required)
- OID
- 0fddab…6d94:126
CreateRegisterKindProposal details
CreateDeregisterKindProposal
func(daoID uint64, kindName string) uint64CreateDeregisterKindProposal creates a proposal to deregister a proposal kind from a DAO by name, through the permanent manage-kinds kind. The proposal is hosted and voted in the DAO itself and decided by supermajority; on approval the kind is deregistered, which blocks new proposals of that kind while in-flight ones still vote and execute. The manage-kinds kind itself cannot be deregistered, so a DAO always keeps the ability to manage its kind set (and to re-register a catalog kind by name). Parameters: - daoID: ID of the DAO (required) - kindName: name of the proposal kind to deregister (required)
- OID
- 0fddab…6d94:127
CreateDeregisterKindProposal details
CreateAmendBylawsProposal
func(daoID uint64, payload string) uint64CreateAmendBylawsProposal creates a proposal to add, amend or remove one of the DAO's bylaws documents with a verifiable diff patch (see gno.land/p/nt/bylaws/v0). The mandates/ folder is reserved: the Constitution grants a council self-power over its Bylaws only, so mandates change from above (creation or an ancestor's amendment — not implemented yet), never through this proposal. The payload is an encoded patch — build it with AmendBylawsPayload (e.g. through a vm/qeval query) or with bylaws.Diff(...).Encode() from a realm. The patch pins the sha256 of the document text it was diffed against, so an amendment racing a concurrent change to the same document fails cleanly instead of clobbering it; a patch already stale at creation is rejected here. Amendments are decided by supermajority — the default council rule; the Constitution names no special threshold for a council amending its own documents. Parameters: - daoID: ID of the DAO (required) - payload: encoded bylaws patch (required)
- OID
- 0fddab…6d94:128
CreateAmendBylawsProposal details
AmendBylawsPayload
func(daoID uint64, path string, proposed string) stringAmendBylawsPayload builds the CreateAmendBylawsProposal payload that changes a DAO's document at path to the proposed text: a new path adds a document, empty proposed text removes one. It diffs against the document's current text and pins its hash, so build the payload fresh (e.g. through a vm/qeval query) and propose promptly — a payload built against superseded text is rejected. Read-only.
- OID
- 0fddab…6d94:129
AmendBylawsPayload details
assertKindRegistered
func(dao *v0.CommonDAO, name string)assertKindRegistered panics unless a proposal kind is registered on the DAO. Used to gate the opt-in propose paths so they work only after the DAO registered the kind through governance.
- OID
- 0fddab…6d94:130
assertKindRegistered details
mustPropose
func(dao *v0.CommonDAO, caller .uverse.address, kind string, args interface{...}) uint64mustPropose submits a proposal through one of the DAO's registered proposal kinds and validates it for the current state, panicking on any error. Validation also reruns inside Execute, so this only fails fast at creation.
- OID
- 0fddab…6d94:131
mustPropose details
parseAddresses
func(s string) [].uverse.address- OID
- 0fddab…6d94:132
parseAddresses details
containsAddress
func(addrs [].uverse.address, addr .uverse.address) boolcontainsAddress checks if an address is present in a list.
- OID
- 0fddab…6d94:133
containsAddress details
executing
boolexecuting is this realm's GLOBAL re-entrancy latch, the outer of two complementary layers. It is set while a proposal executor is running (inside the public Execute) and rejects any nested Execute — an executor must never trigger another execution, whether of the same DAO or a different one, directly or by crossing back in as its DAO. The two layers guard different invariants and neither subsumes the other: - The /p/ CommonDAO carries per-DAO \`executing\` / \`proposing\` FIELDS (see the package's commondao.gno). Being fields on the owning DAO object, they are writable where a mutable /p/ global is not, so they travel with a standalone /p/ consumer that never wrote a realm-global latch: they give every consumer same-DAO re-entrancy protection (a nested Execute or Propose on the SAME DAO). - This realm-global bool adds what a per-DAO field structurally cannot: it enforces one-executor-per-transaction across ALL DAOs, closing the cross-DAO straddle a per-DAO latch misses — the ancestor-hosted dissolution/clawback case, where an executor running under DAO A's Execute nests an Execute that deletes a DIFFERENT DAO out from under A. A latch keyed on the executing DAO never fires there; a target latch would demand a scattered check at every DAO-mutating executor. The single global bool makes "one executor per tx" a local, unforgettable invariant instead, and also shuts the conditional- execution "free option" (nest a different DAO's Execute, observe in-tx, panic to revert). It is realm module state: a mutable /p/ package global is forbidden (writing one panics the borrow/stamping rule), and the latch must be writable. This global is the realm's, complementing — not replacing — the /p/ per-DAO fields. Vote / Create\* / Withdraw / Resign are deliberately NOT latched: no executor re-enters them, legitimate executors need them (sub-DAO creation, the dissolution sweep), and a proposal executor acting as its DAO in ANOTHER DAO (e.g. casting a council vote) rides those paths. A rejected nested Execute panics. Thrown across the cross() boundary the re-entrant call arrived through, that aborts the whole transaction. The deferred leaveExecute lowers the flag on normal returns (and on any same-transaction recovered panic). Cross-transaction safety does NOT rely on that defer — a rejected re-entry aborts the transaction, and the aborted transaction's realm writes (including this flag) are never committed, so a later transaction can never observe it stuck true.
Value
false
enterExecute
func()enterExecute raises the re-entrancy latch, panicking if it is already raised (i.e. this Execute is nested inside another). Pair with a deferred leaveExecute.
- OID
- 0fddab…6d94:135
enterExecute details
leaveExecute
func()leaveExecute lowers the re-entrancy latch.
- OID
- 0fddab…6d94:137
leaveExecute details
dateFormat
untyped stringValue
"Mon, 02 Jan 2006 03:04pm MST"
trustedMarkdownBody
typetrustedMarkdownBody marks proposal definitions whose Body returns markdown the definition assembled itself (escaping any embedded user fields with md.EscapeText). Those bodies are rendered verbatim. Every other body — including the execution kind, whose Body is the proposer's raw text — is treated as user-supplied and escaped by the renderer. A definition from an imported package cannot implement this realm-local marker either, so it is escaped too. The render layer is the single escape point: definitions return raw text and opt out only when they render their own markup.
Value
v0.trustedMarkdownBody
Render
func(path string) string- OID
- 0fddab…6d94:138
Render details
renderHome
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fddab…6d94:140
renderHome details
renderDAO
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fddab…6d94:141
renderDAO details
renderCreateProposalSection
func(dao *v0.CommonDAO, res *v0.ResponseWriter)- OID
- 0fddab…6d94:142
renderCreateProposalSection details
renderTreasury
func(res *v0.ResponseWriter, dao *v0.CommonDAO)- OID
- 0fddab…6d94:143
renderTreasury details
renderCouncil
func(res *v0.ResponseWriter, path string, council *v0.ReadonlySet)- OID
- 0fddab…6d94:144
renderCouncil details
renderTree
func(res *v0.ResponseWriter, dao *v0.CommonDAO, indent string, showDissolved bool)- OID
- 0fddab…6d94:145
renderTree details
renderSettings
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fddab…6d94:146
renderSettings details
renderBylaws
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fddab…6d94:147
renderBylaws details
renderProposalsList
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fddab…6d94:148
renderProposalsList details
renderProposalsListItem
func(res *v0.ResponseWriter, dao *v0.CommonDAO, p *v0.Proposal)- OID
- 0fddab…6d94:149
renderProposalsListItem details
renderProposal
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fddab…6d94:150
renderProposal details
renderProposalStats
func(res *v0.ResponseWriter, record v0.ReadonlyVotingRecord)- OID
- 0fddab…6d94:151
renderProposalStats details
renderProposalVotes
func(res *v0.ResponseWriter, path string, dao *v0.CommonDAO, p *v0.Proposal)- OID
- 0fddab…6d94:152
renderProposalVotes details
renderProposalVote
func(res *v0.ResponseWriter, req *v0.Request)- OID
- 0fddab…6d94:153
renderProposalVote details
mustGetDAOFromRequest
func(req *v0.Request) *v0.CommonDAO- OID
- 0fddab…6d94:154
mustGetDAOFromRequest details
mustGetProposalFromRequest
func(req *v0.Request, dao *v0.CommonDAO) *v0.Proposal- OID
- 0fddab…6d94:155
mustGetProposalFromRequest details
parseRealmPath
func(path string) *v0.Request- OID
- 0fddab…6d94:156
parseRealmPath details
voteLink
func(daoID uint64, proposalID uint64) string- OID
- 0fddab…6d94:157
voteLink details
executeLink
func(daoID uint64, proposalID uint64) string- OID
- 0fddab…6d94:158
executeLink details
textProposalLink
func(daoID uint64) string- OID
- 0fddab…6d94:159
textProposalLink details
updateCouncilLink
func(daoID uint64) string- OID
- 0fddab…6d94:160
updateCouncilLink details
ancestorCouncilUpdateLink
func(daoID uint64) string- OID
- 0fddab…6d94:161
ancestorCouncilUpdateLink details
newSubDAOLink
func(daoID uint64) string- OID
- 0fddab…6d94:162
newSubDAOLink details
dissolveSubDAOLink
func(daoID uint64) string- OID
- 0fddab…6d94:163
dissolveSubDAOLink details
treasuryClawbackLink
func(daoID uint64) string- OID
- 0fddab…6d94:164
treasuryClawbackLink details
treasuryFreezeLink
func(daoID uint64) string- OID
- 0fddab…6d94:165
treasuryFreezeLink details
treasurySpendLink
func(daoID uint64) string- OID
- 0fddab…6d94:166
treasurySpendLink details
registerKindLink
func(daoID uint64) string- OID
- 0fddab…6d94:167
registerKindLink details
deregisterKindLink
func(daoID uint64) string- OID
- 0fddab…6d94:168
deregisterKindLink details
amendBylawsLink
func(daoID uint64) string- OID
- 0fddab…6d94:169
amendBylawsLink details
goToDAOLink
func(daoID uint64) string- OID
- 0fddab…6d94:170
goToDAOLink details
goToProposalLink
func(daoID uint64, proposalID uint64) string- OID
- 0fddab…6d94:171
goToProposalLink details
userLink
func(addr .uverse.address) string- OID
- 0fddab…6d94:172
userLink details
isVotingPeriodActive
func(p *v0.Proposal) bool- OID
- 0fddab…6d94:173
isVotingPeriodActive details
isExecutionAllowed
func(p *v0.Proposal) bool- OID
- 0fddab…6d94:174
isExecutionAllowed details
currentRealmPath
func() string- OID
- 0fddab…6d94:175
currentRealmPath details
daoURL
func(daoID uint64) string- OID
- 0fddab…6d94:177
daoURL details
settingsURL
func(daoID uint64) string- OID
- 0fddab…6d94:178
settingsURL details
daoProposalsURL
func(daoID uint64) string- OID
- 0fddab…6d94:179
daoProposalsURL details
bylawsURL
func(daoID uint64) string- OID
- 0fddab…6d94:180
bylawsURL details
proposalURL
func(daoID uint64, proposalID uint64) string- OID
- 0fddab…6d94:181
proposalURL details
voteURL
func(daoID uint64, proposalID uint64, addr .uverse.address) string- OID
- 0fddab…6d94:182