Skip to content

Conversation

@fvictorio
Copy link
Contributor

This fixes #7795, but I'm not fully convinced about the change.

The problem is that we are always setting the type of default network to be a simulated network, and we also set some other default values. This makes sense, but it does seem to assume that the network is not of type http. My concern is that a user's settings could interact in the wrong way with those default values.

On the other hand, without this change there's no way to have an http network as the default network, something that was possible in HH2.

One alternative here is to re-introduce the defaultNetwork config, and default it to "default" (yes).

Another alternative is to only use those default values if the user doesn't change the type, but that starts feeling a bit too complex.

@changeset-bot
Copy link

changeset-bot bot commented Dec 17, 2025

⚠️ No Changeset found

Latest commit: 30241c0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@kanej kanej requested a review from alcuadrado December 18, 2025 15:13
@kanej kanej removed the request for review from alcuadrado January 14, 2026 15:53
@kanej kanej marked this pull request as ready for review January 14, 2026 15:53
@kanej kanej added the no docs needed This PR doesn't require links to documentation label Jan 14, 2026
@kanej
Copy link
Member

kanej commented Jan 14, 2026

We should double check running tests against a npx hardhat node instance, and add a changeset.
But in principle we are happy with this approach to let users set default to an http network.

Copy link
Contributor

@michalbrabec michalbrabec left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overriding the default network creates the need to setup a new network for npx hardhat node and then used it with the --network parameter.
#7795 (comment)

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.

Configuration for default network is ignored

3 participants