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

# Robinhood Chain 节点

> OrbitFlare 提供的 Robinhood Chain 专用节点访问——面向代币化股票 L2 的低延迟 RPC 和 WebSocket 端点，支持免费试用。

## 概述

OrbitFlare 为 **Robinhood Chain** 提供节点基础设施。Robinhood Chain 是 Robinhood 于 2026 年 7 月上线主网的 EVM 兼容以太坊 Layer 2，基于 Arbitrum Orbit（Nitro）技术栈构建，使用 ETH 作为 Gas 代币，并承载 Robinhood 的代币化股票——这些股票全天候交易，且从上线第一天起就与 Uniswap、Chainlink 等 DeFi 协议集成。

如果你正在围绕代币化股票构建交易系统、索引器或 DeFi 集成，OrbitFlare 让你无需自己运维 Nitro 基础设施即可直接访问节点。由于该链完全兼容 EVM，Hardhat、Foundry、ethers.js、viem 和 Wagmi 等标准工具无需修改即可直接使用，并且该链对 ERC-4337 账户抽象提供一等支持。

<Note>
  Robinhood Chain 节点访问目前以**免费试用**形式提供。请联系团队开通。
</Note>

## 端点

<Tabs>
  <Tab title="主网">
    | 协议                  | 端点                                         |
    | ------------------- | ------------------------------------------ |
    | **JSON-RPC (HTTP)** | `http://robinhood.rpc.orbitflare.com:8547` |
    | **WebSocket**       | `ws://robinhood.rpc.orbitflare.com:8548`   |

    Robinhood Chain 主网使用 `chainId: 4663`，Gas 代币为 ETH。

    ### 访问方式

    访问通过 **IP 白名单**控制，而非 API 密钥。申请试用时，请提供将要连接的服务器的公网 IP 地址。不在白名单中的地址发出的请求会被拒绝。
  </Tab>

  <Tab title="测试网">
    Robinhood Chain 还运行一个公共测试网（`chainId: 46630`），这是一条结算到以太坊 Sepolia 的 Arbitrum Orbit 链，同样使用 ETH 作为 Gas 代币：

    | 资源                 | 地址                                                                                                                 |
    | ------------------ | ------------------------------------------------------------------------------------------------------------------ |
    | **水龙头**            | [faucet.testnet.chain.robinhood.com](https://faucet.testnet.chain.robinhood.com)                                   |
    | **浏览器**            | [explorer.testnet.chain.robinhood.com](https://explorer.testnet.chain.robinhood.com)                               |
    | **跨链桥（从 Sepolia）** | [Arbitrum Bridge](https://portal.arbitrum.io/bridge?destinationChain=robinhood-chain-testnet\&sourceChain=sepolia) |

    生成一个临时密钥对，从水龙头领取测试网 ETH，即可端到端地测试完整的交易生命周期。

    <Note>
      OrbitFlare 端点仅服务**主网**。
    </Note>
  </Tab>
</Tabs>

## 发起 RPC 调用

Robinhood Chain 兼容 EVM，使用标准 JSON-RPC 2.0。请求时携带 `Content-Type: application/json` 并使用 POST 请求体：

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "http://robinhood.rpc.orbitflare.com:8547" \
    -H "Content-Type: application/json" \
    -d '{
      "jsonrpc": "2.0",
      "method": "eth_blockNumber",
      "params": [],
      "id": 1
    }'
  ```

  ```typescript viem theme={null}
  import { createPublicClient, defineChain, http } from "viem";

  const robinhoodChain = defineChain({
    id: 4663,
    name: "Robinhood Chain",
    nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
    rpcUrls: {
      default: { http: ["http://robinhood.rpc.orbitflare.com:8547"] },
    },
  });

  const client = createPublicClient({
    chain: robinhoodChain,
    transport: http(),
  });

  const block = await client.getBlockNumber();
  console.log("Latest block:", block);
  ```

  ```python web3.py theme={null}
  from web3 import Web3

  w3 = Web3(Web3.HTTPProvider("http://robinhood.rpc.orbitflare.com:8547"))

  print("Connected:", w3.is_connected())
  print("Chain ID:", w3.eth.chain_id)       # 4663
  print("Latest block:", w3.eth.block_number)
  ```
</CodeGroup>

### WebSocket 订阅

实时订阅通过 WebSocket 端点进行。在 Node.js 中需要安装 `ws` 包（`npm install ws`）：

```javascript theme={null}
import WebSocket from "ws";

const ws = new WebSocket("ws://robinhood.rpc.orbitflare.com:8548");

ws.on("open", () => {
  ws.send(JSON.stringify({
    jsonrpc: "2.0",
    id: 1,
    method: "eth_subscribe",
    params: ["newHeads"],
  }));
});

ws.on("message", (data) => {
  const msg = JSON.parse(data);
  console.log("New block header:", msg.params?.result);
});
```

Robinhood Chain 大约每 100 毫秒出一个块，因此 `newHeads` 的推送频率会远高于以太坊主网和大多数 L2。

### 支持的方法

节点提供标准 EVM JSON-RPC 接口，包括：

| 类别            | 方法                                                                              |
| ------------- | ------------------------------------------------------------------------------- |
| **区块**        | `eth_blockNumber`、`eth_getBlockByHash`、`eth_getBlockByNumber`                   |
| **交易**        | `eth_sendRawTransaction`、`eth_getTransactionByHash`、`eth_getTransactionReceipt` |
| **账户**        | `eth_getBalance`、`eth_getCode`、`eth_getStorageAt`、`eth_getTransactionCount`     |
| **合约**        | `eth_call`、`eth_estimateGas`、`eth_getLogs`                                      |
| **网络**        | `net_version`、`eth_chainId`、`eth_gasPrice`、`eth_feeHistory`                     |
| **WebSocket** | `eth_subscribe`（newHeads、logs、newPendingTransactions）                           |

<Note>
  作为 Arbitrum Nitro 链，节点在标准 `eth_*` 方法之外还提供 `arb_*` 扩展方法。完整方法参考见[以太坊 JSON-RPC 规范](https://ethereum.org/en/developers/docs/apis/json-rpc/)。
</Note>

## 示例：读取代币化股票

这条链的旗舰资产是 Robinhood 的代币化股票，它们是标准 ERC-20 合约。以下示例直接从链上状态读取 NVIDIA 代币（`NVDA`）：

<CodeGroup>
  ```typescript viem theme={null}
  import { createPublicClient, defineChain, erc20Abi, http } from "viem";

  const robinhoodChain = defineChain({
    id: 4663,
    name: "Robinhood Chain",
    nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
    rpcUrls: {
      default: { http: ["http://robinhood.rpc.orbitflare.com:8547"] },
    },
  });

  const client = createPublicClient({ chain: robinhoodChain, transport: http() });

  const NVDA = "0xd0601CE157Db5bdC3162BbaC2a2C8aF5320D9EEC";

  const [name, symbol, decimals, totalSupply] = await Promise.all([
    client.readContract({ address: NVDA, abi: erc20Abi, functionName: "name" }),
    client.readContract({ address: NVDA, abi: erc20Abi, functionName: "symbol" }),
    client.readContract({ address: NVDA, abi: erc20Abi, functionName: "decimals" }),
    client.readContract({ address: NVDA, abi: erc20Abi, functionName: "totalSupply" }),
  ]);

  console.log(`${name} (${symbol}), ${totalSupply / 10n ** BigInt(decimals)} shares tokenized`);
  // NVIDIA • Robinhood Token (NVDA), 26419 shares tokenized
  ```

  ```bash cURL theme={null}
  # 调用 NVDA 代币合约的 symbol()
  curl -X POST "http://robinhood.rpc.orbitflare.com:8547" \
    -H "Content-Type: application/json" \
    -d '{
      "jsonrpc": "2.0",
      "method": "eth_call",
      "params": [{
        "to": "0xd0601CE157Db5bdC3162BbaC2a2C8aF5320D9EEC",
        "data": "0x95d89b41"
      }, "latest"],
      "id": 1
    }'
  ```
</CodeGroup>

<Warning>
  在硬编码代币地址之前，请在[区块浏览器](https://robinhoodchain.blockscout.com)中仔细核对：许多仿冒代币也使用 `NVDA` 符号。官方 Robinhood 股票代币的名称带有 `• Robinhood Token` 字样，上面的地址是被数万个账户持有的那一个。
</Warning>

## 使用场景

<CardGroup cols={3}>
  <Card title="代币化股票交易" icon="chart-line">
    全天候交易和监控 NVDA、AAPL 等链上股票，不受开市时间限制。
  </Card>

  <Card title="DeFi 集成" icon="coins">
    基于上线即可用的 Uniswap 资金池和 Chainlink 预言机进行构建。
  </Card>

  <Card title="索引器与分析" icon="database">
    通过 WebSocket 实时跟踪 100 毫秒级出块，维护你自己的链上状态视图。
  </Card>
</CardGroup>

## 开始使用

<CardGroup cols={2}>
  <Card title="在 Discord 申请试用" icon="discord" href="https://discord.gg/orbitflare">
    在 OrbitFlare Discord 中开一个工单，说明你的使用场景和需要加入白名单的服务器 IP，我们会为你开通。
  </Card>

  <Card title="控制台" icon="gauge" href="https://orbitflare.com/dashboard">
    在控制台中管理你的 OrbitFlare 服务、密钥和套餐。
  </Card>
</CardGroup>

## 官方资源

* [Robinhood Chain 文档](https://docs.robinhood.com/chain)
* [Robinhood Chain 浏览器（Blockscout）](https://robinhoodchain.blockscout.com)
* [Robinhood Chain 状态页](https://status.robinhoodchain.offchain.io)
