Omniscia Alliance Block Audit

StakeLock Static Analysis Findings

StakeLock Static Analysis Findings

SLK-01S: State Mutability Optimization

TypeSeverityLocation
Gas OptimizationInformationalStakeLock.sol:L14

Description:

The linked function can have its state mutability restricted to view.

Example:

contracts/StakeLock.sol
14function onlyUnlocked() public {
15 require(block.number > lockEndBlock, "onlyUnlocked::cannot perform this action until the end of the lock");
16}

Recommendation:

We advise it to be done so to optimize the gas cost involved in its execution.

Alleviation:

The state mutability of the function was properly set to view.