X Layer RPC Methods

eth

MethodNotes
eth_protocolVersionAlways returns 'zero'.
eth_syncingReturns an object with the sync status or false if not syncing.
eth_gasPriceReturns the current gas price in OKB.
eth_blockNumberReturns the current block height.
eth_chainIdReturns the chain’s identifier in hexadecimal format.
eth_getBalanceReturns the balance of a given account address at a specified block number.
eth_getStorageAtReturns the storage address for a given account address at a specific block.
eth_getTransactionCountReturns the total transaction count for a given account address and block number.
eth_getBlockTransactionCountByNumberReturns the total transaction count for a specified block number.
eth_getBlockTransactionCountByHashReturns the total transaction count for a specified block hash.
eth_getCodeReturns the code at a given account address at a specific block number.
eth_signCalculates an Ethereum-specific signature.
eth_sendTransactionSends a transaction from one account to another.
eth_sendRawTransactionCreates a new message, call transaction, or contract creation for signed transactions.
eth_callExecutes a new message call without creating a transaction on the blockchain.
eth_estimateGasEstimates the gas required to send the transaction.
eth_getBlockByNumberReturns information about a block by its block number.
eth_getBlockByHashReturns block information given its hash, including a boolean indicating success.
eth_getTransactionByHashReturns details of a transaction from its hash.
eth_getTransactionByBlockHashAndIndexReturns transaction details based on block hash and transaction index.
eth_getTransactionReceiptReturns the receipt of a transaction given its hash.
eth_newFilterCreates a new filter using specific topics.
eth_newBlockFilterCreates a filter that notifies when a new block arrives.
eth_uninstallFilterRemoves the filter with the specified filter ID.
eth_getFilterChangesPolls a filter and returns logs since the last poll.
eth_getLogsReturns an array of logs matching a specified filter object.
eth_getFilterLogsReturns an array of logs matching a given filter ID.
eth_getTransactionbyBlockNumberAndIndexReturns transaction details by block height and block index.
eth_getCompilersAlways returns empty.
eth_getUncleCountByBlockHashAlways returns empty.
eth_getUncleCountByBlockNumberAlways returns empty.
eth_getUncleByBlockHashAndIndexAlways returns empty.
eth_getUncleByBlockNumberAndIndexAlways returns empty.
eth_subscribeSubscribes to events via JSON-RPC notifications.
eth_unsubscribeUnsubscribes from an event using the provided subscription ID.

web3

MethodNotes
web3_clientVersionReturns the Web3 client version.
web3_sha3Returns keccak-256 (not the standardized SHA3-256) of the given data.

net

MethodNotes
net_versionReturns the current network ID.

debug

MethodNotes
debug_traceBlockByHashExecutes all transactions in a block specified by its hash, using a tracer.
debug_traceBlockByNumberExecutes all transactions in a block specified by its number, using a tracer (trace mode required).
debug_traceTransactionReturns all traces associated with a given transaction.

txpool

MethodNotes
txpool_contentAlways returns empty.

zkevm

MethodNotes
zkevm_batchNumberReturns the latest batch number.
zkevm_batchNumberByBlockNumberReturns the batch number associated with a specific block.
zkevm_consolidatedBlockNumberReturns the latest block number linked to the most recent verified batch.
zkevm_getBatchByNumberRetrieves the batch corresponding to a specified number.
zkevm_isBlockVirtualizedReturns true if the provided block number is linked to a virtualized batch; otherwise, returns false.
zkevm_isBlockConsolidatedReturns true if the provided block number is linked to a verified batch; otherwise, returns false.
zkevm_virtualBatchNumberReturns the most recent virtual batch number.
zkevm_verifiedBatchNumberReturns the most recent verified batch number.

trace

MethodNotes
trace_blockReturns all execution traces for every transaction in a specified block.
trace_callSimulates a single call without broadcasting and returns its execution trace.
trace_callManyRuns multiple simulated calls in one request and returns each call’s trace.
trace_filterSearches and returns traces matching filters like block range, tx hash, or address.
trace_getRetrieves a specific trace from a transaction by its trace address.
trace_replayBlockTransactionsReplays every transaction in a block and returns traces plus post-state.
trace_replayTransactionReplays one transaction and returns its trace and post-state.
trace_transactionReturns all traces generated by a single transaction.

👋 Need Help?

Contact us through email or our support page for any issues, bugs, or assistance you may need.