EVM Protobuf Streams
You can find the schema here.
EVM blockchains produce blocks at varying intervals depending on the network. Ethereum mainnet targets ~12 seconds per block, while other EVM chains may have different block times.
Structure of On-Chain Data
The EVM Protobuf Streams provide three main message types for different use cases:
BlockMessage
: Full blocks with detailed transaction tracesTokenBlockMessage
: Focused on token transfers with currency metadataDexBlockMessage
: Specialized for DEX (Decentralized Exchange) trading activity
Block-Level Data
Each block in the stream includes a BlockHeader
with fields such as:
Hash
: The unique identifier of the blockParentHash
: Hash of the previous blockNumber
: Block number/height in the chainGasLimit
: Maximum gas allowed in this blockGasUsed
: Actual gas consumed by transactionsTime
: Block timestampBaseFee
: Base fee per gas (EIP-1559)
The BlockMessage
also includes:
Chain
: Information about the blockchain (ChainId, Config)Uncles
: Uncle/ommer blocks (Ethereum PoW)Transactions
: All transactions in the blockL1Header
: For Layer 2 chains, information about the corresponding L1 block
Transaction-Level Data
Transactions include:
TransactionHeader
: Core transaction dataHash
: Transaction hashGas
: Gas limit for this transactionValue
: Amount of native currency transferredData
: Call data for contract interactionsFrom
/To
: Sender and recipient addressesGasPrice
,GasFeeCap
,GasTipCap
: Fee parameters- Special fields for EIP-4844 blob transactions
Signature
: Transaction signature (R, S, V values)Receipt
: Execution resultsStatus
: Success or failureGasUsed
: Actual gas consumedLogs
: Event logs emitted
Trace
: Detailed execution traceCalls
: Internal contract callsCaptureStates
: State modifications
Token Data
The TokenBlockMessage
stream provides information about token transfers:
TokenTransfer
: Records token movements with:Sender
: Address sending tokensReceiver
: Address receiving tokensAmount
: Amount of tokens transferredId
: Token ID (for non-fungible tokens)Currency
: Detailed token informationSuccess
: Whether the transfer succeeded
TokenInfo
: Metadata about each token:SmartContract
: Token contract addressName
: Token nameSymbol
: Token symbolDecimals
: Token decimal placesFungible
: Whether token is fungible (ERC-20) or non-fungible (ERC-721/1155)
DEX (Decentralized Exchange) Data
The DexBlockMessage
stream specializes in DEX trading activity:
DexTrade
: Records of trades executed on DEXsBuy
/Sell
: Both sides of the tradeDex
: Information about the exchangeSuccess
: Whether the trade succeededFees
: Trading fees paid
DexInfo
: Details about the exchange:SmartContract
: Exchange contract addressProtocolName
: Name of the protocol (e.g., "Uniswap", "SushiSwap")ProtocolFamily
: Family of DEX protocolsProtocolVersion
: Version of the protocolPair
: Trading pair information
TradeSide
: Details about each side of a trade:Buyer
/Seller
: Addresses involvedOrderId
: Identifier for the orderAssets
: What was traded
Layer 2 Support
EVM Protobuf Streams provide dedicated fields for Layer 2 chains:
L1Header
: Corresponding L1 block information- Optimism-specific fields:
SequenceNumber
,BatcherAddr
,L1FeeOverhead
, etc. - Arbitrum-specific fields:
GasL1
for L1 data costs
Using This Stream in Python, JavaScript, and Go
Python, JavaScript, and Go code samples can be used with these streams by changing the topic to one of:
eth.transactions.proto
eth.tokens.proto
eth.dextrades.proto
eth.raw.proto
(for raw block data)eth.broadcasted.transactions.proto
(for broadcasted transactions)eth.broadcasted.tokens.proto
(for broadcasted token transfers)eth.broadcasted.dextrades.proto
(for broadcasted DEX trades)eth.broadcasted.raw.proto
(for raw broadcasted block data)
The Python package bitquery-pb2-kafka-package includes all schema and is up to date so you don't have to manually install schema files.