optimism icon indicating copy to clipboard operation
optimism copied to clipboard

op-program: Bedrock contracts test setup fails due to incorrect Solady library mapping

Open BlocksOnAChain opened this issue 8 months ago • 2 comments

Spearbit audit finding

Description The ForkLive.s.sol file imports the Solady library with the following.

import { LibString } from "solady/src/utils/LibString.sol"; However, the Foundry remapping already accounts for the src directory. This makes compilation through forge build fail.

Recommendation

Fix the import in ForkLive.s.sol.

diff --git a/packages/contracts-bedrock/test/setup/ForkLive.s.sol b/packages/contracts-bedrock/test/setup/ForkLive.s.sol
index 40e9c94e3..7ac455bd5 100644
--- a/packages/contracts-bedrock/test/setup/ForkLive.s.sol
+++ b/packages/contracts-bedrock/test/setup/ForkLive.s.sol
@@ -14,7 +14,7 @@ import { Deploy } from "scripts/deploy/Deploy.s.sol";
 // Libraries
 import { GameTypes, Claim } from "src/dispute/lib/Types.sol";
 import { EIP1967Helper } from "test/mocks/EIP1967Helper.sol";
-import { LibString } from "solady/src/utils/LibString.sol";
+import { LibString } from "solady/utils/LibString.sol";
 
 // Interfaces
 import { IFaultDisputeGame } from "interfaces/dispute/IFaultDisputeGame.sol";

BlocksOnAChain avatar Apr 03 '25 16:04 BlocksOnAChain

@Inphi - can you check if the PR above(https://github.com/ethereum-optimism/optimism/pull/15249) is the only thing we need to close this issue?

BlocksOnAChain avatar Apr 10 '25 14:04 BlocksOnAChain

Can i work on this ?

Himess avatar Dec 06 '25 12:12 Himess