XDC chain ID: mainnet and Apothem testnet
- Mainnet: chain ID 50 (0x32 in hexadecimal), currency XDC (18 decimals).
- Apothem testnet: chain ID 51 (0x33), currency TXDC.
- Devnet: chain ID 551.
Source: XDC docs, network specifications.
XDC is EVM-compatible. Since the Cancun upgrade at block 98,800,200 it supports Ethereum's Cancun-era EVM features and EIP-1559 fees.
Works with MetaMask and other browser wallets.
| Network name | XDC Network |
|---|---|
| RPC URL | https://erpc.xinfin.network |
| Chain ID | 50 (testnet: 51) |
| Currency symbol | XDC |
| Block explorer | https://xdcscan.com |
XDC RPC URLs
- https://erpc.xinfin.network
- https://rpc.xinfin.network
- https://rpc1.xinfin.network
- https://erpc.xdcrpc.com
Apothem testnet: https://rpc.apothem.network and https://erpc.apothem.network. Official list: XDC docs. Live response time, block lag and 30-day uptime of each endpoint: XDC RPC status.
Each of these answered eth_chainId with the right chain ID (0x32 for mainnet, 0x33 for Apothem) when we tested them on 16 October 2026. They are free, shared endpoints, so a busy app should be ready to switch to another one, run its own node or use a node provider.
How building on XDC works
The XDC docs describe the network as “a public blockchain that is EVM-compatible” (XDC docs, migrating from Ethereum). Contracts are written in Solidity and compiled to the same bytecode as on Ethereum, and wallets, libraries and frameworks that speak Ethereum's interfaces work once they point at an XDC RPC URL and chain ID. A few details differ.
Which EVM version to compile for
The XDC docs still say the EVM “has been upgraded to support Solidity compiler versions up to v0.8.23” (XDC docs) and list Shanghai as the EVM version (XDC docs, architecture). Those pages appear to predate the Cancun upgrade. When we tested mainnet and Apothem on 16 October 2026, Cancun-era opcodes such as PUSH0, MCOPY and transient storage (TSTORE and TLOAD) ran, while features Ethereum added after Cancun, such as the CLZ opcode and the BLS12-381 precompiles, were not active. A newer compiler works if you set its evmVersion to cancun, or to shanghai to match the docs. Test on Apothem first.
Fees: EIP-1559 since Cancun
The Cancun upgrade (v2.6.8, block 98,800,200, January 2026) brought EIP-1559 fees to XDC: each block has a base fee, which is burned (xdc.dev, Cancun upgrade). The eth_feeHistory and eth_maxPriorityFeePerGas methods answered on 16 October 2026, so standard fee estimation in ethers.js, viem or web3.js works. The XDC docs give the cost as gas used × gas price, paid in XDC (XDC docs, gas fees). The live base fee is on XDC network status and the amount burned on the XDC burn tracker.
Finality
Under the XDPoS 2.0 consensus, live since 30 September 2024, a block “requires only a three block finality” (xdc.org): it is final once three more blocks confirm it. With blocks a few seconds apart that takes seconds, not minutes. The live block time is on network status.
Addresses: xdc and 0x
An address can be written with xdc or 0x at the start; both are the same account. RPC methods, Solidity and Ethereum libraries expect the 0x form, while some XDC explorers, wallets and exchanges show the xdc form. Our address converter switches between them.
Tokens: XRC-20
The XDC docs call XRC20 “the most widely used token standard on the XDC Network, similar to the ERC20 standard on Ethereum” (XDC docs, tokens). An ERC-20 contract compiled for XDC is an XRC-20 token; the name only marks the network it runs on.
How to deploy a smart contract on XDC, step by step
- Set up a test wallet. Use a separate wallet for development and add the Apothem testnet: chain ID 51, RPC https://rpc.apothem.network (XDC docs). The button above does it in one click.
- Get test XDC. The Apothem faucet offered 1,000 test XDC per request when we checked on 16 October 2026. Test XDC has no value.
- Write and compile the contract. In the browser, XinFin's tools guide lists XDC Network Remix, a “web browser-based Integrated Development Environment” (xinfin.org). On your own machine, Hardhat is covered in the XDC docs, and other Ethereum frameworks work the same way. Set the EVM version as described above.
- Deploy to Apothem. In Remix, the XDC docs say to choose Injected Web3 under Deploy & Run Transactions, so your wallet signs the deployment (XDC docs, deployment). In a framework, add a network with chain ID 51 and the Apothem RPC URL, and read the deploying key from an environment variable, never from a file you commit.
- Verify the source code. XDCScan's Verify & Publish Contract Source Code page takes the source, the compiler version and the settings you used. The XDC docs also show the Hardhat command for it, npx hardhat verify with the network name and the contract address, and link to guides for verifying with Standard Input JSON (XDC docs).
- Test what users will do: call every function from a wallet, check the events on the testnet explorer, and try the failure cases.
- Deploy to mainnet with chain ID 50 and a mainnet RPC URL, using real XDC for gas, then verify the mainnet contract the same way.
Reading XDC chain data: JSON-RPC and APIs
There are three ways to read the chain from an app, depending on what you need.
JSON-RPC
The XDC docs say “XDC is fully compatible with Ethereum JSON-RPC API” (XDC docs, JSON-RPC): eth_blockNumber, eth_getBalance, eth_call, eth_getLogs and the rest work on the URLs above. XDC nodes also answer methods in an XDPoS_ namespace for consensus data. Our validator list uses XDPoS_getMasternodesByNumber, which returned the active masternode set when we tested it on 16 October 2026. That namespace is not in the XDC API docs, so treat it as less stable than the standard methods.
Explorer API
Etherscan's API V2 list of supported chains includes XDC Mainnet (chain ID 50) and XDC Apothem Testnet (chain ID 51) (Etherscan docs). Use chainid=50 with an Etherscan API key for balances, token transfers, logs and verified source code.
Your own node
For heavy or critical use, run your own node instead of a shared endpoint. Client releases are published on GitHub (XDPoSChain releases): on 16 October 2026 the newest stable release was v2.7.1, and a v3.0.0 testnet pre-release had just been published.
XDC subnets
For companies that need a private chain, the XDC docs describe the XDC Subnet as a way for organizations “to deploy sovereign, permissioned blockchain networks” (XDC docs, subnets). XDC Zero is the cross-chain framework that connects a subnet to the main XDC network (XDC docs, XDC Zero). A subnet is a separate network with its own validators; contracts and tokens on it are not on XDC mainnet.
XDC block explorers, faucet and docs
- Block explorers: xdcscan.com and xdcscan.io; Apothem testnet: testnet.xdcscan.com.
- Testnet faucet: faucet.apothem.network.
- Documentation: docs.xdc.network.
- Source code: github.com/XinFinOrg (client releases: XDPoSChain).
- Developer forum: xdc.dev.
Key dates for XDC developers
- 1 June 2019: XDC mainnet launches (xinfin.org).
- 30 September 2024: XDPoS 2.0 goes live, with three-block finality (xdc.org).
- 17 September 2025: native USDC and Circle's CCTP V2 go live on XDC mainnet (xdc.org).
- January 2026: the Cancun upgrade (v2.6.8) activates at block 98,800,200, adding EIP-1559 fees, MCOPY and transient storage (xdc.dev).
Common mistakes when building on XDC
- Mixing up chain IDs. Mainnet is 50 and Apothem is 51. A transaction signed for one network is rejected by the other, and test XDC is not real XDC.
- Pasting xdc addresses into Ethereum tools. Libraries and contracts expect the 0x form. Convert first.
- Compiling for a newer EVM than XDC runs. A contract built for a later Ethereum upgrade can fail to deploy or revert on an unknown opcode. Set the EVM version explicitly.
- A fixed gas price. The base fee moves with demand. Let your library estimate fees from the node instead of hardcoding a price.
- RPC URLs from old tutorials. Some endpoints in older guides no longer work: rpc.xdc.org returned an HTTP 502 error when we tested it on 16 October 2026. Use the list above or the XDC docs.
- Leaving the contract unverified. Users and auditors cannot read unverified code, and many treat it as a warning sign.
- Exposing a private key. Keep deploy keys in environment variables or a hardware wallet, never in a repository or a website form. More in the safety center.
How active XDC development is
XDPoSChain, the XDC node software, last changed 22 days ago and had 228 commits in the last 12 full weeks. See all XDC GitHub activity.
GitHub REST API (api.github.com), read from our server · updated 9 min ago
XDC developer FAQ
50 for mainnet (0x32 in hexadecimal), 51 for the Apothem testnet (0x33) and 551 for the devnet, according to the XDC docs.
The XDC docs give https://erpc.xinfin.network for mainnet. https://rpc.xinfin.network, https://rpc1.xinfin.network and https://erpc.xdcrpc.com also answered in our test on 16 October 2026. For Apothem, use https://rpc.apothem.network.
Yes. The XDC docs call it EVM-compatible, and Solidity contracts from Ethereum can be moved to it (XDC docs). Compile for the Cancun EVM version or earlier.
Yes. The XDC docs cover both Remix and Hardhat, and other Ethereum frameworks work with XDC's RPC URLs and chain IDs.
From the Apothem faucet, which offered 1,000 test XDC per request when we checked on 16 October 2026. Test XDC has no value.
On XDCScan's Verify and Publish page, with the same compiler version and settings you deployed with, or with npx hardhat verify, as shown in the XDC docs.
Yes, since the Cancun upgrade at block 98,800,200 in January 2026. Each block has a base fee, which is burned, and standard fee estimation works.
Yes. Every XDC node offers the Ethereum JSON-RPC API, and Etherscan's API V2 supports XDC with chainid=50 (Etherscan docs).
The token standard on XDC. The XDC docs describe it as similar to Ethereum's ERC-20 (XDC docs).