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

It is a waste of gas to add additional getter functions for public state variables, because they are given getter functions automatically.

[L-15] It is a waste of gas to add additional getter functions for public state variables, because they are given getter functions automatically.

Description:

  • Found in src/RamNFT.sol

    function getCharacteristics(uint256 tokenId) public view returns (CharacteristicsOfRam memory) {
    return Characteristics[tokenId];
    }

    Characteristics is a public state variable.

    function getNextTokenId() public view returns (uint256) {
    return tokenCounter;
    }

    tokenCounter is a public state variable.

Recommended Mitigation: Remove these getter functions.

Updates

Lead Judging Commences

bube Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Info/Gas/Invalid according to docs

Support

FAQs

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