Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: high
Invalid

Horses can't be fed by all users

Summary

Arithmetic underflow or overflow

Vulnerability Details

[FAIL. Reason: panic: arithmetic underflow or overflow (0x11); counterexample: calldata=0x094e24bc0000000000000000000000000000000000000000000000000000000000000001 args=[0x0000000000000000000000000000000000000001]] testHorseCanBeFedAtAllTimes(address) (runs: 0, μ: 0, ~: 0)
function testHorseCanBeFedByEveryone(address randomUser) public {
vm.warp(10);
vm.roll(10);
uint256 horseId = horseStore.totalSupply();
vm.assume(randomUser != address(0));
vm.prank(randomUser);
horseStore.feedHorse(horseId);
assertEq(horseStore.isHappyHorse(horseId), true);
}

Impact

High risk

Tools Used

foundry

Recommendations

Updates

Lead Judging Commences

inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Lack of quality

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.