본문으로 건너뛰기

ExecutionOutcome Structure

Definition

ExecutionOutcome is the result of execution of Transaction or Receipt

Transaction's ExecutionOutcome

In the result of the Transaction execution will always be a Receipt.

ExecutionOutcomeWithIdView

pub struct ExecutionOutcomeWithIdView {
pub proof: MerklePath,
pub block_hash: CryptoHash,
pub id: CryptoHash,
pub outcome: ExecutionOutcomeView,
}

ExecutionOutcomeView

pub struct ExecutionOutcomeView {
/// Logs from this transaction or receipt.
pub logs: Vec<String>,
/// Receipt IDs generated by this transaction or receipt.
pub receipt_ids: Vec<CryptoHash>,
/// The amount of the gas burnt by the given transaction or receipt.
pub gas_burnt: Gas,
/// The amount of tokens burnt corresponding to the burnt gas amount.
/// This value doesn't always equal to the `gas_burnt` multiplied by the gas price, because
/// the prepaid gas price might be lower than the actual gas price and it creates a deficit.
#[serde(with = "u128_dec_format")]
pub tokens_burnt: Balance,
/// The id of the account on which the execution happens. For transaction this is signer_id,
/// for receipt this is receiver_id.
pub executor_id: AccountId,
/// Execution status. Contains the result in case of successful execution.
pub status: ExecutionStatusView,
/// Execution metadata, versioned
#[serde(default)]
pub metadata: ExecutionMetadataView,
}

ExecutionStatusView

pub enum ExecutionStatusView {
/// The execution is pending or unknown.
Unknown,
/// The execution has failed.
Failure(TxExecutionError),
/// The final action succeeded and returned some value or an empty vec encoded in base64.
SuccessValue(String),
/// The final action of the receipt returned a promise or the signed transaction was converted
/// to a receipt. Contains the receipt_id of the generated receipt.
SuccessReceiptId(CryptoHash),
}
Was this page helpful?