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

_isActivePlayer function is not used

Summary

The internal function _isActivePlayer is not used in the smart contract.

Vulnerability Details

/// @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;
}

The function _isActivePlayer is internal and can only be used by the contract itself, but is not used.
It can be removed to reduce gas consumption and to avoid creating confusion by leaving functions unused.

Impact

The impact is low, deployment only consumes more gas and it can be confusing to find a function that is not used.

Tools Used

Manual review

Recommendations

Remove the unused function.

Updates

Lead Judging Commences

Hamiltonite Lead Judge about 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.

Give us feedback!