Run Wake in Foundry project with remappings
0xCLARITY opened this issue · 2 comments
0xCLARITY commented
Forgive me if I'm doing this wrong, but I'm running the following code:
wake detect all --remapping "remappings.txt"
However, even with specifying the remapping flag, I still get errors like this:
╭───────────────────────────────────────────────────────────────────────────────────────╮
│ ParserError: Source "solady/auth/OwnableRoles.sol" not found: File not found. │
│ Searched the following locations: "/Users/0xCLARITY/Documents/my-contracts/.", │
│ "/Users/0xCLARITY/Documents/my-contracts/node_modules", │
│ "/opt/homebrew/lib/python3.11/site-packages/wake/contracts". │
│ --> src/MyContract.sol:12:1: │
│ | │
│ 12 | import {OwnableRoles} from "solady/auth/OwnableRoles.sol"; │
│ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │
│ │
│ │
╰───────────────────────────────────────────────────────────────────────────────────────╯
What do I need to do to run wake detectors on my Foundry project?
michprev commented
Hello @0xCLARITY,
the easiest thing you can do is to run wake init config
. This will load Foundry remappings and create a Wake config file automatically.
The --remapping
flag expects a single remapping string (solady/=lib/solady/src/
for example).
0xCLARITY commented
Thanks - that worked!