DEV Community

Zhuoxin Sun
Zhuoxin Sun

Posted on • Originally published at onfinality.io

BSC Testnet RPC Endpoint: Chain Settings, Faucet, and Debugging Tips

BSC Testnet RPC Decision Checklist

Before integrating a BSC Testnet RPC endpoint into your development workflow, evaluate the following criteria to avoid surprises when you move to mainnet.

Criterion What to check Why it matters
Rate limits Does the provider publish a per-second or per-minute limit? Testnet is often used for load testing – a low limit can block your automation scripts.
WebSocket support Does the endpoint expose wss:// for real-time subscriptions? Required for event listening, pending transaction tracking, and live price feeds during development.
Archive data / Trace API Does the provider support eth_getLogs and debug_traceTransaction? Essential for indexing historical events and debugging failed transactions. BSC official endpoints disable eth_getLogs.
Uptime & reliability Is the endpoint backed by a load-balanced cluster? Testnet downtime can delay your development cycles. Commercial providers typically offer better SLA.
Geographic latency Where are the servers located relative to your CI/CD pipeline? High latency can cause timeouts in automated tests. Use a provider with global presence.

Chain Configuration for BSC Testnet

BSC Testnet replicates the BNB Smart Chain mainnet with a separate validator set and uses tBNB as the gas token. All transactions are valueless, making it safe for testing.

  • Network Name: BNB Smart Chain Testnet
  • Chain ID: 97 (0x61)
  • Currency Symbol: tBNB
  • Block Explorer: testnet.bscscan.com
  • Official RPC Endpoints (public, rate-limited):
    • https://data-seed-prebsc-1-s1.bnbchain.org:8545
    • https://data-seed-prebsc-2-s2.bnbchain.org:8545

How to Add BSC Testnet to MetaMask

Open MetaMask, click the network dropdown, and choose Add Network (custom network). Fill in the fields using the configuration above. Alternatively, use ChainList to add it with one click.

{
  "chainId": "0x61",
  "chainName": "BNB Smart Chain Testnet",
  "nativeCurrency": {
    "name": "tBNB",
    "symbol": "tBNB",
    "decimals": 18
  },
  "rpcUrls": ["https://data-seed-prebsc-1-s1.bnbchain.org:8545"],
  "blockExplorerUrls": ["https://testnet.bscscan.com"]
}
Enter fullscreen mode Exit fullscreen mode

Getting tBNB from a Faucet

To pay gas on BSC Testnet, request free tBNB from a reliable faucet. Most faucets require a social login or Proof of Humanity (e.g., GitHub account) to prevent abuse.

Expect a 24-hour cooldown between requests per address. If you need more for extensive testing, consider using a dedicated node to avoid public faucet limitations.

Testing Your RPC Connection

Use curl to verify the endpoint responds to basic JSON-RPC calls:

curl -X POST https://data-seed-prebsc-1-s1.bnbchain.org:8545 \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
Enter fullscreen mode Exit fullscreen mode

A successful response returns the current block number in hex. If you see connection refused or timeouts, try an alternative RPC URL from the chain configuration section.

Common Pitfalls on BSC Testnet

1. Rate Limiting on Official Endpoints

BSC’s public endpoints enforce a limit of 10,000 requests per 5 minutes per IP. If your dApp makes many parallel calls during testing, you may hit this limit. Use a commercial RPC provider like OnFinality for higher throughput and dedicated resources.

2. eth_getLogs Is Disabled

The official mainnet and testnet endpoints do not support eth_getLogs. To fetch historical event logs, you need a provider that offers indexed archive data. Many third-party RPC services include this endpoint without extra charges.

3. WebSocket Connection Drops

Some public endpoints have unstable WebSocket connections. If your application requires persistent subscriptions, test with a robust WSS provider or fallback to polling every few seconds.

4. Incorrect Chain ID in Transactions

Always use chain ID 97 (0x61). Signing a testnet transaction with chain ID 56 (mainnet) will be rejected by the network. Most Web3 libraries (ethers.js, web3.js) handle this automatically when you specify the correct provider.

Debugging Failed Transactions

When a testnet transaction fails, check these steps:

  • Insufficient tBNB: Even testnet gas costs are non-zero. Ensure you have enough tBNB at the from address.
  • Nonce mismatch: Use eth_getTransactionCount with "pending" to get the correct nonce.
  • Revert reason: Call eth_call with same parameters but estimateGas disabled, or use debug_traceTransaction on a failed hash if your provider supports it.

Key Takeaways

  • BSC Testnet (chain ID 97) is an EVM-compatible test environment with tBNB as gas.
  • Public endpoints are free but rate-limited and lack eth_getLogs.
  • Evaluate providers based on rate limits, WebSocket, archive data, and latency.
  • Use testnet for smart contract testing, CI/CD pipelines, and load simulations before mainnet deployment.

Frequently Asked Questions

What is the BSC Testnet RPC URL?

The official public RPC URLs are listed in the chain configuration section. You can also find community-maintained endpoints on ChainList or use a managed provider like OnFinality.

How do I get tBNB for testing?

Use BNB Chain’s official faucet at testnet.bnbchain.org/faucet-smart or third-party faucets. Cooldown periods apply.

Can I use my mainnet BNB on testnet?

No. Testnet uses a separate, valueless token (tBNB). You must request it from a faucet.

Does OnFinality support BSC Testnet?

Yes. OnFinality provides both public and dedicated BSC Testnet RPC endpoints with higher rate limits and optional archive data, suitable for CI/CD and load testing. Check our supported networks page for details.

Why is my transaction not pending?

Common causes: nonce too low, insufficient gas, or the endpoint is overloaded. Verify the nonce using eth_getTransactionCount with "pending" block tag.

Next Steps

After verifying your BSC Testnet connection, consider how your mainnet RPC strategy will scale. Review our guide on choosing an RPC provider for production-ready infrastructure, and explore OnFinality’s RPC pricing to compare shared vs. dedicated node options.

Related resources

Originally published at OnFinality.

Top comments (0)