Skip to main content

Optimism Data Schema

Optimism datasets provide comprehensive on-chain data including blocks, transactions, and logs (events), traces (internal transactions), and state changes. All data is indexed and queryable through Portal or v2 archives.

Available Data Types

Block headers contain metadata about each block in the chain.
Field NameData TypeDescription
numberintegerBlock number
hashstringBlock hash
timestampintegerBlock timestamp (Unix)
parentHashstringParent block hash
gasUsedbigintTotal gas used in block
gasLimitbigintBlock gas limit
baseFeePerGasbigintBase fee per gas (EIP-1559)
l1BlockNumberintegerCorresponding L1 (Ethereum) block number
Transaction data includes all executed transactions with their execution details.
Field NameData TypeDescription
hashstringTransaction hash
fromaddressSender address
toaddressRecipient address
valuebigintTransaction value in wei
gasUsedbigintGas used by transaction
gasPricebigintGas price in wei
maxFeePerGasbigintMax fee per gas (EIP-1559)
maxPriorityFeePerGasbigintMax priority fee (EIP-1559)
l1FeebigintL1 data availability fee
inputbytesTransaction input data
nonceintegerTransaction nonce
statusintegerTransaction status (1 = success, 0 = failure)
Event logs emitted by smart contracts during transaction execution.
Field NameData TypeDescription
addressaddressContract address that emitted the log
topicsarrayIndexed event topics (up to 4)
databytesNon-indexed event data
logIndexintegerLog index in the block
transactionIndexintegerIndex of parent transaction
transactionHashstringHash of parent transaction
Internal transactions and call traces showing execution flow within transactions.
Field NameData TypeDescription
transactionIndexintegerIndex of parent transaction
typestringTrace type (call, create, suicide, reward)
fromaddressTrace originator address
toaddressTrace destination address
valuebigintValue transferred
gasbigintGas provided
gasUsedbigintGas actually used
inputbytesInput data
outputbytesOutput data

Usage Examples

For code examples showing how to query this data, see: