pub struct FinalExecutionOutcome {
pub status: FinalExecutionStatus,
pub transaction: TransactionView,
pub transaction_outcome: ExecutionOutcomeWithId,
pub receipts_outcome: Vec<ExecutionOutcomeWithId>,
}Expand description
Final execution outcome from send_tx RPC.
All fields are required — this type only appears when a transaction has actually
been executed (not for wait_until=NONE responses).
Fields§
§status: FinalExecutionStatusOverall transaction execution result.
transaction: TransactionViewThe transaction that was executed.
transaction_outcome: ExecutionOutcomeWithIdOutcome of the transaction itself.
receipts_outcome: Vec<ExecutionOutcomeWithId>Outcomes of all receipts spawned by the transaction.
Implementations§
Source§impl FinalExecutionOutcome
impl FinalExecutionOutcome
Sourcepub fn is_success(&self) -> bool
pub fn is_success(&self) -> bool
Check if the transaction succeeded.
Sourcepub fn is_failure(&self) -> bool
pub fn is_failure(&self) -> bool
Check if the transaction failed.
Sourcepub fn failure_message(&self) -> Option<String>
pub fn failure_message(&self) -> Option<String>
Get the failure message if present.
Sourcepub fn failure_error(&self) -> Option<&TxExecutionError>
pub fn failure_error(&self) -> Option<&TxExecutionError>
Get the typed execution error if present.
Sourcepub fn transaction_hash(&self) -> &CryptoHash
pub fn transaction_hash(&self) -> &CryptoHash
Get the transaction hash.
Sourcepub fn total_gas_used(&self) -> Gas
pub fn total_gas_used(&self) -> Gas
Get total gas used across all receipts.
Sourcepub fn result(&self) -> Result<Vec<u8>, Error>
pub fn result(&self) -> Result<Vec<u8>, Error>
Get the return value as raw bytes (base64-decoded).
Returns Err if the execution status is not SuccessValue (including
transaction validation or action failures), or if the value is not
valid base64.
Note: When using the high-level transaction API, only transaction
validation failures return Err(Error::InvalidTx(..)) from the
send call. On-chain action failures are returned as Ok(outcome)
with outcome.is_failure() == true. This method is primarily useful
when working with the low-level rpc().send_tx() API or when you
already have an outcome and want to decode its return value.
Sourcepub fn json<T: DeserializeOwned>(&self) -> Result<T, Error>
pub fn json<T: DeserializeOwned>(&self) -> Result<T, Error>
Deserialize the return value as JSON.
Returns Err if result() fails (on-chain failure, unexpected status,
or invalid base64) or if JSON deserialization fails.
Trait Implementations§
Source§impl Clone for FinalExecutionOutcome
impl Clone for FinalExecutionOutcome
Source§fn clone(&self) -> FinalExecutionOutcome
fn clone(&self) -> FinalExecutionOutcome
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more