Skip to content

Commit bb04f47

Browse files
authored
Merge pull request #6466 from NomicFoundation/chore/bump-ignore-edr
chore: bump `@ignored/edr` to `0.10.0-alpha.1`
2 parents 1fea7c8 + 1e625dc commit bb04f47

File tree

4 files changed

+43
-36
lines changed

4 files changed

+43
-36
lines changed

.changeset/giant-chairs-drop.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"hardhat": patch
3+
---
4+
5+
fix: We generate stack traces for failing Solidity tests by re-executing them for performance reasons. This fix ensures that we don't generate stack traces if EVM execution is indeterministic. Indeterminism can be caused by forking from the latest block number or by using impure cheatcodes.

pnpm-lock.yaml

+33-33
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

v-next/hardhat/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
"typescript-eslint": "7.7.1"
8585
},
8686
"dependencies": {
87-
"@ignored/edr": "0.8.0-alpha.2",
87+
"@ignored/edr": "0.10.0-alpha.1",
8888
"@ignored/edr-optimism": "0.6.5-alpha.3",
8989
"@nomicfoundation/hardhat-errors": "workspace:^3.0.0-next.1",
9090
"@nomicfoundation/hardhat-utils": "workspace:^3.0.0-next.1",

v-next/hardhat/src/internal/builtin-plugins/solidity-test/reporter.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -128,13 +128,15 @@ export async function* testReporter(
128128
}
129129

130130
const stackTrace = failure.stackTrace();
131+
// TODO handle `UnexpectedError` and `UnsafeToReplay` variants
131132
if (
132133
stackTrace !== undefined &&
133134
stackTrace !== null &&
134-
stackTrace.length > 0
135+
stackTrace.kind === "StackTrace" &&
136+
stackTrace.entries.length > 0
135137
) {
136138
const stackTraceStack: string[] = [];
137-
for (const entry of stackTrace.reverse()) {
139+
for (const entry of stackTrace.entries.reverse()) {
138140
const callsite = encodeStackTraceEntry(entry);
139141
if (callsite !== undefined) {
140142
stackTraceStack.push(` at ${callsite.toString()}`);

0 commit comments

Comments
 (0)