Module transformers

Source
Expand description

Provides utility functions to transform transaction data into various representations within the carbon-core framework.

This module includes functions for extracting transaction metadata, parsing instructions, and nesting instructions based on stack depth. It also offers transformations for Solana transaction components into suitable formats for the framework, enabling flexible processing of transaction data.

§Key Components

  • Metadata Extraction: Extracts essential transaction metadata for processing.
  • Instruction Parsing: Parses both top-level and nested instructions from transactions.
  • Account Metadata: Converts account data into a standardized format for transactions.

§Notes

  • The module supports both legacy and v0 transactions, including handling of loaded addresses and inner instructions.

Functions§

extract_account_metas
Extracts account metadata from a compiled instruction and transaction message.
extract_instructions_with_metadata
Extracts instructions with metadata from a transaction update.
transaction_metadata_from_original_meta
Converts UI transaction metadata into TransactionStatusMeta.
unnest_parsed_instructions
Unnests parsed instructions, producing an array of (InstructionMetadata, DecodedInstruction<T>) tuple