pub struct Trace {Show 25 fields
pub from: Option<Address>,
pub to: Option<Address>,
pub call_type: Option<String>,
pub gas: Option<Quantity>,
pub input: Option<Data>,
pub init: Option<Data>,
pub value: Option<Quantity>,
pub author: Option<Address>,
pub reward_type: Option<String>,
pub block_hash: Option<Hash>,
pub block_number: Option<u64>,
pub address: Option<Address>,
pub code: Option<Data>,
pub gas_used: Option<Quantity>,
pub output: Option<Data>,
pub subtraces: Option<u64>,
pub trace_address: Option<Vec<u64>>,
pub transaction_hash: Option<Hash>,
pub transaction_position: Option<u64>,
pub type_: Option<String>,
pub error: Option<String>,
pub sighash: Option<Data>,
pub action_address: Option<Address>,
pub balance: Option<Quantity>,
pub refund_address: Option<Address>,
}Expand description
Trace object
Fields§
§from: Option<Address>The address of the sender who initiated the transaction.
to: Option<Address>The address of the recipient of the transaction if it was a transaction to an address. For contract creation transactions, this field is None.
call_type: Option<String>The type of trace, call or delegatecall, two ways to invoke a function in a smart contract.
call creates a new environment for the function to work in, so changes made in that
function won’t affect the environment where the function was called.
delegatecall doesn’t create a new environment. Instead, it runs the function within the
environment of the caller, so changes made in that function will affect the caller’s environment.
gas: Option<Quantity>The units of gas included in the transaction by the sender.
input: Option<Data>The optional input data sent with the transaction, usually used to interact with smart contracts.
init: Option<Data>The init code.
value: Option<Quantity>The value of the native token transferred along with the transaction, in Wei.
The address of the receiver for reward transaction.
reward_type: Option<String>Kind of reward. Block reward or Uncle reward.
block_hash: Option<Hash>The hash of the block in which the transaction was included.
block_number: Option<u64>The number of the block in which the transaction was included.
address: Option<Address>Destroyed address.
code: Option<Data>Contract code.
gas_used: Option<Quantity>The total used gas by the call, encoded as hexadecimal.
output: Option<Data>The return value of the call, encoded as a hexadecimal string.
subtraces: Option<u64>The number of sub-traces created during execution. When a transaction is executed on the EVM, it may trigger additional sub-executions, such as when a smart contract calls another smart contract or when an external account is accessed.
trace_address: Option<Vec<u64>>An array that indicates the position of the transaction in the trace.
transaction_hash: Option<Hash>The hash of the transaction.
transaction_position: Option<u64>The index of the transaction in the block.
type_: Option<String>The type of action taken by the transaction, call, create, reward and suicide.
call is the most common type of trace and occurs when a smart contract invokes another contract’s function.
create represents the creation of a new smart contract. This type of trace occurs when a smart contract is deployed to the blockchain.
error: Option<String>A string that indicates whether the transaction was successful or not.
None if successful, Reverted if not.
sighash: Option<Data>4-byte function signature hash for the trace
action_address: Option<Address>The action address for traces that create contracts
balance: Option<Quantity>The balance associated with the trace operation
refund_address: Option<Address>The refund address for refund operations
Implementations§
Source§impl Trace
impl Trace
Sourcepub fn from_arrow(batch: &RecordBatch) -> Result<Vec<Self>>
pub fn from_arrow(batch: &RecordBatch) -> Result<Vec<Self>>
Convert an arrow RecordBatch into a vector of Trace structs
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Trace
impl<'de> Deserialize<'de> for Trace
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl TryFrom<TraceReader<'_>> for Trace
impl TryFrom<TraceReader<'_>> for Trace
impl Eq for Trace
impl StructuralPartialEq for Trace
Auto Trait Implementations§
impl Freeze for Trace
impl RefUnwindSafe for Trace
impl Send for Trace
impl Sync for Trace
impl Unpin for Trace
impl UnwindSafe for Trace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more