@nomicfoundation/hardhat-foundry
Version:
Hardhat plugin that provides compatibility with Foundry-based projects remappings.
33 lines (20 loc) • 1.16 kB
Markdown
This plugin provides compatibility between Hardhat and Foundry-based projects by automatically loading Solidity remappings generated by `forge`, including those installed with npm.
This plugin is intended to be used when your project or your dependencies depend on remappings generated by Foundry, instead of declaring them in a `remappings.txt` file.
First, you need to make sure you have installed Foundry by following the [Foundry installation guide](https://getfoundry.sh/introduction/installation/).
Then, install the plugin by running the following command:
```bash
npm install --save-dev @nomicfoundation/hardhat-foundry
```
In your `hardhat.config.ts` file, import the plugin and add it to the `plugins` array:
```typescript
import { defineConfig } from "hardhat/config";
import hardhatFoundry from "@nomicfoundation/hardhat-foundry";
export default defineConfig({
plugins: [hardhatFoundry],
});
```
You only need to install the plugin and Hardhat will be able to resolve Solidity remappings for Foundry-based packages, including those installed with npm.