Etherlink RPC Documentation
Connect to Etherlink mainnet through Dwellir's archive HTTPS and WebSocket endpoints. Chain ID 42793, historical state, logs, and call traces.
Etherlink RPC
Access Etherlink mainnet through Dwellir's archive nodes. Query historical EVM state, transactions, logs, and verified call traces.
Get your API keyEtherlink RPC plans and rate limits
- Free plan: 20 responses per second, up to 100,000 responses a day.
- Plans: $49/mo, $299/mo, $999/mo with 25M, 150M, and 500M included responses. Overages billed at $5/$3/$2 per million responses respectively.
- Paid rate limits: 100 to 5,000 responses per second (bursts from 500 to 10,000), no daily limit.
- Billing: 1 response = 1 API credit on every shared plan, over HTTPS or WebSocket (WSS) where Etherlink supports it.
Details: Pricing · Rate limits · Authentication · Archive nodes
Why build on Etherlink?
Etherlink runs Ethereum Virtual Machine (EVM) contracts on a Tezos Smart Rollup. Existing Solidity contracts and Ethereum tools can connect through its JSON-RPC interface. The native gas token is tez (XTZ).
Dwellir's mainnet nodes retain historical state. Use fixed block numbers to read balances, contract code, storage, and contract calls. You can also retrieve past blocks, receipts, and event logs.
Quick start with Etherlink
Replace YOUR_API_KEY with your Dwellir API key. The WebSocket URL includes /ws after the key.
| Transport | Mainnet endpoint |
|---|---|
| HTTPS | https://api-etherlink-mainnet.n.dwellir.com/YOUR_API_KEY |
| WSS | wss://api-etherlink-mainnet.n.dwellir.com/YOUR_API_KEY/ws |
curl -sS -X POST https://api-etherlink-mainnet.n.dwellir.com/<your-api-key> \ -H 'Content-Type: application/json' \ -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'Check the chain ID
Send a JSON-RPC request over HTTPS before using the endpoint in an application:
curl -X POST 'https://api-etherlink-mainnet.n.dwellir.com/YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'The result is 0xa729, or 42793 in decimal.
Read historical state
This ethers.js v6 example reads the native XTZ balance at block 1,000,000. Replace the address with the account you need to inspect.
import { JsonRpcProvider } from 'ethers';
const provider = new JsonRpcProvider(
'https://api-etherlink-mainnet.n.dwellir.com/YOUR_API_KEY'
);
const network = await provider.getNetwork();
if (network.chainId !== 42793n) {
throw new Error(`Expected Etherlink mainnet, received ${network.chainId}`);
}
const balance = await provider.getBalance(
'0x5d66ec78664f4a0b0929a41270316a6cd4d8bd4b',
1_000_000
);
console.log(balance.toString());Subscribe to new heads
Connect to the WebSocket URL shown above and send this message:
{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}The response contains a subscription ID. Later eth_subscription notifications contain new block headers. Send eth_unsubscribe with that ID when you finish. Only newHeads subscriptions are verified here.
Network specifications
| Parameter | Value | Details |
|---|---|---|
| Chain ID | 42793 | Mainnet, hexadecimal 0xa729 |
| Native currency | XTZ | Tez uses 18 decimals in the EVM interface |
| Network | Tezos Smart Rollup | EVM-compatible execution |
| Node client | Octez EVM 0.66 | Dwellir mainnet archive nodes |
| RPC transport | HTTPS and WSS | JSON-RPC 2.0; WSS uses the /ws path |
| Explorer | Etherlink Explorer | Mainnet blocks and transactions |
API reference
The reference pages use recorded mainnet requests with fixed block numbers, addresses, and transaction hashes. They document methods verified on Dwellir's Etherlink deployment.
RPC capabilities and limits
| Capability | Support | Operational note |
|---|---|---|
| Historical state | Archive | Read balances, code, storage, and calls at fixed block numbers |
| Event logs | Supported | Use eth_getLogs with a block filter |
| WebSocket subscriptions | newHeads verified | Use the /ws endpoint and eth_subscribe |
| Call traces | callTracer verified | See debug_traceTransaction and debug_traceBlockByNumber |
eth_getProof | Unsupported | Octez EVM 0.66 returns -32004 Method not supported |
eth_syncing | Unsupported | Octez EVM 0.66 returns -32004 Method not supported |
net_peerCount | Unsupported | Octez EVM 0.66 returns -32004 Method not supported |
Trace availability
Etherlink mainnet block tracing starts at the Bifrost boundary, block 4,162,673. Use callTracer with the verified debug methods. Earlier blocks have no call traces.
The examples use a 119s timeout value. The endpoint accepted that value, but timeout enforcement was not verified. These examples do not establish support for other debug methods or tracers.
Resources
eth_coinbase
Check the legacy eth_coinbase compatibility method on Ethereum. Public endpoints may return an address, `unimplemented`, or another unsupported-method response depending on the client.
eth_blockNumber
Get the current block height on Etherlink. Essential for syncing dApps, monitoring transaction confirmations, and blockchain state tracking.

