DatingDapp

First Flight #33
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

[L-4] Dead Code in `LikeRegistry.sol` – Unused `Like` Struct

Description:

The Like struct is declared in LikeRegistry.sol, but it is never used within the contract. This results in unnecessary dead code, which increases contract size and reduces code clarity without providing any functional value. Unused structures can also lead to confusion for future maintainers and auditors, as they may assume the struct is intended for use in some part of the logic.

contract LikeRegistry is Ownable {
// Struct to store information about a "Like" action
struct Like {
address liker;
address liked;
uint256 timestamp;
}
...
}

Recommended Mitigation:

Remove the unused struct if it is not needed to reduce contract size and improve maintainability.

Refactor the contract to utilize the struct if it was initially intended to store like-related data. This could improve readability and reduce redundant mappings or variables if applicable.

Updates

Appeal created

n0kto Lead Judge 7 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Informational or Gas

Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.

Support

FAQs

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