Omniscia BlazeSwap Audit

TransferHelper Code Style Findings

TransferHelper Code Style Findings

THR-01C: Redundant Usage of Value Literals

Description:

The linked value literals are meant to represent the bytes4 selector of particular EIP-20 functions and are declared as hexadecimal literals with the selector commented above them.

Example:

contracts/shared/libraries/TransferHelper.sol
11// bytes4(keccak256(bytes('approve(address,uint256)')));
12(bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));

Recommendation:

We advise the actual selector declaration style to be utilized instead whereby a particular interface (in this case IERC20) can be imported and its selectors defined in the code as such - IERC20.approve.selector.

Alleviation:

The BlazeSwap team considered this exhibit but opted not to apply a remediation for it as they have stated they will not remediate any issues of minor severity and below.