Closed codehawks-bot closed 1 year ago
Gas Optimization / Informational
https://github.com/Cyfrin/2023-07-escrow/tree/main/src/IEscrow.sol
https://github.com/Cyfrin/2023-07-escrow/tree/main/src/IEscrowFactory.sol
Custom error has no parameters
Consider adding some parameters to the error describing the cause of the error
Instances (9):
File: src/IEscrow.sol 9: error Escrow__OnlyBuyer(); 10: error Escrow__OnlyBuyerOrSeller(); 11: error Escrow__OnlyArbiter(); 13: error Escrow__MustDeployWithTokenBalance(); 15: error Escrow__DisputeRequiresArbiter(); 16: error Escrow__TokenZeroAddress(); 17: error Escrow__BuyerZeroAddress(); 18: error Escrow__SellerZeroAddress();
Link to code - https://github.com/Cyfrin/2023-07-escrow/tree/main/src/IEscrow.sol
File: src/IEscrowFactory.sol 8: error EscrowFactory__AddressesDiffer();
Link to code - https://github.com/Cyfrin/2023-07-escrow/tree/main/src/IEscrowFactory.sol
Manual Code Review
Add parameters to the error which describe the cause
Intended
Custom error has no parameters
Severity
Gas Optimization / Informational
Relevant GitHub Links
https://github.com/Cyfrin/2023-07-escrow/tree/main/src/IEscrow.sol
https://github.com/Cyfrin/2023-07-escrow/tree/main/src/IEscrowFactory.sol
Summary
Custom error has no parameters
Vulnerability Details
Consider adding some parameters to the error describing the cause of the error
Instances (9):
Link to code - https://github.com/Cyfrin/2023-07-escrow/tree/main/src/IEscrow.sol
Link to code - https://github.com/Cyfrin/2023-07-escrow/tree/main/src/IEscrowFactory.sol
Tools Used
Manual Code Review
Recommendations
Add parameters to the error which describe the cause