Open codehawks-bot opened 11 months ago
nonReentrant
modifier
Gas Optimization / Informational
https://github.com/Cyfrin/2023-07-escrow/tree/main/src/Escrow.sol#112
The nonReentrant modifier should occur before all other modifiers
This is a best-practice to protect against reentrancy in other modifiers
Instances (1):
File: src/Escrow.sol 112: function resolveDispute(uint256 buyerAward) external onlyArbiter nonReentrant inState(State.Disputed) {
Link to code - https://github.com/Cyfrin/2023-07-escrow/tree/main/src/Escrow.sol
Manual Code Review
Add nonReentrant modifier before all other modifiers
The
nonReentrant
modifier
should occur before all other modifiersSeverity
Gas Optimization / Informational
Relevant GitHub Links
https://github.com/Cyfrin/2023-07-escrow/tree/main/src/Escrow.sol#112
Summary
The
nonReentrant
modifier
should occur before all other modifiersVulnerability Details
This is a best-practice to protect against reentrancy in other modifiers
Instances (1):
Link to code - https://github.com/Cyfrin/2023-07-escrow/tree/main/src/Escrow.sol
Tools Used
Manual Code Review
Recommendations
Add
nonReentrant
modifier
before all other modifiers