> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dune.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ethereum.logs

> Smart contract event logs on Ethereum — indexed topics and data fields from token transfers, swaps, and protocol actions.

export const TableSample = ({tableName, tableSchema}) => <>
    <div className="hidden dark:block">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}&darkMode=true`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
    <div className="dark:hidden">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
  </>;

## Table Description

The `ethereum.logs` table represents the logs generated by the Ethereum Virtual Machine (EVM) when a contract is executed. Logs are a way to store data on the blockchain. Logs originate from events that occur during the execution of a smart contract. A log consists of:

* topic list: a list of 0 to 4 32-byte data topics. `Topic0` is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.
* data: contains non-indexed data.

This is the raw version of this table, for decoded event logs, see the [decoded logs](/data-catalog/evm/ethereum/decoded/event-logs) section.

## Column Descriptions

| Column | Type | Description |
| - | - | - |
| `block_time` | `timestamp` | Timestamp of the block containing this log |
| `block_number` | `bigint` | Block number containing this log |
| `block_hash` | `varbinary` | Hash of the block containing this log |
| `contract_address` | `varbinary` | Address of the contract that emitted the log |
| `topic0` | `varbinary` | Event signature hash (first indexed topic) |
| `topic1` | `varbinary` | First indexed event parameter |
| `topic2` | `varbinary` | Second indexed event parameter |
| `topic3` | `varbinary` | Third indexed event parameter |
| `data` | `varbinary` | Non-indexed event data |
| `tx_hash` | `varbinary` | Hash of the transaction that generated this log |
| `index` | `integer` | Position of the log within the block |
| `tx_index` | `integer` | Position of the transaction within the block |
| `block_date` | `date` | Date of the block (UTC) |
| `tx_from` | `varbinary` | Address that initiated the transaction |
| `tx_to` | `varbinary` | Address the transaction was sent to |
| `blob_gas_price` | `bigint` | Blob gas price of the transaction (EIP-4844) |
| `blob_gas_used` | `bigint` | Blob gas used by the transaction (EIP-4844) |

## Table Sample

<TableSample tableSchema="ethereum" tableName="logs" />

## Examples

### Filter the logs for a specific contract

```sql theme={null}
select *
from ethereum.logs
where contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
limit 10
```

### Filter the logs for a specific topic

```sql theme={null}
select *
from ethereum.logs
where topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef

```

### Show the logs of a specific block

```sql theme={null}
SELECT *
FROM ethereum.logs
WHERE evt_block_number = 1000000
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.