Calculation logic to determine horse happiness will revert the transaction if executed before block timestamp 86400
.
There is an issue in the HorseStore.sol::isHappyHorse()
function implementation where the calculation won't work when executed at a block timestamp earlier than 86400
. This is due to an arithmetic underflow problem, which causes the function to revert.
It wouldn't be possible to obtain a result from the HorseStore.sol::isHappyHorse()
function.
Add the next test in HorseStoreSolidity.t.sol
.
Run a test with forge test --mt test_IsHappyHorseRevertsWhenExecutedAtBlockTimestampLessThan86400
.
Foundry
Recommended changes in HorseStore.sol::isHappyHorse()
function:
Add the next test in HorseStoreSolidity.t.sol
.
Run a test with forge test --mt test_IsHappyHorseExecutedAtBlockTimestampLessThan86400
.
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.