Cyfrin / 2023-07-foundry-defi-stablecoin

37 stars 32 forks source link

Functions not used internally could be marked external #1129

Closed codehawks-bot closed 1 year ago

codehawks-bot commented 1 year ago

Functions not used internally could be marked external

Severity

Gas Optimization / Informational

Relevant GitHub Links

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

Summary

Functions not used internally could be marked external

Vulnerability Details

Instances (1):

File: src/DecentralizedStableCoin.sol

46:     function burn(uint256 _amount) public override onlyOwner {

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

Tools Used

Code Review using VSCode

Recommendations

Mark the method as external that are not used internally

PatrickAlphaC commented 1 year ago

We'd have to change OZ imports to change visibility, I'm ok with not fixing this.