NomicFoundation / hardhat

Hardhat is a development environment to compile, deploy, test, and debug your Ethereum software.
https://hardhat.org
Other
7.18k stars 1.38k forks source link

[hardhat-core] Validate network URLs after config resolution #3323

Open fvictorio opened 1 year ago

fvictorio commented 1 year ago

Our config validation uses the user config, and one of the validations is that all non-Hardhat networks have a URL.

This means that a plugin cannot add its own URL, because by the time the extendConfigs are executed, the user config has been already validated (see for example this)

The resolved config type will still need for the URLs to be mandatory, because we use that in some type guards to distinguish between the Hardhat network and other networks. So we'll probably need to use some dummy values during resolution, and then a post-validation step that checks that no URL has that dummy value.

Needs #3500

github-actions[bot] commented 1 year ago

This issue is also being tracked on Linear.

We use Linear to manage our development process, but we keep the conversations on Github.

LINEAR-ID: 3f1f3cfb-3f09-4461-bbf0-108d21d265f8

FabijanC commented 1 year ago

Is commenting enough to unstale this?

fvictorio commented 1 year ago

Thanks @FabijanC. I marked this as not stale. We are going to stop using that mechanism soon anyway.