> ## 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/optimism.svg"

export const chain_0 = "Optimism"

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

<img className="page-cover" src="https://mintcdn.com/validation-cloud/QajBabafGojozKj4/nodeapi/assets/optimism.jpg?fit=max&auto=format&n=QajBabafGojozKj4&q=85&s=d27c9738fe0aa743ffe3f5a2871af89f" alt="" noZoom width="1990" height="480" data-path="nodeapi/assets/optimism.jpg" />

<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>

OP Mainnet, formerly called Optimism, is the main blockchain network in the Optimism ecosystem.\
\
OP Mainnet is a Layer 2 network that operates on top of Ethereum's architecture. It is designed to be EVM equivalent and as close to Ethereum as possible.

The minor differences between building on OP Mainnet and Ethereum are outlined in [Optimism's developer docs](https://docs.optimism.io/chain/differences).

## Network Support

| Network | HTTPS | WSS |
| - | - | - |
| Mainnet | ✅ | ✅ |
| Testnet (Sepolia) | ✅ | ✅ |

> 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.optimism.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
      -X POST \
      -H "Content-Type: application/json" \
      -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":0}'
  ```

  ```bash title="testnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
  curl https://sepolia.optimism.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.optimism.validationcloud.io/v1/wss/<YOUR_API_KEY_HERE>
  ```

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

## Compute Units

| Method | Compute units |
| - | - |
| [eth\_accounts](/nodeapi/optimism/execution-api/eth_accounts) | 20 |
| [eth\_blockNumber](/nodeapi/optimism/execution-api/eth_blocknumber) | 20 |
| [eth\_call](/nodeapi/optimism/execution-api/eth_call) | 40 |
| [eth\_chainId](/nodeapi/optimism/execution-api/eth_chainid) | 10 |
| [eth\_estimateGas](/nodeapi/optimism/execution-api/eth_estimategas) | 40 |
| [eth\_gasPrice](/nodeapi/optimism/execution-api/eth_gasprice) | 40 |
| [eth\_getBalance](/nodeapi/optimism/execution-api/eth_getbalance) | 40 |
| [eth\_getBlockByHash](/nodeapi/optimism/execution-api/eth_getblockbyhash) | 40 |
| [eth\_getBlockByNumber](/nodeapi/optimism/execution-api/eth_getblockbynumber) | 40 |
| [eth\_getBlockTransactionCountByHash](/nodeapi/optimism/execution-api/eth_getblocktransactioncountbyhash) | 40 |
| [eth\_getBlockTransactionCountByNumber](/nodeapi/optimism/execution-api/eth_getblocktransactioncountbynumber) | 40 |
| [eth\_getCode](/nodeapi/optimism/execution-api/eth_getcode) | 40 |
| [eth\_getFilterChanges](/nodeapi/optimism/execution-api/eth_getfilterchanges) | 40 |
| [eth\_getFilterLogs](/nodeapi/optimism/execution-api/eth_getfilterlogs) | 40 |
| [eth\_getLogs](/nodeapi/optimism/execution-api/eth_getlogs) | 80 |
| [eth\_getStorageAt](/nodeapi/optimism/execution-api/eth_getstorageat) | 40 |
| [eth\_getTransactionByBlockHashAndIndex](/nodeapi/optimism/execution-api/eth_gettransactionbyblockhashandindex) | 40 |
| [eth\_getTransactionByBlockNumberAndIndex](/nodeapi/optimism/execution-api/eth_gettransactionbyblocknumberandindex) | 40 |
| [eth\_getTransactionByHash](/nodeapi/optimism/execution-api/eth_gettransactionbyhash) | 40 |
| [eth\_getTransactionCount](/nodeapi/optimism/execution-api/eth_gettransactioncount) | 40 |
| [eth\_getTransactionReceipt](/nodeapi/optimism/execution-api/eth_gettransactionreceipt) | 40 |
| [eth\_getUncleByBlockHashAndIndex](/nodeapi/optimism/execution-api/eth_getunclebyblockhashandindex) | 40 |
| [eth\_getUncleByBlockNumberAndIndex](/nodeapi/optimism/execution-api/eth_getunclebyblocknumberandindex) | 40 |
| [eth\_getUncleCountByBlockHash](/nodeapi/optimism/execution-api/eth_getunclecountbyblockhash) | 40 |
| [eth\_getUncleCountByBlockNumber](/nodeapi/optimism/execution-api/eth_getunclecountbyblocknumber) | 40 |
| [eth\_newBlockFilter](/nodeapi/optimism/execution-api/eth_newblockfilter) | 40 |
| [eth\_maxPriorityFeePerGas](/nodeapi/optimism/execution-api/eth_maxpriorityfeepergas) | 20 |
| [eth\_newFilter](/nodeapi/optimism/execution-api/eth_newfilter) | 40 |
| [eth\_newPendingTransactionFilter](/nodeapi/optimism/execution-api/eth_newpendingtransactionfilter) | 40 |
| [eth\_sendRawTransaction](/nodeapi/optimism/execution-api/eth_sendrawtransaction) | 80 |
| [eth\_subscribe](/nodeapi/optimism/execution-api/eth_subscribe) | 20 |
| [eth\_syncing](/nodeapi/optimism/execution-api/eth_syncing) | 10 |
| [eth\_uninstallFilter](/nodeapi/optimism/execution-api/eth_uninstallfilter) | 20 |
| [eth\_unsubscribe](/nodeapi/optimism/execution-api/eth_unsubscribe) | 20 |
| [net\_listening](/nodeapi/optimism/execution-api/net_listening) | 10 |
| [net\_peerCount](/nodeapi/optimism/execution-api/net_peercount) | 20 |
| [net\_version](/nodeapi/optimism/execution-api/net_version) | 10 |
| [web3\_clientVersion](/nodeapi/optimism/execution-api/web3_clientversion) | 40 |
| [web3\_sha3](/nodeapi/optimism/execution-api/web3_sha3) | 40 |
| txpool\_content | 500 |


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