---
title: "EVM JSON-RPC 方法"
description: "EVM Core RPC API 覆盖与 Archive/能力说明"
url: "https://blockreq.com/docs/zh-cn/build/api-reference/evm-methods/"
---

# EVM JSON-RPC 方法

BlockReq 通过 HTTPS 与 WebSocket 支持标准 EVM JSON-RPC。下表按常见 Core RPC API 类别组织，并标注 Archive、Trace、Debug、Txpool 或 WSS 能力要求。

> [!NOTE]
> Archive 支持按链生效。依赖旧区块状态、Proof、Debug 或 Trace 调用前，请先在公开链页面和 Dashboard 链列表确认该路由已经验证为 Archive。

计费见 [Request Counting](https://blockreq.com/docs/zh-cn/pricing/request-counting/index.md)。本页只描述方法可用性与能力要求。

## Chain 与 Web3

| 方法                                                              | 范围      | 说明                     |
| ----------------------------------------------------------------- | --------- | ------------------------ |
| [`eth_chainId`](https://blockreq.com/docs/zh-cn/build/api-reference/ethereum/eth_chainId/index.md) | HTTPS/WSS | 返回当前 chain ID。      |
| `eth_syncing`                                                     | HTTPS/WSS | 返回同步状态。           |
| `net_version`                                                     | HTTPS/WSS | 返回网络 ID。            |
| `net_listening`                                                   | HTTPS/WSS | 返回监听状态。           |
| `net_peerCount`                                                   | HTTPS/WSS | 该链提供时返回 peer 数。 |
| `web3_clientVersion`                                              | HTTPS/WSS | 返回客户端版本字符串。   |
| `web3_sha3`                                                       | HTTPS/WSS | 返回 Keccak-256 hash。   |

## Account 与 State

| 方法                                                                                      | 范围              | 说明                              |
| ----------------------------------------------------------------------------------------- | ----------------- | --------------------------------- |
| [`eth_getBalance`](https://blockreq.com/docs/zh-cn/build/api-reference/ethereum/eth_getBalance/index.md)                   | Latest 或 Archive | 旧区块 tag 需要 Archive 路由。    |
| [`eth_getCode`](https://blockreq.com/docs/zh-cn/build/api-reference/ethereum/eth_getCode/index.md)                         | Latest 或 Archive | 旧区块 tag 需要 Archive 路由。    |
| [`eth_getStorageAt`](https://blockreq.com/docs/zh-cn/build/api-reference/ethereum/eth_getStorageAt/index.md)               | Latest 或 Archive | 按 block tag 读取 storage slot。  |
| [`eth_getProof`](https://blockreq.com/docs/zh-cn/build/api-reference/ethereum/eth_getProof/index.md)                       | Archive/proof     | 返回账户与 storage Merkle proof。 |
| [`eth_getTransactionCount`](https://blockreq.com/docs/zh-cn/build/api-reference/ethereum/eth_getTransactionCount/index.md) | Latest 或 Archive | 旧区块 tag 需要 Archive 路由。    |
| [`eth_call`](https://blockreq.com/docs/zh-cn/build/api-reference/ethereum/eth_call/index.md)                               | Latest 或 Archive | 历史调用需要 Archive state。      |

## Blocks

| 方法                                                                                | 范围          | 说明                               |
| ----------------------------------------------------------------------------------- | ------------- | ---------------------------------- |
| [`eth_blockNumber`](https://blockreq.com/docs/zh-cn/build/api-reference/ethereum/eth_blockNumber/index.md)           | HTTPS/WSS     | 最新区块号。                       |
| [`eth_getBlockByNumber`](https://blockreq.com/docs/zh-cn/build/api-reference/ethereum/eth_getBlockByNumber/index.md) | HTTPS/WSS     | 按区块号或 tag 查询区块。          |
| [`eth_getBlockByHash`](https://blockreq.com/docs/zh-cn/build/api-reference/ethereum/eth_getBlockByHash/index.md)     | HTTPS/WSS     | 按 hash 查询区块。                 |
| `eth_getBlockTransactionCountByNumber`                                              | HTTPS/WSS     | 按区块号返回交易数。               |
| `eth_getBlockTransactionCountByHash`                                                | HTTPS/WSS     | 按区块 hash 返回交易数。           |
| [`eth_getBlockReceipts`](https://blockreq.com/docs/zh-cn/build/api-reference/ethereum/eth_getBlockReceipts/index.md) | Heavy/history | 该链支持时返回区块内全部 receipt。 |

## Transactions

| 方法                                                                                          | 范围      | 说明                            |
| --------------------------------------------------------------------------------------------- | --------- | ------------------------------- |
| [`eth_getTransactionByHash`](https://blockreq.com/docs/zh-cn/build/api-reference/ethereum/eth_getTransactionByHash/index.md)   | HTTPS/WSS | 按 hash 查询交易。              |
| `eth_getTransactionByBlockNumberAndIndex`                                                     | HTTPS/WSS | 按区块号和 index 查询交易。     |
| `eth_getTransactionByBlockHashAndIndex`                                                       | HTTPS/WSS | 按区块 hash 和 index 查询交易。 |
| [`eth_getTransactionReceipt`](https://blockreq.com/docs/zh-cn/build/api-reference/ethereum/eth_getTransactionReceipt/index.md) | HTTPS/WSS | 查询交易 receipt。              |
| [`eth_sendRawTransaction`](https://blockreq.com/docs/zh-cn/build/api-reference/ethereum/eth_sendRawTransaction/index.md)       | HTTPS     | 广播已签名交易。                |

## Logs 与 Filters

| 方法                                                              | 范围          | 说明                                                 |
| ----------------------------------------------------------------- | ------------- | ---------------------------------------------------- |
| [`eth_getLogs`](https://blockreq.com/docs/zh-cn/build/api-reference/ethereum/eth_getLogs/index.md) | History/index | HTTP 计为 1 个 Request。链仍可能限制允许的区块范围。 |
| `eth_newFilter`                                                   | HTTPS         | 该链支持时创建日志过滤器。                           |
| `eth_newBlockFilter`                                              | HTTPS         | 创建新区块过滤器。                                   |
| `eth_newPendingTransactionFilter`                                 | HTTPS         | 创建 pending 交易过滤器。                            |
| `eth_getFilterChanges`                                            | HTTPS         | 返回过滤器变化。                                     |
| `eth_getFilterLogs`                                               | HTTPS         | 返回过滤器日志。                                     |
| `eth_uninstallFilter`                                             | HTTPS         | 删除过滤器。                                         |

## Gas 与 Fees

| 方法                                                                      | 范围      | 说明                   |
| ------------------------------------------------------------------------- | --------- | ---------------------- |
| [`eth_gasPrice`](https://blockreq.com/docs/zh-cn/build/api-reference/ethereum/eth_gasPrice/index.md)       | HTTPS/WSS | Legacy gas price。     |
| [`eth_estimateGas`](https://blockreq.com/docs/zh-cn/build/api-reference/ethereum/eth_estimateGas/index.md) | HTTPS     | 估算交易 gas。         |
| `eth_feeHistory`                                                          | HTTPS     | EIP-1559 fee history。 |
| `eth_maxPriorityFeePerGas`                                                | HTTPS     | Priority fee 建议。    |
| `eth_createAccessList`                                                    | 按链支持  | 仅在该链支持时可用。   |

## WebSocket Subscriptions

| 方法                                                                  | 范围   | 说明                                 |
| --------------------------------------------------------------------- | ------ | ------------------------------------ |
| [`eth_subscribe`](https://blockreq.com/docs/zh-cn/build/api-reference/ethereum/eth_subscribe/index.md) | 仅 WSS | 支持 `newHeads`、`logs` 等订阅类型。 |
| `eth_unsubscribe`                                                     | 仅 WSS | 取消已有订阅。                       |

## Debug 与 Trace

| 方法                                                                      | 范围         | 说明                                      |
| ------------------------------------------------------------------------- | ------------ | ----------------------------------------- |
| `debug_traceTransaction`                                                  | 付费 / debug | 返回交易执行 trace。                      |
| `debug_traceBlockByHash`                                                  | 付费 / debug | 按 block hash trace 区块内交易。          |
| `debug_traceBlockByNumber`                                                | 付费 / debug | 按 block number 或 tag trace 区块内交易。 |
| [`debug_traceCall`](https://blockreq.com/docs/zh-cn/build/api-reference/ethereum/debug_traceCall/index.md) | 付费 / debug | Trace 一个不提交上链的 call。             |
| `trace_block`                                                             | 付费 / trace | 返回区块 trace。                          |
| `trace_call`                                                              | 付费 / trace | 执行并 trace 一个 call。                  |
| `trace_callMany`                                                          | 付费 / trace | 该链支持时执行并 trace 多个 call。        |
| [`trace_filter`](https://blockreq.com/docs/zh-cn/build/api-reference/ethereum/trace_filter/index.md)       | 付费 / trace | 按区块和地址过滤 trace。                  |
| `trace_get`                                                               | 付费 / trace | 按交易 hash 和 trace address 查询 trace。 |
| `trace_rawTransaction`                                                    | 付费 / trace | Trace raw transaction。                   |
| `trace_transaction`                                                       | 付费 / trace | 返回交易 trace。                          |
| `trace_replayBlockTransactions`                                           | 付费 / trace | 对区块内全部交易执行重型 replay。         |
| `trace_replayTransaction`                                                 | 付费 / trace | 重型 replay 方法，仅在确有需要时使用。    |

## Txpool

| 方法             | 范围          | 说明                             |
| ---------------- | ------------- | -------------------------------- |
| `txpool_status`  | 付费 / txpool | 该链支持时的 pending pool 状态。 |
| `txpool_inspect` | 付费 / txpool | 该链支持时的 pending pool 摘要。 |
| `txpool_content` | 付费 / txpool | 该链支持时的 pending pool 内容。 |

> [!NOTE]
> Free endpoint 不包含 `debug_*`、`trace_*` 或 `txpool_*` 方法。方法倍率见 [Request Counting](https://blockreq.com/docs/zh-cn/pricing/request-counting/index.md)。
