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: u64,
    pub refund: u64,
    pub api_scrs: Vec<ApiSmartContractResult>,
    pub api_logs: Option<ApiLogs>,
}
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: u64

The gas used by the transaction.

§refund: u64

The refund of the transaction.

§api_scrs: Vec<ApiSmartContractResult>

The smart contract results of the transaction.

§api_logs: Option<ApiLogs>

The api logs of the transaction.

Implementations§

source§

impl TxResponse

source

pub fn from_tx_result(tx_result: TxResult) -> Self

Creates a TxResponse from a TxResult.

source

pub fn from_network_tx(tx: TransactionOnNetwork) -> Self

Creates a TxResponse from a TransactionOnNetwork.

source

pub fn from_raw_results(raw_results: Vec<Vec<u8>>) -> Self

Creates a TxResponse from raw results.

source

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.

source

pub fn is_success(&self) -> bool

Checks if the transaction was successful.

Trait Implementations§

source§

impl Clone for TxResponse

source§

fn clone(&self) -> TxResponse

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TxResponse

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for TxResponse

source§

fn default() -> TxResponse

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl CodecFromSelf 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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T> InterpretableFrom<&T> for T
where T: Clone,

source§

fn interpret_from(from: &T, _context: &InterpreterContext) -> T

source§

impl<T> InterpretableFrom<T> for T

source§

fn interpret_from(from: T, _context: &InterpreterContext) -> T

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ReconstructableFrom<&T> for T
where T: Clone,

source§

impl<T> ReconstructableFrom<T> for T

source§

fn reconstruct_from(from: T, _builder: &ReconstructorContext) -> T

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more