40,000 USDC
View results
Submission Details
Severity: gas

Reduce gas usage by moving to Solidity 0.8.19 or later

Summary

Reduce gas usage by moving to Solidity 0.8.19 or later

Vulnerability Details

In earlier releases and in the default legacy code generation, when an internal library function or a free function accessed via a module was called only during contract creation, e.g. only in the constructor, a copy of the function still also occurred in the contract's runtime bytecode. This was fixed in the version 0.8.19 and later.

Source link for complete release notes

Instances (4):

File: src/Escrow.sol
2: pragma solidity 0.8.18;

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

File: src/EscrowFactory.sol
2: pragma solidity 0.8.18;

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

File: src/IEscrow.sol
2: pragma solidity 0.8.18;

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

File: src/IEscrowFactory.sol
2: pragma solidity 0.8.18;

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

Tools Used

Manual Code Review

Recommendations

Use Solidity 0.8.19 or later

Support

FAQs

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