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

# Optimism RPC URL and Chain ID

> Optimism RPC URL: https://rpc.goldrushdata.com/v1/optimism-mainnet. Optimism chain ID: 10 (0xa). GoldRush JSON-RPC endpoint and quickstart for Optimism.

Requests need your GoldRush API key in the `Authorization` header ([Authentication](https://goldrush.dev/docs/goldrush-json-rpc/authentication.md)). Point viem, ethers.js, web3.js or raw HTTP at the endpoint below.

## Endpoint

```
https://rpc.goldrushdata.com/v1/optimism-mainnet
```

| Property | Value |
| - | - |
| **RPC URL** | `https://rpc.goldrushdata.com/v1/optimism-mainnet` |
| **Chain ID** | `10` (`0xa`) |
| **Chain slug** | `optimism-mainnet` |
| **Native gas token** | ETH |
| **Block time** | \~2s |
| **Block explorer** | [https://optimistic.etherscan.io/](https://optimistic.etherscan.io/) |
| **Network type** | Mainnet |

## Quickstart

```bash theme={null}
curl https://rpc.goldrushdata.com/v1/optimism-mainnet \
  -H "Authorization: Bearer $GOLDRUSH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_chainId",
    "params": []
  }'
```

It returns `"0xa"`, Optimism's chain ID (10).

## Methods

Optimism uses standard Ethereum JSON-RPC (`eth_*`, `net_*`, `web3_*`). Parameters and return values are the same as on Ethereum, so the [Ethereum method reference](https://goldrush.dev/docs/api-reference/json-rpc/chains/ethereum.md) applies: send the same request to `https://rpc.goldrushdata.com/v1/optimism-mainnet`.

`debug_*` and `trace_*` coverage for Optimism isn't listed in the [debug & trace matrix](https://goldrush.dev/docs/goldrush-json-rpc/debug-trace.md); check with GoldRush support before you rely on them.

## Related

> [card] [JSON-RPC Overview](https://goldrush.dev/docs/goldrush-json-rpc/overview.md)
>
> Product overview and architecture.

> [card] [Authentication](https://goldrush.dev/docs/goldrush-json-rpc/authentication.md)
>
> Header reference and per-library setup.


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