function testFuzz_testFeedingHorseAllTheTime(uint256 countTime) public {
uint256 horseId = horseStore.totalSupply();
console2.log("block.timestamp: %s", block.timestamp);
vm.warp(countTime);
vm.prank(user);
horseStore.mintHorse();
uint256 lastFedTimeStamp = block.timestamp;
console2.log("lastFedTimeStamp: %s", lastFedTimeStamp);
console2.log("block.timestamp: %s", block.timestamp);
horseStore.feedHorse(horseId);
assertEq(horseStore.horseIdToFedTimeStamp(horseId), lastFedTimeStamp);
}
Failing tests:
Encountered 1 failing test in test/HorseStoreHuff.t.sol:HorseStoreHuff
[FAIL. Reason: EvmError: Revert; counterexample: calldata=0xcea30babffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff
args=[115792089237316195423570985008687907853269984665640564039457584007913129639935 [1.157e77]]]
testFuzz_testFeedingHorseAllTheTime(uint256) (runs: 263, μ: 90315, ~: 90315)
Delete the checks if the timestamp is odd.
#define macro FEED_HORSE() = takes (0) returns (0) {
timestamp // [timestamp]
0x04 calldataload // [horseId, timestamp]
STORE_ELEMENT(0x00) // []
// End execution
- 0x11 timestamp mod
- endFeed jumpi
- revert
- endFeed:
stop
}