Get started
Network details
Everything you need to connect to Lib Testnet: chain ID, RPC endpoint, currency, explorer and faucet.
#Lib Testnet
| Network name | Lib Testnet |
| Chain ID | 54210 (hex 0xd3c2) |
| RPC URL | https://rpc-testnet.libchain.tech |
| Currency | tLIB (Lib Test Coin), 18 decimals |
| Block explorer | https://testnet.libchain.tech |
| Faucet | LibChain Hub faucet or https://faucet.libchain.tech |
| Consensus | QBFT (proof of authority) |
| EVM version | Cancun |
| Block time | 2 seconds while there are transactions, a heartbeat block every 60 seconds when idle |
| Block gas limit | 30,000,000 |
| Client | Hyperledger Besu |
There's no public WebSocket endpoint. Poll over HTTPS (viem and ethers both do this by default) or read new blocks from the explorer API.
#Add it by hand
In MetaMask: Settings → Networks → Add a network → Add a network manually, then enter the values above. Lib Wallet has Lib Testnet built in.
Apps can ask the wallet to add it with wallet_addEthereumChain:
await window.ethereum.request({
method: 'wallet_addEthereumChain',
params: [{
chainId: '0xd3c2',
chainName: 'Lib Testnet',
nativeCurrency: { name: 'Lib Test Coin', symbol: 'tLIB', decimals: 18 },
rpcUrls: ['https://rpc-testnet.libchain.tech'],
blockExplorerUrls: ['https://testnet.libchain.tech'],
}],
})#Chain definition for your tools
import { defineChain } from 'viem'
export const libTestnet = defineChain({
id: 54210,
name: 'Lib Testnet',
nativeCurrency: { name: 'Lib Test Coin', symbol: 'tLIB', decimals: 18 },
rpcUrls: { default: { http: ['https://rpc-testnet.libchain.tech'] } },
blockExplorers: { default: { name: 'Lib Explorer', url: 'https://testnet.libchain.tech' } },
testnet: true,
})import { JsonRpcProvider } from 'ethers'
export const provider = new JsonRpcProvider('https://rpc-testnet.libchain.tech', 54210, { staticNetwork: true })[rpc_endpoints]
lib_testnet = "https://rpc-testnet.libchain.tech"networks: {
libTestnet: {
url: 'https://rpc-testnet.libchain.tech',
chainId: 54210,
accounts: [process.env.PRIVATE_KEY!],
},
}#Check that you're connected
curl -s https://rpc-testnet.libchain.tech -H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'
# {"jsonrpc":"2.0","id":1,"result":"0xd3c2"}