Omniscia Alliance Block Audit

OnlyExitFeature Code Style Findings

OnlyExitFeature Code Style Findings

OEF-01C: Unused Function Argument

TypeSeverityLocation
Code StyleInformationalOnlyExitFeature.sol:L9

Description:

The withdraw function override of OnlyExitFeature contains an unused _tokenAmount argument.

Example:

contracts/pool-features/OnlyExitFeature.sol
9function withdraw(uint256 _tokenAmount) public override virtual {
10 revert("OnlyExitFeature::cannot withdraw from this contract. Only exit.");
11}

Recommendation:

To silence the compiler issue, we advise that the function argument name is omitted safely either by commenting it out in a multi-line comment (/* _tokenAmount */) or by omitting it completely.

Alleviation:

A comment was introduced that states the function is not overridden if the argument does not exist, however, we advised the removal of its name and not of it as a whole i.e. function withdraw(uint256) public override virtual is equivalent to the current one in terms of inheritence.