I'm using the solana-transaction-status
crate and want to inspect the inner instructions of a given transaction in rust.
I can fetch the transaction data using the RPC and I get a EncodedConfirmedTransactionWithStatusMeta
object. I try to access the inner instructions using:
let inner_instructions = encoded_tx
.transaction
.meta
.to_owned()
.unwrap()
.inner_instructions;
This gives me an object of type OptionSerializer<Vec<UiInnerInstructions>>
. The issue is that I have no idea how to access and traverse the inner Vec<UiInnerInstructions>
. The API reference for the type doesn't seem to have an answer either: https://docs.rs/solana-transaction-status/1.14.7/solana_transaction_status/option_serializer/enum.OptionSerializer.html#method.skip
Any help would be appreciated