const VoteAgainst, VoteFor, VoteAbstain
Vote support values.
Package governor is a simplified on-chain governance realm inspired by OpenZeppelin's Governor. Anyone may open a pro...
⚠️ Experimental — generated with no human supervision by the daily MCP pipeline (Solidity→Gno port). Not audited. See r/moul/x/daily.
A simplified on-chain governance realm inspired by OpenZeppelin's Governor.
It ports the core proposal → vote → execute lifecycle to Gno: Propose records
a proposal's snapshot height and a deadline of ChainHeight() + votingPeriod,
CastVote gives every address a single equally-weighted vote (1 address = 1
vote, tracked in an avl voter set), and State computes Active / Succeeded
/ Defeated from the deadline versus the current chain height plus whether the
for tally beats against. Execute finalizes a Succeeded proposal.
Unlike the ERC20Votes-weighted original, voting power here is flat (one address, one vote) and there is no timelock — the emphasis is on a clean, deterministic state machine driven by block height.
# open a proposal (returns its id)
Propose("Fund the docs working group for Q3")
# vote: 0=against, 1=for, 2=abstain (one vote per address)
CastVote(1, 1)
# read the current state: Active | Succeeded | Defeated | Executed
State(1)
# once past the deadline with for > against, finalize it
Execute(1)
Render("") lists every proposal with its tally bars (▓░) and state.
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:

🧪 Highly experimental — potentially vibe-coded. Not audited; may break, change, or be removed at any time. Do not use with anything of value. Full disclaimer: DISCLAIMER.
Package governor is a simplified on-chain governance realm inspired by OpenZeppelin's Governor. Anyone may open a proposal; every address gets a single equally-weighted vote (1 address = 1 vote); a proposal succeeds when its voting deadline has passed and the "for" tally strictly beats "against".
Vote support values.
Proposal state values.
CastVote records one vote for the caller on proposal id. support is 0=against, 1=for, 2=abstain. One address may vote at most once per proposal, and voting is only allowed while the proposal is Active.
Execute marks a Succeeded proposal as executed. It panics unless the proposal has reached the Succeeded state.
Propose opens a new proposal and returns its id. The snapshot height and deadline are recorded from the current chain height.
Render lists all proposals with their tallies and states as Markdown.
State returns the current lifecycle state of proposal id.
Proposal is a single governance proposal.