1package xdao23import (4 "chain/runtime/unsafe"56 "gno.land/p/moul/udao/v0"7)89// DAO is a whitelist system that implements the udao.DAO interface.10// It can allow a trusted list of addresses to share the administration of realms that are designed to be managed by "DAOs".11// 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.12// 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.13type WhitelistDAO struct {14 admins []address // for the sake of simplicity and because this simple DAO implementation isn't designed to scale, we just keep a simple slice15}1617// check that DAO implements the udao.DAO interface.18var _ udao.DAO = (*WhitelistDAO)(nil)1920func NewWhitelistDAO() *WhitelistDAO {21 caller := unsafe.PreviousRealm().Address()22 return &WhitelistDAO{23 admins: []address{caller},24 }25}2627// udao.DAO methods28//2930func (d *WhitelistDAO) Propose(prop udao.Proposal) (uint64, error) { panic("not implemented") }3132func (d WhitelistDAO) GetProposalStatus(id uint64) (udao.ProposalStatus, error) {33 panic("not implemented")34}35func (d *WhitelistDAO) Execute(id uint64) error { panic("not implemented") }36func (d WhitelistDAO) GetProposal(id uint64) (udao.Proposal, error) { panic("not implemented") }3738// other methods39//4041func (d *WhitelistDAO) AddAdmin(addr address) { panic("not implemented") }42func (d *WhitelistDAO) DelAdmin(addr address) { panic("not implemented") }43func (d WhitelistDAO) ListAdmins() []address { return d.admins[:] }44func (d WhitelistDAO) Render(path string) string { return "TODO" }45Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.