diff --git a/crates/revm/revm-inspectors/src/tracing/types.rs b/crates/revm/revm-inspectors/src/tracing/types.rs index 71439b139..a85942add 100644 --- a/crates/revm/revm-inspectors/src/tracing/types.rs +++ b/crates/revm/revm-inspectors/src/tracing/types.rs @@ -32,14 +32,22 @@ pub enum CallKind { impl CallKind { /// Returns true if the call is a create + #[inline] pub fn is_any_create(&self) -> bool { matches!(self, CallKind::Create | CallKind::Create2) } /// Returns true if the call is a delegate of some sorts + #[inline] pub fn is_delegate(&self) -> bool { matches!(self, CallKind::DelegateCall | CallKind::CallCode) } + + /// Returns true if the call is [CallKind::StaticCall]. + #[inline] + pub fn is_static_call(&self) -> bool { + matches!(self, CallKind::StaticCall) + } } impl std::fmt::Display for CallKind { @@ -413,6 +421,11 @@ impl CallTraceNode { logs: Default::default(), }; + if self.trace.kind.is_static_call() { + // STATICCALL frames don't have a value + call_frame.value = None; + } + // we need to populate error and revert reason if !self.trace.success { call_frame.revert_reason = decode_revert_reason(self.trace.output.as_ref());