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: u32parent_index: u32depth: u32call_type: i32caller: Vec<u8>address: Vec<u8>value: Option<BigInt>gas_limit: u64gas_consumed: u64return_data: Vec<u8>input: Vec<u8>executed_code: boolsuicide: boolkeccak_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: boolfailure_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: u64end_ordinal: u64account_creations: Vec<AccountCreation>

Implementations

Returns the enum value of call_type, or the default if the field is set to an invalid enum value.

Sets call_type to the provided enum value.

Trait Implementations

Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Returns the encoded length of the message without a length delimiter.
Clears the message, resetting all fields to their default.
Encodes the message to a buffer. Read more
Encodes the message to a newly allocated buffer.
Encodes the message with a length-delimiter to a buffer. Read more
Encodes the message with a length-delimiter to a newly allocated buffer.
Decodes an instance of the message from a buffer. Read more
Decodes a length-delimited instance of the message from the buffer.
Decodes an instance of the message from a buffer, and merges it into self. Read more
Decodes a length-delimited instance of the message from buffer, and merges it into self. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.