pub struct Log {
pub address: Vec<u8>,
pub topics: Vec<Vec<u8>>,
pub data: Vec<u8>,
pub index: u32,
pub block_index: u32,
pub ordinal: u64,
}
Fields§
§address: Vec<u8>
§topics: Vec<Vec<u8>>
§data: Vec<u8>
§index: u32
Index is the index of the log relative to the transaction. This index is always populated regardless of the state reversion of the the call that emitted this log.
Only available in DetailLevel: EXTENDED
block_index: u32
BlockIndex represents the index of the log relative to the Block.
An important notice is that this field will be 0 when the call that emitted the log has been reverted by the chain.
Currently, there is two locations where a Log can be obtained:
- block.transaction_traces[].receipt.logs[]
- block.transaction_traces[].calls[].logs[]
In the receipt
case, the logs will be populated only when the call
that emitted them has not been reverted by the chain and when in this
position, the blockIndex
is always populated correctly.
In the case of calls
case, for call
where stateReverted == true
,
the blockIndex
value will always be 0.
ordinal: u64
The block’s global ordinal when the log was recorded, refer to [Block] documentation for further information about ordinals and total ordering.
Trait Implementations§
Source§impl Message for Log
impl Message for Log
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.