Skip to main content

Solana Module

The Solana module parses transactions for the Solana blockchain, handling multiple instructions, programs, and SPL tokens.

Architecture Overview

Transaction Model

  • Encoding: Borsh/Bincode serialization
  • Instruction-based: Multiple instructions per transaction
  • Account Model: Accounts owned by programs
  • Fee Model: Fixed base fee with optional priority fees

Key Components

The Solana parser handles:

  • System program transfers
  • SPL Token operations
  • Associated Token Account (ATA) creation
  • Multiple instructions per transaction
  • Program invocations

Transaction Structure

Solana transactions consist of:

  1. Signatures: One or more transaction signatures
  2. Message: Contains the actual transaction data
    • Account keys (all accounts involved)
    • Instructions (operations to execute)
    • Recent blockhash (for replay protection)

Instruction Types

System Program

  • SOL transfers between accounts
  • Account creation and initialization
  • Space allocation for data storage

SPL Token Program

  • Token transfers
  • Token approvals
  • Mint and burn operations

Associated Token Account

  • Automatic creation of token accounts
  • Deterministic addressing for user tokens

Visualization Strategy

Primary Information

Display the most significant instruction as the title, with supporting instructions shown as steps.

Multiple Instructions

Group related instructions together, showing them as a sequence of operations.

Account Context

Show account ownership and program associations when relevant.

Implementation Details

Source code available at:

Supported Programs

The parser recognizes common Solana programs:

  • System Program
  • SPL Token Program
  • SPL Associated Token Account Program
  • Custom programs via IDL (Interface Definition Language)

Example Transaction Types

SOL Transfer

Simple transfer of native SOL between accounts.

SPL Token Transfer

Transfer of SPL tokens, often including ATA creation if needed.

Complex DeFi Transaction

Multiple instructions working together (e.g., create account, transfer tokens, interact with DEX).

Resources