The check if (!epochs[_currentEpochId].hasEnded()) { revert InvalidOperation(); }
is repeated in multiple functions. This can be refactored into a modifier to reduce code duplication and improve readability.
The repeated check for whether the current epoch has ended can be refactored into a modifier. This simplifies the code and ensures consistency across functions that require this check.
Refactoring repeated code into a modifier reduces code duplication, making the contract more maintainable and readable.
Manual review.
Create a modifier to encapsulate the check for an ended epoch and apply it to relevant functions:
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.