Omniscia Evergon Labs Audit
FractionERC20Factory Code Style Findings
FractionERC20Factory Code Style Findings
FER-01C: Redundant Import of Implementation
| Type | Severity | Location |
|---|---|---|
| Code Style | ![]() | FractionERC20Factory.sol:L5, L33, L38 |
Description:
The FractionERC20Factory will import the full FractionERC20DataManager implementation yet utilize it as an interface.
Example:
contracts/dataManagers/fractionalizers/FractionERC20Factory.sol
22/// @inheritdoc FractionFactory23function _initializeFraction(24 address dm,25 bytes32 dp,26 uint256 nftId,27 string memory name,28 string memory symbol,29 uint256 mintAmount,30 address mintBeneficiary,31 address wrapper32) internal override {33 FractionERC20DataManager(dm).initialize(dp, mintBeneficiary, wrapper, _dataIndex, _fractionDO, name, symbol, nftId, mintAmount);34}35
36/// @inheritdoc FractionFactory37function _tranferFractionOwnership(address dm, address newOwner) internal override {38 FractionERC20DataManager(dm).transferOwnership(newOwner);39}Recommendation:
We advise an interface to be utilized for each function invoked, optimizing the code's syntax and potentially its generated bytecode.
Alleviation (c6b23c23d8bcd8cce85049ad959cbd711a37126b):
A proper interface was introduced for the relevant contract and is now imported, addressing this exhibit.
