# zks_getBytecodeByHash

> import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'

# `zks_getBytecodeByHash`

Returns the bytecode of a transaction for the provided hash.

## Parameters

- `hash`: (string) [_Required_] The hash of the transaction.

## Response

The byte code of the given transaction.

## Example

Replace `<YOUR-API-KEY>` with an API key from your [Infura dashboard](https://app.infura.io/).

### Request

<Tabs>
  <TabItem value="curl">

```bash
curl https://zksync-mainnet.infura.io/v3/<YOUR-API-KEY> \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "zks_getBytecodeByHash", "params": ["0x0100067d861e2f5717a12c3e869cfb657793b86bbb0caa05cc1421f16c5217bc"]}'
```

  </TabItem>
  <TabItem value="WSS">

```bash
wscat -c wss://zksync-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "id": 1, "method": "zks_getBytecodeByHash", "params": ["0x0100067d861e2f5717a12c3e869cfb657793b86bbb0caa05cc1421f16c5217bc"]}'
```

  </TabItem>
</Tabs>

### Response

<Tabs>
  <TabItem value="JSON">

```json
{
  "jsonrpc": "2.0",
  "result": [
    0,
    4,
    0,
    0,
    0,
    0,
    0,
    2,
    0,
    11,
    ...,
    ...
  ],
  "id": 1
}
```

  </TabItem>
</Tabs>
