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

getPassword function should emit an event

Summary

It might be a good idea to emit an event while getting password as well to keep a record of who accessed the password data.

Vulnerability Details

New event might be added to emit it while getting password.

Impact

Emitting an event in the getter function is considered a good practice and may allow to keep a record of accessing the password data.

Tools Used

Manual codebase analysis.

Recommendations

+ event GetPassword();
function getPassword() external view returns (string memory) {
if (msg.sender != s_owner) {
revert PasswordStore__NotOwner();
}
+ emit GetPassword();
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: Other

Support

FAQs

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