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

# Robinhood Chain tooling

> Robinhood Chain tooling guide for Chainstack nodes. Use MetaMask, ethers.js, viem, web3.py, Hardhat, Foundry, and Remix with Robinhood Chain mainnet and testnet.

Robinhood Chain is an Arbitrum Orbit layer-2 with full EVM compatibility, so standard Ethereum tooling works against a Chainstack endpoint unchanged. Point any library or framework at your node URL and set the chain ID — `4663` for mainnet, `46630` for testnet.

## MetaMask

On [node access details](/docs/manage-your-node#view-node-access-and-credentials), click **Connect wallet** to inject your Chainstack endpoint automatically.

If you need to add the network manually, use:

* Network name: `Robinhood Chain Mainnet`
* RPC URL: your Chainstack HTTPS endpoint
* Chain ID: `4663`
* Currency symbol: `ETH`
* Block explorer URL: `https://robinscan.io/`

For the testnet, use:

* Network name: `Robinhood Chain Testnet`
* RPC URL: your Chainstack HTTPS endpoint
* Chain ID: `46630`
* Currency symbol: `ETH`
* Block explorer URL: `https://explorer.testnet.chain.robinhood.com`

Refer to [node access details](/docs/manage-your-node#view-node-access-and-credentials) for your endpoint URL format and credentials.

## ethers.js

Build dapps using [ethers.js](https://github.com/ethers-io/ethers.js/) v6 and Robinhood Chain nodes deployed with Chainstack.

1. Install [ethers.js](https://www.npmjs.com/package/ethers).
2. Connect over HTTP or WebSocket to get the latest block number.

<CodeGroup>
  ```javascript HTTP theme={"system"}
  const { ethers } = require("ethers");

  const provider = new ethers.JsonRpcProvider("YOUR_CHAINSTACK_ENDPOINT");
  provider.getBlockNumber().then(console.log);
  ```

  ```javascript WebSocket theme={"system"}
  const { ethers } = require("ethers");

  const provider = new ethers.WebSocketProvider("YOUR_CHAINSTACK_WSS_ENDPOINT");
  provider.getBlockNumber().then(console.log);
  ```
</CodeGroup>

where

* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS endpoint. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
* YOUR\_CHAINSTACK\_WSS\_ENDPOINT — your node WSS endpoint

## viem

Build dapps using [viem](https://github.com/wevm/viem) and Robinhood Chain nodes deployed with Chainstack.

1. Install [viem](https://www.npmjs.com/package/viem).
2. Create a public client over HTTP and get the latest block number.

<CodeGroup>
  ```javascript Javascript theme={"system"}
  import { createPublicClient, http } from "viem";

  const client = createPublicClient({
    transport: http("YOUR_CHAINSTACK_ENDPOINT"),
  });

  const blockNumber = await client.getBlockNumber();
  console.log(blockNumber);
  ```
</CodeGroup>

where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).

## web3.py

Build dapps using [web3.py](https://github.com/ethereum/web3.py) and Robinhood Chain nodes deployed with Chainstack.

1. Install [web3.py](https://web3py.readthedocs.io/).
2. Connect over HTTP to get the latest block number.

<CodeGroup>
  ```python Key Protected theme={"system"}
  from web3 import Web3

  web3 = Web3(Web3.HTTPProvider("YOUR_CHAINSTACK_ENDPOINT"))
  print(web3.eth.block_number)
  ```

  ```python Password Protected theme={"system"}
  from web3 import Web3

  web3 = Web3(Web3.HTTPProvider("https://%s:%s@%s" % ("USERNAME", "PASSWORD", "HOSTNAME")))
  print(web3.eth.block_number)
  ```
</CodeGroup>

where

* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS endpoint protected either with the key or password
* USERNAME — the username to your node if you use a password-protected endpoint
* PASSWORD — the password to your node if you use a password-protected endpoint
* HOSTNAME — the host name of your node

## Hardhat

Configure [Hardhat](https://hardhat.org/) to deploy contracts and interact through your Robinhood Chain nodes.

1. Install [Hardhat](https://hardhat.org/) and create a project.
2. Add the network to `hardhat.config.js`:

   <CodeGroup>
     ```javascript Javascript theme={"system"}
     require("@nomicfoundation/hardhat-toolbox");

     module.exports = {
       solidity: "0.8.24",
       networks: {
         robinhood: {
           url: "YOUR_CHAINSTACK_ENDPOINT",
           chainId: 4663,
           accounts: ["YOUR_PRIVATE_KEY"],
         },
       },
     };
     ```
   </CodeGroup>

   where

   * YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS endpoint. See [node access details](/docs/manage-your-node#view-node-access-and-credentials).
   * YOUR\_PRIVATE\_KEY — the private key of the account you use to deploy the contract
3. Run `npx hardhat run scripts/deploy.js --network robinhood` and Hardhat will deploy through Chainstack.

For the testnet, set `chainId: 46630`.

## Foundry

1. Install [Foundry](https://getfoundry.sh/).
2. Use `--rpc-url` to run the operation through your Chainstack node.

### Forge

Use `forge` to develop, test, and deploy your smart contracts.

To deploy a contract:

<CodeGroup>
  ```shell Shell theme={"system"}
  forge create CONTRACT_NAME --contracts CONTRACT_PATH --private-key YOUR_PRIVATE_KEY --rpc-url YOUR_CHAINSTACK_ENDPOINT
  ```
</CodeGroup>

where

* CONTRACT\_NAME — name of the contract in the Solidity source code
* CONTRACT\_PATH — path to your smart contract
* YOUR\_PRIVATE\_KEY — the private key to your funded account that you use to deploy the contract
* YOUR\_CHAINSTACK\_ENDPOINT — your node HTTPS endpoint protected either with the key or password

### Cast

Use `cast` to interact with the network and the deployed contracts.

To get the latest block number:

<CodeGroup>
  ```shell Shell theme={"system"}
  cast block-number --rpc-url YOUR_CHAINSTACK_ENDPOINT
  ```
</CodeGroup>

where YOUR\_CHAINSTACK\_ENDPOINT is your node HTTPS endpoint protected either with the key or password.

## Remix IDE

To make Remix IDE interact with Robinhood Chain through a Chainstack node:

1. Get [MetaMask](https://metamask.io/) and set it to interact through a Chainstack node. See [MetaMask](/docs/robinhood-tooling#metamask).
2. In Remix IDE, navigate to the **Deploy & run transactions** tab. Select **Injected Provider - MetaMask** in **Environment**.

This engages MetaMask and makes Remix IDE interact with Robinhood Chain through a Chainstack node.
