DEV Community

Zhuoxin Sun
Zhuoxin Sun

Posted on • Originally published at onfinality.io

Aleph Zero RPC Endpoints & Provider Guide | OnFinality

Summary

Aleph Zero is a layer-1 blockchain that combines a Substrate-based core with an EVM-compatible layer, offering privacy, scalability, and instant finality. Developers building on Aleph Zero need reliable RPC endpoints to interact with the network—whether querying on-chain data, submitting transactions, or deploying smart contracts. This article provides the official RPC endpoints for Aleph Zero mainnet and testnet, configuration examples for common tools, and a structured checklist to help you choose an RPC provider that meets your performance and budget requirements.

Aleph Zero RPC Decision Checklist

Before selecting an RPC provider for Aleph Zero, evaluate the following criteria to ensure your infrastructure aligns with your project's needs.

Criterion What to check Why it matters
Network coverage Does the provider support both mainnet and testnet? You need testnet for development and mainnet for production.
Endpoint type Are HTTPS and WSS endpoints available? WSS is required for real-time subscriptions (e.g., event listeners).
Rate limits What is the requests-per-second (RPS) limit? High-throughput dApps need higher RPS to avoid throttling.
Latency Where are the provider's nodes located? Lower geographic distance reduces round-trip time.
Pricing model Is it pay-as-you-go, subscription, or dedicated? Match the model to your expected call volume and budget.
Reliability Does the provider publish uptime SLAs or status pages? Downtime can break your application.
Developer support Are there docs, SDKs, or community channels? Quick troubleshooting saves development time.
Additional features Does the provider offer archive data, trace APIs, or analytics? Archive nodes are needed for historical queries.

Aleph Zero Network Overview

Aleph Zero is designed for high throughput and low fees, with a native privacy layer called Liminal. It has two execution environments:

  • Substrate layer: The core chain using Substrate framework, with its own RPC interface.
  • EVM layer: A fully EVM-compatible sidechain that allows developers to deploy Solidity contracts and use Ethereum tooling.

Most developers interact with the EVM layer for dApps, while the Substrate layer is used for staking, governance, and native asset transfers. RPC endpoints differ for each layer.

Aleph Zero RPC Endpoints

Below are the official public RPC endpoints for Aleph Zero. Note that public endpoints often have rate limits and may not be suitable for production workloads.

Mainnet

  • EVM Layer:
    • HTTPS: https://rpc.alephzero.raas.gelato.cloud
    • WSS: wss://ws.alephzero.raas.gelato.cloud
  • Substrate Layer:
    • HTTPS: https://rpc.alephzero.substrate.network (example, check official docs)
    • WSS: wss://rpc.alephzero.substrate.network

Testnet (Sepolia-based)

  • EVM Layer:
    • HTTPS: https://rpc.alephzero-testnet.gelato.digital
    • WSS: wss://ws.alephzero-testnet.gelato.digital
  • Substrate Layer:
    • HTTPS: https://rpc.alephzero-testnet.substrate.network
    • WSS: wss://rpc.alephzero-testnet.substrate.network

Chain IDs:

  • Mainnet EVM: 41455
  • Testnet EVM: 2039

Connecting to Aleph Zero RPC

Using curl (JSON-RPC)

curl -s -X POST https://rpc.alephzero.raas.gelato.cloud \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
Enter fullscreen mode Exit fullscreen mode

Using ethers.js (JavaScript)

const { ethers } = require("ethers");

const provider = new ethers.JsonRpcProvider("https://rpc.alephzero.raas.gelato.cloud");

async function getBlockNumber() {
  const blockNumber = await provider.getBlockNumber();
  console.log("Current block number:", blockNumber);
}

getBlockNumber();
Enter fullscreen mode Exit fullscreen mode

Using web3.py (Python)

from web3 import Web3

w3 = Web3(Web3.HTTPProvider("https://rpc.alephzero.raas.gelato.cloud"))
print(w3.eth.block_number)
Enter fullscreen mode Exit fullscreen mode

Adding to MetaMask

  1. Open MetaMask and click the network dropdown.
  2. Click "Add Network" and fill in:
    • Network Name: Aleph Zero Mainnet
    • RPC URL: https://rpc.alephzero.raas.gelato.cloud
    • Chain ID: 41455
    • Currency Symbol: AZERO
    • Block Explorer URL: https://evm-explorer.alephzero.org
  3. Click "Save".

Choosing an RPC Provider for Aleph Zero

Public endpoints are convenient for development but often insufficient for production due to rate limits and potential downtime. When evaluating RPC providers, consider the following factors:

1. Network Support

Ensure the provider supports both mainnet and testnet for Aleph Zero. Some providers may only offer one or the other.

2. Performance and Reliability

Look for providers with geographically distributed nodes to reduce latency. Check if they have a status page or SLA. For example, OnFinality offers Aleph Zero endpoints with transparent performance metrics.

3. Pricing

Compare pricing models:

  • Free tier: Good for prototyping but limited.
  • Pay-as-you-go: Flexible for variable usage.
  • Dedicated nodes: Best for high-throughput or latency-sensitive applications.

OnFinality provides competitive pricing for Aleph Zero RPC access. See our RPC pricing page for details.

4. Additional Features

Some providers offer archive nodes, trace APIs, or WebSocket subscriptions. If your dApp requires historical data or real-time events, prioritize providers that support these features.

Common Pitfalls and Troubleshooting

Rate Limiting

Public endpoints often throttle requests. If you encounter "429 Too Many Requests", consider upgrading to a paid plan or using a dedicated node.

WebSocket Disconnections

For WSS connections, ensure your client handles reconnection gracefully. Use libraries that support automatic reconnection.

Wrong Chain ID

Double-check the chain ID when adding the network to wallets. Using the wrong chain ID can cause transaction failures.

Testnet Faucet

To get testnet AZERO, use the faucet at drpc.org/faucet/alephzero.

Key Takeaways

  • Aleph Zero has two layers: Substrate and EVM, each with separate RPC endpoints.
  • Public endpoints are suitable for development but not for production.
  • When choosing an RPC provider, evaluate network coverage, latency, pricing, and additional features.
  • OnFinality supports Aleph Zero RPC with reliable infrastructure and transparent pricing. Check our supported networks for availability.
  • Always test with testnet endpoints before deploying to mainnet.

Frequently Asked Questions

What is the Aleph Zero RPC URL for mainnet?

The mainnet EVM RPC URL is https://rpc.alephzero.raas.gelato.cloud. For the Substrate layer, refer to the official documentation.

How do I get testnet AZERO?

Use the PoW faucet at drpc.org/faucet/alephzero or request tokens via the Aleph Zero Discord.

Can I use Aleph Zero RPC with MetaMask?

Yes. Add the network with RPC URL https://rpc.alephzero.raas.gelato.cloud and Chain ID 41455 (mainnet) or 2039 (testnet).

What is the difference between Substrate and EVM RPC?

The Substrate RPC exposes chain-specific methods (e.g., staking, governance), while the EVM RPC is compatible with Ethereum JSON-RPC for smart contract interactions.

Does OnFinality support Aleph Zero?

Yes, OnFinality provides Aleph Zero RPC endpoints. Visit our networks page for details.

FAQ

What is the Aleph Zero RPC URL for mainnet?

The mainnet EVM RPC URL is https://rpc.alephzero.raas.gelato.cloud. For the Substrate layer, refer to the official documentation.

How do I get testnet AZERO?

Use the PoW faucet at drpc.org/faucet/alephzero or request tokens via the Aleph Zero Discord.

Can I use Aleph Zero RPC with MetaMask?

Yes. Add the network with RPC URL https://rpc.alephzero.raas.gelato.cloud and Chain ID 41455 (mainnet) or 2039 (testnet).

What is the difference between Substrate and EVM RPC?

The Substrate RPC exposes chain-specific methods (e.g., staking, governance), while the EVM RPC is compatible with Ethereum JSON-RPC for smart contract interactions.

Does OnFinality support Aleph Zero?

Yes, OnFinality provides Aleph Zero RPC endpoints. Visit our networks page for details.

Related resources

Originally published at OnFinality.

Top comments (0)