Logo
RPC Assistant

Moonriver RPC: Endpoints, Configuration, and Best Practices

Resumen

Moonriver is an Ethereum-compatible canary network on Kusama, ideal for testing dApps before deploying on Moonbeam. This guide covers Moonriver RPC endpoints, how to configure wallets and tools, and how to choose a reliable RPC provider for production use.

Moonriver RPC Decision Checklist

Before integrating Moonriver RPC into your project, consider the following:

CriterionWhat to checkWhy it matters
Network typeMainnet (chain ID 1285) vs testnetMoonriver is a canary network with real MOVR tokens; ensure you are on the correct network for your use case.
Endpoint typeHTTPS vs WSSUse HTTPS for standard requests, WSS for real-time subscriptions (e.g., event listeners).
Rate limitsPublic vs private endpointsPublic endpoints have rate limits; for production, use a private endpoint or dedicated node.
Archive dataFull vs archive nodeArchive nodes provide historical state; needed for dApps that query past data.
Provider reliabilityUptime, latency, supportChoose a provider with consistent performance and responsive support.
Pricing modelPay-as-you-go vs subscriptionMatch the pricing model to your expected request volume.
SecurityAPI key management, encryptionProtect your API keys and use HTTPS/WSS to secure data in transit.
Geographic distributionNode locationsMultiple regions reduce latency for global users.

What is Moonriver?

Moonriver is a companion network to Moonbeam, serving as an incentivized canary network on the Kusama ecosystem. It provides a full Ethereum-like environment, supporting Solidity smart contracts and Ethereum-compatible tools. Developers use Moonriver to test new features and dApps in a production-like setting before deploying to Moonbeam. The native token is MOVR.

Moonriver Network Details

  • Chain ID: 1285 (0x505 in hex)
  • Currency: MOVR
  • Block Explorer: Moonscan
  • Block Time: ~12 seconds
  • Consensus: Nominated Proof-of-Stake (NPoS) with collators

Moonriver RPC Endpoints

To interact with Moonriver, you need an RPC endpoint. Below are common public endpoints (rate-limited) and private endpoints from providers.

Public Endpoints (for testing)

ProviderHTTPS URLWSS URL
Moonbeam Foundationhttps://rpc.api.moonriver.moonbeam.networkwss://wss.api.moonriver.moonbeam.network
OnFinalityhttps://moonriver.api.onfinality.io/publicwss://moonriver.api.onfinality.io/public-ws
PublicNodehttps://moonriver-rpc.publicnode.comwss://moonriver-rpc.publicnode.com
UnitedBlochttps://moonriver.unitedbloc.comwss://moonriver.unitedbloc.com

Note: Public endpoints are rate-limited and not suitable for production. For reliable access, obtain a private API key from an RPC provider.

Private Endpoints (for production)

Private endpoints offer higher rate limits, dedicated support, and optional archive/trace data. Providers like OnFinality offer managed RPC services with configurable plans. Visit the Moonriver network page for details.

How to Connect to Moonriver

Using curl

curl -H "Content-Type: application/json" \
  -d '{"id":1,"jsonrpc":"2.0","method":"eth_blockNumber","params":[]}' \
  https://moonriver.api.onfinality.io/public

Using ethers.js (JavaScript)

const { ethers } = require("ethers");

const provider = new ethers.JsonRpcProvider(
  "https://moonriver.api.onfinality.io/public",
  { chainId: 1285, name: "moonriver" }
);

async function getBlockNumber() {
  const blockNumber = await provider.getBlockNumber();
  console.log("Current block:", blockNumber);
}

getBlockNumber();

Using web3.py (Python)

from web3 import Web3

w3 = Web3(Web3.HTTPProvider("https://moonriver.api.onfinality.io/public"))
print(w3.eth.block_number)

Adding Moonriver to MetaMask

  1. Open MetaMask and click the network dropdown.
  2. Click "Add Network" or "Custom Network".
  3. Enter the following details:
    • Network Name: Moonriver
    • New RPC URL: https://rpc.api.moonriver.moonbeam.network (or your private endpoint)
    • Chain ID: 1285
    • Currency Symbol: MOVR
    • Block Explorer URL: https://moonriver.moonscan.io
  4. Click "Save".

Choosing an RPC Provider for Moonriver

When selecting an RPC provider, consider:

  • Reliability: Look for providers with consistent uptime and low latency. Check their status page or community feedback.
  • Scalability: Ensure the provider can handle your request volume without throttling.
  • Features: Some providers offer archive nodes, trace APIs, or WebSocket support.
  • Pricing: Compare pay-as-you-go vs subscription plans. Visit RPC pricing for details.
  • Support: Access to technical support can be crucial for production dApps.

OnFinality provides Moonriver RPC endpoints with configurable rate limits, archive support, and dedicated node options. See the Moonriver network page for more information.

Common Pitfalls and Troubleshooting

Rate Limiting

Public endpoints have rate limits (e.g., 25-40 req/s). If you get 429 errors, switch to a private endpoint or reduce request frequency.

Incorrect Chain ID

Ensure your wallet or dApp uses chain ID 1285. Using the wrong chain ID can cause transaction failures.

WebSocket Disconnections

For real-time subscriptions, use WSS endpoints. If disconnections occur, implement reconnection logic in your application.

Missing Archive Data

If your dApp requires historical state, use an archive node. Not all providers offer archive data.

Key Takeaways

  • Moonriver is an Ethereum-compatible canary network on Kusama with chain ID 1285.
  • Public RPC endpoints are available for testing but have rate limits.
  • For production, use a private endpoint from a reliable provider.
  • Configure your tools (MetaMask, ethers.js, etc.) with the correct network details.
  • Evaluate providers based on reliability, scalability, features, and pricing.

Frequently Asked Questions

What is the difference between Moonriver and Moonbeam?

Moonriver is a canary network on Kusama where new features are tested before being deployed to Moonbeam on Polkadot. Moonriver uses MOVR tokens and has real economic value.

Can I use Moonriver for production dApps?

Yes, Moonriver is a live network with real assets. Many dApps deploy on Moonriver to reach the Kusama ecosystem.

How do I get MOVR tokens?

MOVR can be obtained through decentralized exchanges (e.g., SushiSwap on Moonriver) or centralized exchanges that list MOVR.

What are the rate limits for public endpoints?

Rate limits vary by provider. For example, the Moonbeam Foundation endpoint allows 25 req/s, while OnFinality's public endpoint allows 40 req/s. For higher limits, use a private endpoint.

Does OnFinality support Moonriver archive nodes?

Yes, OnFinality offers archive nodes for Moonriver. Check the Moonriver network page for details.

Next Steps

Base de conocimiento RPC

Detalles RPC relacionados

Nunca te preocupes por la infraestructura nuevamente

OnFinality elimina la carga pesada de DevOps para que puedas construir de forma más inteligente y rápida.

Comenzar