X Layer RPC Methods
eth
eth| Method | Notes |
|---|---|
eth_protocolVersion | Always returns 'zero'. |
eth_syncing | Returns an object with the sync status or false if not syncing. |
eth_gasPrice | Returns the current gas price in OKB. |
eth_blockNumber | Returns the current block height. |
eth_chainId | Returns the chain’s identifier in hexadecimal format. |
eth_getBalance | Returns the balance of a given account address at a specified block number. |
eth_getStorageAt | Returns the storage address for a given account address at a specific block. |
eth_getTransactionCount | Returns the total transaction count for a given account address and block number. |
eth_getBlockTransactionCountByNumber | Returns the total transaction count for a specified block number. |
eth_getBlockTransactionCountByHash | Returns the total transaction count for a specified block hash. |
eth_getCode | Returns the code at a given account address at a specific block number. |
eth_sign | Calculates an Ethereum-specific signature. |
eth_sendTransaction | Sends a transaction from one account to another. |
eth_sendRawTransaction | Creates a new message, call transaction, or contract creation for signed transactions. |
eth_call | Executes a new message call without creating a transaction on the blockchain. |
eth_estimateGas | Estimates the gas required to send the transaction. |
eth_getBlockByNumber | Returns information about a block by its block number. |
eth_getBlockByHash | Returns block information given its hash, including a boolean indicating success. |
eth_getTransactionByHash | Returns details of a transaction from its hash. |
eth_getTransactionByBlockHashAndIndex | Returns transaction details based on block hash and transaction index. |
eth_getTransactionReceipt | Returns the receipt of a transaction given its hash. |
eth_newFilter | Creates a new filter using specific topics. |
eth_newBlockFilter | Creates a filter that notifies when a new block arrives. |
eth_uninstallFilter | Removes the filter with the specified filter ID. |
eth_getFilterChanges | Polls a filter and returns logs since the last poll. |
eth_getLogs | Returns an array of logs matching a specified filter object. |
eth_getFilterLogs | Returns an array of logs matching a given filter ID. |
eth_getTransactionbyBlockNumberAndIndex | Returns transaction details by block height and block index. |
eth_getCompilers | Always returns empty. |
eth_getUncleCountByBlockHash | Always returns empty. |
eth_getUncleCountByBlockNumber | Always returns empty. |
eth_getUncleByBlockHashAndIndex | Always returns empty. |
eth_getUncleByBlockNumberAndIndex | Always returns empty. |
eth_subscribe | Subscribes to events via JSON-RPC notifications. |
eth_unsubscribe | Unsubscribes from an event using the provided subscription ID. |
web3
web3| Method | Notes |
|---|---|
web3_clientVersion | Returns the Web3 client version. |
web3_sha3 | Returns keccak-256 (not the standardized SHA3-256) of the given data. |
net
net| Method | Notes |
|---|---|
net_version | Returns the current network ID. |
debug
debug| Method | Notes |
|---|---|
debug_traceBlockByHash | Executes all transactions in a block specified by its hash, using a tracer. |
debug_traceBlockByNumber | Executes all transactions in a block specified by its number, using a tracer (trace mode required). |
debug_traceTransaction | Returns all traces associated with a given transaction. |
txpool
txpool| Method | Notes |
|---|---|
txpool_content | Always returns empty. |
zkevm
zkevm| Method | Notes |
|---|---|
zkevm_batchNumber | Returns the latest batch number. |
zkevm_batchNumberByBlockNumber | Returns the batch number associated with a specific block. |
zkevm_consolidatedBlockNumber | Returns the latest block number linked to the most recent verified batch. |
zkevm_getBatchByNumber | Retrieves the batch corresponding to a specified number. |
zkevm_isBlockVirtualized | Returns true if the provided block number is linked to a virtualized batch; otherwise, returns false. |
zkevm_isBlockConsolidated | Returns true if the provided block number is linked to a verified batch; otherwise, returns false. |
zkevm_virtualBatchNumber | Returns the most recent virtual batch number. |
zkevm_verifiedBatchNumber | Returns the most recent verified batch number. |
trace
trace| Method | Notes |
|---|---|
trace_block | Returns all execution traces for every transaction in a specified block. |
trace_call | Simulates a single call without broadcasting and returns its execution trace. |
trace_callMany | Runs multiple simulated calls in one request and returns each call’s trace. |
trace_filter | Searches and returns traces matching filters like block range, tx hash, or address. |
trace_get | Retrieves a specific trace from a transaction by its trace address. |
trace_replayBlockTransactions | Replays every transaction in a block and returns traces plus post-state. |
trace_replayTransaction | Replays one transaction and returns its trace and post-state. |
trace_transaction | Returns 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.
Updated 4 months ago
Did this page help you?
