Omniscia Alliance Block Audit
OneStakerFeature Static Analysis Findings
OneStakerFeature Static Analysis Findings
OSF-01S: State Mutability Optimization
| Type | Severity | Location |
|---|---|---|
| Gas Optimization | Informational | OneStakerFeature.sol:L17 |
Description:
The linked function can have its state mutability restricted to view.
Example:
contracts/pool-features/OneStakerFeature.sol
17function onlyStaker(address sender) public {18 require(msg.sender == staker, "onlyStaker::incorrect staker");19}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.