diff --git a/crates/evm/traces/src/lib.rs b/crates/evm/traces/src/lib.rs index d7d55696f7b2..2538c03ca5dc 100644 --- a/crates/evm/traces/src/lib.rs +++ b/crates/evm/traces/src/lib.rs @@ -122,23 +122,21 @@ pub async fn render_trace_arena( // Display trace return data let color = trace_color(&node.trace); - write!(s, "{child}{EDGE}{}", color.paint(RETURN))?; - if node.trace.kind.is_any_create() { - match &return_data { - None => { - writeln!(s, "{} bytes of code", node.trace.output.len())?; - } - Some(val) => { - writeln!(s, "{val}")?; - } + write!( + s, + "{child}{EDGE}{}{}", + color.paint(RETURN), + color.paint(format!("[{:?}] ", node.trace.status)) + )?; + match return_data { + Some(val) => write!(s, "{val}"), + None if node.trace.kind.is_any_create() => { + write!(s, "{} bytes of code", node.trace.output.len()) } - } else { - match &return_data { - None if node.trace.output.is_empty() => writeln!(s, "()")?, - None => writeln!(s, "{}", node.trace.output)?, - Some(val) => writeln!(s, "{val}")?, - } - } + None if node.trace.output.is_empty() => Ok(()), + None => write!(s, "{}", node.trace.output), + }?; + writeln!(s)?; Ok(()) } diff --git a/crates/forge/tests/fixtures/include_custom_types_in_traces.stdout b/crates/forge/tests/fixtures/include_custom_types_in_traces.stdout index 786679a6736b..571cc6927459 100644 --- a/crates/forge/tests/fixtures/include_custom_types_in_traces.stdout +++ b/crates/forge/tests/fixtures/include_custom_types_in_traces.stdout @@ -6,13 +6,13 @@ Ran 2 tests for test/Contract.t.sol:CustomTypesTest [FAIL. Reason: PoolNotInitialized()] testErr() (gas: 231) Traces: [231] CustomTypesTest::testErr() - └─ ← PoolNotInitialized() + └─ ← [Revert] PoolNotInitialized() [PASS] testEvent() (gas: 1312) Traces: [1312] CustomTypesTest::testEvent() ├─ emit MyEvent(a: 100) - └─ ← () + └─ ← [Stop] Suite result: FAILED. 1 passed; 1 failed; 0 skipped; finished in 3.88ms diff --git a/crates/forge/tests/fixtures/repro_6531.stdout b/crates/forge/tests/fixtures/repro_6531.stdout index 01f282bf7cfd..35c27c9483e1 100644 --- a/crates/forge/tests/fixtures/repro_6531.stdout +++ b/crates/forge/tests/fixtures/repro_6531.stdout @@ -7,10 +7,10 @@ Ran 1 test for test/Contract.t.sol:USDTCallingTest Traces: [9559] USDTCallingTest::test() ├─ [0] VM::createSelectFork("") - │ └─ ← 0 + │ └─ ← [Return] 0 ├─ [3110] 0xdAC17F958D2ee523a2206206994597C13D831ec7::name() [staticcall] - │ └─ ← "Tether USD" - └─ ← () + │ └─ ← [Return] "Tether USD" + └─ ← [Stop] Suite result: ok. 1 passed; 0 failed; 0 skipped; finished in 3.43s