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

# gnosis.creation_traces

> Contract deployment records on Gnosis — deployer address, factory context, and deployed bytecode.

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 CreationTracesSnippet = ({blockchain}) => <div>
    <h2>Table Description</h2>
    <p>
      The <code>{blockchain}.creation_traces</code> table contains information about the creation of smart contracts on the {blockchain} blockchain. This includes the address of the contract, the address of the creator, the block number at which the contract was created, the transaction hash, and the contract's bytecode. This table is useful for understanding the deployment of smart contracts on the {blockchain} blockchain.
    </p>
    <Tip>
      This table is a subset of the <code>traces</code> table, which contains information about all traces on the {blockchain} blockchain. The <code>creation_traces</code> table is filtered to only include traces that create new smart contracts. The filter for this is <code>type = 'create' </code>.
    </Tip>
    <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 creation trace</td></tr>
        <tr><td><code>block_number</code></td><td><code>bigint</code></td><td>Block number containing this creation trace</td></tr>
        <tr><td><code>tx_hash</code></td><td><code>varbinary</code></td><td>Hash of the transaction that created the contract</td></tr>
        <tr><td><code>address</code></td><td><code>varbinary</code></td><td>Address of the newly created contract</td></tr>
        <tr><td><code>from</code></td><td><code>varbinary</code></td><td>Address that deployed the contract</td></tr>
        <tr><td><code>code</code></td><td><code>varbinary</code></td><td>Bytecode of the deployed contract</td></tr>
        <tr><td><code>block_month</code></td><td><code>date</code></td><td>Month of the block (for partitioning)</td></tr>
      </tbody>
    </table>
    <h2>Table Sample</h2>
    <TableSample tableSchema={blockchain} tableName="creation_traces" />
    <h2>Examples</h2>
    <h3>Show the creation of a specific smart contract</h3>
    <pre><code>{`SELECT * FROM ${blockchain}.creation_traces
WHERE contract_address = 0x06012c8cf97bead5deae237070f9587f8e7a266d`}</code></pre>
    <h3>Show the creation of smart contracts by a specific creator</h3>
    <pre><code>{`SELECT * FROM ${blockchain}.creation_traces
WHERE "from" = 0x0d4a11d5eeaac28ec3f61d100da81f6a1b65c9d6`}</code></pre>
    <h3>Show the creation of smart contracts in the last 10 days</h3>
    <pre><code>{`SELECT 
    date_trunc('day', block_time) AS day,
    COUNT(*)
FROM ${blockchain}.creation_traces
GROUP BY 1
ORDER BY 1 DESC
LIMIT 10`}</code></pre>
  </div>;

<CreationTracesSnippet blockchain="gnosis" />
