Skip to content

Commit

Permalink
return unsupported for unsupported tracers
Browse files Browse the repository at this point in the history
  • Loading branch information
eyusufatik committed Dec 18, 2024
1 parent e9861a5 commit 0348508
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions crates/evm/src/rpc_helpers/tracing_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,24 +73,26 @@ pub(crate) fn trace_transaction<C: sov_modules_api::Context>(
.inspector
.into_geth_builder()
.geth_call_traces(call_config, res.result.gas_used());
return Ok((frame.into(), res.state));
Ok((frame.into(), res.state))
}
GethDebugBuiltInTracerType::PreStateTracer => {
// Requires DatabaseRef trait
// meaning we need a readonly state to implement this
return Err(EthApiError::Unsupported("PreStateTracer"));
Err(EthApiError::Unsupported("PreStateTracer"))
}
GethDebugBuiltInTracerType::NoopTracer => {
Ok((NoopFrame::default().into(), Default::default()))
}
// TODO: either implement or return unsupported
GethDebugBuiltInTracerType::MuxTracer => todo!("MuxTracer"),
GethDebugBuiltInTracerType::FlatCallTracer => todo!("FlatCallTracer"),
GethDebugBuiltInTracerType::MuxTracer => Err(EthApiError::Unsupported("MuxTracer")),
GethDebugBuiltInTracerType::FlatCallTracer => {
Err(EthApiError::Unsupported("FlatCallTracer"))
}
},
GethDebugTracerType::JsTracer(_code) => {
// This also requires DatabaseRef trait
// Implement after readonly state is implemented
return Err(EthApiError::Unsupported("JsTracer"));
Err(EthApiError::Unsupported("JsTracer"))
}
};
}
Expand Down

0 comments on commit 0348508

Please sign in to comment.