• Stars
    star
    189
  • Rank 198,093 (Top 5 %)
  • Language
    TypeScript
  • License
    Apache License 2.0
  • Created almost 2 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Minimal template to get started with Foundry + Hardhat

Hardhat x Foundry Template

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

Github Actions

Getting Started

  • Use Foundry:
forge install
forge test
  • Use Hardhat:
npm install
npx hardhat test

Features

  • Write / run tests with either Hardhat or Foundry:
forge test
#Β or
npx hardhat test
  • Use Hardhat's task framework
npx hardhat example
  • Install libraries with Foundry which work with Hardhat.
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.