Omniscia Hot Cross Audit

FeeManager Code Style Findings

FeeManager Code Style Findings

FMR-01C: Data Location Optimization

TypeSeverityLocation
Gas OptimizationInformationalFeeManager.sol:L23-L34

Description:

The initialize function is meant to be invoked externally and is declared as public.

Example:

contracts/utils/FeeManager.sol
23function initialize(
24 address[] memory managers,
25 address feeCollector_,
26 uint256 mintFee_,
27 uint256 collectionFee_
28) public initializer {
29 __ManagerControl_init(managers);
30
31 _setFeeCollector(feeCollector_);
32 _setMintFee(mintFee_);
33 _setCollectionFee(collectionFee_);
34}

Recommendation:

We advise it to be set to external and its memory argument to be set as calldata, an optimization that can be bubbled down to the ManagerControl implementation.

Alleviation:

The function was properly set to external and had its memory argument set to calldata.