Omniscia Evergon Labs Audit
FractionERC1155Factory Code Style Findings
FractionERC1155Factory Code Style Findings
FEC-01C: Redundant Import of Implementation
| Type | Severity | Location |
|---|---|---|
| Code Style | ![]() | FractionERC1155Factory.sol:L5, L33, L38 |
Description:
The FractionERC1155Factory will import the full FractionERC1155DataManager implementation yet utilize it as an interface.
Example:
contracts/dataManagers/fractionalizers/FractionERC1155Factory.sol
12contract FractionERC1155Factory is FractionFactory {13 constructor(14 address lzEndpoint,15 address fractionImplementation_,16 address registry_,17 address dataIndex_,18 address fractionDO_,19 address wrapper_20 ) FractionFactory(lzEndpoint, fractionImplementation_, registry_, dataIndex_, fractionDO_, wrapper_) {}21
22 /// @inheritdoc FractionFactory23 function _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 FractionERC1155DataManager(dm).initialize(dp, mintBeneficiary, wrapper, _dataIndex, _fractionDO, name, symbol, nftId, mintAmount);34 }35
36 /// @inheritdoc FractionFactory37 function _tranferFractionOwnership(address dm, address newOwner) internal override {38 FractionERC1155Factory(dm).transferOwnership(newOwner);39 }40}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.
