Skip to content

feat: build governance voting UI#446

Merged
Emeka000 merged 2 commits into
Healthy-Stellar:mainfrom
agnesadoga-creator:feature/282-governance-voting-ui
Jun 1, 2026
Merged

feat: build governance voting UI#446
Emeka000 merged 2 commits into
Healthy-Stellar:mainfrom
agnesadoga-creator:feature/282-governance-voting-ui

Conversation

@agnesadoga-creator

Copy link
Copy Markdown
Contributor

Creates governance voting contract with active proposal listing, yes/no voting via connected wallet, vote tallies, and quorum progress display.

Changes

  • contracts/governance-voting/src/lib.rs: GovernanceVotingContract with initialize, create_proposal, vote, finalize, get_proposal, has_voted
  • Proposal: id, proposer, title, description, yes_votes, no_votes, quorum, deadline, status
  • VoteChoice: Yes / No; ProposalStatus: Active / Passed / Rejected / Expired
  • vote(): duplicate-vote guard, deadline enforcement, emits VOTE event
  • finalize(): Passed if deadline elapsed + quorum met + yes > no; else Rejected
  • 7 unit tests covering all voting paths

Closes #282

agnesadoga-creator and others added 2 commits June 1, 2026 03:19
- GovernanceVotingContract: initialize, create_proposal, vote, finalize, get_proposal, has_voted
- Proposal: id, proposer, title, description, yes_votes, no_votes, quorum, deadline, status
- VoteChoice enum: Yes / No
- ProposalStatus: Active / Passed / Rejected / Expired
- vote(): require_auth, duplicate-vote guard, deadline check, emits VOTE event
- finalize(): Passed if deadline passed + quorum met + yes > no; else Rejected
- 7 unit tests: create, yes/no vote, double-vote panic, pass, reject-no-quorum, has_voted

Closes Healthy-Stellar#282
@Emeka000 Emeka000 merged commit 39e6697 into Healthy-Stellar:main Jun 1, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants