Skip to content

build: upgrade to @nomicfoundation/edr v0.12.0-next.x (v2)#7985

Draft
Wodann wants to merge 5 commits intov2from
hh2/tracing-unification
Draft

build: upgrade to @nomicfoundation/edr v0.12.0-next.x (v2)#7985
Wodann wants to merge 5 commits intov2from
hh2/tracing-unification

Conversation

@Wodann
Copy link
Copy Markdown
Member

@Wodann Wodann commented Feb 20, 2026

  • Because this PR includes a bug fix, relevant tests have been included.
  • Because this PR includes a new feature, the change was previously discussed on an Issue or with someone from the team.
  • I didn't do anything of this.

Previously, we temporarily broke backwards compatibility in EDR to ship faster to Hardhat 3, resulting in a stoppage of integrations for Hardhat 2. This is a draft PR tracking changes required to backport the latest version of @nomicfoundation/edr to Hardhat 2.

Minor Changes

  • NomicFoundation/edr@3974769: Added callTraces() to Response object, inclusion of which is configurable through the includeCallTraces option on the ObservabilityConfig

  • NomicFoundation/edr@f4bdc36: Removed getLatestSupportedSolcVersion API

    BREAKING CHANGE: A new API latestSupportedSolidityVersion was previously introduced to replace the deprecated getLatestSupportedSolcVersion. The old API has now been removed. Users should update their code to use latestSupportedSolidityVersion instead.

  • NomicFoundation/edr@3974769: Removed traces() API from the Response object

  • NomicFoundation/edr@f4bdc36: Added support to the debug_traceCall & debug_traceTransaction JSON-RPC methods for different tracers (4byteTracer, callTracer, flatCallTracer, prestateTracer, noopTracer, and muxTracer).

    Our API is now aligned with Geth's tracing capabilities.

    BREAKING CHANGE: Memory capture used to be enabled by default on geth, but has since been flipped core: cmd: invert disableMemory ethereum/go-ethereum#23558 and is now disabled by default. We have followed suit and disabled it by default as well. If you were relying on memory capture, you will need to explicitly enable it by setting the enableMemory option to true in your tracer configuration.

To Do

  • Bump EDR version once released to fix tests

@Wodann Wodann requested a review from Copilot February 20, 2026 22:40
@Wodann Wodann self-assigned this Feb 20, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 20, 2026

⚠️ No Changeset found

Latest commit: c46cf5b

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
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR upgrades the @nomicfoundation/edr dependency from v0.12.0-next.22 to v0.12.0-next.26, adapting the codebase to handle breaking API changes in the EDR library. The upgrade includes changes to API naming conventions, trace handling mechanisms, and error reporting structures.

Changes:

  • Migrated from deprecated getLatestSupportedSolcVersion to latestSupportedSolidityVersion API
  • Updated trace handling to use new EDR Response methods (traces() and stackTrace() as method calls)
  • Simplified trace conversion functions to work with EDR's new flattened data structures
  • Enhanced error handling with discriminated union pattern for stack traces

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
packages/hardhat-core/test/helpers/compilation.ts Updated import and usage of renamed Solidity version API
packages/hardhat-core/test/builtin-tasks/compile.ts Updated import and usage of renamed Solidity version API
packages/hardhat-core/src/internal/hardhat-network/provider/utils/convertToEdr.ts Removed deprecated edrRpcDebugTraceToHardhat function; updated trace conversion functions to work with new EDR data structures
packages/hardhat-core/src/internal/hardhat-network/provider/provider.ts Added IncludeTraces configuration; updated trace and stack trace handling to use new method-based API and discriminated unions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@alcuadrado alcuadrado changed the title build: upgrade to @nomicfoundation/edr v0.12.0-next.26 build: upgrade to @nomicfoundation/edr v0.12.0-next.26 (v2) Feb 24, 2026
@Wodann Wodann changed the title build: upgrade to @nomicfoundation/edr v0.12.0-next.26 (v2) build: upgrade to @nomicfoundation/edr v0.12.0-next.x (v2) Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants