const InvalidatedByExecution, InvalidatedByPause
Invalidation causes recorded on every policy reconfiguration.
Package memba\_weighted\_host hosts the founding policy's governed role actions. This source-only component is not th...
Package memba_weighted_host hosts the founding policy's governed role actions. This source-only component is not the current memba_dao and grants no external application authority. The owning realm must keep its Host private.
Invalidation causes recorded on every policy reconfiguration.
MarketConfigPath is the sole target of this source-only typed action model. These values do not dispatch an action or grant the host application authority.
Ballot reads. Pending pages hold at most MaxPendingPage proposals, and one call examines at most MaxPendingScan proposals before handing back a cursor.
1const (
2 AppstoreAccept AppstoreKind = "accept-owner"
3 AppstoreReturn AppstoreKind = "return-owner"
4 AppstoreAbortReturn AppstoreKind = "abort-return"
5 AppstoreAddCurator AppstoreKind = "add-curator"
6 AppstoreRemoveCurator AppstoreKind = "remove-curator"
7 AppstoreFee AppstoreKind = "set-fee"
8 AppstoreTreasury AppstoreKind = "set-treasury"
9 AppstoreUnpause AppstoreKind = "unpause"
10 AppstoreSeal AppstoreKind = "seal-import"
11 AppstoreApprove AppstoreKind = "approve"
12 AppstoreReject AppstoreKind = "reject"
13 AppstoreDelist AppstoreKind = "delist"
14 AppstoreRestore AppstoreKind = "restore"
15 AppstoreClearFlags AppstoreKind = "clear-flags"
16)1const (
2 ArcadeAcceptOwner ArcadeActionKind = "accept-owner"
3 ArcadeReturnOwner ArcadeActionKind = "return-owner"
4 ArcadeAbortReturn ArcadeActionKind = "abort-return"
5 ArcadeAddAttester ArcadeActionKind = "add-attester"
6 ArcadeRemoveAttester ArcadeActionKind = "remove-attester"
7 ArcadeUnpause ArcadeActionKind = "unpause"
8)1const (
2 BadgesAcceptOwner BadgesActionKind = "accept-owner"
3 BadgesReturnOwner BadgesActionKind = "return-owner"
4 BadgesAbortReturn BadgesActionKind = "abort-return"
5 BadgesAddAdmin BadgesActionKind = "add-admin"
6 BadgesRemoveAdmin BadgesActionKind = "remove-admin"
7 BadgesUnpause BadgesActionKind = "unpause"
8) 1const (
2 ChannelsAcceptOwner ChannelsActionKind = "accept-owner"
3 ChannelsReturnOwner ChannelsActionKind = "return-owner"
4 ChannelsAbortReturn ChannelsActionKind = "abort-return"
5 ChannelsAddMember ChannelsActionKind = "add-member"
6 ChannelsRemoveMember ChannelsActionKind = "remove-member"
7 ChannelsSetRoles ChannelsActionKind = "set-roles"
8 ChannelsCreateText ChannelsActionKind = "create-text-channel"
9 ChannelsUnpause ChannelsActionKind = "unpause"
10) 1const (
2 EscrowAcceptOwner EscrowActionKind = "accept-owner"
3 EscrowReturnOwner EscrowActionKind = "return-owner"
4 EscrowAbortReturn EscrowActionKind = "abort-return"
5 EscrowUnpause EscrowActionKind = "unpause"
6 EscrowRefundClient EscrowActionKind = "refund-client"
7 EscrowPayFreelancer EscrowActionKind = "pay-freelancer"
8 // EscrowSetFeeRecipient stages a new fallback fee recipient (escrow_v4
9 // two-step rotation); the staged address accepts with its own transaction.
10 EscrowSetFeeRecipient EscrowActionKind = "set-fee-recipient"
11)1const (
2 FeedAcceptOwner FeedActionKind = "accept-owner"
3 FeedReturnOwner FeedActionKind = "return-owner"
4 FeedAbortReturn FeedActionKind = "abort-return"
5 FeedAddModerator FeedActionKind = "add-moderator"
6 FeedRemoveModerator FeedActionKind = "remove-moderator"
7 FeedUnpause FeedActionKind = "unpause"
8) 1const (
2 FeedbackAcceptOwner FeedbackActionKind = "accept-owner"
3 FeedbackReturnOwner FeedbackActionKind = "return-owner"
4 FeedbackAbortReturn FeedbackActionKind = "abort-return"
5 FeedbackAddMember FeedbackActionKind = "add-member"
6 FeedbackRemoveMember FeedbackActionKind = "remove-member"
7 FeedbackSetRoles FeedbackActionKind = "set-roles"
8 FeedbackCreateText FeedbackActionKind = "create-text-channel"
9 FeedbackUnpause FeedbackActionKind = "unpause"
10)1const (
2 ReviewsAcceptModerator ReviewsActionKind = "accept-moderator"
3 ReviewsReturnModerator ReviewsActionKind = "return-moderator"
4 ReviewsAbortReturn ReviewsActionKind = "abort-return"
5 ReviewsHideReview ReviewsActionKind = "hide-review"
6 ReviewsHideComment ReviewsActionKind = "hide-comment"
7 ReviewsUnhide ReviewsActionKind = "unhide"
8)New must run inside the owning realm's init with its own live realm value. No realm value is persisted; each mutation requires a fresh live frame.
NewWithMarket binds immutable destinations. Keep the Host private; the realm must expose only the reviewed fixed-target adapter, never ConsumeMarket.
ApplicationPolicies is copied and validated by construction. No policy can subsequently be attached or changed on an existing host.
Explicit allowlist bits are separate from the owner's implicit attester right.
Admin bits are explicit grants. The current owner's authority to appoint is separate from those bits, but target ownership always installs an admin grant.
1type ChannelsState struct {
2 Owner, PendingOwner address
3 Paused bool
4 MemberCount int
5 MembershipRevision uint64
6 OwnerMember, DAOMember, SuccessorMember, SubjectMember bool
7 OwnerRoles, DAORoles, SuccessorRoles, SubjectRoles string
8 ChannelCount int
9 ChannelExists bool
10 ChannelDescription, ChannelType, ChannelReadRoles, ChannelWriteRoles string
11}EscrowState is the escrow_v4 state a proposal freezes. The pause fields copy PauseInfo except PausedBlocks, which grows every block. ExitsOpen is also height-derived: it is read fresh at proposal and execution time and never enters the commitment (escrowStateJSON), so a pause ageing past its blocking window cannot make a frozen proposal stale.
Feed moderators are explicit grants. Ownership itself can moderate, so the outgoing owner must not retain a separate moderator grant after handoff.
1type FeedbackState struct {
2 Owner, PendingOwner address
3 Paused bool
4 MemberCount int
5 MembershipRevision uint64
6 OwnerMember, DAOMember, SuccessorMember, SubjectMember bool
7 OwnerRoles, DAORoles, SuccessorRoles, SubjectRoles string
8 ChannelCount int
9 ChannelExists bool
10 ChannelDescription, ChannelType, ChannelReadRoles, ChannelWriteRoles string
11} 1type Host struct {
2 feedbackPolicy *FeedbackPolicy
3 channelsPolicy *ChannelsPolicy
4 feedPolicy *FeedPolicy
5 badgesPolicy *BadgesPolicy
6 escrowPolicy *EscrowPolicy
7 appstorePolicy *AppstorePolicy
8 arcadePolicy *ArcadePolicy
9 questPolicy *QuestPolicy
10 reviewsPolicy *ReviewsPolicy
11 marketPolicy *MarketPolicy
12 path string
13 seats [7]Seat
14 policy *memba_weighted_policy.Policy
15 proposals []*roleProposal
16 // rosters holds every distinct electorate, oldest first. A new entry is
17 // appended only when a recovery changes a seat address.
18 rosters [][7]address
19 // invalidations mirrors the policy generation: one record per Reconfigure.
20 invalidations []invalidation
21}BallotJSON reports one address's ballot on one proposal. Eligibility is the electorate frozen when the proposal was created, so a recovered key keeps its ballot on older proposals and has none on newer ones. choice is "yes", "no" or "abstain" (the host's three ballot values), or null with a null votedAtHeight when the address has not voted. Ballots stay readable after a proposal is executed, invalidated or expired; tallies do not.
ConfigJSON describes only implemented host capabilities. Fixed founding thresholds are not configurable through a role action. Operational role labels have no additional vote or execution privilege.
ConsumeMarket is for the owning realm's fixed adapter only. It checks the fresh target state and consumes authorization BEFORE crossing. No recovery is permitted in that adapter: a target panic must abort the transaction.
Only the owning realm's fixed adapter may use this. Keep Host private and let target panics/postcondition failures abort the entire transaction.
PendingVotesJSON lists, newest first, the proposals that are still open for voting where voter is in the frozen electorate and has not voted. before is an exclusive decimal cursor ("" or "0" for newest); limit is clamped to 1..MaxPendingPage. Executing any action invalidates every older open proposal, and deadlines follow creation order, so the scan stops at the first proposal that no longer accepts votes: nothing older can be pending. The scan also stops after MaxPendingScan proposals; next then resumes it. next is null when nothing older can be pending.
A fixed pause-only capability, not a proposal category or a bool-controlled escape. An already-paused call cannot invalidate pending unpause approvals.
ProposalsJSON uses an exclusive descending ID cursor. before=0 means newest; a returned nextBefore remains stable when newer proposals are appended. IDs/cursors/counts are decimal strings so uint64 values never lose precision in a JavaScript client. A null cursor ends pagination, not an empty page guess.
Every role change is critical. The proposer cannot select a lower category, inject a callback or substitute the target/role/grant after voting begins.
MarketAction is a closed value, not a callback, method name or free-form payload. Its private fields are frozen into the commitment returned by Bytes.
Bytes commits the target path, operation, category-relevant arguments and recipient. There are no user-supplied delimiters in these closed domains.
MarketPolicy contains only addresses separately approved for a generated DAO candidate. The generator requires explicit inputs and binds fixed-target dispatch. No address here is inferred from an old testnet literal.
MarketState is copied from the fixed target by the owning realm adapter. BPS is read only for a fee action; other actions commit zero in that field.
1type ProposalView struct {
2 Feedback bool
3 FeedbackAction FeedbackAction
4 FeedbackBefore FeedbackState
5 Channels bool
6 ChannelsAction ChannelsAction
7 ChannelsBefore ChannelsState
8 Feed bool
9 FeedAction FeedAction
10 FeedBefore FeedState
11 Badges bool
12 BadgesAction BadgesAction
13 BadgesBefore BadgesState
14 Escrow bool
15 EscrowAction EscrowAction
16 EscrowBefore EscrowState
17 Appstore bool
18 AppstoreAction AppstoreAction
19 AppstoreBefore AppstoreState
20 Arcade bool
21 ArcadeAction ArcadeAction
22 ArcadeBefore ArcadeState
23 Quest bool
24 QuestAction QuestAction
25 QuestBefore QuestState
26 Reviews bool
27 ReviewsAction ReviewsAction
28 ReviewsBefore ReviewsState
29 Market bool
30 MarketAction MarketAction
31 MarketBefore MarketState
32 Recovery bool
33 PersonID string
34 Replacement address
35 ID uint64
36 Proposer address
37 Target address
38 Role Role
39 Grant bool
40 State memba_weighted_policy.State
41 // Invalidation is set only for an INVALIDATED proposal. A proposal whose
42 // vote had already closed without qualifying stays EXPIRED instead.
43 Invalidated bool
44 InvalidationCause string
45 InvalidationHeight int64
46 InvalidationProposal uint64
47 InvalidationTarget string
48 ExpiredBeforeInvalidation bool
49}Views contain copied values only, never pointers to policy, ballots or seats.
ReviewsItem contains copied moderation-relevant state only. Ordinary reactions do not invalidate moderation; content edits, deletion and visibility do.
Seat is copied at construction. Founder/core-developer voting eligibility is independent from these operational role labels; all members may execute.