pub struct TxResponse {
pub out: Vec<Vec<u8>>,
pub new_deployed_address: Option<Address>,
pub new_issued_token_identifier: Option<String>,
pub tx_error: TxResponseStatus,
pub logs: Vec<Log>,
pub gas_used: u64,
pub refund: u64,
pub tx_hash: Option<H256>,
}
Expand description
The response of a transaction.
Fields§
§out: Vec<Vec<u8>>
The output of the transaction.
new_deployed_address: Option<Address>
The address of the newly deployed smart contract.
new_issued_token_identifier: Option<String>
The identifier of the newly issued token.
tx_error: TxResponseStatus
The status of the transaction.
logs: Vec<Log>
The logs of the transaction.
gas_used: u64
The gas used by the transaction.
refund: u64
The refund of the transaction.
tx_hash: Option<H256>
The transaction hash, if available.
Implementations§
Source§impl TxResponse
impl TxResponse
Sourcepub fn from_tx_result(tx_result: TxResult) -> Self
pub fn from_tx_result(tx_result: TxResult) -> Self
Creates a TxResponse
from a TxResult
.
Sourcepub fn from_raw_results(raw_results: Vec<Vec<u8>>) -> Self
pub fn from_raw_results(raw_results: Vec<Vec<u8>>) -> Self
Creates a TxResponse
from raw results.
Sourcepub fn to_expect(&self) -> TxExpect
pub fn to_expect(&self) -> TxExpect
Creates a scenario “expect” field based on the real response.
Useful for creating traces that also check the results come out always the same.
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Checks if the transaction was successful.
Trait Implementations§
Source§impl Clone for TxResponse
impl Clone for TxResponse
Source§fn clone(&self) -> TxResponse
fn clone(&self) -> TxResponse
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 TxResponse
impl Debug for TxResponse
Source§impl Default for TxResponse
impl Default for TxResponse
Source§fn default() -> TxResponse
fn default() -> TxResponse
Returns the “default value” for a type. Read more
Source§impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ExpectError<'_>
impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ExpectError<'_>
Source§fn item_tx_expect(&self, prev: TxExpect) -> TxExpect
fn item_tx_expect(&self, prev: TxExpect) -> TxExpect
Part of the execution pre-processing, each result handler needs to produce an “expect” field,
as defined in the environment. Read more
Source§fn item_process_result(self, _: &TxResponse) -> Self::Returns
fn item_process_result(self, _: &TxResponse) -> Self::Returns
The main functionality of a result handler, it either does some computation internally
(e.g. execution of a lambda function), or produces a result, or both.
Source§impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ExpectMessage<'_>
impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ExpectMessage<'_>
Source§fn item_tx_expect(&self, prev: TxExpect) -> TxExpect
fn item_tx_expect(&self, prev: TxExpect) -> TxExpect
Part of the execution pre-processing, each result handler needs to produce an “expect” field,
as defined in the environment. Read more
Source§fn item_process_result(self, _: &TxResponse) -> Self::Returns
fn item_process_result(self, _: &TxResponse) -> Self::Returns
The main functionality of a result handler, it either does some computation internally
(e.g. execution of a lambda function), or produces a result, or both.
Source§impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ExpectStatus
impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ExpectStatus
Source§fn item_tx_expect(&self, prev: TxExpect) -> TxExpect
fn item_tx_expect(&self, prev: TxExpect) -> TxExpect
Part of the execution pre-processing, each result handler needs to produce an “expect” field,
as defined in the environment. Read more
Source§fn item_process_result(self, _: &TxResponse) -> Self::Returns
fn item_process_result(self, _: &TxResponse) -> Self::Returns
The main functionality of a result handler, it either does some computation internally
(e.g. execution of a lambda function), or produces a result, or both.
Source§impl<Env, Original, T> RHListItemExec<TxResponse, Env, Original> for ExpectValue<T>
impl<Env, Original, T> RHListItemExec<TxResponse, Env, Original> for ExpectValue<T>
Source§fn item_tx_expect(&self, prev: TxExpect) -> TxExpect
fn item_tx_expect(&self, prev: TxExpect) -> TxExpect
Part of the execution pre-processing, each result handler needs to produce an “expect” field,
as defined in the environment. Read more
Source§fn item_process_result(self, _: &TxResponse) -> Self::Returns
fn item_process_result(self, _: &TxResponse) -> Self::Returns
The main functionality of a result handler, it either does some computation internally
(e.g. execution of a lambda function), or produces a result, or both.
Source§impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsGasUsedwhere
Env: TxEnv,
impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsGasUsedwhere
Env: TxEnv,
Source§fn item_process_result(self, tx_response: &TxResponse) -> Self::Returns
fn item_process_result(self, tx_response: &TxResponse) -> Self::Returns
The main functionality of a result handler, it either does some computation internally
(e.g. execution of a lambda function), or produces a result, or both.
Source§impl<Env, Original, NHList> RHListItemExec<TxResponse, Env, Original> for ReturnsHandledOrError<Env, Original, NHList>where
Env: TxEnv<RHExpect = TxExpect>,
NHList: RHListExec<TxResponse, Env>,
NHList::ListReturns: NestedTupleFlatten,
impl<Env, Original, NHList> RHListItemExec<TxResponse, Env, Original> for ReturnsHandledOrError<Env, Original, NHList>where
Env: TxEnv<RHExpect = TxExpect>,
NHList: RHListExec<TxResponse, Env>,
NHList::ListReturns: NestedTupleFlatten,
Source§fn item_tx_expect(&self, prev: TxExpect) -> TxExpect
fn item_tx_expect(&self, prev: TxExpect) -> TxExpect
Part of the execution pre-processing, each result handler needs to produce an “expect” field,
as defined in the environment. Read more
Source§fn item_process_result(self, raw_result: &TxResponse) -> Self::Returns
fn item_process_result(self, raw_result: &TxResponse) -> Self::Returns
The main functionality of a result handler, it either does some computation internally
(e.g. execution of a lambda function), or produces a result, or both.
Source§impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsLogswhere
Env: TxEnv,
impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsLogswhere
Env: TxEnv,
Source§fn item_process_result(self, raw_result: &TxResponse) -> Self::Returns
fn item_process_result(self, raw_result: &TxResponse) -> Self::Returns
The main functionality of a result handler, it either does some computation internally
(e.g. execution of a lambda function), or produces a result, or both.
Source§impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsMessage
impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsMessage
Source§fn item_tx_expect(&self, prev: TxExpect) -> TxExpect
fn item_tx_expect(&self, prev: TxExpect) -> TxExpect
Part of the execution pre-processing, each result handler needs to produce an “expect” field,
as defined in the environment. Read more
Source§fn item_process_result(self, raw_result: &TxResponse) -> Self::Returns
fn item_process_result(self, raw_result: &TxResponse) -> Self::Returns
The main functionality of a result handler, it either does some computation internally
(e.g. execution of a lambda function), or produces a result, or both.
Source§impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsNewAddresswhere
Env: TxEnv,
impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsNewAddresswhere
Env: TxEnv,
Source§fn item_process_result(self, tx_response: &TxResponse) -> Self::Returns
fn item_process_result(self, tx_response: &TxResponse) -> Self::Returns
The main functionality of a result handler, it either does some computation internally
(e.g. execution of a lambda function), or produces a result, or both.
Source§impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsNewBech32Addresswhere
Env: TxEnv,
impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsNewBech32Addresswhere
Env: TxEnv,
Source§fn item_process_result(self, tx_response: &TxResponse) -> Self::Returns
fn item_process_result(self, tx_response: &TxResponse) -> Self::Returns
The main functionality of a result handler, it either does some computation internally
(e.g. execution of a lambda function), or produces a result, or both.
Source§impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsNewManagedAddresswhere
Env: TxEnv,
impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsNewManagedAddresswhere
Env: TxEnv,
Source§fn item_process_result(self, tx_response: &TxResponse) -> Self::Returns
fn item_process_result(self, tx_response: &TxResponse) -> Self::Returns
The main functionality of a result handler, it either does some computation internally
(e.g. execution of a lambda function), or produces a result, or both.
Source§impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsNewTokenIdentifierwhere
Env: TxEnv,
impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsNewTokenIdentifierwhere
Env: TxEnv,
Source§fn item_process_result(self, raw_result: &TxResponse) -> Self::Returns
fn item_process_result(self, raw_result: &TxResponse) -> Self::Returns
The main functionality of a result handler, it either does some computation internally
(e.g. execution of a lambda function), or produces a result, or both.
Source§impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsRawResultwhere
Env: TxEnv,
impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsRawResultwhere
Env: TxEnv,
Source§fn item_process_result(self, tx_response: &TxResponse) -> Self::Returns
fn item_process_result(self, tx_response: &TxResponse) -> Self::Returns
The main functionality of a result handler, it either does some computation internally
(e.g. execution of a lambda function), or produces a result, or both.
Source§impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsResultwhere
Env: TxEnv,
Original: TopDecodeMulti,
impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsResultwhere
Env: TxEnv,
Original: TopDecodeMulti,
Source§fn item_process_result(self, tx_response: &TxResponse) -> Self::Returns
fn item_process_result(self, tx_response: &TxResponse) -> Self::Returns
The main functionality of a result handler, it either does some computation internally
(e.g. execution of a lambda function), or produces a result, or both.
Source§impl<Env, Original, T> RHListItemExec<TxResponse, Env, Original> for ReturnsResultAs<T>
impl<Env, Original, T> RHListItemExec<TxResponse, Env, Original> for ReturnsResultAs<T>
Source§fn item_process_result(self, tx_response: &TxResponse) -> Self::Returns
fn item_process_result(self, tx_response: &TxResponse) -> Self::Returns
The main functionality of a result handler, it either does some computation internally
(e.g. execution of a lambda function), or produces a result, or both.
Source§impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsResultUnmanaged
impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsResultUnmanaged
Source§fn item_process_result(self, tx_response: &TxResponse) -> Self::Returns
fn item_process_result(self, tx_response: &TxResponse) -> Self::Returns
The main functionality of a result handler, it either does some computation internally
(e.g. execution of a lambda function), or produces a result, or both.
Source§impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsStatus
impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsStatus
Source§fn item_tx_expect(&self, prev: TxExpect) -> TxExpect
fn item_tx_expect(&self, prev: TxExpect) -> TxExpect
Part of the execution pre-processing, each result handler needs to produce an “expect” field,
as defined in the environment. Read more
Source§fn item_process_result(self, raw_result: &TxResponse) -> Self::Returns
fn item_process_result(self, raw_result: &TxResponse) -> Self::Returns
The main functionality of a result handler, it either does some computation internally
(e.g. execution of a lambda function), or produces a result, or both.
Source§impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsTxHashwhere
Env: TxEnv,
impl<Env, Original> RHListItemExec<TxResponse, Env, Original> for ReturnsTxHashwhere
Env: TxEnv,
Source§fn item_process_result(self, raw_result: &TxResponse) -> Self::Returns
fn item_process_result(self, raw_result: &TxResponse) -> Self::Returns
The main functionality of a result handler, it either does some computation internally
(e.g. execution of a lambda function), or produces a result, or both.
Source§impl<Env, Original, F> RHListItemExec<TxResponse, Env, Original> for WithNewAddress<Env, F>
impl<Env, Original, F> RHListItemExec<TxResponse, Env, Original> for WithNewAddress<Env, F>
Source§fn item_process_result(self, tx_response: &TxResponse) -> Self::Returns
fn item_process_result(self, tx_response: &TxResponse) -> Self::Returns
The main functionality of a result handler, it either does some computation internally
(e.g. execution of a lambda function), or produces a result, or both.
Source§impl<Env, Original, F> RHListItemExec<TxResponse, Env, Original> for WithRawTxResponse<F>
impl<Env, Original, F> RHListItemExec<TxResponse, Env, Original> for WithRawTxResponse<F>
Source§fn item_process_result(self, raw_result: &TxResponse) -> Self::Returns
fn item_process_result(self, raw_result: &TxResponse) -> Self::Returns
The main functionality of a result handler, it either does some computation internally
(e.g. execution of a lambda function), or produces a result, or both.
Source§impl<Env, Original, T, F> RHListItemExec<TxResponse, Env, Original> for WithResultAs<T, F>
impl<Env, Original, T, F> RHListItemExec<TxResponse, Env, Original> for WithResultAs<T, F>
Source§fn item_process_result(self, tx_response: &TxResponse) -> Self::Returns
fn item_process_result(self, tx_response: &TxResponse) -> Self::Returns
The main functionality of a result handler, it either does some computation internally
(e.g. execution of a lambda function), or produces a result, or both.
Auto Trait Implementations§
impl Freeze for TxResponse
impl RefUnwindSafe for TxResponse
impl Send for TxResponse
impl Sync for TxResponse
impl Unpin for TxResponse
impl UnwindSafe for TxResponse
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> InterpretableFrom<&T> for Twhere
T: Clone,
impl<T> InterpretableFrom<&T> for Twhere
T: Clone,
fn interpret_from(from: &T, _context: &InterpreterContext) -> T
Source§impl<T> InterpretableFrom<T> for T
impl<T> InterpretableFrom<T> for T
fn interpret_from(from: T, _context: &InterpreterContext) -> T
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>
Converts
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>
Converts
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