Closed zajck closed 2 years ago
The linked local variable declarations can be substituted with a contract-level constant.
constant
uint256 _complainPeriod = 7 * 1 days; uint256 _cancelFaultPeriod = 7 * 1 days; complainPeriod = _complainPeriod; cancelFaultPeriod = _cancelFaultPeriod; emit LogComplainPeriodChanged(_complainPeriod, msg.sender); emit LogCancelFaultPeriodChanged(_cancelFaultPeriod, msg.sender);
We advise one to be declared to optimize the gas cost of the contract's construction.
VKL-01S: Redundant Local Variable Declaration
Description:
The linked local variable declarations can be substituted with a contract-level
constant
.Example:
Recommendation:
We advise one to be declared to optimize the gas cost of the contract's construction.