# ReportVersions v0.3.1 API Reference
Source: https://docs.chain.link/chainlink-local/api-reference/v0.3.1/report-versions

> For the complete documentation index, see [llms.txt](/llms.txt).

> **NOTE: Integrate Chainlink Local into your project**
>
> ### npm
>
> If you use [NPM](https://www.npmjs.com/), install the [@chainlink/local NPM
> package](https://www.npmjs.com/package/@chainlink/local):
>
> ```shell
> npm install @chainlink/local@0.3.1
> ```
>
> ### yarn
>
> If you use [Yarn](https://yarnpkg.com/), install the [@chainlink/local NPM
> package](https://www.npmjs.com/package/@chainlink/local):
>
> ```shell
> yarn add @chainlink/local@0.3.1
> ```
>
> ### foundry
>
> If you use [Foundry](https://book.getfoundry.sh/):
>
> ```shell
> forge install smartcontractkit/chainlink-local@v0.3.1
> ```
>
> and then set remappings to: `@chainlink/local/=lib/chainlink-local/` in either `remappings.txt` or `foundry.toml` file
>
> ### RemixIDE
>
> Import the `CCIPLocalSimulator` contract from the `@chainlink/local` package:
>
> ```solidity
> import {CCIPLocalSimulator} from "@chainlink/local@0.3.1/src/ccip/CCIPLocalSimulator.sol";
> ```

## ReportVersions

An abstract contract that defines the Data Streams report schemas (`ReportV1` through `ReportV13`).

[`ReportVersions`](https://github.com/smartcontractkit/chainlink-local/blob/v0.3.1/src/data-streams/ReportVersions.sol)

> **NOTE**
>
> These structs mirror the Data Streams report schemas. For the schema reference, see the [Data Streams report
> schemas](https://docs.chain.link/data-streams/reference/report-schema-overview).
> [`MockReportGenerator`](/chainlink-local/api-reference/v0.3.1/mock-report-generator) inherits from this contract and
> generates signed reports for each version.

## Structs

### ReportV1

> **CAUTION: Deprecated**
>
> The v1 schema (early crypto report with block metadata) is deprecated; it is included for historical reference and
> backwards compatibility with legacy streams.

| Field                 | Type      | Description                                          |
| --------------------- | --------- | ---------------------------------------------------- |
| feedId                | `bytes32` | The stream ID the report has data for                |
| observationsTimestamp | `uint32`  | Observation timestamp in seconds                     |
| benchmarkPrice        | `int192`  | DON consensus median benchmark price                 |
| bid                   | `int192`  | Bid-side price estimate                              |
| ask                   | `int192`  | Ask-side price estimate                              |
| currentBlockNum       | `uint64`  | Current block number used by the report              |
| currentBlockHash      | `bytes32` | Current block hash used by the report                |
| validFromBlockNum     | `uint64`  | Earliest block number from which the report is valid |
| currentBlockTimestamp | `uint64`  | Current block timestamp in seconds                   |

### ReportV2

> **NOTE**
>
> Crypto streams schema. The `benchmarkPrice` value is carried to either 8 or 18 decimal places, depending on the
> stream.

| Field                 | Type      | Description                                                |
| --------------------- | --------- | ---------------------------------------------------------- |
| feedId                | `bytes32` | The feed ID the report has data for                        |
| validFromTimestamp    | `uint32`  | Earliest timestamp for which price is applicable           |
| observationsTimestamp | `uint32`  | Latest timestamp for which price is applicable             |
| nativeFee             | `uint192` | Base cost to validate a transaction, in the native token   |
| linkFee               | `uint192` | Base cost to validate a transaction, in LINK               |
| expiresAt             | `uint32`  | Latest timestamp where the report can be verified on-chain |
| benchmarkPrice        | `int192`  | DON consensus median price                                 |

### ReportV3

> **NOTE**
>
> Crypto streams schema with bid/ask. The `price`, `bid`, and `ask` values are carried to either 8 or 18 decimal places,
> depending on the stream.

| Field                 | Type      | Description                                                                        |
| --------------------- | --------- | ---------------------------------------------------------------------------------- |
| feedId                | `bytes32` | The stream ID the report has data for                                              |
| validFromTimestamp    | `uint32`  | Earliest timestamp for which price is applicable                                   |
| observationsTimestamp | `uint32`  | Latest timestamp for which price is applicable                                     |
| nativeFee             | `uint192` | Base cost to validate a transaction, in the native token                           |
| linkFee               | `uint192` | Base cost to validate a transaction, in LINK                                       |
| expiresAt             | `uint32`  | Latest timestamp where the report can be verified on-chain                         |
| price                 | `int192`  | DON consensus median price                                                         |
| bid                   | `int192`  | Simulated price impact of a buy order up to the X% depth of liquidity utilisation  |
| ask                   | `int192`  | Simulated price impact of a sell order up to the X% depth of liquidity utilisation |

### ReportV4

> **NOTE**
>
> RWA stream schema. The `price` value is carried to either 8 or 18 decimal places. `marketStatus` indicates whether the
> market is currently open: `0` (`Unknown`), `1` (`Closed`), `2` (`Open`).

| Field                 | Type      | Description                                                 |
| --------------------- | --------- | ----------------------------------------------------------- |
| feedId                | `bytes32` | The stream ID the report has data for                       |
| validFromTimestamp    | `uint32`  | Earliest timestamp for which price is applicable            |
| observationsTimestamp | `uint32`  | Latest timestamp for which price is applicable              |
| nativeFee             | `uint192` | Base cost to validate a transaction, in the native token    |
| linkFee               | `uint192` | Base cost to validate a transaction, in LINK                |
| expiresAt             | `uint32`  | Latest timestamp where the report can be verified on-chain  |
| price                 | `int192`  | DON consensus median benchmark price                        |
| marketStatus          | `uint32`  | The DON's consensus on whether the market is currently open |

### ReportV5

> **NOTE**
>
> Rate report schema.

| Field                 | Type      | Description                                                |
| --------------------- | --------- | ---------------------------------------------------------- |
| feedId                | `bytes32` | The stream ID the report has data for                      |
| validFromTimestamp    | `uint32`  | Earliest timestamp for which the report is applicable      |
| observationsTimestamp | `uint32`  | Latest timestamp for which the report is applicable        |
| nativeFee             | `uint192` | Base cost to validate a transaction, in the native token   |
| linkFee               | `uint192` | Base cost to validate a transaction, in LINK               |
| expiresAt             | `uint32`  | Latest timestamp where the report can be verified on-chain |
| rate                  | `int192`  | Reported rate value                                        |
| timestamp             | `uint32`  | Rate timestamp in seconds                                  |
| duration              | `uint32`  | Duration window in seconds                                 |

### ReportV6

> **NOTE**
>
> Multi-price report schema.

| Field                 | Type      | Description                                                |
| --------------------- | --------- | ---------------------------------------------------------- |
| feedId                | `bytes32` | The stream ID the report has data for                      |
| validFromTimestamp    | `uint32`  | Earliest timestamp for which the report is applicable      |
| observationsTimestamp | `uint32`  | Latest timestamp for which the report is applicable        |
| nativeFee             | `uint192` | Base cost to validate a transaction, in the native token   |
| linkFee               | `uint192` | Base cost to validate a transaction, in LINK               |
| expiresAt             | `uint32`  | Latest timestamp where the report can be verified on-chain |
| price                 | `int192`  | Primary price value                                        |
| price2                | `int192`  | Secondary price value                                      |
| price3                | `int192`  | Third price value                                          |
| price4                | `int192`  | Fourth price value                                         |
| price5                | `int192`  | Fifth price value                                          |

### ReportV7 through ReportV13

> **NOTE**
>
> `ReportV7` through `ReportV13` follow the same base layout (feed ID, validity timestamps, native and LINK fees,
> expiry) with schema-specific payload fields. See the [Data Streams report schema
> overview](https://docs.chain.link/data-streams/reference/report-schema-overview) for each schema's fields.