The LevelOne
contract lacks a mechanism to prevent the director from performing a system upgrade before the session end date, which is defined as 4 weeks from the session start.
Violation of invariant rules: "System upgrade cannot take place unless school's sessionEnd
has reached".
Add the following code to the LevelOneAndGraduateTest.t.sol
file within the LevelOneAndGraduateTest
contract.
Manual Review
Foundry
Ensure that the system cannot be updated before the end of the session. One of the possible ways we see below.
We need to update the code below in the LevelOne.sol
file.
The changes above ensure that the function can only be executed after the session period has ended.
`graduateAndUpgrade()` can be called successfully even when the school session has not ended
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.