s_claimers
A state variable s_claimers
is declared in SnowmanAirdrop
but never read or written anywhere. This wastes a small amount of storage and may indicate missing tracking logic or confuse future maintainers. It’s a low-severity, code-quality issue. Remove it if not needed, or implement its intended use (e.g., push claimers on successful claims) and add appropriate getters or events.
The code is compiled and deployed with s_claimers
present, but never used.
This is obvious on code review or static analysis since no references to s_claimers
appear beyond the declaration.
Gas/Wasted Storage: Declaring but not using a dynamic array causes unnecessary storage slot allocation, increasing deployment cost slightly and incurring a small ongoing storage cost (though an empty array has minimal footprint until items are added).
Maintainability: Future readers may be confused about intended behavior. It suggests that tracking claimers was planned but never implemented.
Potential Missing Logic: The presence of s_claimers
may indicate that the author intended to record addresses that successfully claimed, but forgot to implement it. If tracking of claimers is desired (e.g., to list or prevent double claims beyond the existing mapping), this is a logic gap.
Remove s_claimers
if tracking of claimers is not needed:
Or Implement Intended Tracking if it was meant to record claim events. For example:
Add in claimSnowman after a successful claim:
Provide a getter or enumeration function (be mindful of gas cost if the array grows large).
Or use an event (the existing SnowmanClaimedSuccessfully event already logs receiver and amount, which often suffices). If an on-chain list is required, fully flesh out how and why, and consider pagination or off-chain indexing.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.