Summary
This article explains how to obtain and use USDC on the BNB Smart Chain testnet. It covers the difference between native and bridged USDC, how to get testnet USDC via faucets or by deploying your own mock, and how to configure your dApp to interact with the token contract.
Quick Answer: Getting USDC on BNB Testnet
USDC on BNB Smart Chain testnet is a test token that mimics the behavior of the mainnet USDC stablecoin. It is not a real asset and has no monetary value. You can obtain it through a faucet, or you can deploy your own mock USDC contract for complete control during development.
Before you can interact with USDC, you need a reliable RPC endpoint. OnFinality provides a public endpoint for the BNB Chain testnet at https://bnb-testnet.api.onfinality.io/public. For production-grade testing with higher rate limits and dedicated throughput, consider a managed RPC service or a dedicated node.
Decision Guide: Which USDC Approach Fits Your Testing?
Your choice of how to get USDC on BNB testnet depends on your testing goals:
- Quick integration tests: Use a faucet to get bridged USDC. It's fast and requires no contract deployment.
- Full control over token behavior: Deploy your own mock USDC contract. This lets you mint arbitrary amounts and simulate edge cases.
- Testing with real-world token addresses: Use the known bridged USDC contract address to test your dApp's integration with a specific token address.
If you are building a dApp that expects to interact with USDC on mainnet, you should test with the bridged USDC address to ensure your contract logic handles the correct token. If you are testing internal accounting or UI logic, a mock token is often simpler.
What Is USDC on BNB Testnet?
USDC is an ERC-20 stablecoin issued by Circle. On the BNB Smart Chain, USDC exists in two forms:
- Native USDC: Issued directly on BNB Chain by Circle. As of 2025, native USDC is available on BNB Chain mainnet, but on the testnet, you will typically find the bridged version.
- Bridged USDC: Wrapped by a bridge protocol (like Axelar or Wormhole) from another chain. The bridged token has a different contract address and may have different metadata.
On the BNB testnet, the most commonly referenced USDC is the bridged version. Always verify the contract address you are using, as using the wrong address can lead to failed transactions or unexpected behavior.
Chain Settings and RPC Endpoint
To interact with the BNB testnet, configure your wallet or dApp with the following settings:
| Parameter | Value |
|---|---|
| Network Name | BNB Smart Chain Testnet |
| RPC URL | https://bnb-testnet.api.onfinality.io/public |
| Chain ID | 97 |
| Symbol | tBNB |
| Block Explorer | https://testnet.bscscan.com |
For a managed endpoint with higher rate limits, check the BNB Chain Testnet network page.
Getting Testnet USDC via Faucets
The easiest way to get USDC on BNB testnet is to use a faucet. Several community faucets dispense testnet USDC. However, faucets can be unreliable or rate-limited. If you cannot find a USDC faucet, you can often get tBNB from a faucet and then swap it for USDC on a testnet DEX, or you can deploy your own USDC contract.
Deploying Your Own Mock USDC
Deploying a mock USDC contract gives you unlimited minting power. Here is a simple Solidity contract you can deploy:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract MockUSDC is ERC20 {
constructor() ERC20("USD Coin", "USDC") {
_mint(msg.sender, 1_000_000 * 10 ** decimals());
}
function mint(address to, uint256 amount) public {
_mint(to, amount);
}
}
Deploy this contract using Remix, Hardhat, or Foundry. After deployment, you can mint tokens to any address for testing.
Using USDC in Your dApp
Once you have USDC, you can interact with it using standard ERC-20 methods. Here is an example using ethers.js to check a balance:
const { ethers } = require("ethers");
const provider = new ethers.providers.JsonRpcProvider("https://bnb-testnet.api.onfinality.io/public");
const usdcAddress = "0x..."; // Replace with your USDC contract address
const wallet = new ethers.Wallet("0x...", provider); // Replace with your private key
const usdc = new ethers.Contract(
usdcAddress,
["function balanceOf(address) view returns (uint256)"],
wallet
);
async function main() {
const balance = await usdc.balanceOf(wallet.address);
console.log("USDC balance:", ethers.utils.formatUnits(balance, 18));
}
main();
Remember that USDC on BNB testnet may have 18 decimals (like the bridged version) or 6 decimals (like native USDC). Always check the token's decimals() function.
Common Pitfalls and Troubleshooting
- Wrong contract address: Using a mainnet USDC address on testnet will fail. Always verify the address on the testnet explorer.
- Insufficient tBNB for gas: Even though USDC is free, you need tBNB to pay for transaction fees. Get tBNB from a faucet first.
- RPC rate limits: Public RPC endpoints have rate limits. If you are making many requests, consider a managed RPC service to avoid throttling.
- Token decimals mismatch: If your dApp assumes 6 decimals but the token uses 18, balances will appear inflated. Always fetch the token's decimals dynamically.
Key Takeaways
- USDC on BNB testnet is a test token, not real money.
- You can get it via faucets or by deploying your own mock contract.
- Use the correct contract address and decimals for your testing.
- A reliable RPC endpoint is essential for smooth testing; consider OnFinality's public endpoint or a dedicated node for higher throughput.
Frequently Asked Questions
Q: Is USDC on BNB testnet the same as mainnet USDC? A: No. Testnet USDC is a test token with no value. The contract address and possibly the decimals differ from mainnet.
Q: Can I use the mainnet USDC contract address on testnet? A: No. You must use the testnet-specific contract address. Using a mainnet address will result in errors.
Q: How do I get tBNB for gas? A: Use a BNB testnet faucet. Many faucets are available online; search for "BNB testnet faucet" or check the BNB Chain Testnet network page for resources.
Q: What if the USDC faucet is down? A: Deploy your own mock USDC contract as shown above. This gives you unlimited tokens and is a common practice in development.
Q: Why does my USDC balance show a huge number?
A: This is likely a decimals mismatch. The token may use 18 decimals instead of 6. Check the token's decimals() function and adjust your formatting accordingly.