Struct multiversx_sc_scenario::scenario::model::TxResponse
source · 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
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_network_tx(tx: TransactionOnNetwork) -> Self
pub fn from_network_tx(tx: TransactionOnNetwork) -> Self
Creates a TxResponse
from a TransactionOnNetwork
.
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
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> 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