# Optimism

<figure><img src="/files/KD2KmoBsT9qAoXcD1cZC" alt="Optimism Logo"><figcaption></figcaption></figure>

## Introduction

The [**Optimism network**](https://www.optimism.io/) is a Layer 2 scaling solution for Ethereum that improves transaction speed and reduces costs while leveraging Ethereum's security. It uses **Optimistic Rollups**, a technology that processes transactions off-chain and posts only summarized data to Ethereum, ensuring scalability without compromising decentralization.

#### Key Features of Optimism:

1. **Layer 2 Scaling**:
   * Optimism offloads transaction processing from Ethereum's mainnet, enabling faster and cheaper transactions.
2. **Optimistic Rollups**:
   * Transactions are processed off-chain under the assumption of validity (optimism). Disputes are resolved on Ethereum only when necessary, minimizing on-chain computation.
3. **Ethereum Compatibility**:
   * Fully compatible with Ethereum's smart contracts and tools, allowing developers to easily migrate or deploy dApps on Optimism.
4. **Low Gas Fees**:
   * By reducing the computational load on Ethereum, Optimism offers significantly lower gas fees for users and developers.
5. **Secure by Ethereum**:
   * Optimism inherits the security and decentralization of Ethereum by anchoring transaction data to the Ethereum blockchain.
6. **Open and Decentralized**:
   * Optimism is an open platform for developers and users, with a commitment to decentralization and transparency.
7. **OP Token**:
   * The native token **OP** is used for governance and incentivizing ecosystem development through the Optimism Collective, a community-driven initiative.
8. **Support for Public Goods**:
   * Optimism is committed to funding open-source projects and public goods, fostering a sustainable and collaborative blockchain ecosystem.

Optimism provides a practical solution for scaling Ethereum while supporting the broader Web3 ecosystem, making it popular for decentralized finance (DeFi), NFTs, and other high-demand applications.

## How to Interact

1. Get your API Key from [Forbole's RPC](https://rpc.forbole.com/).

<figure><img src="/files/eVJfguNPBox9X2qDez9N" alt="DevTools Endpoints"><figcaption></figcaption></figure>

1. Test the query as follow:

```bash
curl https://rpc-mainnet-optimism-fullnode.forbole.com \
  -X POST \
  -H "Content-Type: application/json" \
  -H "apikey: {apiKey}" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber"}'
```

**Response Example**

```json
{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x7ae19e4"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rpc.forbole.com/rpc-api-documentation/guide-to-rpc/endpoints/rpc/optimism.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
