# Transactions of the same block it depends on

[Open the transaction in TraceFast →](https://tracefast.xyz/tx/0x6bb3103eec4ca8f4a324bbab71dc84f533af7e6be11ab8b13d0d10333bb9abc5)

The read-after-write edges between one transaction and the other transactions of its block — slots it read that an earlier transaction had written (`role: reader`), and slots it wrote that a later one read (`role: writer`) — edge by edge and folded per pair of transactions. Facts of execution order only: no statement about intent. An empty answer for a computed transaction means no dependency. Not computed yet answers 422.

```
GET https://tracefast.xyz/api/v1/chains/1/transactions/{hash}/state-dependencies
```

| Parameter | In | Type | Notes |
|---|---|---|---|
| `hash` | path | string | Transaction hash, `0x`-prefixed, 64 hex characters, any case. |

**Access** — an [API key](/api/authentication) on the **Investigation** plan or higher ([plans](/api/authentication#plans)), or no key at all: pay per call with [x402](/api/x402) at the same path on `https://mpp.tracefast.xyz/api/v1`, at the price its `402` states. As a tool for AI agents: `get_transaction_state_dependencies` on the [MCP server](/api/mcp-server). **Stable** — see [stability](/api/conventions#stability).

`chains/1` is a literal: other chain ids answer `404 chain_not_supported`. An unknown query parameter is refused rather than ignored.

## Response

`200 application/json`. Lists in the example are cut to two entries.

```json
{
  "data": {
    "chainId": 1,
    "hash": "0x6bb3103eec4ca8f4a324bbab71dc84f533af7e6be11ab8b13d0d10333bb9abc5",
    "edges": [],
    "truncated": false,
    "pairs": [],
    "pairsComplete": true
  },
  "meta": {
    "chain": "ethereum",
    "timestamp": 1794918390200,
    "cached": false,
    "asOfBlock": 25920000,
    "docs": "https://docs.tracefast.xyz/api/transaction-state-dependencies"
  }
}
```

### `data`

| Field | Meaning |
|---|---|
| `chainId` | Chain id. `1` is Ethereum mainnet. |
| `edges` | Edge by edge (slot by slot). |
| `hash` | The transaction, lowercase and `0x`-prefixed. |
| `pairs` | The same, folded per pair of transactions. |
| `pairsComplete` | `false` when the pairs were folded from a clipped edge list. |
| `truncated` | More edges than the cap: these are the first ones. |

### `data.edges[]`

| Field | Meaning |
|---|---|
| `readerTxHash` | Hash of the reading transaction, lowercase and `0x`-prefixed. Absent when it could not be resolved. |
| `readerTxIndex` | Position in the block of the transaction that read the slot. |
| `role` | The asked transaction's side: `reader` (it read what an earlier one wrote) or `writer` (a later one read what it wrote). |
| `storageAddress` | The contract whose slot carries the dependency, lowercase and `0x`-prefixed. |
| `storageKey` | The slot, 32 bytes, `0x`-prefixed. |
| `writerTxHash` | Hash of the writing transaction, lowercase and `0x`-prefixed. Absent when it could not be resolved. |
| `writerTxIndex` | Position in the block of the transaction whose write was read. |

### `data.pairs[]`

| Field | Meaning |
|---|---|
| `readerTxHash` | Hash of the reading transaction, lowercase and `0x`-prefixed. Absent when it could not be resolved. |
| `readerTxIndex` | Position in the block of the transaction that read. |
| `role` | The asked transaction's side: `reader` (it read what the other wrote) or `writer` (the other read what it wrote). |
| `slots` | Slots the pair depends through. |
| `storageAddresses` | Distinct contracts those slots belong to. |
| `writerTxHash` | Hash of the writing transaction, lowercase and `0x`-prefixed. Absent when it could not be resolved. |
| `writerTxIndex` | Position in the block of the transaction whose writes were read. |

`meta` is the same envelope on every method — see [conventions](/api/conventions#meta).

## Errors

| Status | When |
|---|---|
| 400 | `bad_request`: malformed hash, or an unknown query parameter |
| 404 | `not_found`: no transaction with this hash is known; `chain_not_supported`; or an unknown path |
| 422 | `block_not_available`: `reason: coverage_gap` — not computed yet; `reason: block_not_available` — older than the first block served |
| 503 | `service_unavailable`: temporarily unavailable; retry; or `service_degraded`: who is calling could not be established right now; retry after `Retry-After`. |

Malformed input, unknown parameters and the key check's `401`/`403`/`429`/`503` are the same for every method — see [conventions](/api/conventions#errors) and [API keys](/api/authentication#when-a-key-is-refused).

## Related pages

* [One transaction](/api/transaction)
* [Transaction events](/api/transaction-events)
* [Why it reverted](/api/transaction-failures)
* [Execution trace](/api/trace)
* [All API methods](/api/methods) — every method on one page
* [Conventions](/api/conventions) — requests, responses, errors and pagination
