Skip to content

JohnGuilding/foundry-with-hardhat

Repository files navigation

Foundry with Hardhat Template

This repository provides a template for contract development with Foundry and Hardhat.

Getting started

Use Foundry:

forge install
forge test

Use Hardhat:

npm install
npx hardhat test

Install libraries with Foundry which work with Hardhat.

forge install rari-capital/solmate

Test

Write / run tests with either Hardhat or Foundry:

forge test
# or
npx hardhat test

Compile

forge build
# or
npx hardhat compile

Run a local node

anvil
# or
npx hardhat node

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published