Cyfrin / 2023-07-escrow

17 stars 12 forks source link

Events are missing sender information #860

Closed codehawks-bot closed 10 months ago

codehawks-bot commented 11 months ago

Events are missing sender information

Severity

Gas Optimization / Informational

Relevant GitHub Links

https://github.com/Cyfrin/2023-07-escrow/tree/main/src/Escrow.sol

Summary

Events are missing sender information

Vulnerability Details

When an action is triggered based on a user's action, not being able to filter based on who triggered the action makes event processing a lot more cumbersome. Including the msg.sender the events of these types of action will make events much more useful to end users, especially when msg.sender is not tx.origin.

Instances (2):

File: src/Escrow.sol

96:         emit Confirmed(i_seller);

121:         emit Resolved(i_buyer, i_seller);

Link to code - https://github.com/Cyfrin/2023-07-escrow/tree/main/src/Escrow.sol

Tools Used

Manual Code Review

Recommendations

Use msg.sender in the events

PatrickAlphaC commented 10 months ago

Not wanted.