pub struct Call {Show 27 fields
pub index: u32,
pub parent_index: u32,
pub depth: u32,
pub call_type: i32,
pub caller: Vec<u8>,
pub address: Vec<u8>,
pub value: Option<BigInt>,
pub gas_limit: u64,
pub gas_consumed: u64,
pub return_data: Vec<u8>,
pub input: Vec<u8>,
pub executed_code: bool,
pub suicide: bool,
pub keccak_preimages: HashMap<String, String>,
pub storage_changes: Vec<StorageChange>,
pub balance_changes: Vec<BalanceChange>,
pub nonce_changes: Vec<NonceChange>,
pub logs: Vec<Log>,
pub code_changes: Vec<CodeChange>,
pub gas_changes: Vec<GasChange>,
pub status_failed: bool,
pub status_reverted: bool,
pub failure_reason: String,
pub state_reverted: bool,
pub begin_ordinal: u64,
pub end_ordinal: u64,
pub account_creations: Vec<AccountCreation>,
}
Fields
index: u32
parent_index: u32
depth: u32
call_type: i32
caller: Vec<u8>
address: Vec<u8>
value: Option<BigInt>
gas_limit: u64
gas_consumed: u64
return_data: Vec<u8>
input: Vec<u8>
executed_code: bool
suicide: bool
keccak_preimages: HashMap<String, String>
hex representation of the hash -> preimage
storage_changes: Vec<StorageChange>
balance_changes: Vec<BalanceChange>
nonce_changes: Vec<NonceChange>
logs: Vec<Log>
code_changes: Vec<CodeChange>
gas_changes: Vec<GasChange>
status_failed: bool
In Ethereum, a call can be either:
- Successfull, execution passes without any problem encountered
- Failed, execution failed, and remaining gas should be consumed
- Reverted, execution failed, but only gas consumed so far is billed, remaining gas is refunded
When a call is either failed
or reverted
, the status_failed
field
below is set to true
. If the status is reverted
, then both status_failed
and status_reverted
are going to be set to true
.
status_reverted: bool
failure_reason: String
Populated when a call either failed or reverted, so when status_failed == true
,
see above for details about those flags.
state_reverted: bool
This field represents wheter or not the state changes performed by this call were correctly recorded by the blockchain.
On Ethereum, a transaction can record state changes even if some
of its inner nested calls failed. This is problematic however since
a call will invalidate all its state changes as well as all state
changes performed by its child call. This means that even if a call
has a status of SUCCESS
, the chain might have reverted all the state
changes it performed.
Trx 1
Call #1 <Failed>
Call #2 <Execution Success>
Call #3 <Execution Success>
|--- Failure here
Call #4
In the transaction above, while Call #2 and Call #3 would have the
status EXECUTED
begin_ordinal: u64
end_ordinal: u64
account_creations: Vec<AccountCreation>
Implementations
Trait Implementations
sourceimpl Message for Call
impl Message for Call
sourcefn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
sourcefn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
Encodes the message to a buffer. Read more
sourcefn encode_to_vec(&self) -> Vec<u8, Global>
fn encode_to_vec(&self) -> Vec<u8, Global>
Encodes the message to a newly allocated buffer.
sourcefn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
Encodes the message with a length-delimiter to a buffer. Read more
sourcefn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>
fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>
Encodes the message with a length-delimiter to a newly allocated buffer.
sourcefn decode<B>(buf: B) -> Result<Self, DecodeError> where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError> where
B: Buf,
Self: Default,
Decodes an instance of the message from a buffer. Read more
sourcefn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
B: Buf,
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
sourcefn merge<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
Decodes an instance of the message from a buffer, and merges it into self
. Read more
sourcefn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
Decodes a length-delimited instance of the message from buffer, and
merges it into self
. Read more
impl StructuralPartialEq for Call
Auto Trait Implementations
impl RefUnwindSafe for Call
impl Send for Call
impl Sync for Call
impl Unpin for Call
impl UnwindSafe for Call
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more