Omniscia 0xPhase Audit

TreasuryV1 Code Style Findings

TreasuryV1 Code Style Findings

TV1-01C: Redundant Duplicate Application of Access Control

TypeSeverityLocation
Gas OptimizationTreasuryV1.sol:L34, L127

Description:

The MANAGER_ROLE based access control is applied in both instances of the TreasuryV1::spend function.

Example:

treasury/TreasuryV1.sol
28/// @inheritdoc ITreasury
29function spend(
30 string memory cause,
31 address token,
32 uint256 amount,
33 address to
34) external override onlyRole(MANAGER_ROLE) {
35 spend(keccak256(bytes(cause)), token, amount, to);
36}

Recommendation:

We advise the modifier to be safely removed from the parent TreasuryV1::spend function, optimizing the application of access control within TreasuryV1.

Alleviation (3dd3d7bf0c2693b2f9c23bacedfa420393f7ea84):

The redundant application of access control has been safely omitted as advised.