crytic / crytic/crytic-compile
Support for Hardhat projects with Yarn PnP
- Dominant language
- Python
- Stars
- 197
- Forks
- 97
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the desired feature
Yarn version 2 and above are quickly becoming industry standard due to the optimal way of package management. Especially with PnP mode of dependencies, there are no more `node_modules` folders. This is specifically a problem for hardhat projects as `slither` is attempting to read dependency source code from `node_modules` which no longer exists.
Hardhat already supports PnP, hence it would be ideal if slither can also load dependencies from the set locations (by reading pnp.cjs files), or load the js environment and then read the package location. Given if someone is using hardhat, its safe to assume node will be available and can be loaded
Contributor guide
Research direction
Start by tracing how Hardhat dependency source locations are resolved and where the project currently assumes node_modules exists. Investigate the pnp.cjs locations or JavaScript environment described in the issue; done means Hardhat projects using Yarn PnP can load dependency source code without node_modules.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, python
- Domain
- build-system, devtools, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100