Skip to content

CLI commands

The Hardhat Ignition CLI provides a set of commands to interact with the deployment process. The following is a list of available commands:

  • deploy: Deploy a module to the specified network
  • deployments: List all deployment IDs
  • migrate: Migrate artifacts to the new Hardhat 3 format
  • status: Show the current status of a deployment
  • track-tx: Track a transaction that is missing from a given deployment. Only use if a Hardhat Ignition error message suggests to do so.
  • transactions: Show all transactions for a given deployment
  • verify: Verify contracts from a deployment against the configured block explorers
  • visualize: Visualize a module as an HTML report
  • wipe: Reset a deployment’s future to allow rerunning

Deploy a module to the specified network

Usage: hardhat [GLOBAL OPTIONS] ignition deploy [--default-sender <STRING_WITHOUT_DEFAULT>] [--deployment-id <STRING_WITHOUT_DEFAULT>] [--parameters <FILE_WITHOUT_DEFAULT>] [--reset] [--strategy <STRING>] [--verify] [--write-localhost-deployment] [--] modulePath
OPTIONS:
--default-sender Set the default sender for the deployment
--deployment-id Set the id of the deployment
--parameters A relative path to a JSON file to use for the module parameters
--reset Wipes the existing deployment state before deploying (default: false)
--strategy Set the deployment strategy to use (default: basic)
--verify Verify the deployment on Etherscan (default: false)
--write-localhost-deployment Write deployment information to disk when deploying to the in-memory network (default: false)
POSITIONAL ARGUMENTS:
modulePath The path to the module file to deploy

List all deployment IDs

Usage: hardhat [GLOBAL OPTIONS] ignition deployments

Migrate artifacts to the new Hardhat 3 format

Usage: hardhat [GLOBAL OPTIONS] ignition migrate [--] deploymentId
POSITIONAL ARGUMENTS:
deploymentId The id of the deployment to migrate

Show the current status of a deployment

Usage: hardhat [GLOBAL OPTIONS] ignition status [--] deploymentId
POSITIONAL ARGUMENTS:
deploymentId The id of the deployment to show

Track a transaction that is missing from a given deployment. Only use if a Hardhat Ignition error message suggests to do so.

Usage: hardhat [GLOBAL OPTIONS] ignition track-tx [--] txHash deploymentId
POSITIONAL ARGUMENTS:
deploymentId The id of the deployment to add the tx to
txHash The hash of the transaction to track

Show all transactions for a given deployment

Usage: hardhat [GLOBAL OPTIONS] ignition transactions [--] deploymentId
POSITIONAL ARGUMENTS:
deploymentId The id of the deployment to show transactions for

Verify contracts from a deployment against the configured block explorers

Usage: hardhat [GLOBAL OPTIONS] ignition verify [--force] [--] deploymentId
OPTIONS:
--force Force verification (default: false)
POSITIONAL ARGUMENTS:
deploymentId The id of the deployment to verify

Visualize a module as an HTML report

Usage: hardhat [GLOBAL OPTIONS] ignition visualize [--no-open] [--] modulePath
OPTIONS:
--no-open Disables opening report in browser (default: false)
POSITIONAL ARGUMENTS:
modulePath The path to the module file to visualize

Reset a deployment’s future to allow rerunning

Usage: hardhat [GLOBAL OPTIONS] ignition wipe [--] deploymentId futureId
POSITIONAL ARGUMENTS:
deploymentId The id of the deployment with the future to wipe
futureId The id of the future to wipe