This document contains some tips on how to collaborate in this project.
If you find a bug or want to propose a new feature, please open an issue. Pull requests are welcome, but we recommend you discuss it in an issue first, especially for big changes. This will increase the odds that we can accept your PR.
This repository is a monorepo handled with pnpm
workspaces.
There are five packages:
- core - containing the ignition library for orchestrating deployments
- hardhat-plugin - containing the Hardhat plugin wrapper for the core library
- hardhat-plugin-ethers - containing the Hardhat plugin extension to add ethers support to hardhat-plugin
- hardhat-plugin-viem - containing the Hardhat plugin extension to add viem support to hardhat-plugin
- ui - containing the UI for the visualize report
Ignition is a typescript
project managed by pnpm
.
To install the dependencies, run pnpm
in the project root:
pnpm install
The packages are written in typescript
and so require a build step, to build:
pnpm build
The Hardhat plugin depends on core, while developing you may want to run a continuous build with watch
:
pnpm watch
The test suite is written in mocha
, to run:
pnpm test
Formatting is enforced with prettier
and code rules with eslint
, to run both:
pnpm lint
If typescript or testing gets into a weird state, clean
will remove ephemeral folders (i.e. ./dist
, ./coverage
etc) and clear the typescript build info cache, allowing you to start from a clean slate:
pnpm clean
We work on two branches, main and development.
The development branch is the default branch. It's where we merge all pull requests and is the branch that all contributing PRs should be based on.
The main branch is meant to be kept in sync with the latest released version of each package. It's where we publish new releases from, and should only be merged into when a new release is being made.
Ignition's documentation lives inside the main Hardhat repo. If your change requires a documentation change, please submit a separate PR to the Hardhat repo, following their contributing guidelines, and link to it from your PR.
If you are working purely on the documentation, not as a result of a technical change, you should submit a PR to the Hardhat repo directly.
To publish ignition:
- git fetch, Checkout out
development
, then ensure your branch is up to dategit pull --ff-only
- Perform a clean install and build (will lose all uncommitted changes):
git clean -fdx .
pnpm install
pnpm build
- Run a full check, stopping on failure:
pnpm fullcheck
- Confirm the commits represent the features for the release
- Create a release branch
git checkout -b release/yyyy-mm-dd
- Update the
CHANGELOG.md
under./packages/core
. - Update the
CHANGELOG.md
under./packages/hardhat-plugin
. - Update the
CHANGELOG.md
under./packages/hardhat-plugin-ethers
. - Update the
CHANGELOG.md
under./packages/hardhat-plugin-viem
. - Update the
CHANGELOG.md
under./packages/ui
. - Update the package versions based on semver (manually) - versions are kept in sync across our packages.
- Commit the version update
git commit
:
chore: bump version to vX.X.X
Update the packages versions and changelogs for the `X.X.X -
yyyy-mm-dd` release.
- Push the release branch and open a pull request on
main
, the PR description should match the changelogs - On a successful check,
rebase merge
the release branch intomain
- Switch to
main
branch and pull the latest changes - Git tag the version,
g tag -a v0.x.x -m "v0.x.x"
and push the taggit push --follow-tags
- Publish all workspace packages:
pnpm -r publish --no-git-checks
- Create a release on github off of the pushed tag, the release notes should match the changelogs followed by a hiring entry:
---
> 💡 **The Nomic Foundation is hiring! Check [our open positions](https://www.nomic.foundation/jobs).**
---
- Switch to
development
branch and rebase it onmain
to include the new release. Push the rebaseddevelopment
branch
To knock off the rough edges
Setup ignition in a new hardhat project based on the getting started guide.
Run a deploy with a module that doesn't exist
Check that a sensible error message is displayed
Setup ignition in a new hardhat project based on the getting started guide.
Tweak the module so that it has a problem that will be caught by validation (ADD_MORE_DETAILS_HERE).
Run a deploy with a invalid module
Check that a sensible error message is displayed
Ensure you have an infura/alchemy RPC endpoint set up for Sepolia as well as an ETH address with Sepolia ETH that you don't mind pasting the privkey in plaintext for. I used metamask
Setup the network settings in the hardhat.config.js
of the example you want to test
Run a deploy/test from the example directory you set up
Check that deployment was successful, or results match expected (for instance, on-hold for multisig)