1// loader.gno initialises the govDAO v0 implementation and tier structure.2//3// It intentionally does NOT add any members or set AllowedDAOs. When the4// allowedDAOs list in the DAO proxy is empty, InAllowedDAOs() returns true5// for any caller (see r/gov/dao/proxy.gno), which lets a subsequent MsgRun6// bootstrap the member set and then lock things down.7//8// Bootstrap flow (official network genesis or local dev):9//10// 1. All packages — including this loader — are deployed via MsgAddPackage.11// The loader sets up tier entries and the DAO implementation.12// 2. A MsgRun executes a setup script (e.g. govdao_prop1.gno) which:13// a. Adds a temporary deployer as T1 member (for supermajority).14// b. Creates a governance proposal to register validators, votes YES,15// and executes it.16// c. Adds the real govDAO members directly via memberstore.Get().17// d. Removes the temporary deployer.18// e. Calls dao.UpdateImpl to set AllowedDAOs, locking down access.19//20// See misc/deployments/ for concrete genesis generation examples.21package loader2223import (24 "gno.land/r/gov/dao"25 "gno.land/r/gov/dao/impl/v0"26 "gno.land/r/gov/dao/memberstore/v0"27)2829func init(cur realm) {30 // Create tier entries in the members tree (required before any SetMember).31 memberstore.Get(0, cur).SetTier(memberstore.T1)32 memberstore.Get(0, cur).SetTier(memberstore.T2)33 memberstore.Get(0, cur).SetTier(memberstore.T3)3435 // Set the DAO implementation. AllowedDAOs is intentionally left empty36 // so that the genesis MsgRun can manipulate the memberstore directly.37 dao.UpdateImpl(cross(cur), dao.NewUpdateRequest(impl.GetInstance(0, cur), nil))38}39Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.
vm/qrender output, sanitized (docs/render-security.md) and displayed in an empty-sandbox iframe — scripts, forms and popups cannot run. Links stay inert in-preview; right-click to open.