X Layer

📘

See the X Layer RPC API connection guide.

eth

MethodNotesCompute Unit Value
eth_blockNumberReturns the current block height.1
eth_callExecutes a new message call without creating a transaction on the blockchain.10
eth_chainIdReturns the chain’s identifier in hexadecimal format.1
eth_estimateGasEstimates the gas required to send the transaction.50
eth_feeHistoryReturns historical gas fee data for a given block range.1
eth_gasPriceReturns the current gas price in OKB.5
eth_getBalanceReturns the balance of a given account address at a specified block number.5
eth_getBlockByHashReturns block information given its hash, including a boolean indicating success.5
eth_getBlockByNumberReturns information about a block by its block number.5
eth_getBlockTransactionCountByHashReturns the total transaction count for a specified block hash.5
eth_getBlockTransactionCountByNumberReturns the code at a given account address at a specific block number.5
eth_getCodeReturns the code for a given account address and block number5
eth_getLogsReturns an array of all logs matching a given filter object50
eth_getProofRetrieves proof of the state of a specific account or contract at a specific block.5
eth_getStorageAtReturns the storage address for a given account address at a specific block.5
eth_getTransactionByBlockHashAndIndexReturns transaction details based on block hash and transaction index.5
eth_getTransactionByBlockNumberAndIndexReturns transaction details by block height and block index.5
eth_getTransactionByHashReturns details of a transaction from its hash.5
eth_getTransactionCountReturns the total transaction count for a given account address and block number.10
eth_getTransactionReceiptReturns the receipt of a transaction given its hash.5
eth_getUncleByBlockHashAndIndexAlways returns empty.5
eth_getUncleByBlockNumberAndIndexAlways returns empty.5
eth_getUncleCountByBlockHashAlways returns empty.5
eth_getUncleCountByBlockNumberAlways returns empty.5
eth_maxPriorityFeePerGasReturns the maximum priority fee per gas.1
eth_sendRawTransactionCreates a new message, call transaction, or contract creation for signed transactions.100
eth_syncingReturns an object with the sync status or false if not syncing.1

debug

🚧

These methods can only be used if the request parameters contains tracer: callTracer

MethodNotesCompute Unit Value
debug_traceBlockExecutes and traces all transactions in a given block, providing detailed execution information.50
debug_traceTransactionReturns all traces associated with a given transaction.50
debug_traceBlockByHashExecutes all transactions in a block specified by its hash, using a tracer.50
debug_traceBlockByNumberExecutes all transactions in a block specified by its number, using a tracer (trace mode required).50

net

MethodNotesCompute Unit Value
net_versionReturns the current network ID.1
net_peerCountReturns the number of peers currently connected to the node.1

web3

MethodNotesCompute Unit Value
web3_clientVersionGet the Web3 client version.1
web3_sha3Returns keccak-256 (not the standardized SHA3-256) of the given data.1

trace

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

👋 Need Help?

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