No need of both fallback & receive if calldata is not used
Low/Info issue submitted by Shield
Summary
No need of both fallback & receive if calldata is not used
Vulnerability Detail
In FaultDisputeGame there are both fallback & receive present and fallback does not take any calldata param as input hence the code size can be reduced by removing either of the two methods
Impact
having a large codesize increases deployment costs
No need of both
fallback
&receive
if calldata is not usedLow/Info issue submitted by Shield
Summary
No need of both
fallback
&receive
if calldata is not usedVulnerability Detail
In
FaultDisputeGame
there are bothfallback
&receive
present andfallback
does not take any calldata param as input hence the code size can be reduced by removing either of the two methodsImpact
having a large codesize increases deployment costs
Code Snippet
https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/src/dispute/FaultDisputeGame.sol#L132-L135
Tool used
Manual Review
Recommendation
removing either the
fallback
orreceive
method