Skip to content

Commit

Permalink
Merge pull request #6203 from NomicFoundation/chore/bump-edr-0.8.0
Browse files Browse the repository at this point in the history
chore: bump EDR to 0.8.0
  • Loading branch information
nebasuke authored Jan 31, 2025
2 parents 2151bce + edb1490 commit f208510
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 47 deletions.
8 changes: 8 additions & 0 deletions .changeset/kind-teachers-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"hardhat": patch
---

* fix: improved provider initialization performance
* fix: ignore unknown opcodes in source maps
* fix: crash when loading EDR on Windows without a C Runtime library installed
* fix: improved stack trace generation performance
2 changes: 1 addition & 1 deletion packages/hardhat-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"dependencies": {
"@ethersproject/abi": "^5.1.2",
"@metamask/eth-sig-util": "^4.0.0",
"@nomicfoundation/edr": "^0.7.0",
"@nomicfoundation/edr": "^0.8.0",
"@nomicfoundation/ethereumjs-common": "4.0.4",
"@nomicfoundation/ethereumjs-tx": "5.0.4",
"@nomicfoundation/ethereumjs-util": "9.0.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import type {
Response,
SubscriptionEvent,
HttpHeader,
TracingConfigWithBuffers,
} from "@nomicfoundation/edr";
import { Common } from "@nomicfoundation/ethereumjs-common";
import picocolors from "picocolors";
import debug from "debug";
import { EventEmitter } from "events";
import fsExtra from "fs-extra";
import semver from "semver";

import { requireNapiRsModule } from "../../../common/napi-rs";
import {
Expand All @@ -33,7 +33,6 @@ import {
import { isErrorResponse } from "../../core/providers/http";
import { getHardforkName } from "../../util/hardforks";
import { ConsoleLogger } from "../stack-traces/consoleLogger";
import { FIRST_SOLC_VERSION_SUPPORTED } from "../stack-traces/constants";
import { encodeSolidityStackTrace } from "../stack-traces/solidity-errors";
import { SolidityStackTrace } from "../stack-traces/solidity-stack-trace";

Expand Down Expand Up @@ -165,7 +164,7 @@ export class EdrProviderWrapper
public static async create(
config: HardhatNetworkProviderConfig,
loggerConfig: LoggerConfig,
tracingConfig?: TracingConfig
tracingConfig?: TracingConfigWithBuffers
): Promise<EdrProviderWrapper> {
const { Provider } = requireNapiRsModule(
"@nomicfoundation/edr"
Expand Down Expand Up @@ -506,19 +505,14 @@ export async function createHardhatNetworkProvider(

async function makeTracingConfig(
artifacts: Artifacts | undefined
): Promise<TracingConfig | undefined> {
): Promise<TracingConfigWithBuffers | undefined> {
if (artifacts !== undefined) {
const buildInfos = [];

const buildInfoFiles = await artifacts.getBuildInfoPaths();

try {
for (const buildInfoFile of buildInfoFiles) {
const buildInfo = await fsExtra.readJson(buildInfoFile);
if (semver.gte(buildInfo.solcVersion, FIRST_SOLC_VERSION_SUPPORTED)) {
buildInfos.push(buildInfo);
}
}
const buildInfos = await Promise.all(
buildInfoFiles.map((filePath) => fsExtra.readFile(filePath))
);

return {
buildInfos,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export const SUPPORTED_SOLIDITY_VERSION_RANGE = "<=0.8.28";
export const FIRST_SOLC_VERSION_SUPPORTED = "0.5.1";
66 changes: 33 additions & 33 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f208510

Please sign in to comment.