* The contract defines an internal function `_isActivePlayer()` that checks if `msg.sender` is an active player in the raffle by iterating through the `players` array.
* This function is never called anywhere in the contract code, making it dead code that wastes deployment gas and confuses readers about the contract's intended functionality.
```solidity:172:180:src/PuppyRaffle.sol
/// @notice this function will return true if the msg.sender is an active player
function _isActivePlayer() internal view returns (bool) {
for (uint256 i = 0; i < players.length; i++) {
if (players[i] == msg.sender) {
return true;
}
}
return false;
}
```
Likelihood:
* This function exists in the codebase but is never invoked
* The function is defined and compiled into the bytecode, consuming gas during deployment
* Code reviewers may assume it's used somewhere, leading to confusion
Impact:
* Unnecessary gas consumption during contract deployment
* Code confusion - suggests incomplete implementation
* Maintenance burden - unclear if function should be used or removed
* Potential for future developers to misunderstand contract design
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.