Closed codehawks-bot closed 1 year ago
Gas Optimization / Informational
constructor
payable
gas saved: 13 gas per instance
Number of Instances: 1
https://github.com/Cyfrin/2023-07-escrow/blob/65a60eb0773803fa0be4ba72defaec7d8567bccc/src/Escrow.sol#L32C3-L39C8
constructor( uint256 price, IERC20 tokenContract, address buyer, address seller, address arbiter, uint256 arbiterFee ) { //some code }
set constructor to payable
We like the protection from having it not marked payable
constructor can be payable
Severity
Gas Optimization / Informational
[GAS] setting the
constructor
topayable
gas saved: 13 gas per instance
Number of Instances: 1
https://github.com/Cyfrin/2023-07-escrow/blob/65a60eb0773803fa0be4ba72defaec7d8567bccc/src/Escrow.sol#L32C3-L39C8
Recommendation
set constructor to
payable