World Chain
Available for Premium and Enterprise users only.
World Chain API is available on Web3 API platform.
World Chain is an EVM-compatible Layer 2 built on the OP Stack and part of the Superchain. It settles on Ethereum, uses ETH as its gas token, gives verified humans a free gas allowance, and produces a block every 2 seconds. The chain ID is 480.
The examples on these pages run against mainnet, https://rpc.ankr.com/worldchain/YOUR_ANKR_API_KEY. Over WSS, connect to wss://rpc.ankr.com/worldchain/ws/YOUR_ANKR_API_KEY.
Ankr's World Chain nodes are full nodes. Every block and transaction is available, but receipts, logs, and state (balances, eth_call, traces) cover only the most recent ~100,000 blocks, about 55 hours.
Your Web3 application reads World Chain data and sends transactions through a World Chain node, calling the methods of its API.
The API interaction follows the JSON-RPC which is a stateless, light-weight remote procedure call (RPC) protocol. It defines several data structures and the rules around their processing. It is transport agnostic in that the concepts can be used within the same process, over sockets, over HTTP, or in other message-passing environments. It uses JSON (RFC 4627) as data format.
Methods supported
net_version: returns the current network ID.net_listening: returnstrueif client is actively listening for network connections.eth_protocolVersion: returns the current Ethereum protocol version.eth_syncing: returns an object with data about the sync status or false.eth_gasPrice: returns the current price per gas in wei.eth_blockNumber: returns the number of most recent block.eth_getBalance: returns the balance of the account specified by address.eth_getStorageAt: returns the value from a storage position at an address specified.eth_getTransactionCount: returns the number of transactions sent from an address.eth_getBlockTransactionCountByHash: returns the number of transactions in a block specified by block hash.eth_getBlockTransactionCountByNumber: returns the number of transactions in the block specified by number.eth_getUncleCountByBlockHash: returns the number of uncles in a block specified by block hash.eth_getUncleCountByBlockNumber: returns the number of uncles in a block specified by block number.eth_getCode: returns code at a given address.eth_sendRawTransaction: creates new message call transaction or a contract creation for signed transactions.eth_call: executes a new message call immediately without creating a transaction on the blockchain.eth_estimateGas: generates and returns an estimate of how much gas is necessary to allow the transaction to complete.eth_getBlockByHash: returns information for the block specified by block hash.eth_getBlockByNumber: returns information for the block specified by block number.eth_getTransactionByHash: returns information on a transaction specified by transaction hash.eth_getTransactionByBlockHashAndIndex: returns information on a transaction specified by block hash and transaction index position.eth_getTransactionByBlockNumberAndIndex: returns information on a transaction by block number and transaction index position.eth_getTransactionReceipt: returns the receipt of a transaction by transaction hash.eth_getUncleByBlockHashAndIndex: returns information about an uncle of a block by hash and uncle index position.eth_getUncleByBlockNumberAndIndex: returns information about an uncle of a block by number and uncle index position.eth_getLogs: returns an array of all logs matching a given filter object.
Debug methods:
debug_traceBlockByHash: traces the execution of all transactions within a block specified by hash.debug_traceBlockByNumber: traces the execution of all transactions within a block specified by number.debug_traceBlock: traces the execution of all transactions within a block.debug_traceTransaction: traces the execution of a transaction specified by hash.debug_traceCall: traces a call executed on top of the state of a block specified, without creating a transaction.
Not available on World Chain:
There is no trace_* module, and the node does not implement web3_clientVersion or web3_sha3. For call traces use the debug_trace* methods above. See Unsupported methods for the full list.
Methods
web3, net, eth
net_versionnet_listeningeth_protocolVersioneth_syncingeth_gasPriceeth_blockNumbereth_getBalanceeth_getStorageAteth_getTransactionCounteth_getBlockTransactionCountByHasheth_getBlockTransactionCountByNumbereth_getUncleCountByBlockHasheth_getUncleCountByBlockNumbereth_getCodeeth_sendRawTransactioneth_calleth_estimateGaseth_getBlockByHasheth_getBlockByNumbereth_getTransactionByHasheth_getTransactionByBlockHashAndIndexeth_getTransactionByBlockNumberAndIndexeth_getTransactionReceipt