mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
builder functions for GethDefaultTracingOptions (#4956)
This commit is contained in:
committed by
GitHub
parent
e823c4082d
commit
b62db459d4
@ -347,6 +347,88 @@ pub struct GethDefaultTracingOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl GethDefaultTracingOptions {
|
impl GethDefaultTracingOptions {
|
||||||
|
/// Enables memory capture.
|
||||||
|
pub fn enable_memory(self) -> Self {
|
||||||
|
self.with_enable_memory(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Disables memory capture.
|
||||||
|
pub fn disable_memory(self) -> Self {
|
||||||
|
self.with_disable_memory(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Disables stack capture.
|
||||||
|
pub fn disable_stack(self) -> Self {
|
||||||
|
self.with_disable_stack(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Disables storage capture.
|
||||||
|
pub fn disable_storage(self) -> Self {
|
||||||
|
self.with_disable_storage(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Enables return data capture.
|
||||||
|
pub fn enable_return_data(self) -> Self {
|
||||||
|
self.with_enable_return_data(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Disables return data capture.
|
||||||
|
pub fn disable_return_data(self) -> Self {
|
||||||
|
self.with_disable_return_data(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Enables debug mode.
|
||||||
|
pub fn debug(self) -> Self {
|
||||||
|
self.with_debug(true)
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Sets the enable_memory field.
|
||||||
|
pub fn with_enable_memory(mut self, enable: bool) -> Self {
|
||||||
|
self.enable_memory = Some(enable);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Sets the disable_memory field.
|
||||||
|
pub fn with_disable_memory(mut self, disable: bool) -> Self {
|
||||||
|
self.disable_memory = Some(disable);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Sets the disable_stack field.
|
||||||
|
pub fn with_disable_stack(mut self, disable: bool) -> Self {
|
||||||
|
self.disable_stack = Some(disable);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Sets the disable_storage field.
|
||||||
|
pub fn with_disable_storage(mut self, disable: bool) -> Self {
|
||||||
|
self.disable_storage = Some(disable);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Sets the enable_return_data field.
|
||||||
|
pub fn with_enable_return_data(mut self, enable: bool) -> Self {
|
||||||
|
self.enable_return_data = Some(enable);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Sets the disable_return_data field.
|
||||||
|
pub fn with_disable_return_data(mut self, disable: bool) -> Self {
|
||||||
|
self.disable_return_data = Some(disable);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Sets the debug field.
|
||||||
|
pub fn with_debug(mut self, debug: bool) -> Self {
|
||||||
|
self.debug = Some(debug);
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Sets the limit field.
|
||||||
|
pub fn with_limit(mut self, limit: u64) -> Self {
|
||||||
|
self.limit = Some(limit);
|
||||||
|
self
|
||||||
|
}
|
||||||
/// Returns `true` if return data capture is enabled
|
/// Returns `true` if return data capture is enabled
|
||||||
pub fn is_return_data_enabled(&self) -> bool {
|
pub fn is_return_data_enabled(&self) -> bool {
|
||||||
self.enable_return_data
|
self.enable_return_data
|
||||||
@ -369,7 +451,6 @@ impl GethDefaultTracingOptions {
|
|||||||
!self.disable_storage.unwrap_or(false)
|
!self.disable_storage.unwrap_or(false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Bindings for additional `debug_traceCall` options
|
/// Bindings for additional `debug_traceCall` options
|
||||||
///
|
///
|
||||||
/// See <https://geth.ethereum.org/docs/rpc/ns-debug#debug_tracecall>
|
/// See <https://geth.ethereum.org/docs/rpc/ns-debug#debug_tracecall>
|
||||||
|
|||||||
Reference in New Issue
Block a user