Skip to content

Conversation

@siljapetasch
Copy link
Contributor

Summary

Fixes a bug where global hre.config.ignition settings (like requiredConfirmations, blockPollingInterval, etc.) are not propagated to ignition.deploy() when called from scripts.

Problem

The Ignition helper implementations (EthersIgnitionHelperImpl and ViemIgnitionHelperImpl) are instantiated without passing the global configuration from hre.config.ignition. This causes deployments to fall back to default values instead of respecting user configuration.

For example, setting requiredConfirmations: 1 in hardhat.config.ts has no effect, and deployments use the default value of 5, causing IGN403: WAITING_FOR_CONFIRMATIONS errors on networks with lazy mining.

Root Cause

The network hook handlers instantiate the helper implementations with only 3 arguments, omitting the optional 4th parameter config?: Partial<DeployConfig>:

  • v-next/hardhat-ignition-ethers/src/internal/hook-handlers/network.ts:24-27
  • v-next/hardhat-ignition-viem/src/internal/hook-handlers/network.ts:24-27

This leaves this.#config as undefined in the helper instances, so when the deploy() method merges configurations, only per-deployment config and defaults are used.

Solution

Pass context.config.ignition as the 4th parameter when instantiating both helper implementations. This ensures the global configuration is properly merged with per-deployment config, establishing the correct precedence:

defaultConfighre.config.ignition → per-deployment config

Changes

  • Modified v-next/hardhat-ignition-ethers/src/internal/hook-handlers/network.ts to pass context.config.ignition to EthersIgnitionHelperImpl constructor
  • Modified v-next/hardhat-ignition-viem/src/internal/hook-handlers/network.ts to pass context.config.ignition to ViemIgnitionHelperImpl constructor

Testing

Verified that:

  1. Global hre.config.ignition settings are now respected in ignition.deploy() calls
  2. Per-deployment config still takes precedence over global config
  3. The deploy task continues to work correctly (it was already working)

Related Issues

Fixes #7640

@changeset-bot
Copy link

changeset-bot bot commented Oct 30, 2025

🦋 Changeset detected

Latest commit: 46bb5f9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@nomicfoundation/hardhat-ignition-ethers Patch
@nomicfoundation/hardhat-ignition-viem Patch
@nomicfoundation/hardhat-ignition Patch
@nomicfoundation/ignition-core Patch
@nomicfoundation/ignition-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@zoeyTM zoeyTM self-requested a review November 3, 2025 07:54
@zoeyTM zoeyTM added this pull request to the merge queue Nov 3, 2025
Merged via the queue into NomicFoundation:main with commit b137d14 Nov 3, 2025
66 checks passed
@github-actions github-actions bot mentioned this pull request Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no docs needed This PR doesn't require links to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

hre.config.ignition settings not propagated to ignition.deploy() when called from scripts

4 participants