# hardhat-foundry

Description: Hardhat plugin that provides compatibility with Foundry-based projects' remappings
Npm package: https://www.npmjs.com/package/@nomicfoundation/hardhat-foundry
Source code: https://github.com/NomicFoundation/hardhat/tree/main/v-next/hardhat-foundry

This plugin provides compatibility between Hardhat and Foundry-based projects by automatically loading Solidity remappings generated by `forge`, including those installed with npm.

## When to use this plugin

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.

## Installation

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],
});
```

## Usage

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.
