Closed chasebrownn closed 5 months ago
The linked variables are assigned to only once during the contract's constructor.
constructor
ISwapRouter public swapRouter; IWETH public WETH; constructor(address _router, address _weth) { swapRouter = ISwapRouter(_router); WETH = IWETH(_weth); }
We advise them to be set as immutable greatly optimizing their read-access gas cost.
immutable
Resolved
EIW-01C: Variable Mutability Specifiers (Immutable)
Description:
The linked variables are assigned to only once during the contract's
constructor
.Example:
Recommendation:
We advise them to be set as
immutable
greatly optimizing their read-access gas cost.