President Elector

First Flight #24
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

No Events for State Changes

Summary

The contract does not emit events for important state changes.

Impact

Lack of transparency and difficulty in tracking contract activity.
For example, no event emissions in functions like selectPresidentor rankCandidates

Tools Used

Manual Review

Recommendations

event PresidentElected(address indexed newPresident);
event CandidatesRanked(address indexed voter, address[] orderedCandidates);
function selectPresident() external onlyPresident {
// Logic to select president...
emit PresidentElected(s_currentPresident);
}
function rankCandidates(address[] memory orderedCandidates) external {
// Logic...
emit CandidatesRanked(msg.sender, orderedCandidates);
}
Updates

Lead Judging Commences

inallhonesty Lead Judge 11 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.