Hardhat Ignition configuration
Hardhat Ignition has configuration options at both the global and network level.
Configuration options
Section titled “Configuration options”You can use the ignition field in the Hardhat config to customize how Hardhat Ignition behaves:
export default { ignition: { blockPollingInterval: 1_000, timeBeforeBumpingFees: 3 * 60 * 1_000, maxFeeBumps: 4, requiredConfirmations: 5, disableFeeBumping: false, },};These are the different options you can add to your Hardhat config file.
blockPollingInterval
Section titled “blockPollingInterval”The time in milliseconds that Hardhat Ignition will wait between checks that a new block has been minted.
Default value: 1_000 (1 second)
timeBeforeBumpingFees
Section titled “timeBeforeBumpingFees”The time in milliseconds to wait before bumping the fee for an unconfirmed transaction.
Default value: 180_000 (3 minutes)
maxFeeBumps
Section titled “maxFeeBumps”The number of times an unconfirmed transaction will have its fee bumped before Hardhat Ignition considers it timed out.
Default value: 4
requiredConfirmations
Section titled “requiredConfirmations”The number of confirmations Hardhat Ignition waits before considering a transaction as complete. This provides control over block re-org risk.
Default value: 5
disableFeeBumping
Section titled “disableFeeBumping”If set to true, Hardhat Ignition will not bump the fee for unconfirmed transactions. Overrides the disableFeeBumping option in the network configuration.
Default value: false
explorerUrl
Section titled “explorerUrl”The default block explorer to use.
Default value: undefined
Network configuration options
Section titled “Network configuration options”You can use the ignition field under specific network configurations to customize deployments on a per-network basis:
export default { networks: { sepolia: { // ... ignition: { maxFeePerGasLimit: 50_000_000_000n, // 50 gwei maxFeePerGas: 20_000_000_000n, // 20 gwei maxPriorityFeePerGas: 2_000_000_000n, // 2 gwei gasPrice: 50_000_000_000n, // 50 gwei disableFeeBumping: false, explorerUrl: "https://sepolia.etherscan.io", }, // ... }, },};These are the different options you can add to the per-network ignition config.
maxFeePerGasLimit
Section titled “maxFeePerGasLimit”If set, places a limit on the maximum fee per gas that Hardhat Ignition will allow when sending transactions. If Hardhat Ignition’s calculated max fee per gas is higher than the limit, the deployment will be stopped with an error. This is useful for preventing accidental high fees during busy periods.
Default value: undefined
maxFeePerGas
Section titled “maxFeePerGas”The maximum fee per gas, in wei, that Hardhat Ignition will use when sending transactions. If not set then Hardhat Ignition will try to use the base fee from the latest block instead.
Default value: undefined
maxPriorityFeePerGas
Section titled “maxPriorityFeePerGas”The maximum priority fee per gas, in wei, that Hardhat Ignition will use for gas fee calculations when sending transactions. If not set then Hardhat Ignition will try to use eth_maxPriorityFeePerGas if available, or default to 1 gwei.
Default value: undefined
gasPrice
Section titled “gasPrice”The gas price, in wei, that Hardhat Ignition will use for gas fee calculations when sending transactions. This field only applies to deployments on the Polygon network. It will not be used on other networks even if set.
Default value: undefined
disableFeeBumping
Section titled “disableFeeBumping”If set to true, Hardhat Ignition will not bump the fee for unconfirmed transactions on this network. Is overridden by the top-level disableFeeBumping option.
Default value: false
explorerUrl
Section titled “explorerUrl”The default block explorer to use.
Default value: undefined