madlabman / foundry-hardhat-template

Minimal template to get started with Foundry + Hardhat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Foundry + Hardhat template

Getting Started

  • Use Foundry:
forge install
forge test
  • Use Hardhat:
yarn install
yarn test

Features

  • Write / run tests with either Hardhat or Foundry:
forge test
# or
yarn test
  • Install libraries with Foundry which work with Hardhat.
forge install rari-capital/solmate
  • Deploy to local fork via Hardhat.
anvil
npx hardhat run --network localhost scripts/deploy.ts

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

Minimal template to get started with Foundry + Hardhat

License:GNU General Public License v3.0


Languages

Language:TypeScript 75.9%Language:Solidity 24.1%