Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/foundry-rs/hardhat-foundry-template

Minimal template to get started with Foundry + Hardhat
https://github.com/foundry-rs/hardhat-foundry-template

Last synced: 2 months ago
JSON representation

Minimal template to get started with Foundry + Hardhat

Lists

README

        

#

Hardhat x Foundry Template

**Template repository for getting started quickly with Hardhat and Foundry in one project**

![Github Actions](https://github.com/devanonon/hardhat-foundry-template/workflows/test/badge.svg)

### Getting Started

* Use Foundry:
```bash
forge install
forge test
```

* Use Hardhat:
```bash
npm install
npx hardhat test
```

### Features

* Write / run tests with either Hardhat or Foundry:
```bash
forge test
# or
npx hardhat test
```

* Use Hardhat's task framework
```bash
npx hardhat example
```

* Install libraries with Foundry which work with Hardhat.
```bash
forge install rari-capital/solmate # Already in this repo, just an example
```

### Notes

Whenever you install new libraries using Foundry, make sure to update your `remappings.txt` file by running `forge remappings > remappings.txt`. This is required because we use `hardhat-preprocessor` and the `remappings.txt` file to allow Hardhat to resolve libraries you install with Foundry.