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

`_isActivePlayer` is not working as intended

Summary

_isActivePlayer internal visibility restricts it's functionality as described by the NATSPEC

Vulnerability Details

_isActivePlayer is meant to return true if the msg.sender is an active player according to NATSPEC but it's visibility is internal which means it can be called only by the contract and all the contracts that inherit from it. The _isActivePlayer function is never called internally.

Impact

_isActivePlayer can't be used as intended.

Tools Used

Manual review

Recommendations

/// @notice this function will return true if the msg.sender is an active player
-- function _isActivePlayer() internal view returns (bool) {
++ function isActivePlayer() external 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 over 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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