In the EggHuntGame contract, the eggCounter variable is not explicitly initialized in the constructor. Although Solidity automatically initializes state variables of type uint256 to 0, not explicitly setting an initial value for this counter may cause confusion or potential issues when interacting with the contract in the future.
Lack of explicit initialization might result in uncertainty for other developers interacting with the contract. While Solidity guarantees the variable starts at 0, explicitly initializing it makes the code clearer and avoids potential mistakes, especially if future modifications introduce assumptions about initia
In the current contract, eggCounter is declared but never initialized:
line: https://github.com/CodeHawks-Contests/2025-04-eggstravaganza/blob/main/src/EggHuntGame.sol#L23
The counter starts from 0, but it would be clearer and more robust to explicitly initialize it within the constructor like so:
Add an explicit initialization for eggCounter in the constructor, ensuring that its initial value is clear and documented:
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.