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

QA: For better readability & more in line with recommendations/standards, should drop the curly braces at L36-L38.

Summary

The if statement below uses curly braces when not necessary (i.e. where revert + custom error is used):

function getPassword() external view returns (string memory) {
if (msg.sender != s_owner) {
revert PasswordStore__NotOwner();
}
return s_password;
}

Vulnerability Details

n/a

Impact

LOW

Tools Used

VSC.

Recommendations

function getPassword() external view returns (string memory) {
++ if (msg.sender != s_owner) revert PasswordStore__NotOwner();
-- if (msg.sender != s_owner) {
-- revert PasswordStore__NotOwner();
-- }
return s_password;
}
Updates

Lead Judging Commences

inallhonesty Lead Judge
almost 2 years ago
inallhonesty Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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