We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getTimeout()
Gas Optimization / Informational
https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/main/src/libraries/OracleLib.sol#L35
The getTimeout() function in the OracleLib contract is currently marked as public, although it could be marked as external to optimize gas usage.
public
external
Manual review
Consider changing the visibility of the getTimeout() function to external to save gas when the function is called from outside the contract:
function getTimeout(AggregatorV3Interface /* chainlinkFeed */ ) external pure returns (uint256) { return TIMEOUT; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Unnecessary public visibility in
getTimeout()
Severity
Gas Optimization / Informational
Relevant GitHub Links
https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/main/src/libraries/OracleLib.sol#L35
Summary
The
getTimeout()
function in the OracleLib contract is currently marked aspublic
, although it could be marked asexternal
to optimize gas usage.Tools Used
Manual review
Recommendations
Consider changing the visibility of the
getTimeout()
function toexternal
to save gas when the function is called from outside the contract:The text was updated successfully, but these errors were encountered: