Closed 0xfornax closed 1 year ago
The linked variable is assigned to only once during the contract's constructor.
constructor
constructor( address _vesselManagerAddress, address _stabilityPoolAddress, address _borrowerOperationsAddress, address _timelockAddress ) ERC20("GRAI", "GRAI") { vesselManagerAddress = _vesselManagerAddress; timelockAddress = _timelockAddress; stabilityPool = IStabilityPool(_stabilityPoolAddress); borrowerOperationsAddress = _borrowerOperationsAddress; }
We advise it to be set as immutable greatly optimizing its read-access gas cost.
immutable
Fixed on commit 98b3df007b7dc32442df5a08216fb6c2f4cc1cdb ("Gas optimizations").
DTN-01C: Variable Mutability Specifier (Immutable)
Description:
The linked variable is assigned to only once during the contract's
constructor
.Example:
Recommendation:
We advise it to be set as
immutable
greatly optimizing its read-access gas cost.