Skip to content

Select compile framework for projects having both hardhat and foundry #1414

Open
@brozorec

Description

@brozorec

Describe the desired feature

I work on a project with both foundry and hardhat configs. When running slither . the compile platform defaults to hardhat while I wanted it to use forge build. There's no reference to how to switch the platform in this repo's wiki. After digging in the code, I found the option --compile-force-framework (compile_force_framework) and eventually saw it also in "crytic-compile" wiki. I believe some piece of documentation is missing about faundry and the presented case in particular.

Posting here so that it can serve other people:

  • from cli
slither . --compile-force-framework=foundry
  • from "slither.config.json"
{
  ...
  "compile_force_framework": "foundry",
  ...
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions