> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blockdb.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Function Results

> Block-versioned on-chain view function outputs — token metadata, oracle values. Time-travel queries over any contract state.

## Overview

* **Dataset ID:** `0122`
* **Table:** `blockdb_evm.b0122_function_results_v1`
* **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)`.
* **Primary key:** `(contract_id, block_number, call_data)`
* **API:** [POST /evm/raw/function-results](/api-reference/evm/primitives/function-results)
* **CSV Sample:** [Download](https://huggingface.co/datasets/BlockDB/Raw-Function-Results-Ethereum-And-EVM-Cryptocurrency-Data/resolve/main/data/blockdb_evm.b0122_function_results_v1.csv?download=true)
* **JSON Sample:** [Download](https://huggingface.co/datasets/BlockDB/Raw-Function-Results-Ethereum-And-EVM-Cryptocurrency-Data/resolve/main/data/blockdb_evm.b0122_function_results_v1.json?download=true)

## Sample Viewer

<Frame>
  <iframe src="https://huggingface.co/datasets/BlockDB/Raw-Function-Results-Ethereum-And-EVM-Cryptocurrency-Data/embed/viewer/default/train" frameborder="0" width="100%" height="600px" />
</Frame>

## Columns

| Column           | Type          | Description                                                                                                                               |
| ---------------- | ------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| `contract_id`    | `BYTEA`       | Unique contract incarnation ID: 20 bytes (address) + 4 bytes (creation block BE) + 2 bytes (tx\_index BE). Links to `b0121_contracts_v1`. |
| `block_number`   | `BIGINT`      | Block at which the value was read.                                                                                                        |
| `block_time`     | `TIMESTAMPTZ` | UTC timestamp of the block.                                                                                                               |
| `call_data`      | `BYTEA`       | Raw call data used to invoke the function.                                                                                                |
| `signature_hash` | `BYTEA`       | 4-byte selector (keccak256(signature)\[0..3]).                                                                                            |
| `result`         | `BYTEA`       | Raw return data from the function call (null if reverted).                                                                                |
| `timestamp_utc`  | `TIMESTAMPTZ` | UTC timestamp when the function call result was recorded.                                                                                 |
| `_tracing_id`    | `BYTEA`       | Tracing ID of the genesis tx record.                                                                                                      |
| `_created_at`    | `TIMESTAMPTZ` | Record creation timestamp.                                                                                                                |
| `_updated_at`    | `TIMESTAMPTZ` | Record last update timestamp.                                                                                                             |

## Use Cases

* Historical state reconstruction and time-travel queries
* Token metadata and balance lookups at specific blocks
* Contract configuration and parameter tracking over time
* Price oracle and external data feed analysis
* Governance proposal and voting state tracking
* Historical analytics requiring point-in-time contract state

## Related Datasets

<CardGroup cols={3}>
  <Card title="Contracts" icon="file-code" href="/data-catalog/evm/primitives/contracts">
    Deployment metadata for the queried contracts.
  </Card>

  <Card title="Transactions" icon="arrow-right-arrow-left" href="/data-catalog/evm/primitives/transactions">
    Transactions that triggered these read calls.
  </Card>

  <Card title="Logs" icon="list" href="/data-catalog/evm/primitives/logs">
    Events emitted alongside function invocations.
  </Card>
</CardGroup>
