Omniscia Mitosis Audit

CCDMHost Code Style Findings

CCDMHost Code Style Findings

CCD-01C: Generic Typographic Mistakes

TypeSeverityLocation
Code StyleCCDMHost.sol:L26, L27, L28

Description:

The referenced lines contain typographical mistakes (i.e. private variable without an underscore prefix) or generic documentational errors (i.e. copy-paste) that should be corrected.

Example:

src/helpers/ccdm/CCDMHost.sol
26FeeInfo _fee;

Recommendation:

We advise them to be corrected enhancing the legibility of the codebase.

Alleviation (58e8cc66dfa900c03c47df78f5170d9960005629):

All referenced variables have been renamed accordingly, omitting their underscore prefix for the sake of legibility as they do not constitute actual private / internal variables.

CCD-02C: Non-Standard Library Usage

Description:

The referenced statements will utilize the SafeERC20 library directly instead of via its using SafeERC20 for IERC20 syntax.

Example:

src/helpers/ccdm/CCDMHost.sol
104SafeERC20.safeTransferFrom(IERC20(token), _msgSender(), address(this), amount);

Recommendation:

We advise the code to instead employ the syntax aforementioned, optimizing the legibility of the code greatly.

Alleviation (58e8cc66dfa900c03c47df78f5170d9960005629):

The SafeERC20 library is now utilized properly throughout the contract, addressing this exhibit.

CCD-03C: Suboptimal Struct Declaration Styles

TypeSeverityLocation
Code StyleCCDMHost.sol:L64, L78, L116

Description:

The linked declaration styles of the referenced structs are using index-based argument initialization.

Example:

src/helpers/ccdm/CCDMHost.sol
64bytes memory enc = Message.encodeDeposit(MsgDeposit(receiver.toBytes32(), token.toBytes32(), amount));

Recommendation:

We advise the key-value declaration format to be utilized instead in each instance, greatly increasing the legibility of the codebase.

Alleviation (58e8cc66dfa900c03c47df78f5170d9960005629):

This exhibit has been partially alleviated as the key-value declaration style is solely utilized in one of the three instances.