Skip to main content
Schema: solana.core Table: fact_events_inner Type: Base Table

Description

This table records every event that occurs within inner instructions (Cross-Program Invocations, or CPIs) on the Solana blockchain. Each row represents an event triggered by a program calling another program during transaction execution, capturing the full context of nested program interactions. The table covers all inner events observed on Solana mainnet, with detailed indexing to support analysis of deeply nested program flows. Events are uniquely identified by block, transaction, instruction, and inner instruction indices. This model enables granular tracing of protocol and application logic, supporting advanced analytics on composability, protocol integrations, and on-chain automation.

Key Use Cases

  • Analyze Cross-Program Invocations (CPIs) and nested program calls
  • Trace the full execution flow of complex Solana transactions
  • Study composability and protocol integrations
  • Support advanced analytics on on-chain automation and program-to-program interactions
  • Downstream analytics for protocol-specific event flows and composable DeFi/NFT protocols

Important Relationships

  • Closely related to core.fact_events (for top-level events), core.ez_events_decoded (preferred for decoded instruction details), and core.ez_transfers (for transfer events)
  • Use core.fact_events for top-level program events and instruction execution
  • Use core.ez_events_decoded for detailed instruction and argument analysis (if program is being decoded)
  • Use core.ez_transfers for asset movement and transfer analytics
  • Joins with core.fact_blocks for block context and core.fact_transactions for transaction context

Commonly-used Fields

  • block_timestamp: For time-series and event sequencing analysis
  • block_id, tx_id, instruction_index, inner_index: For unique event identification and joins
  • program_id, instruction_program_id, event_type: For filtering by program or event type
  • instruction: For instruction-level analytics
  • signers, succeeded: For user attribution and transaction outcome analysis

Sample Queries

Count of inner instructions by program

SELECT
    program_id,
    COUNT(*) AS inner_instruction_count,
    COUNT(DISTINCT tx_id) AS unique_transactions
FROM solana.core.fact_events_inner
WHERE block_timestamp >= CURRENT_DATE - 1
GROUP BY program_id
ORDER BY inner_instruction_count DESC
LIMIT 20;

Simple inner instruction details

SELECT
    block_timestamp,
    tx_id,
    program_id,
    instruction_index,
    inner_index,
    instruction
FROM solana.core.fact_events_inner
WHERE block_timestamp >= CURRENT_TIMESTAMP - INTERVAL '1 hour'
ORDER BY block_timestamp DESC, tx_id, instruction_index, inner_index
LIMIT 100;

Transactions with nested instructions

SELECT
    tx_id,
    COUNT(*) AS total_inner_instructions,
    COUNT(DISTINCT program_id) AS programs_called,
    MAX(inner_index) + 1 AS max_nesting_depth
FROM solana.core.fact_events_inner
WHERE block_timestamp >= CURRENT_DATE - 1
GROUP BY tx_id
HAVING total_inner_instructions > 1
ORDER BY total_inner_instructions DESC
LIMIT 100;

Columns

Column NameData TypeDescription
BLOCK_TIMESTAMPTIMESTAMP_NTZThe timestamp (UTC) at which the block was produced on the Solana blockchain. This field is recorded as a TIMESTAMP data type and represents the precise moment the block was finalized and added to the chain. It is essential for time-series analysis, block production monitoring, and aligning transaction and event data to specific points in time. Used extensively for analytics involving block intervals, network activity trends, and historical lookups. Format: YYYY-MM-DD HH:MI:SS (UTC).
BLOCK_IDNUMBERA unique identifier for the block in which this transaction was included on the Solana blockchain. Typically a sequential integer or hash, depending on the data source. Used to group transactions by block and analyze block-level activity.
Example:
  • 123456789
Business Context:
  • Supports block-level analytics, such as block production rate and transaction throughput.
  • Useful for tracing transaction inclusion and block explorer integrations.
Relationships:
  • All transactions with the same ‘block_id’ share the same ‘block_timestamp’. | | TX_ID | TEXT | The unique transaction signature (hash) for each transaction on the Solana blockchain. This field is a base58-encoded string, typically 88 characters in length, and serves as the primary identifier for transactions across all Solana data models. Used to join transaction data with related tables (blocks, events, transfers, logs, decoded instructions) and to trace the full lifecycle and effects of a transaction. Essential for transaction-level analytics, debugging, and cross-referencing with block explorers or Solana APIs.
Example:
  • 5Nf6Q2k6v1Qw2k3v4Qw5Nf6Q2k6v1Qw2k3v4Qw5Nf6Q2k6v1Qw2k3v4Qw5Nf6Q2k6v1Qw2k3v4Qw
Business Context:
  • Enables precise tracking, auditing, and attribution of on-chain activity
  • Used for linking transactions to events, logs, and protocol actions
  • Critical for compliance, monitoring, and analytics workflows | | SIGNERS | ARRAY | List of accounts that signed the transaction. This field captures all wallet addresses that provided signatures for the transaction, enabling multi-signature analysis and transaction authority tracking.
Data type: ARRAY (list of Solana addresses) Business context: Used to track transaction signers, analyze multi-signature patterns, and identify transaction authorities. Analytics use cases: Multi-signature analysis, transaction authority tracking, and signer pattern studies. Example: [‘9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM’, ‘AnotherAddress…’] | | SUCCEEDED | BOOLEAN | Boolean flag indicating whether the transaction was successfully executed and confirmed on the Solana blockchain. A value of TRUE means the transaction was processed without errors; FALSE indicates failure due to program errors, insufficient funds, or other issues. Example:
  • true
  • false
Business Context:
  • Used to filter for successful transactions in analytics and reporting.
  • Important for error analysis, user experience, and program debugging. | | INSTRUCTION_INDEX | NUMBER | The position of the event (instruction) within the list of instructions for a given Solana transaction. Used to order and reference events within a transaction. Indexing starts at 0 for the first event.
Example:
  • 0
  • 3
Business Context:
  • Enables precise identification and ordering of events within a transaction, which is critical for reconstructing transaction flows and analyzing protocol behavior.
  • Used to join or filter event-level data, especially when multiple events occur in a single transaction. | | INNER_INDEX | NUMBER | The position of the inner instruction or event within the list of inner instructions for a given Solana transaction. Used to order and reference nested (CPI) instructions. Indexing starts at 0 for the first inner instruction.
Example:
  • 0
  • 2
Business Context:
  • Enables precise identification and ordering of nested program calls (Cross-Program Invocations) within a transaction.
  • Critical for analyzing composability, protocol integrations, and the full execution path of complex transactions. | | INSTRUCTION_PROGRAM_ID | TEXT | The unique public key (base58-encoded address) of the Solana program that invoked this inner instruction (Cross-Program Invocation, CPI). This field identifies the calling program.
Example:
  • “4Nd1mY…” (caller)
  • “TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA” (callee)
Business Context:
  • Enables tracing of program-to-program calls and composability patterns in Solana transactions.
  • Used to analyze protocol integrations, nested execution flows, and the origin of on-chain actions.
Relationships:
  • Used with ‘program_id’, ‘tx_id’, and instruction indices to reconstruct full CPI call stacks.
  • ‘instruction_program_id’ is the caller; ‘program_id’ is the callee for the inner instruction. | | PROGRAM_ID | TEXT | The unique public key (base58-encoded address) of a Solana program. This field identifies the on-chain program (smart contract) responsible for processing instructions, emitting events, or managing accounts. Used throughout Solana analytics models—including events, transactions, IDLs, and program activity tables—to join, filter, and analyze program-level data.
Example:
  • “4Nd1mY…”
  • “TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA”
Business Context:
  • Used as a join key for program activity, deployments, events, and interface changes.
  • Supports segmentation of activity by protocol, DEX, NFT marketplace, or other on-chain application. | | EVENT_TYPE | TEXT | A string categorizing the type of event or instruction, such as ‘transfer’, ‘mint’, ‘burn’, or protocol-specific actions.
Example:
  • ‘transfer’
  • ‘mint’
  • ‘burn’
Business Context:
  • Enables segmentation and filtering of on-chain activity for analytics and dashboards.
  • Used to group and analyze protocol-specific actions and user behaviors.
Relationships:
  • May be derived from decoded instruction data or protocol-specific logic. | | INSTRUCTION | VARIANT | Specifies which program it is calling, which accounts it wants to read or modify, and additional data that serves as auxiliary input to the program | | _INSERTED_TIMESTAMP | TIMESTAMP_NTZ | Time the record was inserted into snowflake | | FACT_EVENTS_INNER_ID | TEXT | A unique, stable identifier for each record in this table. The primary key (PK) ensures that every row is uniquely identifiable and supports efficient joins, lookups, and data integrity across models. The PK may be a natural key (such as a blockchain transaction hash) or a surrogate key generated from one or more fields, depending on the table’s structure and requirements. | | INSERTED_TIMESTAMP | TIMESTAMP_NTZ | The timestamp when this transaction record was first inserted into the analytics database. Used for data freshness tracking and incremental model logic. Format: YYYY-MM-DD HH:MI:SS. Not derived from the blockchain, but from the ETL process. | | MODIFIED_TIMESTAMP | TIMESTAMP_NTZ | The timestamp when this transaction record was last updated in the analytics database. Used for tracking updates and supporting incremental model logic. Format: YYYY-MM-DD HH:MI:SS. Not derived from the blockchain, but from the ETL process. |