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
}'
{
"meta": {
"chain_id": 1,
"request_window": {
"from_block": 18934000,
"to_block": 18935000,
"from_timestamp": null,
"to_timestamp": null
},
"resolved_window": {
"from_block": 18934000,
"to_block": 18935000,
"from_timestamp": null,
"to_timestamp": null
},
"filters": {
"contract_addresses": [
"1234567890abcdef1234567890abcdef12345678"
],
"signature_hashes": [
"0902f1ac"
],
"latest_only": false
}
},
"data": [
{
"contract_id": "1234567890abcdef1234567890abcdef1234567800121a0700",
"block_number": 18934560,
"block_time": "2024-04-01T12:34:56.000Z",
"call_data": "0902f1ac",
"signature_hash": "0902f1ac",
"result": "0000000000000000000000000000000000000000000000000de0b6b3a7640000",
"timestamp_utc": "2024-04-01T12:34:56.000Z",
"_tracing_id": "0122000000000000000000000000000000000001",
"_created_at": "2025-11-11T18:42:15.123Z",
"_updated_at": "2025-11-11T18:42:15.123Z"
}
],
"cursor": null,
"page_count": 1
}
Primitives
Function Results
Read cached function execution outputs enriched with traces and gas usage.
POST
/
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
}'
{
"meta": {
"chain_id": 1,
"request_window": {
"from_block": 18934000,
"to_block": 18935000,
"from_timestamp": null,
"to_timestamp": null
},
"resolved_window": {
"from_block": 18934000,
"to_block": 18935000,
"from_timestamp": null,
"to_timestamp": null
},
"filters": {
"contract_addresses": [
"1234567890abcdef1234567890abcdef12345678"
],
"signature_hashes": [
"0902f1ac"
],
"latest_only": false
}
},
"data": [
{
"contract_id": "1234567890abcdef1234567890abcdef1234567800121a0700",
"block_number": 18934560,
"block_time": "2024-04-01T12:34:56.000Z",
"call_data": "0902f1ac",
"signature_hash": "0902f1ac",
"result": "0000000000000000000000000000000000000000000000000de0b6b3a7640000",
"timestamp_utc": "2024-04-01T12:34:56.000Z",
"_tracing_id": "0122000000000000000000000000000000000001",
"_created_at": "2025-11-11T18:42:15.123Z",
"_updated_at": "2025-11-11T18:42:15.123Z"
}
],
"cursor": null,
"page_count": 1
}
Overview
- Dataset ID:
0122 - Function Results - Description: On-chain function call return values versioned by block. Uses
contract_id(26 bytes) to support metamorphic contracts; primary key is(contract_id, block_number, call_data). - CSV Sample: Download
- JSON Sample: Download
Parameters
Range Filters (mutually exclusive)
Starting block number (inclusive) for the query. Use with
to_block.Ending block number (inclusive) for the query. Use with
from_block.Starting timestamp (ISO-8601). If it falls between blocks, the next block after this timestamp is used. Use with
to_timestamp.Ending timestamp (ISO-8601). If it falls between blocks, the last block before this timestamp is used. Use with
from_timestamp.Validation rule:
Every request must include a bounding window — either a block range (
Providing no bounding window results in HTTP 400.
Every request must include a bounding window — either a block range (
from_block/to_block) or a time range (from_timestamp/to_timestamp). The two ranges are mutually exclusive.contract_addresses and signature_hashes are refinement filters only and must be combined with a block or time range; they cannot be used on their own. function_results is a very large partitioned table, and selectors are low-selectivity (a single hot selector such as transfer() matches a huge fraction of rows), so an unbounded selector scan would time out.Providing no bounding window results in HTTP 400.
Refinement Filters
Filter by 20-byte contract addresses (hex string, no
0x prefix). Resolved to matching contract_id incarnations. Up to 256 entries. Requires a block or time range.4-byte function selectors (8 hex characters, no
0x prefix). Use to scope calls to specific function signatures. Requires a block or time range.Pagination Controls
Recommended default
250; maximum 1000 to stay under ~10 MB responses.Opaque pagination cursor returned from a prior call.
Response Fields
Meta
Echo of request metadata applied to the response.
EVM chain ID echoed from the request.
Pure echo of the window you sent (
from_block/to_block/from_timestamp/to_timestamp); unset bounds are null.The concrete window the query actually executed against, after resolving the request. For a block range on a time-bucketed endpoint (OHLC/VWAP/VWAP-aggregate/fiat VWAP),
from_timestamp/to_timestamp hold the resolved timestamp window (and from_block/to_block echo your request). For a time range on a block-keyed endpoint, from_block/to_block hold the resolved block range (and the timestamps echo your request). null for selector-only requests (no window). No extra database work is done — these are the values the query already computed.Resolved/echoed start block of the executed window.
Resolved/echoed end block of the executed window.
Resolved/echoed start timestamp (ISO-8601) of the executed window.
Resolved/echoed end timestamp (ISO-8601) of the executed window.
Filters echoed from the request (contract addresses, signature hashes, latest_only, limit).
Data
Function result records ordered by
(contract_id, block_number DESC) unless latest_only is true. Each row matches the linked dataset; the first 20 bytes of contract_id are the deployed address — there is no separate contract_address field in the payload.Contract incarnation ID (hex string, 26 bytes, no
0x prefix): 20 bytes address + 4 bytes creation block + 2 bytes tx index. Use to join with contracts or for metamorphic disambiguation.Snapshot block height when the value was observed.
Block time for the snapshot (ISO-8601).
Hex-encoded calldata sent to the contract. For simple getter functions, this is usually just the selector.
4-byte function selector (hex).
Hex-encoded return payload, or
null. Decode using the ABI corresponding to signature_hash.Observation timestamp (ISO-8601), aligned with the snapshot.
Internal lineage identifier (hex string, no
0x prefix) for cross-referencing with lineage endpoints.Record creation timestamp (ISO-8601).
Record last update timestamp (ISO-8601).
Envelope Fields
Pagination cursor to continue the query.
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
}'
{
"meta": {
"chain_id": 1,
"request_window": {
"from_block": 18934000,
"to_block": 18935000,
"from_timestamp": null,
"to_timestamp": null
},
"resolved_window": {
"from_block": 18934000,
"to_block": 18935000,
"from_timestamp": null,
"to_timestamp": null
},
"filters": {
"contract_addresses": [
"1234567890abcdef1234567890abcdef12345678"
],
"signature_hashes": [
"0902f1ac"
],
"latest_only": false
}
},
"data": [
{
"contract_id": "1234567890abcdef1234567890abcdef1234567800121a0700",
"block_number": 18934560,
"block_time": "2024-04-01T12:34:56.000Z",
"call_data": "0902f1ac",
"signature_hash": "0902f1ac",
"result": "0000000000000000000000000000000000000000000000000de0b6b3a7640000",
"timestamp_utc": "2024-04-01T12:34:56.000Z",
"_tracing_id": "0122000000000000000000000000000000000001",
"_created_at": "2025-11-11T18:42:15.123Z",
"_updated_at": "2025-11-11T18:42:15.123Z"
}
],
"cursor": null,
"page_count": 1
}
Last modified on May 29, 2026
Was this page helpful?
⌘I