> ## 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.

# abstract.logs

> Smart contract event logs on Abstract — 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>
  </>;

export const LogsSnippet = ({blockchain}) => <div>
    <h2>Table Description</h2>
    <p>
      The <code>{blockchain}.logs</code> 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: 
      <ul>
        <li>topic list: a list of 0 to 3 32-byte data topics. <code>Topic0</code> is the hash of the signature of the event (indexed), and the remaining topics are indexed parameters of the event.</li>
        <li>data: contains non-indexed data.</li>
      </ul>
    <Tip> 
      This is the raw version of this table. If the chain is a Fully Managed chain, decoded transaction calls will be available, see <a href={`/data-catalog/evm/${blockchain}/decoded/call-tables`}>call tables</a> section. If this is a Hosted chain, decoded call tables will not be available.
    </Tip>
    </p>
    <h2>Column Descriptions</h2>
    <table>
      <thead><tr><th>Column</th><th>Type</th><th>Description</th></tr></thead>
      <tbody>
        <tr><td><code>block_time</code></td><td><code>timestamp</code></td><td>Timestamp of the block containing this log</td></tr>
        <tr><td><code>block_number</code></td><td><code>bigint</code></td><td>Block number containing this log</td></tr>
        <tr><td><code>block_hash</code></td><td><code>varbinary</code></td><td>Hash of the block containing this log</td></tr>
        <tr><td><code>contract_address</code></td><td><code>varbinary</code></td><td>Address of the contract that emitted the log</td></tr>
        <tr><td><code>topic0</code></td><td><code>varbinary</code></td><td>Event signature hash (first indexed topic)</td></tr>
        <tr><td><code>topic1</code></td><td><code>varbinary</code></td><td>First indexed event parameter</td></tr>
        <tr><td><code>topic2</code></td><td><code>varbinary</code></td><td>Second indexed event parameter</td></tr>
        <tr><td><code>topic3</code></td><td><code>varbinary</code></td><td>Third indexed event parameter</td></tr>
        <tr><td><code>data</code></td><td><code>varbinary</code></td><td>Non-indexed event data</td></tr>
        <tr><td><code>tx_hash</code></td><td><code>varbinary</code></td><td>Hash of the transaction that generated this log</td></tr>
        <tr><td><code>index</code></td><td><code>integer</code></td><td>Position of the log within the block</td></tr>
        <tr><td><code>tx_index</code></td><td><code>integer</code></td><td>Position of the transaction within the block</td></tr>
        <tr><td><code>block_date</code></td><td><code>date</code></td><td>Date of the block (UTC)</td></tr>
        <tr><td><code>tx_from</code></td><td><code>varbinary</code></td><td>Address that initiated the transaction</td></tr>
        <tr><td><code>tx_to</code></td><td><code>varbinary</code></td><td>Address the transaction was sent to</td></tr>
        <tr><td><code>blob_gas_price</code></td><td><code>bigint</code></td><td>Blob gas price of the transaction (EIP-4844)</td></tr>
        <tr><td><code>blob_gas_used</code></td><td><code>bigint</code></td><td>Blob gas used by the transaction (EIP-4844)</td></tr>
      </tbody>
    </table>
    <h2>Table Sample</h2>
    <TableSample tableSchema={blockchain} tableName="logs" />
    <h2>Examples</h2>
    <h3>Filter the logs for a specific contract</h3>
    <pre><code>{`SELECT *
FROM ${blockchain}.logs
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d
LIMIT 10`}</code></pre>
    <h3>Filter the logs for a specific topic</h3>
    <pre><code>{`SELECT *
FROM ${blockchain}.logs
WHERE topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
`}</code></pre>
    <h3>Show the logs of a specific block</h3>
    <pre><code>{`SELECT *
FROM ${blockchain}.logs
WHERE evt_block_number = 1000000
`}</code></pre>
  </div>;

<LogsSnippet blockchain="abstract" />
