isAllowedToken modifier should be inline with function depositCollateral , because it is used only in this function by inlining this modifier we can save gas
tokenAddresses.length (line 118 of DSCEngine.sol) , this line must be catch in local variable to save gas
isAllowedToken modifier should be inline with code to save gas
Severity
Gas Optimization / Informational
Relevant GitHub Links
https://github.com/Cyfrin/2023-07-foundry-defi-stablecoin/blob/main/src/DSCEngine.sol#L102
isAllowedToken modifier should be inline with function depositCollateral , because it is used only in this function by inlining this modifier we can save gas
tokenAddresses.length (line 118 of DSCEngine.sol) , this line must be catch in local variable to save gas