Pure package detail
basedao
gno.land/p/samcrew/basedao
Indexed deployment identity with independently loaded latest RPC source. Functions and Render are realm-only RPC capabilities.
Indexed deployment
Identity
- Package path
- gno.land/p/samcrew/basedao
- Block
- 98962
- Deployed (UTC)
- Transaction
- vFRzo/FVwQsb8Cx+tKBmj8a88A034YhkhP+ftPai79c=
Latest RPC state
Source
package basedao
import (
"gno.land/p/moul/md"
"gno.land/p/nt/ufmt/v0"
"gno.land/p/samcrew/daokit"
)
func (d *DAOPrivate) ProposalsPageView(path string) string {
return d.ProposalsHeaderView() +
d.ProposalsView(path)
}
func (d *DAOPrivate) ProposalsHeaderView() string {
pkgPath := d.Realm.PkgPath()
linkPath := getLinkPath(pkgPath)
name := d.GetProfileString(d.Realm.Address(), "DisplayName", "DAO")
s := ""
s += ufmt.Sprintf("# %s - Proposals\n\n", name)
s += md.Link("> Go to the Proposal history 📜", ufmt.Sprintf("%s:%s", linkPath, PROPOSAL_HISTORY_PATH)) + "\n\n"
s += md.Link("Add a new proposal 🗳️", ufmt.Sprintf("%s$help", linkPath)) + "\n\n"
s += ufmt.Sprintf("\n--------------------------------\n")
return s
}
func (d *DAOPrivate) ProposalsView(path string) string {
activeProposals := d.Core.Proposals.GetProposals(
func(p daokit.Proposal) bool {
// Raw status, not DisplayStatus: only Execute writes Status, so a
// stored proposal is Open until Executed and this is exactly
// "not yet executed". Computing the display status here would
// evaluate every proposal's condition a second time — the table
// below already does it for the ones that survive the filter.
return p.Status == daokit.ProposalStatusOpen || p.Status == daokit.ProposalStatusPassed
},
)
s := ""
s += ufmt.Sprintf("## Active Proposals 🗳️ (%d)\n\n", activeProposals.Tree.Size())
s += d.RenderProposalsTable(path, activeProposals)
s += ufmt.Sprintf("\n--------------------------------\n")
return s
}
The verified vm/qfuncs operation accepts realm paths only.
Pure packages expose source files but do not have Realm Render.