-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Problem
When OpenZeppelin is added using git submodules instead of the npm package, gemforge build triggers Hardhat to compile all .sol files inside the submodule, including:
certora/harnesses/lib/forge-std/- test mocks (
test/**) - non-existent patched imports
These folders contain verification harnesses and Foundry test utilities, which Hardhat cannot compile.
This results in errors such as:
- Error HHE902: The file .../certora/patched/governance/TimelockController.sol doesn't exist
- Error HHE902: The package "ds-test" is not installed
- Error HHE902: There was an error while resolving the import "truffle/Assert.sol"
Environment
- Gemforge version: 2.0.0
- Hardhat version: 3.0.16
- OpenZeppelin version: 4.9.2 (submodule)
- Node.js version: 23.5.0
- OS: macOS
How to reproduce
gemforge scaffold --hardhat --folder /path/to/new_or_empty_foldercd /path/to/new_or_empty_foldergemforge build
Workaround
I manually deleted the problematic folders inside the OpenZeppelin submodule:
- rm -rf lib/openzeppelin-contracts/test
- rm -rf lib/openzeppelin-contracts/lib
- rm -rf lib/openzeppelin-contracts/certora
Metadata
Metadata
Assignees
Labels
No labels