Skip to content Search Apps Documentation Source Content File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

README.md

2.40 Kb · 26 lines

Ballot

⚠️ Experimental — generated with no human supervision by the daily MCP pipeline to exercise gno tooling. Not audited. See r/moul/x/daily.


A Gno port of the classic Solidity "Ballot" voting contract: a chairperson seeds a fixed list of proposals and grants specific addresses the right to vote, and each voter either casts a direct vote or delegates their weight down a delegation chain (with a loop guard, just like the original). WinningProposal/WinnerName report the current leader live, so there's no separate close-the-vote step. It's neat because delegation composability - a delegate's weight can itself be re-delegated - is the one part of the original contract that's easy to get subtly wrong, and this port keeps that chain-walking + cycle-detection logic faithful while swapping mappings for an avl.Tree.

Built for gno 0.9.


Part of moul/gno-contracts — moul's versioned gno.land contracts. See the repository for the full catalog, build/test tooling, and usage.

On mainnet: deployment status transactions unique callers deployed revision

Dependency graph:

gno.land/r/nym-moultest123/x/daily/ballot/v0 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.