This repository offers a variety of examples demonstrating how to use Ignition.
To set up the repository, clone it to your local machine and then run the following command:
npm install
Ignition deployments rely on a modular approach. Each module specifies one or more related actions that Ignition will execute to deploy a set of contracts.
The following examples are part of this repository. It's recommended to go through them sequentially for better understanding:
-
Basic Contract Deployments
-
Deployment with Initialization
-
Factory-Deployed Contract
-
Contract Using a Library
-
Contract Capable of Receiving ETH
-
Using submodules
You can individually deploy each module by running the following command:
npx hardhat deploy ./ignition/<module_name>.js
Note: Deployments made using Hardhat Network's in-process version will not be stored persistently.
To persist your deployment data, utilize a separate network instance. For example, run npx hardhat node
in one terminal, and execute deployments with --network localhost
in another.
Ignition modules are compatible with Hardhat tests.
To execute Hardhat tests using Ignition, run:
npm run test
To learn more about how to use Ignition, please read the docs/
section in its repository.
If you want need help using Ignition, you can join #hardhat-ignition
our Discord server.