Skip to main content
ESC

ESC API

The Elastos Smart Chain (ESC) is a fully EVM-compatible blockchain. That means every Ethereum JSON-RPC method you already know — eth_call, eth_getBalance, eth_sendRawTransaction — works out of the box. Use your existing Ethereum tooling; just point it at an ESC endpoint.

Providers

For the complete list of ESC RPC endpoints (including Glide Finance and WebSocket), see Network Endpoints.

Default Elastos-hosted JSON-RPC bases for quick setup:

NetworkProviderRPC URLChain ID
MainnetElastoshttps://api.elastos.io/esc20
TestnetElastoshttps://api-testnet.elastos.io/esc21
Multiple providers for resilience

Use more than one RPC endpoint in production. If one provider goes down, your dApp can fail over to another without downtime.

Key Methods

These are the methods you'll use most often. The full Ethereum JSON-RPC spec applies.

MethodDescription
eth_blockNumberLatest block number.
eth_getBalanceELA balance for an address (in wei).
eth_sendRawTransactionSubmit a signed transaction.
eth_callExecute a read-only contract call.
eth_getTransactionReceiptGet the receipt (status, logs, gas used) for a mined tx.
eth_getLogsQuery event logs by address, topics, or block range.
net_versionReturns the chain ID (20 for mainnet).

Using with ethers.js

import { ethers } from "ethers";

const provider = new ethers.JsonRpcProvider("https://api.elastos.io/esc");

const blockNumber = await provider.getBlockNumber();
console.log("Current block:", blockNumber);

const balance = await provider.getBalance("0xYourAddress");
console.log("Balance:", ethers.formatEther(balance), "ELA");

Using with web3.js

import Web3 from "web3";

const web3 = new Web3("https://api.elastos.io/esc");

const blockNumber = await web3.eth.getBlockNumber();
console.log("Current block:", blockNumber);

const balance = await web3.eth.getBalance("0xYourAddress");
console.log("Balance:", web3.utils.fromWei(balance, "ether"), "ELA");
Native currency is ELA

On ESC, the native gas token is ELA (not ETH). Everything else — units, decimals (18), gas mechanics — behaves identically to Ethereum.

Block Explorer

NetworkExplorer URL
Mainnetesc.elastos.io
Testnetesc-testnet.elastos.io

Both explorers are Blockscout instances — you can verify contracts, inspect transactions, and query token holders directly in the browser.

Faucet

Need testnet ELA? Grab some from the ESC testnet faucet:

ESC Testnet Faucet

Testnet tokens have no value

Testnet ELA (tELA) is free and cannot be traded. Use it for development and testing only.

ESC CLI (geth)

ESC nodes run a modified geth client. You can interact with a local node using the geth CLI.

CommandPurpose
geth accountManage local accounts.
geth attachInteractive JavaScript console attached to a running node.
geth consoleStart a node with the console.
geth versionPrint client version.
FlagPurpose
--rpcEnable HTTP-RPC.
--rpcportHTTP-RPC port (default 20635).
--wsEnable WebSocket.
--datadirData directory for chain state and keystore.
--syncmodeSync mode: fast, full, or light.

See the Elastos.ELA.SideChain.ESC wiki for the full geth command reference.