Snowman Merkle Airdrop

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

[L-1] Unused _snowmanSvgUri Parameter in Constructor

Root + Impact

Root: The _snowmanSvgUri parameter is passed to the constructor but is assigned to s_SnowmanSvgUri without subsequent use;
Impact: Wastes gas and confuses intent without functional effect.

Description

The constructor initializes the Snowman Airdrop ERC721 contract, sets the owner, and assigns a token counter, while also storing _snowmanSvgUri in s_SnowmanSvgUri, but this value is never utilized.
This results in an unused variable, increasing deployment costs and potentially misleading developers about its purpose.

// Root cause in the codebase with @> marks to highlight the relevant section
constructor(string memory _SnowmanSvgUri) ERC721("Snowman Airdrop", "SNOWMAN") Ownable(msg.sender) {
s_TokenCounter = 0;
@> s_SnowmanSvgUri = _SnowmanSvgUri;
}

Risk

Likelihood:

During contract deployment when _snowmanSvgUri is provided.
When code is reviewed or modified, assuming s_SnowmanSvgUri has a role.
Impact:

Increases gas costs unnecessarily.
May lead to confusion or incomplete implementation if intended for future use.

Recommended Mitigation

constructor(string memory _SnowmanSvgUri) ERC721("Snowman Airdrop", "SNOWMAN") Ownable(msg.sender) {
s_TokenCounter = 0;
- s_SnowmanSvgUri = _SnowmanSvgUri;
}

Remove the unused _snowmanSvgUri parameter and assignment if not needed, or define its usage (e.g., in token URI) if intended.

Updates

Lead Judging Commences

yeahchibyke Lead Judge 10 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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

Give us feedback!