Skip to main content

Connect to RPC

To interact with the Watr Network from your local development environment, you’ll need to configure RPC endpoints for both Mainnet and Testnet.

These endpoints allow you to deploy and test smart contracts or query blockchain data.


RPC Endpoints

For Watr Mainnet -

For Watr Testnet -

Note: This RPC URL is specific to the C-Chain (Contract Chain). Make sure you connect to the correct chain/subnet in your wallet or application.


Add to MetaMask

To connect MetaMask to the Watr Testnet:

  1. Open MetaMask.
  2. Click the network dropdown → Add NetworkAdd a network manually. add-network

Connect via Code

Using ethers.js

import { ethers } from "ethers";

const provider = new ethers.JsonRpcProvider(
"https://rpc.watr.org/ext/bc/EypLFUSzC2wdbFJovYS3Af1E7ch1DJf7KxKoGR5QFPErxQkG1/rpc"
);

Using viem

import { createPublicClient, http } from "viem";

const client = createPublicClient({
transport: http(
"https://rpc.watr.org/ext/bc/EypLFUSzC2wdbFJovYS3Af1E7ch1DJf7KxKoGR5QFPErxQkG1/rpc"
),
});