assertIsSuccessfulTransactionPlanResult
Asserts that the given transaction plan result is a SuccessfulTransactionPlanResult.
This function verifies that the entire transaction plan result tree contains only successful single transaction results. It throws if any SingleTransactionPlanResult in the tree has a 'failed' or 'canceled' status.
Note: This is different from assertIsSuccessfulSingleTransactionPlanResult which asserts that a single result is successful. This function asserts that the entire plan result tree (including all nested parallel/sequential structures) contains only successful transactions.
Parameters
| Parameter | Type | Description |
|---|---|---|
plan | TransactionPlanResult | The transaction plan result to assert. |
Returns
asserts plan is SuccessfulTransactionPlanResult<TransactionPlanResultContext>
Throws
Throws a SolanaError with code
SOLANA_ERROR__INSTRUCTION_PLANS__EXPECTED_SUCCESSFUL_TRANSACTION_PLAN_RESULT if
any single transaction result in the tree is not successful.