Skip to content

feat: add VoteResolved event for frontend/indexer tracking#74

Open
Tranquil-Flow wants to merge 1 commit intodevfrom
24-vote-resolved-event
Open

feat: add VoteResolved event for frontend/indexer tracking#74
Tranquil-Flow wants to merge 1 commit intodevfrom
24-vote-resolved-event

Conversation

@Tranquil-Flow
Copy link
Copy Markdown

Summary

Adds a VoteResolved event so frontends and indexers can track vote outcomes without reconstructing state from individual Voted events.

Changes

  • ISafetyNet.sol: New event VoteResolved(uint256 indexed requestId, bool approved, uint256 yesVotes, uint256 noVotes, uint256 totalMembers)
  • SafetyNet.sol: Emitted in two places:
    1. executeContestedWithdrawal() — auto-execute path (yesVotes=0, noVotes=0)
    2. vote() — consensus-reached path (actual vote counts)

Testing

2 new tests added:

  • test_VoteResolvedEmittedOnAutoExecute — verifies event on uncontested auto-execution
  • test_VoteResolvedEmittedOnConsensus — verifies event with correct vote tallies

All 99 tests pass.

Closes #24

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.

Notification Options for Withdrawal Voting Result

1 participant