Skip to main content
The SQL API schema is a set of opinionated tables and columns used to organize onchain data for efficient retrieval.

Supported Tables

Base

On Base Sepolia, the same tables are available under the base_sepolia.* prefix (for example, base_sepolia.events).

Solana

See Query Solana tokens for coverage details, query tips, and examples.

base.blocks

Block metadata including timestamps, gas usage, and consensus fields.
See an example block on Basescan to understand how blockchain data corresponds to these SQL fields.

base.transactions

Transaction data including hash, block number, gas usage, and signatures.
See an example transaction on Basescan to understand how transaction data corresponds to these SQL fields.
timestamp on base.blocks and base.transactions is DateTime (second precision, server timezone), while block_timestamp on base.events, base.encoded_logs, base.decoded_user_operations, and base.transaction_attributions is DateTime64(3, 'UTC') (millisecond precision, UTC). When joining or comparing timestamps across these tables, cast explicitly (for example, toDateTime64(timestamp, 3, 'UTC')) to avoid precision loss or timezone surprises.

base.events

Decoded event logs with contract interactions on Base.
B20 support: All B20 native token standard events—including token operations, factory deployments, and Policy Registry updates—are decoded into this table. See Query B20 Events for indexed event signatures and example queries.
Schema changes: timestamp has been renamed to block_timestamp, and transaction_index has been removed. To retrieve a log’s transaction position within its block, join to base.transactions on transaction_hash and select transaction_index from there.
See example events on Basescan to see how event logs appear on the blockchain.

base.encoded_logs

Encoded log data of event logs that aren’t able to be decoded by our event decoder (ex: log0 opcode).

base.decoded_user_operations

Decoded ERC-4337 user operations bundled into Base transactions.

base.transaction_attributions

Builder/searcher attribution metadata for Base transactions.

solana.transfers

Token transfers projected from decoded transfer / transferChecked instructions on SPL Token, Token-2022, and the System program (native SOL).
Filter on mint and block_time for best performance. Use source_owner / destination_owner to query by wallet rather than token account. Native SOL transfers have an empty mint.

solana.instructions

Decoded Solana instruction calls. At launch, coverage focuses on SPL Token (TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA) and Token-2022 (TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb).
This is an SVM-native schema, not a copy of base.events. Prefer filtering on executing_account, instruction_name, and block_time (the primary index prefix). See Query Solana tokens for examples.