Omniscia Alliance Block Audit
AutoStake Static Analysis Findings
AutoStake Static Analysis Findings
ASE-01S: State Mutability Optimization
Type | Severity | Location |
---|---|---|
Gas Optimization | Informational | AutoStake.sol:L45 |
Description:
The linked function can have its state mutability restricted to view
.
Example:
contracts/autostake-features/AutoStake.sol
45function onlyFactory(address sender) public {46 require(47 msg.sender == factory,48 "Caller is not the Factory contract"49 );50}
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
.