Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small improvements to the config resolution of EDR networks #5865

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

alcuadrado
Copy link
Member

This is a small PR to that I put in place to be able to enable forking in EDR networks. It is not complete, though.

It does just a few things:

  1. Changes the EDR network config resolution so that chainType can be left undefined, as that's important to be able to change them during connection.
  2. Resolved the chainType during connection.
  3. Added the forkConfig to the resolved network config, without any actual resolution.
  4. Sparkled some TODOs.

The reason this PR is important is that optimism needs to be tested in forked mode.

@alcuadrado alcuadrado requested a review from schaable October 27, 2024 21:22
Copy link

changeset-bot bot commented Oct 27, 2024

⚠️ No Changeset found

Latest commit: 86b9c58

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

Copy link

vercel bot commented Oct 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hardhat ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 28, 2024 6:41pm

@github-actions github-actions bot added the status:ready This issue is ready to be worked on label Oct 27, 2024
@alcuadrado alcuadrado added the v-next A Hardhat v3 development task label Oct 27, 2024
@@ -158,7 +158,7 @@ export class EdrProvider extends EventEmitter implements EthereumProvider {
const provider = await context.createProvider(
config.chainType === "optimism"
? OPTIMISM_CHAIN_TYPE
: GENERIC_CHAIN_TYPE,
: GENERIC_CHAIN_TYPE, // TODO: l1 is missing here
Copy link
Member

@schaable schaable Oct 28, 2024

Choose a reason for hiding this comment

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

what's the difference in EDR between generic and l1? are there l1-specific rpc methods or config?

@@ -143,8 +143,26 @@ export class NetworkManagerImplementation {
);

if (resolvedNetworkConfig.type === "edr") {
if (
resolvedChainType !== "optimism" &&
Copy link
Member

Choose a reason for hiding this comment

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

Not to be resolved in this PR, but I'm starting to think that all these keywords need to be constants.

@alcuadrado alcuadrado force-pushed the fix-automatic-sender branch from 07b9706 to 8328d37 Compare October 28, 2024 18:37
Base automatically changed from fix-automatic-sender to v-next October 28, 2024 18:42
@alcuadrado alcuadrado added this pull request to the merge queue Oct 28, 2024
Merged via the queue into v-next with commit 0969184 Oct 28, 2024
45 checks passed
@alcuadrado alcuadrado deleted the edr-config-changes branch October 28, 2024 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready This issue is ready to be worked on v-next A Hardhat v3 development task
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants