The graduateAndUpgrade()
function can be called without verifying whether the school session has ended. This violates the contract invariant, which states that "System upgrade cannot take place unless school's sessionEnd has been reached".
1) Teachers and the principal being paid wages before the session ends
2) Students graduating without completing the required 4-week session
There is no require()
check to make sure the current time is after the session end time. Because of this, the graduateAndUpgrade()
function can be called too early, which breaks the expected flow of the contract
1) VS Code
2) Manual review
Add a require()
statement to ensure the current time is past the session end time before executing the graduateAndUpgrade()
function
`graduateAndUpgrade()` can be called successfully even when the school session has not 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.