Skip to main content
ESC

The Smart Contract Chain: ESC

What It Is

ESC (Elastos Smart Chain) is the EVM-compatible execution layer for Elastos. It is a geth fork with Elastos-specific consensus, cross-chain hooks, and native precompiled contracts. Chain ID is 20 on mainnet.

If you have used Ethereum, Polygon, or similar networks, you can reuse Solidity, Hardhat, Remix, ethers.js, web3.js, and MetaMask. Only RPC endpoints, chain ID, and the Elastos-specific precompiles differ.

Consensus

ESC does not use Ethereum-style open validator sets. Instead, PBFT consensus runs over the BPoS validator set elected through bonded staking on the main chain:

  • Instant finality — once a block is committed, reorgs do not occur. One confirmation is effectively final.
  • No uncle blocks — a single canonical block per height.
  • Throughput trades off against PBFT messaging among the validator group.

Custom Precompiles (1000–1009)

ESC extends the EVM with ten native precompiles implemented in the node (not deployed Solidity). They expose Elastos consensus, staking, and cryptography to smart contracts:

AddressNamePurpose
1000arbitersQuery the current BPoS validator / arbiter set
1001p256VerifyVerify NIST P-256 (secp256r1) signatures
1002pbkVerifySignatureVerify secp256k1 signatures by public key recovery
1003pledgeBillVerifyVerify staking pledge bill signatures
1004pledgeBillTokenIDMap a main-chain tx hash to staking NFT token IDs
1005pledgeBillTokenDetailRead BPoS NFT payload details
1006pledgeBillPayloadVersionNFT payload format version
1007getMainChainBlockByHeightGet main chain block header by height
1008getMainChainLatestHeightGet latest main chain block height from SPV
1009p256VerifyDigestP-256 signature verification against a pre-hashed digest

Source: params/protocol_params.go and core/vm/contracts.go. For Solidity call examples, see the precompile reference.

Notable Deployed Contracts

  • StakeTicket — BPoS staking NFT representation on ESC. Contracts call pledgeBillVerify and related precompiles to verify claims against arbiter-signed pledge data.
  • ELink — Cross-chain oracle bridge bringing sidechain/DID context to ESC contracts, using P-256 verification paths.

Cross-Chain ELA

Depositing ELA from the main chain to ESC mints sidechain ELA at a 1:1 ratio. Withdrawals burn ESC ELA and release main-chain ELA. Asset supply on ESC is tied to main-chain locks and SPV-validated flows. See Bridge System for details.

Network Endpoints

Value
P2P port20638
JSON-RPC / WebSocket20636
Mainnet RPChttps://api.elastos.io/esc
Testnet RPChttps://api-testnet.elastos.io/esc
Block exploreresc.elastos.io
Testnet faucetesc-faucet.elastos.io

For the full list of providers and WebSocket URLs, see Network Endpoints.

Compared to Ethereum

AspectEthereum L1ESC
FinalityProbabilistic (many confirmations)Immediate after inclusion
Block producersOpen validator setRotating BPoS validators (PBFT quorum)
Bridge to ElastosExternal bridgesBuilt-in deposit/withdraw with main chain
Extra primitivesStandard nine precompilesTen Elastos precompiles at 1000–1009

Who Uses ESC

  • dApp and DeFi builders needing EVM compatibility with fast finality
  • NFT and gaming projects using ERC-721 / ERC-1155 patterns
  • Integrators bridging main-chain stake (StakeTicket) and identity/oracle data (ELink)

For a hands-on path, see the deploy-a-contract tutorials.