Closed sherlock-admin3 closed 1 month ago
Tame Plum Ram
Low/Info
OptimismPortal
L1CrossDomainMessenger
The protocol intends to use OptimismPortal2 in their codebase which is in-scope, however L1CrossDomainMessenger imports OptimismPortal instead.
OptimismPortal2
import { OptimismPortal } from "src/L1/OptimismPortal.sol";
Incorrect import, but since it is used as an interface, the logic will still work from the deployed OptimismPortal2 contract.
https://github.com/sherlock-audit/2024-08-tokamak-network/blob/main/tokamak-thanos/packages/tokamak/contracts-bedrock/src/L1/L1CrossDomainMessenger.sol#L7
Manual Review
Import OptimismPortal2 in L1CrossDomainMessenger
- import { OptimismPortal } from "src/L1/OptimismPortal.sol"; + import { OptimismPortal2 } from "src/L1/OptimismPortal2.sol";
Tame Plum Ram
Low/Info
Incorrect
OptimismPortal
file being imported inL1CrossDomainMessenger
Summary
The protocol intends to use
OptimismPortal2
in their codebase which is in-scope, howeverL1CrossDomainMessenger
importsOptimismPortal
instead.Vulnerability Detail
The protocol intends to use
OptimismPortal2
in their codebase which is in-scope, howeverL1CrossDomainMessenger
importsOptimismPortal
instead.Impact
Incorrect import, but since it is used as an interface, the logic will still work from the deployed
OptimismPortal2
contract.Code Snippet
https://github.com/sherlock-audit/2024-08-tokamak-network/blob/main/tokamak-thanos/packages/tokamak/contracts-bedrock/src/L1/L1CrossDomainMessenger.sol#L7
Tool used
Manual Review
Recommendation
Import
OptimismPortal2
inL1CrossDomainMessenger