Omniscia Alliance Block Audit

TreasuryOperated Static Analysis Findings

TreasuryOperated Static Analysis Findings

TOD-01S: State Mutability Optimization

TypeSeverityLocation
Gas OptimizationInformationalTreasuryOperated.sol:L20

Description:

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

Example:

contracts/TreasuryOperated.sol
20function onlyTreasury(address sender) public {
21 require(msg.sender == treasury, "OT::Not called by the treasury");
22}

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.