Bid Beasts

First Flight #49
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Impact: low
Likelihood: low
Invalid

Typo in State Variable Name in the `BidBeasts_NFT_ERC721::CurrenTokenId` state variable declaration

Description

  • State variable names should follow proper naming conventions and be spelled correctly for code maintainability and professionalism.

  • The state variable is named BidBeasts_NFT_ERC721::CurrenTokenID instead of BidBeasts_NFT_ERC721::CurrentTokenID, which is a spelling error.

@> uint256 public CurrenTokenID;

Risk

Likelihood:

  • The typo exists in every deployment of the contract

  • Code reviews and maintenance become more difficult

Impact:

  • Reduced code quality and professionalism

  • Potential confusion for developers interacting with the contract

Proof of Concept

function test_LOW_TypoInVariableName() public {
// Access the misspelled variable to demonstrate the typo
uint256 currentId = nft.CurrenTokenID();
assertEq(currentId, 0, "Initial current token ID should be 0");
// Mint a token to increment the counter
vm.prank(OWNER);
nft.mint(ALICE);
// Verify the typo persists
assertEq(nft.CurrenTokenID(), 1, "CurrenTokenID should increment to 1");
}

Recommended Mitigation

- uint256 public CurrenTokenID;
+ uint256 public CurrentTokenID;
Updates

Lead Judging Commences

cryptoghost Lead Judge about 1 month ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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