40,000 USDC
View results
Submission Details
Severity: gas

constructor can be payable

[GAS] setting the constructor to 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
}

Recommendation

set constructor to payable

Support

FAQs

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