Omniscia Hot Cross Audit
ManagerControl Code Style Findings
ManagerControl Code Style Findings
MCO-01C: Potential Data Location Optimization
Type | Severity | Location |
---|---|---|
Gas Optimization | Informational | ManagerControl.sol:L20 |
Description:
If the __ManagerControl_init
function is meant to be passed arguments by externally facing functions, it is possible to optimize the data location of its input argument to calldata
.
Example:
contracts/utils/ManagerControl.sol
20function __ManagerControl_init(address[] memory managers) public initializer {
Recommendation:
We advise it to be done so if deemed applicable.
Alleviation:
The relevant function had its argument set from memory
to calldata
given that it is solely passed data from external
functions.
MCO-02C: Redundant Visibility Specifier
Type | Severity | Location |
---|---|---|
Gas Optimization | Informational | ManagerControl.sol:L8, L9 |
Description:
The ADMIN_ROLE
and MANAGER_ROLE
variables are contract-level constant
s declared as public
.
Example:
contracts/utils/ManagerControl.sol
8bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");9bytes32 public constant MANAGER_ROLE = keccak256("MANAGER_ROLE");
Recommendation:
We advise their visibility specifiers to be adjusted to either private
or internal
to optimize the contract's bytecode.
Alleviation:
Both variables were set to private
thus preventing unnecessary bytecode from being generated.