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

s_owner not set to immutable wastes gas

Summary

The PasswordStore::s_owner is not going to be changed by the contract. Setting it to immutable would allow to save gas.
I submit this small finding as a test as it is my first submission :)

Vulnerability Details

Generally speaking, reading from storage is less efficient gas-wise than reading from bytecode. Since the variable is never going to be changed, it is a better practice to set it as immutable so that users can save gas using it.

Impact

Wastes gas.

Tools Used

VS Code

Recommendations

- address private s_owner;
+ address private immutable s_owner;
Updates

Lead Judging Commences

inallhonesty Lead Judge
almost 2 years ago
inallhonesty Lead Judge almost 2 years ago
Submission Judgement Published
Invalidated
Reason: Gas optimizations

Support

FAQs

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