v0 source pure
Package udao defines minimal interfaces for Decentralized Autonomous Organizations (DAOs). It intentionally does not ...
View source
gno.land/p/moul/udao/v0
TODO: describe this package.
Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.
⚠️ Disclaimer: provided as-is, without warranty; not security-audited. Full disclaimer: DISCLAIMER.
Package udao defines minimal interfaces for Decentralized Autonomous Organizations (DAOs). It intentionally does not expose members and votes, as these details are implementation-specific. Instead, it focuses on providing an external view of proposals and their statuses, which is what non-members and non-voters typically care about.
The package is designed to allow for composable DAO patterns, enabling flexible and modular implementations of various DAO structures and behaviors.
1
1
func ValidateConstraints
ValidateConstraints checks if all constraints of a proposal are met
5
type Constraint
interfaceConstraint defines an interface for proposal constraints
type DAO
interface 1type DAO interface {
2 // Propose submits a new proposal to the DAO
3 Propose(prop Proposal) (id uint64, err error)
4
5 // GetProposalStatus retrieves the current status and metrics of a specific proposal
6 GetProposalStatus(id uint64) (ProposalStatus, error)
7
8 // Execute attempts to execute a proposal if it has passed
9 Execute(id uint64) error
10
11 // GetProposal retrieves the details of a specific proposal
12 GetProposal(id uint64) (Proposal, error)
13}DAO defines a minimal interface for a Decentralized Autonomous Organization from an external point of view, hiding the internal details of members and voting.
type Proposal
interfaceProposal defines the interface for a DAO proposal
type ProposalState
identProposalState represents the current state of a proposal
type ProposalStatus
structProposalStatus represents the current status and metrics of a proposal