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.
Reduce gas usage by moving to Solidity 0.8.19 or later
Severity
Gas Optimization / Informational
Relevant GitHub Links
https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/tree/main/src/DSCEngine.sol
https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/tree/main/src/DecentralizedStableCoin.sol
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.
Complete release notes
Instances (2):
Link to code - https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/tree/main/src/DSCEngine.sol
Link to code - https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/tree/main/src/DecentralizedStableCoin.sol
Tools Used
Code Review using VSCode
Recommendations
Move to Solidity 0.8.19 or later