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

# Flashblocks

> Faster block confirmations on OP Stack chains via Edge RPC

Flashblocks provide faster block confirmations on OP Stack chains by streaming pre-confirmed blocks before they're finalized on L1. Edge RPC routes to flashblocks-enabled upstreams on supported networks.

## Supported Networks

| Network          | Chain ID | Alias              |
| ---------------- | -------- | ------------------ |
| Base             | 8453     | `base`             |
| Base Sepolia     | 84532    | `base-sepolia`     |
| Optimism         | 10       | `optimism-mainnet` |
| Optimism Sepolia | 11155420 | `optimism-sepolia` |
| Unichain         | 130      | `unichain-mainnet` |
| Unichain Testnet | 1301     | `unichain-testnet` |

## Usage

Target flashblocks-enabled upstreams by adding `use-upstream=flashblocks*` to your request:

```bash theme={null}
https://edge.goldsky.com/standard/evm/8453?secret=YOUR_SECRET&use-upstream=flashblocks*
```

<CodeGroup>
  ```bash curl theme={null}
  curl "https://edge.goldsky.com/standard/evm/8453?secret=YOUR_SECRET&use-upstream=flashblocks*" \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
  ```

  ```javascript ethers.js theme={null}
  import { JsonRpcProvider } from 'ethers'

  const provider = new JsonRpcProvider(
    'https://edge.goldsky.com/standard/evm/8453?secret=YOUR_SECRET&use-upstream=flashblocks*'
  )
  const blockNumber = await provider.getBlockNumber()
  ```

  ```javascript viem theme={null}
  import { createPublicClient, http } from 'viem'
  import { base } from 'viem/chains'

  const client = createPublicClient({
    chain: base,
    transport: http('https://edge.goldsky.com/standard/evm/8453?secret=YOUR_SECRET&use-upstream=flashblocks*')
  })
  const blockNumber = await client.getBlockNumber()
  ```
</CodeGroup>

You can also pass the directive as a header instead of a query parameter:

```bash theme={null}
curl "https://edge.goldsky.com/standard/evm/8453?secret=YOUR_SECRET" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "X-ERPC-Use-Upstream: flashblocks*" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
```
