DEV Community

OnFinality
OnFinality

Posted on Originally published at onfinality.io

Bifrost RPC Endpoints: Chain Settings, Provider Options, and Developer Setup

Bifrost RPC Decision Checklist

Before integrating Bifrost RPC endpoints, evaluate these criteria to avoid common pitfalls:

Criterion What to check Why it matters
Network type Mainnet (Chain ID 3068) vs Testnet (Chain ID 49088) Using wrong chain ID can cause transaction failures or loss of funds
Endpoint type Public vs private vs dedicated Public endpoints have rate limits; private/dedicated offer higher reliability for production
WebSocket support WSS endpoint availability Required for real-time dApps (e.g., order books, notifications)
Archive data Archive vs full node RPC Needed for historical queries and some DeFi analytics
Provider reputation Uptime, latency, support Affects user experience and debugging speed
Pricing model Pay-as-you-go vs monthly subscription Match to your traffic patterns to avoid overpaying

What Is Bifrost?

Bifrost is an EVM-compatible Layer 1 blockchain that focuses on a staking liquidity protocol. It enables cross-chain liquidity for staked assets, allowing users to stake tokens while retaining liquidity. The native token is BFC, used for gas and network fees. Bifrost supports both mainnet and testnet environments, with public RPC endpoints available for development.

Bifrost Chain Settings

Mainnet

Testnet

Bifrost RPC Endpoints

Public Mainnet Endpoints

  • https://public-01.mainnet.bifrostnetwork.com/rpc
  • https://public-02.mainnet.bifrostnetwork.com/rpc
  • wss://public-01.mainnet.bifrostnetwork.com/wss
  • wss://public-02.mainnet.bifrostnetwork.com/wss

Public Testnet Endpoints

  • https://public-01.testnet.bifrostnetwork.com/rpc
  • https://public-02.testnet.bifrostnetwork.com/rpc
  • wss://public-01.testnet.bifrostnetwork.com/wss
  • wss://public-02.testnet.bifrostnetwork.com/wss

Note: Public endpoints are suitable for development and low-traffic use. For production applications, consider a managed RPC provider to ensure reliability and scalability.

How to Connect to Bifrost RPC

Using curl

curl -s -X POST https://public-01.mainnet.bifrostnetwork.com/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
Enter fullscreen mode Exit fullscreen mode

Using ethers.js (JavaScript)

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

const provider = new ethers.providers.JsonRpcProvider(
  "https://public-01.mainnet.bifrostnetwork.com/rpc"
);

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

getBlockNumber();
Enter fullscreen mode Exit fullscreen mode

Using web3.py (Python)

from web3 import Web3

w3 = Web3(Web3.HTTPProvider("https://public-01.mainnet.bifrostnetwork.com/rpc"))
print("Connected:", w3.is_connected())
print("Block number:", w3.eth.block_number)
Enter fullscreen mode Exit fullscreen mode

Choosing an RPC Provider for Bifrost

When selecting an RPC provider for Bifrost, consider the following factors:

1. Reliability and Uptime

Public endpoints may experience downtime or rate limiting. A managed provider offers SLAs and redundant infrastructure.

2. Performance (Latency)

Geographic proximity to the provider's nodes affects latency. Some providers offer global load balancing.

3. WebSocket Support

If your dApp requires real-time updates, ensure the provider offers WSS endpoints.

4. Archive Data

For historical data queries, you may need an archive node. Check if the provider supports archive RPC.

5. Pricing

Compare pricing models: pay-as-you-go vs. monthly subscriptions. Estimate your monthly request volume to choose cost-effectively.

OnFinality offers managed RPC endpoints for Bifrost, with support for both HTTP and WebSocket, and flexible pricing plans. Visit our RPC pricing page for details.

Common Pitfalls and Troubleshooting

"Nonce too low" or "Nonce too high"

  • Ensure you are using the correct chain ID (3068 for mainnet).
  • Check that your transaction nonce matches the next expected nonce for your address.

Connection timeout

  • Verify the endpoint URL is correct.
  • If using a public endpoint, consider switching to a private provider for better reliability.

Rate limiting

  • Public endpoints often have rate limits. Use a provider with higher limits or dedicated nodes.

WebSocket disconnections

  • Implement reconnection logic in your client.
  • Use a provider that supports persistent WebSocket connections.

Frequently Asked Questions

What is the Bifrost chain ID?
Mainnet: 3068, Testnet: 49088.

What is the native token of Bifrost?
BFC (Bifrost Coin).

Where can I get testnet BFC?
Use the Bifrost testnet faucet (check official docs for URL).

Can I use Bifrost RPC for free?
Yes, public endpoints are free but have rate limits. For production, consider a managed provider.

Does OnFinality support Bifrost?
Yes, OnFinality provides Bifrost RPC endpoints. See our supported networks page.

Key Takeaways

  • Bifrost is an EVM-compatible L1 with chain ID 3068 (mainnet) and 49088 (testnet).
  • Public endpoints are available for development, but production apps should use a reliable RPC provider.
  • When choosing a provider, evaluate uptime, latency, WebSocket support, archive data, and pricing.
  • OnFinality offers managed Bifrost RPC with flexible plans. Check pricing and networks for more info.

For further reading, see our guide on how to choose an RPC provider.

Related resources

Originally published at OnFinality.

Top comments (0)