Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

v0 source pure

Readme View source

gno.land/p/nym-moultest123/xdao

🚧 Partial implementation. 7 of the 14 functions panic("not implemented"), Render returns the literal string "TODO". The constructor and the admin list work; nothing that touches proposals does.

WhitelistDAO implements p/moul/udao's DAO interface with the simplest possible governance: a flat list of trusted admins.

1var _ udao.DAO = (*WhitelistDAO)(nil)
2
3func NewWhitelistDAO() *WhitelistDAO   // seeds admins with the calling realm
4func (d WhitelistDAO) ListAdmins() []address

Everything else (Propose, Execute, GetProposal, GetProposalStatus, AddAdmin, DelAdmin) panics.

Why a "DAO" that is not decentralized

Two honest uses, both stated in the source:

  1. Bootstrapping. A realm designed to be DAO-governed needs something to govern it on day one. A whitelist satisfies the interface, so the realm can ship, and the whitelist can later replace itself with a real DAO through the same interface. No migration, no second code path.
  2. One person, several keys. Someone holding keys on different machines can present as a single entity without a multisig ceremony for each action.

It is not a DAO, and the name says so.


Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.

Dependency graph:

gno.land/p/nym-moultest123/xdao/v0 dependency graph

⚠️ Disclaimer: provided as-is, without warranty; not security-audited. Full disclaimer: DISCLAIMER.

Functions 1

Types 1

type WhitelistDAO

struct
1type WhitelistDAO struct {
2	admins []address // for the sake of simplicity and because this simple DAO implementation isn't designed to scale, we just keep a simple slice
3}
source

DAO is a whitelist system that implements the udao.DAO interface. It can allow a trusted list of addresses to share the administration of realms that are designed to be managed by "DAOs". It's not a DAO per say. But makes sense to be used to bootstrap a realm until the DAO can replace itself with a really decnetralized autonomous organization. Asan inception. It's also useful for people who manages multiple keys, like on different computers so they can simulte being a single entity while managing several addresses.

Methods on WhitelistDAO

func AddAdmin

method on WhitelistDAO
1func (d *WhitelistDAO) AddAdmin(addr address)
source

func DelAdmin

method on WhitelistDAO
1func (d *WhitelistDAO) DelAdmin(addr address)
source

func Execute

method on WhitelistDAO
1func (d *WhitelistDAO) Execute(id uint64) error
source

func GetProposal

method on WhitelistDAO
1func (d WhitelistDAO) GetProposal(id uint64) (udao.Proposal, error)
source

func GetProposalStatus

method on WhitelistDAO
1func (d WhitelistDAO) GetProposalStatus(id uint64) (udao.ProposalStatus, error)
source

func ListAdmins

method on WhitelistDAO
1func (d WhitelistDAO) ListAdmins() []address
source

func Propose

method on WhitelistDAO
1func (d *WhitelistDAO) Propose(prop udao.Proposal) (uint64, error)
source

func Render

method on WhitelistDAO
1func (d WhitelistDAO) Render(path string) string
source

Dependencies

Source Files 4