Omniscia AllianceBlock Audit
FeeCalculatorFacet Code Style Findings
FeeCalculatorFacet Code Style Findings
FCF-01C: Non-Standard Invocation of Libraries
Type | Severity | Location |
---|---|---|
Code Style | ![]() | FeeCalculatorFacet.sol:L75, L77 |
Description:
The referenced statements represent library
function invocations without an inferred argument.
Example:
contracts/facets/FeeCalculatorFacet.sol
75require(LibGovernance.isMember(msg.sender), "Governance: msg.sender is not a member");76
77uint256 claimableAmount = LibFeeCalculator.claimReward(msg.sender);
Recommendation:
We advise using LibGovernance for address
and using LibFeeCalculator for address
statements to be introduced to the contract, permitting the LibGovernance::isMember
and LibFeeCalculator::claimReward
functions respectively to be invoked on the msg.sender
argument directly (i.e. msg.sender.isMember()
).
Alleviation (54fd570de24631ca65a7cea022aebe43225a08c7):
The non-standard invocation style has been addressed as advised.
FCF-02C: Redundant Parenthesis Statement
Type | Severity | Location |
---|---|---|
Code Style | ![]() | FeeCalculatorFacet.sol:L19 |
Description:
The referenced statement is redundantly wrapped in parenthesis (()
).
Example:
contracts/facets/FeeCalculatorFacet.sol
19(LibFeeCalculator.feeCalculatorStorage().serviceFee) = abi.decode(data_, (uint256));
Recommendation:
We advise them to be safely omitted, increasing the legibility of the codebase.
Alleviation (54fd570de24631ca65a7cea022aebe43225a08c7):
The redundant parenthesis in the referenced statement have been safely omitted.