Skip to main content
POST
/
v1
/
evm
/
raw
/
contracts
curl -X POST "https://api.blockdb.io/v1/evm/raw/contracts" \
  -H "Authorization: Bearer $BLOCKDB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "chain_id": 1,
  "contract_addresses": [
    "1234567890abcdef1234567890abcdef12345678"
  ],
  "block_numbers": [
    18934001,
    18934222
  ],
  "from_block": 18933000,
  "to_block": 18936000,
  "from_timestamp": null,
  "to_timestamp": null,
  "limit": 200,
  "cursor": null
}'
{
  "meta": {
    "chain_id": 1,
    "request_window": {
      "from_block": 18933000,
      "to_block": 18936000,
      "from_timestamp": null,
      "to_timestamp": null
    },
    "filters": {
      "contract_addresses": [
        "1234567890abcdef1234567890abcdef12345678"
      ],
      "block_numbers": [
        18934001,
        18934222
      ]
    }
  },
  "data": [
    {
      "chain_id": 1,
      "contract_id": "1234567890abcdef1234567890abcdef1234567800121a0700",
      "contract_address": "1234567890abcdef1234567890abcdef12345678",
      "block_number": 18934221,
      "block_time": "2024-04-01T12:34:56Z",
      "tx_index": 7,
      "trace_address": "0",
      "creator_address": "0000000000000000000000000000000000000000",
      "creation_call_type": "CREATE2",
      "_tracing_id": "0121000000000000000000000000000000000001",
      "_created_at": "2025-11-11T18:42:15.123Z",
      "_updated_at": "2025-11-11T18:42:15.123Z"
    }
  ],
  "cursor": null,
  "count": 1
}

Overview

  • Dataset ID: 0121 - Contracts
  • Description: Smart contracts discovered via CREATE/CREATE2 internal transactions. Uses contract_id (26 bytes = address + creation_block + tx_index) as primary key to support metamorphic contracts (e.g. CREATE–SELFDESTRUCT–CREATE2 in the same block).
  • Sample: Hugging Face Sample

Parameters

chain_id
number
required
Target EVM network. See the Chain enumeration for supported values.

Range Filters (mutually exclusive with direct selectors)

from_block
number
Starting block number (inclusive) for the query. Use with to_block.
to_block
number
Ending block number (inclusive) for the query. Use with from_block.
from_timestamp
string
Starting timestamp (ISO-8601). If it falls between blocks, the next block after this timestamp is used. Use with to_timestamp.
to_timestamp
string
Ending timestamp (ISO-8601). If it falls between blocks, the last block before this timestamp is used. Use with from_timestamp.
Validation rule:
You must provide either a block range, a time range, block_numbers, or contract_addresses.
Providing both range selectors and explicit selectors results in HTTP 400.
Providing none also results in HTTP 400.

Direct Selectors

contract_addresses
string[]
Filter by specific deployed contract addresses (hex string, 20 bytes, no 0x prefix). Up to 256 addresses per request.
block_numbers
number[]
Explicit list of block heights to fetch contract deployments from. Mutually exclusive with the range filters.

Pagination Controls

limit
number
default:"250"
Recommended default 250; maximum 1000 to stay under ~10 MB responses.
cursor
string
Opaque pagination cursor supplied by a previous response.

Response Fields

Meta

meta
object
Echo of request metadata applied to the response.
meta.chain_id
number
EVM chain ID echoed from the request.
meta.request_window
object
Block/timestamp bounds derived from the request.
meta.filters
object
Filters echoed from the request (contract addresses, block numbers, limit).

Data

data
object[]
Each element mirrors the table columns (chain implied by meta.chain_id).
data.chain_id
number
EVM Chain ID for the record.
data.contract_id
string
Unique contract incarnation ID (hex string, 26 bytes, no 0x prefix): 20 bytes address + 4 bytes creation block + 2 bytes tx_index. Use for metamorphic disambiguation and to join with function-results.
data.contract_address
string
Deployed contract address (hex string, 20 bytes, no 0x prefix). Use for address-based lookups.
data.block_number
number
Block height containing the contract creation.
data.block_time
string
ISO-8601 UTC timestamp of the creation block, joined from the blocks dataset.
data.tx_index
number
Zero-based index of the deployment transaction within the block.
data.trace_address
string
Position in the call tree (e.g., "0", "0.0", "0.1.2").
data.creator_address
string
Address that deployed the contract (msg.sender of CREATE/CREATE2). Hex string, 20 bytes, no 0x prefix.
data.creation_call_type
string
Type of creation: CREATE or CREATE2.
data._tracing_id
string
Internal tracing identifier for lineage tracking (hex string, no 0x prefix).
data._created_at
string
Timestamp when BlockDB materialized the record.
data._updated_at
string
Timestamp of the latest update to the record.

Envelope Fields

cursor
string | null
Pagination cursor to continue the query.
count
number
Number of records in the current page.

Use Cases

  • Look up the canonical creation block for a contract address before hydrating additional metadata.
  • Backfill on-chain analyses that require the deployment timestamp or transaction location.
  • Seed lineage exploration using _tracing_id to pivot into /evm/logs and /evm/transactions.
curl -X POST "https://api.blockdb.io/v1/evm/raw/contracts" \
  -H "Authorization: Bearer $BLOCKDB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "chain_id": 1,
  "contract_addresses": [
    "1234567890abcdef1234567890abcdef12345678"
  ],
  "block_numbers": [
    18934001,
    18934222
  ],
  "from_block": 18933000,
  "to_block": 18936000,
  "from_timestamp": null,
  "to_timestamp": null,
  "limit": 200,
  "cursor": null
}'
{
  "meta": {
    "chain_id": 1,
    "request_window": {
      "from_block": 18933000,
      "to_block": 18936000,
      "from_timestamp": null,
      "to_timestamp": null
    },
    "filters": {
      "contract_addresses": [
        "1234567890abcdef1234567890abcdef12345678"
      ],
      "block_numbers": [
        18934001,
        18934222
      ]
    }
  },
  "data": [
    {
      "chain_id": 1,
      "contract_id": "1234567890abcdef1234567890abcdef1234567800121a0700",
      "contract_address": "1234567890abcdef1234567890abcdef12345678",
      "block_number": 18934221,
      "block_time": "2024-04-01T12:34:56Z",
      "tx_index": 7,
      "trace_address": "0",
      "creator_address": "0000000000000000000000000000000000000000",
      "creation_call_type": "CREATE2",
      "_tracing_id": "0121000000000000000000000000000000000001",
      "_created_at": "2025-11-11T18:42:15.123Z",
      "_updated_at": "2025-11-11T18:42:15.123Z"
    }
  ],
  "cursor": null,
  "count": 1
}
Last modified on March 21, 2026