20,000 USDC
View results
Submission Details
Severity: gas
Valid

[L-03] The OwnershipTransferred event should send the oldOwner

Summary

The OwnershipTransferred event has two arparameterguments to indicate who was the current owner and who is the new owner, however parameter one does not describe the case, the parameter is declared as user when the variable should be related to the previous owner.

Impact

Confusion if the user is the owner.

Tools Used

Manual code review

Recommendations

Change the parameter name user, for example:

- event OwnershipTransferred(address indexed user, address indexed newOwner);
+ event OwnershipTransferred(address indexed oldOwner, address indexed newOwner);

Support

FAQs

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