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

# Overview

export const logo_0 = "/nodeapi/assets/chains/unichain.svg"

export const chain_0 = "Unichain"

<span className="chain-logo-unichain" />

<img className="page-cover" src="https://mintcdn.com/validation-cloud/QajBabafGojozKj4/nodeapi/assets/unichain-wallpaper-1x.png?fit=max&auto=format&n=QajBabafGojozKj4&q=85&s=3efca4b33250e8fc33c2443503e525fa" alt="" noZoom width="1990" height="480" data-path="nodeapi/assets/unichain-wallpaper-1x.png" />

<div className="not-prose my-8 flex flex-col gap-4 rounded-2xl border border-gray-950/10 p-5 sm:flex-row sm:items-center dark:border-white/10">
  <img src={logo_0} alt="" className="h-10 w-10 shrink-0" noZoom />

  <div className="flex-1">
    <p className="m-0 font-semibold text-gray-900 dark:text-gray-100">Start building on {chain_0} for free</p>
    <p className="m-0 mt-1 text-sm text-gray-600 dark:text-gray-400">Create an endpoint in under a minute. The Free plan includes 50 million compute units a month, and no credit card is required.</p>
  </div>

  <a href="https://app.validationcloud.io/auth/signup?returnTo=%2Fnode%2Fcreate-endpoint" className="shrink-0 rounded-full bg-primary px-5 py-2 text-center text-sm font-semibold text-white no-underline hover:opacity-90">Try free</a>
</div>

Unichain is a DeFi-focused Ethereum Layer 2 built by Uniswap Labs on the OP Stack. It is part of the Optimism Superchain and produces a block every second.

Developer docs: [https://docs.unichain.org](https://docs.unichain.org)

Mainnet block explorer: [https://uniscan.xyz](https://uniscan.xyz)

## Network Support

| Network | Full History / Archive | HTTPS | WSS |
| - | - | - | - |
| Unichain Mainnet | <p>Blocks, receipts and logs ✅ to genesis<br /><br />State and Debug ❌ (last \~10,000 blocks)</p> | ✅ | ✅ |

> Unichain Mainnet keeps historical state for roughly the last 10,000 blocks, about 2.8 hours at one block per second. State methods (`eth_call`, `eth_createAccessList`, `eth_estimateGas`, `eth_getBalance`, `eth_getCode`, `eth_getProof`, `eth_getStorageAt`, `eth_getTransactionCount`, `eth_simulateV1`) and the [Debug API](/nodeapi/unichain/debug-api) work for blocks inside that window. Older blocks return JSON-RPC error `-32603` with a message that contains `state at block #<number> is pruned`.

> The Trace API (`trace_*`) is not available on Unichain. Use the [Debug API](/nodeapi/unichain/debug-api) for call traces.

> WebSocket clients **MUST** respond to server `ping` frames, otherwise the connection will be closed and re-established every minute.

## Getting Started

Send a request to check that your endpoint works. Replace `<YOUR_API_KEY_HERE>` with the key from your endpoint in the [Validation Cloud app](https://app.validationcloud.io/node).

<CodeGroup>
  ```bash title="mainnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
  curl https://mainnet.unichain.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
      -X POST \
      -H "Content-Type: application/json" \
      -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":0}'
  ```
</CodeGroup>

Connect over WebSocket:

<CodeGroup>
  ```bash title="mainnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
  wscat -c wss://mainnet.unichain.validationcloud.io/v1/wss/<YOUR_API_KEY_HERE>
  ```
</CodeGroup>

## Compute Units

| Method | Compute units |
| - | - |
| [debug\_getBadBlocks](/nodeapi/unichain/debug-api/debug_getbadblocks) | 80 |
| [debug\_traceBlockByHash](/nodeapi/unichain/debug-api/debug_traceblockbyhash) | 80 |
| [debug\_traceBlockByNumber](/nodeapi/unichain/debug-api/debug_traceblockbynumber) | 80 |
| [debug\_traceCall](/nodeapi/unichain/debug-api/debug_tracecall) | 80 |
| [debug\_traceTransaction](/nodeapi/unichain/debug-api/debug_tracetransaction) | 80 |
| [eth\_accounts](/nodeapi/unichain/execution-api/eth_accounts) | 20 |
| [eth\_blobBaseFee](/nodeapi/unichain/execution-api/eth_blobbasefee) | 10 |
| [eth\_blockNumber](/nodeapi/unichain/execution-api/eth_blocknumber) | 20 |
| [eth\_call](/nodeapi/unichain/execution-api/eth_call) | 40 |
| [eth\_chainId](/nodeapi/unichain/execution-api/eth_chainid) | 10 |
| [eth\_createAccessList](/nodeapi/unichain/execution-api/eth_createaccesslist) | 20 |
| [eth\_estimateGas](/nodeapi/unichain/execution-api/eth_estimategas) | 40 |
| [eth\_feeHistory](/nodeapi/unichain/execution-api/eth_feehistory) | 20 |
| [eth\_gasPrice](/nodeapi/unichain/execution-api/eth_gasprice) | 40 |
| [eth\_getBalance](/nodeapi/unichain/execution-api/eth_getbalance) | 40 |
| [eth\_getBlockByHash](/nodeapi/unichain/execution-api/eth_getblockbyhash) | 40 |
| [eth\_getBlockByNumber](/nodeapi/unichain/execution-api/eth_getblockbynumber) | 40 |
| [eth\_getBlockReceipts](/nodeapi/unichain/execution-api/eth_getblockreceipts) | 40 |
| [eth\_getBlockTransactionCountByHash](/nodeapi/unichain/execution-api/eth_getblocktransactioncountbyhash) | 40 |
| [eth\_getBlockTransactionCountByNumber](/nodeapi/unichain/execution-api/eth_getblocktransactioncountbynumber) | 40 |
| [eth\_getCode](/nodeapi/unichain/execution-api/eth_getcode) | 40 |
| [eth\_getFilterChanges](/nodeapi/unichain/execution-api/eth_getfilterchanges) | 40 |
| [eth\_getFilterLogs](/nodeapi/unichain/execution-api/eth_getfilterlogs) | 40 |
| [eth\_getLogs](/nodeapi/unichain/execution-api/eth_getlogs) | 80 |
| [eth\_getProof](/nodeapi/unichain/execution-api/eth_getproof) | 40 |
| [eth\_getRawTransactionByHash](/nodeapi/unichain/execution-api/eth_getrawtransactionbyhash) | 10 |
| [eth\_getStorageAt](/nodeapi/unichain/execution-api/eth_getstorageat) | 40 |
| [eth\_getTransactionByBlockHashAndIndex](/nodeapi/unichain/execution-api/eth_gettransactionbyblockhashandindex) | 40 |
| [eth\_getTransactionByBlockNumberAndIndex](/nodeapi/unichain/execution-api/eth_gettransactionbyblocknumberandindex) | 40 |
| [eth\_getTransactionByHash](/nodeapi/unichain/execution-api/eth_gettransactionbyhash) | 40 |
| [eth\_getTransactionCount](/nodeapi/unichain/execution-api/eth_gettransactioncount) | 40 |
| [eth\_getTransactionReceipt](/nodeapi/unichain/execution-api/eth_gettransactionreceipt) | 40 |
| [eth\_getUncleByBlockHashAndIndex](/nodeapi/unichain/execution-api/eth_getunclebyblockhashandindex) | 40 |
| [eth\_getUncleByBlockNumberAndIndex](/nodeapi/unichain/execution-api/eth_getunclebyblocknumberandindex) | 40 |
| [eth\_getUncleCountByBlockHash](/nodeapi/unichain/execution-api/eth_getunclecountbyblockhash) | 40 |
| [eth\_getUncleCountByBlockNumber](/nodeapi/unichain/execution-api/eth_getunclecountbyblocknumber) | 40 |
| [eth\_maxPriorityFeePerGas](/nodeapi/unichain/execution-api/eth_maxpriorityfeepergas) | 20 |
| [eth\_newBlockFilter](/nodeapi/unichain/execution-api/eth_newblockfilter) | 40 |
| [eth\_newFilter](/nodeapi/unichain/execution-api/eth_newfilter) | 40 |
| [eth\_newPendingTransactionFilter](/nodeapi/unichain/execution-api/eth_newpendingtransactionfilter) | 40 |
| [eth\_protocolVersion](/nodeapi/unichain/execution-api/eth_protocolversion) | 10 |
| [eth\_sendRawTransaction](/nodeapi/unichain/execution-api/eth_sendrawtransaction) | 80 |
| [eth\_simulateV1](/nodeapi/unichain/execution-api/eth_simulatev1) | 40 |
| [eth\_subscribe](/nodeapi/unichain/execution-api/eth_subscribe) | 20 |
| [eth\_syncing](/nodeapi/unichain/execution-api/eth_syncing) | 10 |
| [eth\_uninstallFilter](/nodeapi/unichain/execution-api/eth_uninstallfilter) | 20 |
| [eth\_unsubscribe](/nodeapi/unichain/execution-api/eth_unsubscribe) | 20 |
| [net\_listening](/nodeapi/unichain/execution-api/net_listening) | 10 |
| [net\_peerCount](/nodeapi/unichain/execution-api/net_peercount) | 20 |
| [net\_version](/nodeapi/unichain/execution-api/net_version) | 10 |
| [txpool\_content](/nodeapi/unichain/execution-api/txpool_content) | 500 |
| [web3\_clientVersion](/nodeapi/unichain/execution-api/web3_clientversion) | 40 |
| [web3\_sha3](/nodeapi/unichain/execution-api/web3_sha3) | 40 |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.