> ## 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 on Edge RPC: sub-block latency on OP Stack

> Route Edge RPC to flashblocks-enabled upstreams on Base, Optimism, and Unichain (mainnet and testnets) with the use-upstream=flashblocks* directive.

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?key=demo&use-upstream=flashblocks*
```

<CodeGroup>
  ```bash curl theme={null}
  curl "https://edge.goldsky.com/standard/evm/8453?key=demo&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?key=demo&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?key=demo&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?key=demo" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "X-ERPC-Use-Upstream: flashblocks*" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
```


## Related topics

- [Why Edge RPC](/edge-rpc/why-edge.md)
- [Edge EVM Sources](/turbo-pipelines/sources/edge-evm.md)
- [Agent Skills](/ai-skills.md)
- [Edge RPC](/edge-rpc/introduction.md)
- [Payments & fintech on Goldsky](/solutions/payments-fintech.md)
