Enum revm_primitives::result::ExecutionResult
source · pub enum ExecutionResult {
Success {
reason: Eval,
gas_used: u64,
gas_refunded: u64,
logs: Vec<Log>,
output: Output,
},
Revert {
gas_used: u64,
output: Bytes,
},
Halt {
reason: Halt,
gas_used: u64,
},
}
Variants§
Success
Returned successfully
Revert
Reverted by REVERT
opcode that doesn’t spend all gas.
Halt
Reverted for various reasons and spend all gas.
Implementations§
source§impl ExecutionResult
impl ExecutionResult
sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Returns if transaction execution is successful. 1 indicates success, 0 indicates revert. https://eips.ethereum.org/EIPS/eip-658
sourcepub fn logs(&self) -> Vec<Log>
pub fn logs(&self) -> Vec<Log>
Return logs, if execution is not successful, function will return empty vec.
pub fn gas_used(&self) -> u64
Trait Implementations§
source§impl Clone for ExecutionResult
impl Clone for ExecutionResult
source§fn clone(&self) -> ExecutionResult
fn clone(&self) -> ExecutionResult
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ExecutionResult
impl Debug for ExecutionResult
source§impl PartialEq<ExecutionResult> for ExecutionResult
impl PartialEq<ExecutionResult> for ExecutionResult
source§fn eq(&self, other: &ExecutionResult) -> bool
fn eq(&self, other: &ExecutionResult) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.