Skip to content

Option to create custom node startup #6472

Open
@SebastienGllmt

Description

@SebastienGllmt

Feedback

For my project, I want to have a custom way to create a Hardhat node that is instrumented with my own logic instead of the Hardhat one (specifically, we want opentelemetry support)

What worked in Hardhat v2

In hardhat v2, this was possible with either:

  • TASK_NODE_CREATE_SERVER (as mentioned here)
  • By simply doing import { JsonRpcServer } from "hardhat/internal/hardhat-network/jsonrpc/server.js";

Why it doesn't work in Hardhat v3

In Hardhat v3, this is not possible:

  1. There is not only a monlithic node which not only does too much for my use-case, it also has no return type
  2. Doing import { JsonRpcServer } from "hardhat/internal/builtin-plugins/node/json-rpc/server.ts"; doesn't work because the path is not publicly exported

I can copy-paste the JsonRpcServer as-is into my repo, but that's not ideal since this folder also depends on builtin-plugins/network-manager as well

Metadata

Metadata

Assignees

No one assigned

    Labels

    hardhat-3-alphaFeedback about the Hardhat 3 Alphastatus:needs-decisionWe need to make a decision about thisv-nextA Hardhat v3 development task

    Projects

    Status

    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions