The stopEvent function in the MartenitsaEvent contract fails to remove participants from the list of participants after the event ends. This oversight prevents recurring users from joining new events as their addresses remain stored in the _participants mapping.
The stopEvent function is designed to end the event and remove the producer role from participants. However, it lacks the functionality to remove participants from the list entirely. As a result, addresses of previous participants persist in the _participants mapping, which may inadvertently block them from joining future events.
Add this test to the MartenitsaEvent.t.sol test suite.
Users who have participated in previous events remain listed as participants even after the event has ended. This prevents them from joining new events since the contract mistakenly believes they are still active participants.
Manual review, Foundry
You can implement the following changes to the stopEvent function.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.