Template repository for getting started quickly with Foundry projects
Click "Use this template" on GitHub to create a new repository with this repo as the initial state.
Or, if your repo already exists, run:
forge init
forge build
forge test
All you need is to import "@test/utils/TestEnv.sol"
and then inherit it from your test contract. The custom test env includes a variety of useful tools and libaries that can be utilized. The tests in this repo follow the naming convention of:
Contract.b.sol
: Is the base test class for the contract, allows users to define things required for all tests.Contract.t.sol
: Is the concrete test class for the contract, define your non-fuzz tests here.Contract.tf.sol
: Is the fuzz test class for the contract, define your fuzz tests here.
This project uses Foundry. See the book for instructions on how to install and use Foundry.
- forge-template by the Foundry team.