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

s_owner is declared mutable storage variable

Summary

Contract's variable s_owner is declared as storage variable.

Vulnerability Details

Storage variables allow their values to be reassigned in some function intentionally or by mistake.
It should be declared immutable in order to not accidentally lose the feature of ownable contract.

Impact

Medium

Tools Used

Manual review was used.

No automatic tools for code analysis were used.

Standard tools described in https://book.getfoundry.sh/ were used to deploy, test and query the contract.

Recommendations

The following variable declaration:

address private s_owner;

should be substituted with:

address private immutable i_owner;

N.B. Notice the renaming of the variable!

Updates

Lead Judging Commences

inallhonesty Lead Judge
over 1 year ago
inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Gas optimizations

Support

FAQs

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