Summary
Sepolia is the primary Ethereum testnet for contract and dapp development. To use Sepolia RPC, set the chain ID to 11155111 (0xaa36a7), use test ETH as the native currency, and connect to an execution-layer JSON-RPC endpoint over HTTPS or WebSocket. A public endpoint can get you started, but authenticated access from a provider such as OnFinality gives more predictable request limits for CI and repeated testing. Fund a dedicated test wallet from a trusted faucet, and never reuse a mainnet private key or seed phrase. The simplest connectivity check is a JSON-RPC call like eth_blockNumber, followed by the methods your application actually depends on. Verify whether you need archive, trace, or debug support on the endpoint. Before promoting a workflow to Ethereum mainnet, check method coverage, rate limits, and mainnet-specific settings such as chain ID 1 and real ETH fees. Use /networks/eth-sepolia for the current Sepolia endpoint and /pricing/rpc for plan details. Keep Sepolia execution-layer RPC separate from Beacon or consensus APIs, and treat Sepolia strictly as a test environment.
Key Takeaways
- Sepolia uses chain ID 11155111 and test ETH; it is Ethereum's primary testnet for contract and dapp testing.
- Use HTTPS endpoints for JSON-RPC calls and WebSocket endpoints for subscriptions; public endpoints are shared, while authenticated endpoints offer predictable limits.
- Fund test wallets only with faucet ETH and keep test keys separate from mainnet private keys.
- Verify method coverage, archive or trace support, and rate limits before moving a tested workflow to Ethereum mainnet.
Sepolia network settings at a glance
Sepolia is the recommended Ethereum testnet for application development. It uses the same execution-layer JSON-RPC interface as Ethereum mainnet, but operates with test ETH and a separate chain ID.
Before connecting any client, confirm the canonical settings below. The endpoint URL should come from your chosen provider; check /networks/eth-sepolia for the current OnFinality Sepolia endpoint.
| Criterion | What to check | Why it matters |
|---|---|---|
| Chain ID | 11155111 (0xaa36a7) | Prevents cross-network replays and confirms you are on Sepolia, not mainnet. |
| Native currency | Sepolia test ETH | Required for gas; has no real-world value. |
| Block explorer | https://sepolia.etherscan.io | Verifies transactions, contracts, and network state. |
| Consensus | Proof of stake | Mirrors Ethereum mainnet post-Merge behavior. |
| RPC endpoint | Provider-specific HTTPS or WSS URL | Execution-layer JSON-RPC access. |
HTTPS and WebSocket RPC endpoint setup
A Sepolia RPC endpoint accepts standard Ethereum JSON-RPC methods over HTTPS. For real-time event streaming, use a WebSocket endpoint to subscribe to new blocks, pending transactions, and logs.
Public endpoints are shared and may apply low rate limits or throttling. Authenticated endpoints, usually tied to an API key or private node plan, provide more predictable request capacity and are preferable for CI pipelines or repeated testing.
Check /pricing/rpc to understand the OnFinality plan options; current rate limits and feature availability are documented on /networks/eth-sepolia.
- Use HTTPS for request-response calls like eth_blockNumber or eth_call.
- Use WebSocket for subscriptions such as eth_subscribe.
- Keep execution-layer RPC separate from any Beacon or consensus API.
- If the endpoint requires authentication, include the API key in the URL path or header as documented.
| Criterion | What to check | Why it matters |
|---|---|---|
| Public access | Free, shared endpoint without API key | Good for quick tests, but limits may interrupt automated workflows. |
| Authenticated access | API-key or private endpoint | Predictable request limits and support for heavier usage. |
Faucet workflow and safe test-wallet practices
Sepolia test ETH is required to pay for gas. Use a trusted faucet to fund a dedicated test wallet. Many faucets require a small mainnet balance, social login, or API key.
Never reuse a mainnet private key on Sepolia. Create a separate browser wallet or keypair and use a placeholder in code examples. If a test wallet is compromised, no mainnet funds are at risk.
- Create a new wallet for Sepolia testing.
- Request test ETH from a reputable faucet; verify the URL before connecting.
- Aim to keep a small balance to avoid faucet rate limits during long test cycles.
- Do not store a real private key in scripts or configuration files.
Wallet and library connection examples
The following examples use a placeholder endpoint. Replace YOUR_SEPOLIA_RPC_URL with the HTTPS URL from your provider. For MetaMask, add the network manually with the settings above.
- MetaMask: Network name 'Ethereum Sepolia', RPC URL your endpoint, Chain ID 11155111, Currency symbol ETH, Block explorer https://sepolia.etherscan.io
- ethers.js v6: new ethers.JsonRpcProvider(YOUR_SEPOLIA_RPC_URL)
- curl: POST JSON-RPC request to the HTTPS endpoint
JSON-RPC and code snippets
Use curl to confirm connectivity. Replace YOUR_SEPOLIA_RPC_URL with your provider's HTTPS endpoint:
``bash
curl -X POST YOUR_SEPOLIA_RPC_URL \
-H "Content-Type: application/json" \
--data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
``
For ethers.js v6, connect with a JsonRpcProvider:
``javascript
const { ethers } = require('ethers');
const provider = new ethers.JsonRpcProvider('YOUR_SEPOLIA_RPC_URL');
const blockNumber = await provider.getBlockNumber();
console.log('Current Sepolia block:', blockNumber);
``
Always use a placeholder private key in tests. Example of a funded signer:
``javascript
const privateKey = 'YOUR_SEPOLIA_TEST_PRIVATE_KEY';
const wallet = new ethers.Wallet(privateKey, provider);
``
Common methods and method coverage checks
Sepolia execution-layer RPC supports standard Ethereum methods. Before promoting a workflow to mainnet, verify that your provider supports the specific methods you rely on, including archive or trace methods if needed.
Use /rpc-assistant/ethereum-blockchain-api-2 for an overview of Ethereum RPC methods, and /rpc-assistant/best-ethereum-rpc-api for evaluation criteria.
- eth_blockNumber, eth_getBalance, eth_getTransactionReceipt, eth_call, eth_sendRawTransaction, eth_getLogs, eth_estimateGas
- Check archive data support for historical state queries.
- Trace and debug methods may be limited on public endpoints; verify authenticated plan support.
Rate limits, troubleshooting, and mainnet promotion checks
Public Sepolia endpoints often enforce rate limits that can block test suites. Do not assume a specific limit; instead, check your provider's documentation and monitor HTTP 429 responses.
Common errors include nonce too low, insufficient funds from a faucet, and unsupported methods on public endpoints. Fix these by resetting nonce, requesting more test ETH, or switching to an authenticated endpoint.
Before promoting from Sepolia to Ethereum mainnet, test against /networks/eth using the same method calls and transaction patterns. Validate fee estimation, contract state, and subscription behavior under your expected load.
- Use eth_getTransactionCount with 'pending' for the latest nonce.
- Treat Sepolia as a test environment; do not send real assets.
- Check current plan rate limits on /networks/eth-sepolia and compare with /pricing/rpc if you need higher capacity.
- Confirm mainnet-specific settings such as chain ID 1 and real ETH gas.
| Criterion | What to check | Why it matters |
|---|---|---|
| Rate limits | Provider-documented request caps | Avoid 429 throttling during automated testing. |
| Method support | Archive, trace, debug availability | Some debugging workflows require these methods. |
| Mainnet differences | Chain ID 1, real ETH fees, finality | Sepolia mirrors mainnet but is not production. |
Frequently Asked Questions
What is the Sepolia chain ID?
The Sepolia chain ID is 11155111, which is 0xaa36a7 in hexadecimal.
How do I get Sepolia test ETH?
Use a reputable faucet such as the Alchemy Sepolia Faucet, Infura Faucet, or PublicNode Faucet. Some faucets require an account or mainnet balance. Always verify the faucet URL and use a dedicated test wallet.
Can I use a public Sepolia RPC endpoint for automated tests?
Public endpoints are shared and may have low rate limits or intermittent availability. For CI/CD or sustained testing, use an authenticated endpoint or a dedicated node with documented limits, such as those available on the Sepolia network page.
What is the difference between Sepolia execution-layer RPC and the Beacon/consensus API?
The execution-layer RPC serves standard Ethereum JSON-RPC methods for transactions, balances, and logs. The Beacon/consensus API exposes validator and consensus data. Keep these endpoint types separate when configuring infrastructure.
How do I add Sepolia to MetaMask?
In MetaMask, go to Settings > Networks > Add network, then enter: Network name 'Ethereum Sepolia', RPC URL from your provider, Chain ID 11155111, Currency symbol ETH, and Block explorer URL https://sepolia.etherscan.io. Click Save.
What should I check before moving from Sepolia to mainnet?
Verify that your provider supports the same RPC methods on Ethereum mainnet, test with real ETH gas estimation, and confirm subscription behavior. Check /networks/eth for mainnet settings and /pricing/rpc for plan capacity if needed.