hardhat icon indicating copy to clipboard operation
hardhat copied to clipboard

[hardhat-foundry] Add support for configuring path to foundry.toml

Open NIC619 opened this issue 2 years ago • 4 comments

Describe the feature

We install our Foundry repo as submodule and use hardhat to deploy and run scripts (because we are still more used to hardhat scripts) but since it is installed as a submodule the foundry.toml file is not in the root folder. We have to copy the foundry.toml to root directory and modify src path in the copied foundry.toml so hardhat-foundry can read from it and compile. It would be helpful to be able to configure path of foundry folder in hardhat config so hardhat-foundry can fetch the foundry.toml file in the foundry folder and compile.

Search terms

hardhat-foundry

NIC619 avatar Feb 01 '23 04:02 NIC619

Makes sense!

We should probably add a config path llike:

paths: {
  // other paths
  foundry: "foundry/foundry.toml"
}

And then pass the config path to the Foundry commands we run.

I'm not sure if this will be enough, though, because maybe we also need to change the cwd or do something else. This will need some research.

fvictorio avatar Feb 22 '23 08:02 fvictorio

Thanks for taking a look at it!

NIC619 avatar Feb 23 '23 02:02 NIC619

this is exactly what I need

anajuliabit avatar Mar 07 '23 01:03 anajuliabit

👀

samthompsonkennedy avatar Mar 13 '24 09:03 samthompsonkennedy