diff --git a/crates/rpc-types-trace/src/geth/mod.rs b/crates/rpc-types-trace/src/geth/mod.rs index 35920f1e171..a21f30d83a7 100644 --- a/crates/rpc-types-trace/src/geth/mod.rs +++ b/crates/rpc-types-trace/src/geth/mod.rs @@ -668,6 +668,11 @@ pub struct GethDebugTracingCallOptions { } impl GethDebugTracingCallOptions { + /// Creates a new instance with the given tracing options + pub const fn new(tracing_options: GethDebugTracingOptions) -> Self { + Self { tracing_options, state_overrides: None, block_overrides: None } + } + /// Enables state overrides pub fn with_state_overrides(mut self, overrides: StateOverride) -> Self { self.state_overrides = Some(overrides); @@ -687,6 +692,12 @@ impl GethDebugTracingCallOptions { } } +impl From for GethDebugTracingCallOptions { + fn from(value: GethDebugTracingOptions) -> Self { + Self::new(value) + } +} + /// Serializes a storage map as a list of key-value pairs _without_ 0x-prefix fn serialize_string_storage_map_opt( storage: &Option>,