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

Network Manager improvements #6014

Open
31 tasks
schaable opened this issue Dec 3, 2024 · 0 comments
Open
31 tasks

Network Manager improvements #6014

schaable opened this issue Dec 3, 2024 · 0 comments
Assignees
Labels
status:ready This issue is ready to be worked on v-next A Hardhat v3 development task
Milestone

Comments

@schaable
Copy link
Member

schaable commented Dec 3, 2024

Here's a list of potential improvements for the network-manager plugin, broken down into key areas for clarity. Request modifiers aren’t covered in this issue.

Types

  • Align types with Hardhat v2 for easier migration. HttpNetwork types seem fine, but EDRNetwork types should be double-checked.

PR: #6031

Config Validation

  • Make sure all z schemas match their defined types.
  • As part of the refactor of the configOverrides in the NetworkManager.connect() method, we should remove all the user schemas.
  • Some logic could be extracted for reutilization.
  • Use sensitiveUrlSchema when needed (covered in Type Mismatch in Network Fields Using configVariable #5907).

Config Resolution

  • Resolve Genesys accounts correctly.
  • Validate EDR config (covered in Improve EDR config resolution #5961):
    • Match defaults with v2.
    • Use constants for things like hardfork.
    • Check config names like forkConfig.

PR: #6031

EDR Provider

Http Provider

  • Don’t expose Undici.Dispatcher, even in tests. Maybe we could create a custom type for the dispatcher.
  • Emit Hardhat network events.
  • Cleanup the overloads in fetchJsonRpcResponse.

NetworkManager Implementation

  • Fix: reassigning this.#hookManager shouldn’t be necessary.
  • Reevaluate how networkConfigOverride works in the connect function.

General Cleanup

  • Rename networkConfig.type to networkConfig.connectionType and use constants for values.
  • Use constants for the chainType values.
  • Update readonly properties in network and provider classes to use Readonly<T>.
  • Improve typing for getRequestParams (currently returns any[]).
  • There are some utilities in network-manager/rpc that are used by the request-modifiers. We should analyze if it's worth moving any of this to hardhat-utils.
  • Decide if anything needs to be done for the console logger.
  • Address comments in utils/convert-to-edr.
@github-actions github-actions bot added the status:ready This issue is ready to be worked on label Dec 3, 2024
@fvictorio fvictorio added this to Hardhat Dec 3, 2024
@github-project-automation github-project-automation bot moved this to Backlog in Hardhat Dec 3, 2024
@schaable schaable added the v-next A Hardhat v3 development task label Dec 3, 2024
@kanej kanej moved this from Backlog to To-do in Hardhat Dec 3, 2024
@kanej kanej added this to the Public Alpha milestone Dec 3, 2024
@kanej kanej added the type:epic A bigger effort that involves multiple issues and PRs label Dec 3, 2024
@kanej kanej moved this from To-do to Blocked in Hardhat Dec 5, 2024
@kanej kanej moved this from Blocked to In Progress in Hardhat Dec 5, 2024
@kanej kanej removed the type:epic A bigger effort that involves multiple issues and PRs label Dec 5, 2024
@kanej kanej mentioned this issue Nov 27, 2024
9 tasks
@kanej kanej moved this from In Progress to To-do in Hardhat Dec 5, 2024
@kanej kanej moved this from To-do to In Progress in Hardhat Dec 5, 2024
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
Status: In Progress
Development

No branches or pull requests

2 participants