15,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 (2):

File: src/DSCEngine.sol
24: pragma solidity ^0.8.18;

Link to code - https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/tree/main/src/DSCEngine.sol

File: src/DecentralizedStableCoin.sol
24: pragma solidity ^0.8.18;

Link to code - https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/tree/main/src/DecentralizedStableCoin.sol

Tools Used

Manual inspection

Recommendations

Consider moving to Solidity 0.8.19 or later

Support

FAQs

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