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

_isActivePlayer is unused

Summary

The function _isActivePlayer has internal visibility but is never used. This could be conceivably used for a front end to allow players to check if they're active, but this is impossible with current visibility.

Vulnerability Details

function _isActivePlayer() internal view returns (bool) {
for (uint256 i = 0; i < players.length; i++) {
if (players[i] == msg.sender) {
return true;
}
}
return false;
}

The above function is not called by any other contract functions, nor is it accessible externally for a front end.

Impact

Tools Used

  • Foundry

  • Manual Review

Recommendations

Make the function public.

function _isActivePlayer() public view returns (bool) {
for (uint256 i = 0; i < players.length; i++) {
if (players[i] == msg.sender) {
return true;
}
}
return false;
}
Updates

Lead Judging Commences

Hamiltonite Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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