Trait ethcore::trace::Tracer
[−]
[src]
pub trait Tracer: Send { type Output; fn prepare_trace_call(&self, params: &ActionParams) -> Option<Call>; fn prepare_trace_create(&self, params: &ActionParams) -> Option<Create>; fn prepare_trace_output(&self) -> Option<Bytes>; fn trace_call(
&mut self,
call: Option<Call>,
gas_used: U256,
output: Option<Bytes>,
subs: Vec<Self::Output>
); fn trace_create(
&mut self,
create: Option<Create>,
gas_used: U256,
code: Option<Bytes>,
address: Address,
subs: Vec<Self::Output>
); fn trace_failed_call(
&mut self,
call: Option<Call>,
subs: Vec<Self::Output>,
error: TraceError
); fn trace_failed_create(
&mut self,
create: Option<Create>,
subs: Vec<Self::Output>,
error: TraceError
); fn trace_suicide(
&mut self,
address: Address,
balance: U256,
refund_address: Address
); fn trace_reward(
&mut self,
author: Address,
value: U256,
reward_type: RewardType
); fn subtracer(&self) -> Self
where
Self: Sized; fn drain(self) -> Vec<Self::Output>; }
This trait is used by executive to build traces.
Associated Types
type Output
Data returned when draining the Tracer.
Required Methods
fn prepare_trace_call(&self, params: &ActionParams) -> Option<Call>
Prepares call trace for given params. Noop tracer should return None.
fn prepare_trace_create(&self, params: &ActionParams) -> Option<Create>
Prepares create trace for given params. Noop tracer should return None.
fn prepare_trace_output(&self) -> Option<Bytes>
Prepare trace output. Noop tracer should return None.
fn trace_call(
&mut self,
call: Option<Call>,
gas_used: U256,
output: Option<Bytes>,
subs: Vec<Self::Output>
)
&mut self,
call: Option<Call>,
gas_used: U256,
output: Option<Bytes>,
subs: Vec<Self::Output>
)
Stores trace call info.
fn trace_create(
&mut self,
create: Option<Create>,
gas_used: U256,
code: Option<Bytes>,
address: Address,
subs: Vec<Self::Output>
)
&mut self,
create: Option<Create>,
gas_used: U256,
code: Option<Bytes>,
address: Address,
subs: Vec<Self::Output>
)
Stores trace create info.
fn trace_failed_call(
&mut self,
call: Option<Call>,
subs: Vec<Self::Output>,
error: TraceError
)
&mut self,
call: Option<Call>,
subs: Vec<Self::Output>,
error: TraceError
)
Stores failed call trace.
fn trace_failed_create(
&mut self,
create: Option<Create>,
subs: Vec<Self::Output>,
error: TraceError
)
&mut self,
create: Option<Create>,
subs: Vec<Self::Output>,
error: TraceError
)
Stores failed create trace.
fn trace_suicide(
&mut self,
address: Address,
balance: U256,
refund_address: Address
)
&mut self,
address: Address,
balance: U256,
refund_address: Address
)
Stores suicide info.
fn trace_reward(
&mut self,
author: Address,
value: U256,
reward_type: RewardType
)
&mut self,
author: Address,
value: U256,
reward_type: RewardType
)
Stores reward info.
fn subtracer(&self) -> Self where
Self: Sized,
Self: Sized,
Spawn subtracer which will be used to trace deeper levels of execution.
fn drain(self) -> Vec<Self::Output>
Consumes self and returns all traces.
Implementors
impl Tracer for ExecutiveTracer type Output = FlatTrace;
impl Tracer for NoopTracer type Output = FlatTrace;