This template utilizes set of various frameworks:
- Hardhat with TypeScript for compilation, deployments and tests
- Forge for tests (it is possible to write tests with both Hardhat and Forge)
- NPM used as a package manager
- GitHub Action are used for CI/CD pipelines
- Solhint and its integration with Prettier (
npm run lint
with trigger both Solhint and Prettier runs)
-
Create a new GitHub project using this template.
-
Navigate to the
src
folder and runnpm install
. -
All commands, both for Hardhat and Forge, are encapsulated via NPM. For example, running
npm run test
will execute bothhardhat test
andforge tests
commands. This means you should avoid running Hardhat or Forge commands directly. If you find it necessary to update the commands, please modify thepackage.json
with the new set of commands. To view the available scripts, refer to thepackage.json
file. -
The
/test
directory may contain both Forge and Hardhat types of tests. -
The
/utils
directory currently contains a generic TypeScript script that can be used for deploying various Smart Contracts. An example of usage can be found inmain.ts
under the/scripts
directory. -
The
/.github
directory contains both workflow definitions for GitHub Actions and adependabot.yml
file with configuration for Dependabot, which automatically opens pull requests to keep your project's dependencies up to date.