Queries spanning large block ranges or high-activity contracts can time out or be rejected. Keep
fromBlock-to-toBlock ranges under 2,000 blocks for reliable results. Node providers may enforce their own limits.Flashblocks: Set
"fromBlock": "pending" and "toBlock": "pending" on a https://mainnet-preconf.base.org endpoint to query logs from pre-confirmed transactions, updated every ~200ms. For a real-time stream, consider the pendingLogs WebSocket subscription instead.Parameters
The filter options. At least one criterion should be provided.
Show Filter fields
Show Filter fields
Start of the block range. Block number in hex or a block tag. Use
"pending" on a Flashblocks endpoint to include pre-confirmed logs. Defaults to "latest".End of the block range. Block number in hex or a block tag. Defaults to
"latest".A contract address or array of addresses to filter by. Optional.
Array of 32-byte topic filters. Each position can be
null (match any), a single topic hex string, or an array of hex strings (match any in the array). Position 0 is typically the keccak256 hash of the event signature. Optional.Restricts logs to the block with this hash. If provided,
fromBlock and toBlock are ignored. Optional.Returns
Array of log objects matching the filter.
Show Log object fields
Show Log object fields
20-byte address of the contract that emitted the log.
Array of 0–4 indexed 32-byte topics. Topic 0 is typically the event signature hash.
ABI-encoded non-indexed event parameters.
Block number in which this log was emitted (hex).
32-byte hash of the transaction that emitted this log.
Index of the transaction in the block (hex).
32-byte hash of the block.
Log’s index position within the block (hex).
true if the log was removed due to a chain reorganization.Example
Report incorrect code
Copy
Ask AI
curl https://mainnet.base.org \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getLogs",
"params": [{
"fromBlock": "0x12ced00",
"toBlock": "0x12ced28",
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]
}],
"id": 1
}'