build: upgrade to @nomicfoundation/edr v0.12.0-next.x (v2)#7985
build: upgrade to @nomicfoundation/edr v0.12.0-next.x (v2)#7985
Conversation
|
There was a problem hiding this comment.
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
getLatestSupportedSolcVersiontolatestSupportedSolidityVersionAPI - Updated trace handling to use new EDR Response methods (
traces()andstackTrace()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.
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()toResponseobject, inclusion of which is configurable through theincludeCallTracesoption on theObservabilityConfigNomicFoundation/edr@f4bdc36: Removed
getLatestSupportedSolcVersionAPIBREAKING CHANGE: A new API
latestSupportedSolidityVersionwas previously introduced to replace the deprecatedgetLatestSupportedSolcVersion. The old API has now been removed. Users should update their code to uselatestSupportedSolidityVersioninstead.NomicFoundation/edr@3974769: Removed
traces()API from theResponseobjectNomicFoundation/edr@f4bdc36: Added support to the
debug_traceCall&debug_traceTransactionJSON-RPC methods for different tracers (4byteTracer,callTracer,flatCallTracer,prestateTracer,noopTracer, andmuxTracer).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
enableMemoryoption totruein your tracer configuration.To Do