The DSCEngine.getAccountCollateralValue()
is already defined with a named return (returns (uint256 totalCollateralValueInUsd)
).
Therefore, there is no need to use the return totalCollateralValueInUsd;
statement in the end of the function since it will automatically return this parameter once the execution of the function is completed.
Save some gas by removing this return statement.
VSCode
Remove the following line of code:
https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/d1c5501aa79320ca0aeaa73f47f0dbc88c7b77e2/src/DSCEngine.sol#L358
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.