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 lintwith trigger both Solhint and Prettier runs)
-
Create a new GitHub project using this template.
-
Navigate to the
srcfolder and runnpm install. -
All commands, both for Hardhat and Forge, are encapsulated via NPM. For example, running
npm run testwill execute bothhardhat testandforge testscommands. This means you should avoid running Hardhat or Forge commands directly. If you find it necessary to update the commands, please modify thepackage.jsonwith the new set of commands. To view the available scripts, refer to thepackage.jsonfile. -
The
/testdirectory may contain both Forge and Hardhat types of tests. -
The
/utilsdirectory currently contains a generic TypeScript script that can be used for deploying various Smart Contracts. An example of usage can be found inmain.tsunder the/scriptsdirectory. -
The
/.githubdirectory contains both workflow definitions for GitHub Actions and adependabot.ymlfile with configuration for Dependabot, which automatically opens pull requests to keep your project's dependencies up to date.