The following list presents findings related to information and gas optimization. These findings are provided exclusively to facilitate code improvement.
onlyOwner()
modifier instead of an if
statementAdding an onlyOwner()
modifier instead of an if
statement in the PasswordStore::getPassword()
can improve the code readability.
Incomplete @Natspec declaration in the PasswordStore::setPassword()
and PasswordStore::getPassword()
. Suggested these minimum tags to implement for clarity:
@author
@title
@notice
@param
@return
(if applicable)
getPassword()
@param
in PasswordStore::getPassword()
is defined as: "newPassword. The new password to set". But the PasswordStore::getPassword()
doesn't accept any input so there isn't any newPassord
to set.
SetNetPassword()
;The event name should be PasswordStore::SetNewPassword()
instead of SetNetPassword()
.
In the PasswordStore contract define the string private s_password
(32 bytes) variable before the address private s_owner
(20 bytes) for a better slot memory allocation.
The PasswordStore::s_owner
can be defined immutable for saving gas.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.