pub struct ContractCallResult { /* private fields */ }Expand description
Represents the result of a contract call.
It may represent not the original call but the an external call. However the result and gas used come from the original call.
Implementations§
Source§impl ContractCallResult
impl ContractCallResult
Sourcepub fn contract_address(&self) -> Address
pub fn contract_address(&self) -> Address
Sourcepub fn callee_contract_address(&self) -> Address
pub fn callee_contract_address(&self) -> Address
Sourcepub fn callee_contract_bytes(&self) -> Bytes
pub fn callee_contract_bytes(&self) -> Bytes
Sourcepub fn callee_contract_result(&self) -> OdraResult<Bytes>
pub fn callee_contract_result(&self) -> OdraResult<Bytes>
Returns the result of the original contract call as a OdraResult object.
Sourcepub fn callee_contract_error(&self) -> OdraError
pub fn callee_contract_error(&self) -> OdraError
Returns the error of the original contract call as an OdraError object.
Sourcepub fn callee_contract_caller(&self) -> Address
pub fn callee_contract_caller(&self) -> Address
Returns the address of the original contract caller.
Sourcepub fn callee_contract_gas_used(&self) -> u64
pub fn callee_contract_gas_used(&self) -> u64
Returns the amount of gas used in the original contract call.
Sourcepub fn event_names(&self) -> Vec<String>
pub fn event_names(&self) -> Vec<String>
Returns the names of the events emitted by the contract call.
§Returns
A vector containing the names of the events emitted by the contract call.
Sourcepub fn native_event_names(&self) -> Vec<String>
pub fn native_event_names(&self) -> Vec<String>
Returns the names of the native events emitted by the contract call.
§Returns
A vector containing the names of the events emitted by the contract call.
Sourcepub fn events(&self) -> Vec<Bytes>
pub fn events(&self) -> Vec<Bytes>
Returns the events emitted by the contract call.
§Returns
A vector containing the events emitted by the contract call.
Sourcepub fn native_events(&self) -> Vec<Bytes>
pub fn native_events(&self) -> Vec<Bytes>
Returns the native events emitted by the contract call.
§Returns
A vector containing the events emitted by the contract call.
Sourcepub fn emitted_native(&self, event_name: &str) -> bool
pub fn emitted_native(&self, event_name: &str) -> bool
Sourcepub fn emitted_event<T: ToBytes + EventInstance>(&self, event: T) -> bool
pub fn emitted_event<T: ToBytes + EventInstance>(&self, event: T) -> bool
Sourcepub fn emitted_native_event<T: ToBytes + EventInstance>(&self, event: T) -> bool
pub fn emitted_native_event<T: ToBytes + EventInstance>(&self, event: T) -> bool
Sourcepub fn raw_call_result(&self) -> CallResult
pub fn raw_call_result(&self) -> CallResult
Returns the raw call result. Includes data from sub-calls to external contracts.
Trait Implementations§
Source§impl Clone for ContractCallResult
impl Clone for ContractCallResult
Source§fn clone(&self) -> ContractCallResult
fn clone(&self) -> ContractCallResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ContractCallResult
impl RefUnwindSafe for ContractCallResult
impl Send for ContractCallResult
impl Sync for ContractCallResult
impl Unpin for ContractCallResult
impl UnwindSafe for ContractCallResult
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<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