Skip to main content
POST
https://api.blockdb.io
/
v1
/
evm
/
raw
/
function-results
curl -X POST "https://api.blockdb.io/v1/evm/raw/function-results" \
  -H "Authorization: Bearer $BLOCKDB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "chain_id": 1,
  "contract_addresses": [
    "1234567890abcdef1234567890abcdef12345678"
  ],
  "signature_hashes": [
    "0902f1ac"
  ],
  "from_block": 18934000,
  "to_block": 18935000,
  "from_timestamp": null,
  "to_timestamp": null,
  "latest_only": false,
  "limit": 200,
  "cursor": null
}'
{
  "chain_id": 1,
  "meta": {
    "request_window": {
      "from_block": 18934000,
      "to_block": 18935000,
      "from_timestamp": null,
      "to_timestamp": null
    },
    "filters": {
      "contract_addresses": [
        "1234567890abcdef1234567890abcdef12345678"
      ],
      "signature_hashes": [
        "0902f1ac"
      ],
      "latest_only": false
    }
  },
  "data": [
    {
      "dataset": "0105_function-results",
      "dataset_id": "0105",
      "chain_id": 1,
      "contract_address": "1234567890abcdef1234567890abcdef12345678",
      "signature_hash": "0902f1ac",
      "block_number": 18934560,
      "timestamp_utc": "2024-04-01T12:34:56Z",
      "call_data": "0902f1ac",
      "result": "0000000000000000000000000000000000000000000000000de0b6b3a7640000",
      "tracing_id": "0105000000000000000000000000000000000001",
      "_tracing_id": "0105000000000000000000000000000000000001",
      "created_at": "2025-11-11T18:42:15.123Z",
      "_created_at": "2025-11-11T18:42:15.123Z",
      "updated_at": "2025-11-11T18:42:15.123Z",
      "_updated_at": "2025-11-11T18:42:15.123Z"
    }
  ],
  "cursor": null,
  "count": 1
}

Description

Retrieves on-chain function call return values captured at specific block heights. Use this endpoint to hydrate oracle snapshots, monitor configuration values, or audit contract state without re-running eth_call at historical blocks.

Parameters

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

Range Filters (mutually exclusive)

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, or explicit selectors.
Providing more than one option (e.g., both ranges or ranges plus selectors) results in HTTP 400.
Providing none results in HTTP 400.

Direct Selectors

contract_addresses
string[]
Filter by 20-byte contract addresses (hex string, no 0x prefix). Up to 256 entries.
signature_hashes
string[]
4-byte function selectors (8 hex characters, no 0x prefix). Use to scope calls to specific function signatures.

Result Controls

latest_only
boolean
default:"true"
When true, returns only the most recent result per (contract_address, signature_hash) within the requested range. Results are sorted by descending block_number.

Pagination Controls

limit
number
default:"250"
Recommended default 250; maximum 1000 to stay under ~10 MB responses.
cursor
string
Opaque pagination cursor returned from a prior call.

Response Fields

chain_id
number
EVM chain ID echoed at the response root.

Meta

meta
object
Echo of request metadata applied to the response.
meta.request_window
object
Block/timestamp bounds derived from the request.
meta.filters
object
Filters echoed from the request (contract addresses, signature hashes, latest_only, limit).

Data

data
object[]
Function result records ordered by (block_number DESC, contract_address, signature_hash) unless latest_only is true.
data.dataset
string
Dataset slug referencing this collection (0105_function-results). See the DatasetId enumeration for the underlying ID.
data.dataset_id
string
Explicit dataset ID when projection includes it (mirrors the prefix from the slug).
data.chain_id
number
Network where the call was executed.
data.contract_address
string
Contract queried (hex string, 20 bytes, no 0x prefix).
data.signature_hash
string
4-byte selector for the function invoked.
data.block_number
number
Snapshot block height when the value was observed.
data.timestamp_utc
string
ISO-8601 timestamp of the snapshot block.
data.call_data
string
Hex-encoded calldata sent to the contract. For simple getter functions, this is usually just the selector.
data.result
string
Hex-encoded return payload. Decode using the ABI corresponding to signature_hash.
data.tracing_id
string
Public tracing identifier for cross-referencing with lineage endpoints.
data._tracing_id
string
Internal lineage identifier (hex string, no 0x prefix).
data.created_at
string
ISO-8601 timestamp when BlockDB materialized the record.
data._created_at
string
Internal created-at timestamp (mirrors created_at).
data.updated_at
string
ISO-8601 timestamp of the most recent update.
data._updated_at
string
Internal updated-at timestamp (mirrors updated_at).

Envelope Fields

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

Use Cases

  • Refresh oracle or configuration caches with latest per-block values.
  • Detect contract parameter changes by diffing consecutive results.
  • Seed lineage exploration by pairing selectors with their upstream transactions and logs.
curl -X POST "https://api.blockdb.io/v1/evm/raw/function-results" \
  -H "Authorization: Bearer $BLOCKDB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "chain_id": 1,
  "contract_addresses": [
    "1234567890abcdef1234567890abcdef12345678"
  ],
  "signature_hashes": [
    "0902f1ac"
  ],
  "from_block": 18934000,
  "to_block": 18935000,
  "from_timestamp": null,
  "to_timestamp": null,
  "latest_only": false,
  "limit": 200,
  "cursor": null
}'
{
  "chain_id": 1,
  "meta": {
    "request_window": {
      "from_block": 18934000,
      "to_block": 18935000,
      "from_timestamp": null,
      "to_timestamp": null
    },
    "filters": {
      "contract_addresses": [
        "1234567890abcdef1234567890abcdef12345678"
      ],
      "signature_hashes": [
        "0902f1ac"
      ],
      "latest_only": false
    }
  },
  "data": [
    {
      "dataset": "0105_function-results",
      "dataset_id": "0105",
      "chain_id": 1,
      "contract_address": "1234567890abcdef1234567890abcdef12345678",
      "signature_hash": "0902f1ac",
      "block_number": 18934560,
      "timestamp_utc": "2024-04-01T12:34:56Z",
      "call_data": "0902f1ac",
      "result": "0000000000000000000000000000000000000000000000000de0b6b3a7640000",
      "tracing_id": "0105000000000000000000000000000000000001",
      "_tracing_id": "0105000000000000000000000000000000000001",
      "created_at": "2025-11-11T18:42:15.123Z",
      "_created_at": "2025-11-11T18:42:15.123Z",
      "updated_at": "2025-11-11T18:42:15.123Z",
      "_updated_at": "2025-11-11T18:42:15.123Z"
    }
  ],
  "cursor": null,
  "count": 1
}