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) ProposalHistoryPageView(path string) string {
return d.ProposalHistoryHeaderView() +
d.ProposalHistoryView(path)
}
func (d *DAOPrivate) ProposalHistoryHeaderView() string {
pkgPath := d.Realm.PkgPath()
linkPath := getLinkPath(pkgPath)
name := d.GetProfileString(d.Realm.Address(), "DisplayName", "DAO")
s := ""
s += ufmt.Sprintf("# %s - Proposal History\n\n", name)
s += md.Link("> Go to the active Proposals 📃", ufmt.Sprintf("%s:%s", linkPath, PROPOSALS_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) ProposalHistoryView(path string) string {
inactiveProposals := d.Core.Proposals.GetProposals(
func(p daokit.Proposal) bool {
// Raw status, for the reason in view_proposals_page.gno: this is
// exactly "already executed", and the display status would cost a
// second condition evaluation per proposal.
return p.Status != daokit.ProposalStatusOpen && p.Status != daokit.ProposalStatusPassed
},
)
s := ""
s += ufmt.Sprintf("## Inactive Proposals 🗳️ (%d)\n\n", inactiveProposals.Tree.Size())
s += d.RenderProposalsTable(path, inactiveProposals)
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.