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

Setting owner as immutable

[GAS-01] Setting owner as immutable

Description

Making the owner private field as immutable, improves gas usage on deployment and getPassword.

Proof of Concept

The following gas reports are generated via forge test --gas-report.

PasswordStore.sol original version:

src/PasswordStore.sol:PasswordStore contract
Deployment Cost Deployment Size
225780 1067
Function Name min avg median max # calls
getPassword 1320 3072 2825 5320 4
setPassword 4686 16546 23786 23786 5

PasswordStore.sol with owner as immutable:

src/PasswordStore.sol:PasswordStore contract
Deployment Cost Deployment Size
209477 1093
Function Name min avg median max # calls
getPassword 228 1469 1217 3217 4
setPassword 4686 16546 23786 23786 5
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.