The EggHuntGame
contract contains a variable MIN_GAME_DURATION
which defines the minimum length of time, in seconds, for which a game has to last. When the contract owner starts the game, the duration they enter needs to be >= MIN_GAME_DURATION
. This limitation can be bypassed by calling endGame()
which has no checks on time. endGame()
is not an emergency function and the owner cannot start a new game without calling this function. The limitation placed by the contract on game duration should be checked in this function.
Limitation on game duration can be bypassed.
Copy the following into the test folder and run with forge test --mt testMinDurationBypass
.
Expected result:
Check if the game duration has passed before executing EggHuntGame::endGame()
.
Incorrect values reported when a game is ended early
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.