Skip to main content
WSS
Messages
subscribe
type:object
unsubscribe
type:object
subscribe_response
type:object
unsubscribe_response
type:object
update
type:object

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).
  • Sample: Hugging Face Sample

Subscription Parameters

chain_id
number
required
Target EVM network. See the Chain enumeration for supported values.
contract_addresses
string[]
Filter by contract addresses (hex string, 20 bytes, no 0x prefix).
signature_hashes
string[]
Filter by 4-byte function selectors (e.g., 0902f1ac).

Message Fields

Payload fields mirror blockdb_evm.b0122_function_results_v1 (binary fields as hex strings without 0x in JSON).
contract_id
string
Contract incarnation ID (hex, 26 bytes).
block_number
number
Snapshot block height when the value was observed.
block_time
string
Block time (ISO-8601).
call_data
string
Hex-encoded calldata sent to the contract.
signature_hash
string
4-byte function selector (hex).
result
string | null
Hex-encoded return payload, or null.
timestamp_utc
string
Observation timestamp (ISO-8601).
_tracing_id
string
Lineage id (hex).
_created_at
string
Record creation time (ISO-8601).
_updated_at
string
Record last update time (ISO-8601).

Subscription Example

# Use wscat to connect and subscribe
wscat -c wss://api.blockdb.io/v1/evm/ \
  -H "Authorization: Bearer $BLOCKDB_API_KEY" \
  -x '{"action": "subscribe", "dataset_id": "0122", "chain_id": 1, "params": {"signature_hashes": ["0902f1ac"]}}'

Response Example

{
  "chain_id": 1,
  "dataset_id": "0122",
  "is_reorg": 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"
  }
}
Last modified on April 6, 2026