Even though the likelihood is low, it's good practice to include checks for inputs that could cause unexpected behaviour within protocols; be it in constructors or initialization functions; especially those that could impact the protocol functionality upon deployment.
QA/Low report
Low/Info issue submitted by TheSeraphs
Summary: Missing 0 address check
Contract:
OptimismPortal2.sol
Vulnerability Detail
The initialize function is missing a
address(0)
check for all 3 main input contracts addresses.Impact
Even though the likelihood is low, it's good practice to include checks for inputs that could cause unexpected behaviour within protocols; be it in constructors or initialization functions; especially those that could impact the protocol functionality upon deployment.
Code snippet
https://github.com/sherlock-audit/2024-02-optimism-2024/blob/main/optimism/packages/contracts-bedrock/src/L1/OptimismPortal2.sol#L147C1-L162C6
Tool used
Manual Review
Recommendation: