> ## Documentation Index
> Fetch the complete documentation index at: https://docs.monad.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# JSON-RPC API 参考

> Monad JSON-RPC 接口参考

## eth\_blockNumber

返回最新区块的编号。

<a href="/zh/reference/json-rpc/playground?method=eth_blockNumber" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

该方法不接受任何参数。

**返回值**

<ResponseField name="result" type="string">
  当前区块号,十六进制编码。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_blockNumber",
    "params": [],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x4b7"
  }
  ```
</CodeGroup>

## eth\_call

立即执行一次新的消息调用,不会在区块链上创建交易。

<a href="/zh/reference/json-rpc/playground?method=eth_call" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="transaction" type="object" required>
  交易调用对象。

  <Expandable title="properties">
    <ParamField body="from" type="string" />

    <ParamField body="to" type="string" />

    <ParamField body="gas" type="string" />

    <ParamField body="maxFeePerGas" type="string" />

    <ParamField body="maxPriorityFeePerGas" type="string" />

    <ParamField body="value" type="string" />

    <ParamField body="input" type="string" />

    <ParamField body="data" type="string" />

    <ParamField body="nonce" type="string" />

    <ParamField body="chainId" type="string" />

    <ParamField body="accessList" type="string" />

    <ParamField body="authorizationList" type="string" />
  </Expandable>
</ParamField>

<ParamField body="block" type="string" required>
  区块标签(`latest`、`safe`、`finalized`、`pending`)或 32 字节区块哈希。
</ParamField>

**返回值**

<ResponseField name="result" type="string">
  已执行合约调用的返回数据,十六进制编码。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_call",
    "params": [
      {
        "to": "0x...",
        "data": "0x..."
      },
      "latest"
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x..."
  }
  ```
</CodeGroup>

## eth\_chainId

返回当前网络的链 ID。

<a href="/zh/reference/json-rpc/playground?method=eth_chainId" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

该方法不接受任何参数。

**返回值**

<ResponseField name="result" type="string">
  链 ID,十六进制编码。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_chainId",
    "params": [],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x4b7"
  }
  ```
</CodeGroup>

## eth\_createAccessList

返回模拟交易得到的访问列表和使用的 gas。

执行失败和回滚在结果对象的可选
`error` 字段中报告,以便调用者仍可使用生成的访问列表。

<a href="/zh/reference/json-rpc/playground?method=eth_createAccessList" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="transaction" type="object" required>
  交易调用对象。

  <Expandable title="properties">
    <ParamField body="from" type="string" />

    <ParamField body="to" type="string" />

    <ParamField body="gas" type="string" />

    <ParamField body="maxFeePerGas" type="string" />

    <ParamField body="maxPriorityFeePerGas" type="string" />

    <ParamField body="value" type="string" />

    <ParamField body="input" type="string" />

    <ParamField body="data" type="string" />

    <ParamField body="nonce" type="string" />

    <ParamField body="chainId" type="string" />

    <ParamField body="accessList" type="string" />

    <ParamField body="authorizationList" type="string" />
  </Expandable>
</ParamField>

<ParamField body="block" type="string" required>
  区块标签(`latest`、`safe`、`finalized`、`pending`)或 32 字节区块哈希。
</ParamField>

**返回值**

<ResponseField name="result" type="object">
  访问列表和估算使用的 gas。

  <Expandable title="properties">
    <ResponseField name="accessList" type="array" />

    <ResponseField name="gasUsed" type="string" />

    <ResponseField name="error" type="string" post={["optional"]} />
  </Expandable>
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_createAccessList",
    "params": [
      {
        "to": "0x...",
        "data": "0x..."
      },
      "latest"
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x..."
  }
  ```
</CodeGroup>

## eth\_estimateGas

生成并返回完成该交易所需的 gas 估算值。

<a href="/zh/reference/json-rpc/playground?method=eth_estimateGas" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="tx" type="object" required>
  交易调用对象。

  <Expandable title="properties">
    <ParamField body="from" type="string" />

    <ParamField body="to" type="string" />

    <ParamField body="gas" type="string" />

    <ParamField body="maxFeePerGas" type="string" />

    <ParamField body="maxPriorityFeePerGas" type="string" />

    <ParamField body="value" type="string" />

    <ParamField body="input" type="string" />

    <ParamField body="data" type="string" />

    <ParamField body="nonce" type="string" />

    <ParamField body="chainId" type="string" />

    <ParamField body="accessList" type="string" />

    <ParamField body="authorizationList" type="string" />
  </Expandable>
</ParamField>

<ParamField body="block" type="string" required>
  区块标签(`latest`、`safe`、`finalized`、`pending`)或 32 字节区块哈希。
</ParamField>

**返回值**

<ResponseField name="result" type="string">
  估算所需的 gas,十六进制编码。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_estimateGas",
    "params": [
      {
        "to": "0x...",
        "data": "0x..."
      },
      "latest"
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x4b7"
  }
  ```
</CodeGroup>

## eth\_feeHistory

交易手续费历史
返回所请求/支持的区块范围内每 gas 的基础手续费和有效优先费。

<a href="/zh/reference/json-rpc/playground?method=eth_feeHistory" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="block_count" type="string" required>
  所请求范围内的区块数量(十六进制编码整数)。
</ParamField>

<ParamField body="newest_block" type="string" required>
  最高区块号(十六进制)或标签:`latest`、`safe`、`finalized`、`pending`。
</ParamField>

<ParamField body="reward_percentiles" type="array" required>
  用于对有效优先费采样的百分位数值数组(0 到 100 之间的浮点数)。可以为 `null`。
</ParamField>

**返回值**

<ResponseField name="result" type="object">
  请求的区块范围的手续费历史。

  <Expandable title="properties">
    <ResponseField name="gasUsedRatio" type="array" />

    <ResponseField name="oldestBlock" type="string" />
  </Expandable>
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_feeHistory",
    "params": [
      "0x1",
      "latest",
      [
        25,
        75
      ]
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
      "gasUsedRatio": [],
      "oldestBlock": "0x0"
    }
  }
  ```
</CodeGroup>

## eth\_fillTransaction

<a href="/zh/reference/json-rpc/playground?method=eth_fillTransaction" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="tx" type="object" required>
  交易调用对象。

  <Expandable title="properties">
    <ParamField body="from" type="string" />

    <ParamField body="to" type="string" />

    <ParamField body="gas" type="string" />

    <ParamField body="maxFeePerGas" type="string" />

    <ParamField body="maxPriorityFeePerGas" type="string" />

    <ParamField body="value" type="string" />

    <ParamField body="input" type="string" />

    <ParamField body="data" type="string" />

    <ParamField body="nonce" type="string" />

    <ParamField body="chainId" type="string" />

    <ParamField body="accessList" type="string" />

    <ParamField body="authorizationList" type="string" />
  </Expandable>
</ParamField>

**返回值**

<ResponseField name="result" type="object">
  <Expandable title="properties">
    <ResponseField name="raw" type="string" />

    <ResponseField name="tx" type="object" />
  </Expandable>
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_fillTransaction",
    "params": [
      {
        "to": "0x...",
        "data": "0x..."
      }
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
      "raw": "0x",
      "tx": {
        "from": null,
        "to": null,
        "gas": null,
        "maxFeePerGas": null,
        "maxPriorityFeePerGas": null,
        "value": null,
        "input": null,
        "data": null,
        "nonce": null,
        "chainId": null,
        "accessList": null,
        "authorizationList": null
      }
    }
  }
  ```
</CodeGroup>

## eth\_gasPrice

返回当前每 gas 的价格(单位:wei)。

<a href="/zh/reference/json-rpc/playground?method=eth_gasPrice" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

该方法不接受任何参数。

**返回值**

<ResponseField name="result" type="string">
  当前 gas 价格(单位:wei),十六进制编码。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_gasPrice",
    "params": [],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x4b7"
  }
  ```
</CodeGroup>

## eth\_getBalance

返回给定地址账户的余额。

<a href="/zh/reference/json-rpc/playground?method=eth_getBalance" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="account" type="string" required>
  20 字节账户地址(十六进制编码)。
</ParamField>

<ParamField body="block_number" type="string" required>
  区块标签(`latest`、`safe`、`finalized`、`pending`)或 32 字节区块哈希。
</ParamField>

**返回值**

<ResponseField name="result" type="string">
  账户余额(单位:wei),十六进制编码。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_getBalance",
    "params": [
      "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
      "latest"
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x..."
  }
  ```
</CodeGroup>

## eth\_getBlockByHash

按哈希返回区块信息。

<a href="/zh/reference/json-rpc/playground?method=eth_getBlockByHash" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="block_hash" type="string" required>
  32 字节区块哈希(十六进制编码)。
</ParamField>

<ParamField body="return_full_txns" type="boolean" required>
  如果为 `true`,返回完整交易对象;如果为 `false`,只返回交易哈希。
</ParamField>

**返回值**

<ResponseField name="result" type="object">
  区块对象,如未找到则返回 `null`。

  <Expandable title="properties">
    <ResponseField name="hash" type="string" />

    <ResponseField name="parentHash" type="string" />

    <ResponseField name="sha3Uncles" type="string" />

    <ResponseField name="miner" type="string" />

    <ResponseField name="stateRoot" type="string" />

    <ResponseField name="transactionsRoot" type="string" />

    <ResponseField name="receiptsRoot" type="string" />

    <ResponseField name="logsBloom" type="string" />

    <ResponseField name="difficulty" type="string" />

    <ResponseField name="number" type="string" />

    <ResponseField name="gasLimit" type="string" />

    <ResponseField name="gasUsed" type="string" />

    <ResponseField name="timestamp" type="string" />

    <ResponseField name="extraData" type="string" />

    <ResponseField name="mixHash" type="string" />

    <ResponseField name="nonce" type="string" />

    <ResponseField name="uncles" type="array" />

    <ResponseField name="transactions" type="array" />
  </Expandable>
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_getBlockByHash",
    "params": [
      "0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae",
      false
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
      "hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "miner": "0x0000000000000000000000000000000000000000",
      "stateRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "logsBloom": "0x00000000...",
      "difficulty": "0x0",
      "number": "0x0",
      "gasLimit": "0x0",
      "gasUsed": "0x0",
      "timestamp": "0x0",
      "extraData": "0x",
      "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "nonce": "0x0000000000000000",
      "uncles": [],
      "transactions": []
    }
  }
  ```
</CodeGroup>

## eth\_getBlockByNumber

按编号返回区块信息。

<a href="/zh/reference/json-rpc/playground?method=eth_getBlockByNumber" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="block_number" type="string" required>
  区块号(十六进制)或标签:`latest`、`safe`、`finalized`、`pending`。
</ParamField>

<ParamField body="return_full_txns" type="boolean" required>
  如果为 `true`,返回完整交易对象;如果为 `false`,只返回交易哈希。
</ParamField>

**返回值**

<ResponseField name="result" type="object">
  区块对象,如未找到则返回 `null`。

  <Expandable title="properties">
    <ResponseField name="hash" type="string" />

    <ResponseField name="parentHash" type="string" />

    <ResponseField name="sha3Uncles" type="string" />

    <ResponseField name="miner" type="string" />

    <ResponseField name="stateRoot" type="string" />

    <ResponseField name="transactionsRoot" type="string" />

    <ResponseField name="receiptsRoot" type="string" />

    <ResponseField name="logsBloom" type="string" />

    <ResponseField name="difficulty" type="string" />

    <ResponseField name="number" type="string" />

    <ResponseField name="gasLimit" type="string" />

    <ResponseField name="gasUsed" type="string" />

    <ResponseField name="timestamp" type="string" />

    <ResponseField name="extraData" type="string" />

    <ResponseField name="mixHash" type="string" />

    <ResponseField name="nonce" type="string" />

    <ResponseField name="uncles" type="array" />

    <ResponseField name="transactions" type="array" />
  </Expandable>
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_getBlockByNumber",
    "params": [
      "latest",
      false
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
      "hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
      "miner": "0x0000000000000000000000000000000000000000",
      "stateRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
      "logsBloom": "0x00000000...",
      "difficulty": "0x0",
      "number": "0x0",
      "gasLimit": "0x0",
      "gasUsed": "0x0",
      "timestamp": "0x0",
      "extraData": "0x",
      "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
      "nonce": "0x0000000000000000",
      "uncles": [],
      "transactions": []
    }
  }
  ```
</CodeGroup>

## eth\_getBlockReceipts

按编号或哈希返回区块的回执列表。

<a href="/zh/reference/json-rpc/playground?method=eth_getBlockReceipts" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="block" type="string" required>
  区块标签(`latest`、`safe`、`finalized`、`pending`)或 32 字节区块哈希。
</ParamField>

**返回值**

<ResponseField name="result" type="array">
  区块中交易回执对象的数组。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_getBlockReceipts",
    "params": [
      "latest"
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": [
      "0x..."
    ]
  }
  ```
</CodeGroup>

## eth\_getBlockTransactionCountByHash

返回与给定区块哈希匹配的区块中的交易数量。

<a href="/zh/reference/json-rpc/playground?method=eth_getBlockTransactionCountByHash" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="block_hash" type="string" required>
  32 字节区块哈希(十六进制编码)。
</ParamField>

**返回值**

<ResponseField name="result" type="string">
  区块中的交易数,十六进制编码。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_getBlockTransactionCountByHash",
    "params": [
      "0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae"
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x..."
  }
  ```
</CodeGroup>

## eth\_getBlockTransactionCountByNumber

返回与给定区块编号匹配的区块中的交易数量。

<a href="/zh/reference/json-rpc/playground?method=eth_getBlockTransactionCountByNumber" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="block_tag" type="string" required>
  区块号(十六进制)或标签:`latest`、`safe`、`finalized`、`pending`。
</ParamField>

**返回值**

<ResponseField name="result" type="string">
  区块中的交易数,十六进制编码。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_getBlockTransactionCountByNumber",
    "params": [
      "latest"
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x..."
  }
  ```
</CodeGroup>

## eth\_getCode

返回给定地址处的代码。

<a href="/zh/reference/json-rpc/playground?method=eth_getCode" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="account" type="string" required>
  20 字节账户地址(十六进制编码)。
</ParamField>

<ParamField body="block" type="string" required>
  区块标签(`latest`、`safe`、`finalized`、`pending`)或 32 字节区块哈希。
</ParamField>

**返回值**

<ResponseField name="result" type="string">
  给定地址处的字节码。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_getCode",
    "params": [
      "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
      "latest"
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x..."
  }
  ```
</CodeGroup>

## eth\_getLogs

返回与给定 ID 的过滤器匹配的所有日志数组。

<a href="/zh/reference/json-rpc/playground?method=eth_getLogs" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="filters" type="object" required>
  日志过滤器对象。

  <Expandable title="properties">
    <ParamField body="fromBlock" type="string" />

    <ParamField body="toBlock" type="string" />

    <ParamField body="address" type="string" />

    <ParamField body="topics" type="array" />
  </Expandable>
</ParamField>

**返回值**

<ResponseField name="result" type="array">
  匹配过滤器的日志对象数组。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_getLogs",
    "params": [
      {
        "fromBlock": "0x0",
        "toBlock": "0x1",
        "address": "0xac4b3dacb91461209ae9d41ec517c2b9cb1b7daf",
        "topics": []
      }
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": [
      "0x..."
    ]
  }
  ```
</CodeGroup>

## eth\_getStorageAt

返回给定地址某个存储位置的值。

<a href="/zh/reference/json-rpc/playground?method=eth_getStorageAt" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="account" type="string" required>
  20 字节账户地址(十六进制编码)。
</ParamField>

<ParamField body="position" type="string" required>
  存储位置(十六进制编码 256 位整数)。
</ParamField>

<ParamField body="block" type="string" required>
  区块标签(`latest`、`safe`、`finalized`、`pending`)或 32 字节区块哈希。
</ParamField>

**返回值**

<ResponseField name="result" type="string">
  给定存储位置的值,十六进制编码。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_getStorageAt",
    "params": [
      "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
      "0x0",
      "latest"
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x..."
  }
  ```
</CodeGroup>

## eth\_getTransactionByBlockHashAndIndex

按区块哈希和交易索引位置返回交易信息。

<a href="/zh/reference/json-rpc/playground?method=eth_getTransactionByBlockHashAndIndex" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="block_hash" type="string" required>
  32 字节区块哈希(十六进制编码)。
</ParamField>

<ParamField body="index" type="string" required>
  交易索引位置(十六进制编码整数)。
</ParamField>

**返回值**

<ResponseField name="result" type="object">
  交易对象,如未找到则返回 `null`。

  <Expandable title="properties">
    <ResponseField name="type" type="string" />

    <ResponseField name="chainId" type="string" />

    <ResponseField name="nonce" type="string" />

    <ResponseField name="gas" type="string" />

    <ResponseField name="maxFeePerGas" type="string" />

    <ResponseField name="maxPriorityFeePerGas" type="string" />

    <ResponseField name="to" type="string" />

    <ResponseField name="value" type="string" />

    <ResponseField name="accessList" type="array" />

    <ResponseField name="input" type="string" />

    <ResponseField name="r" type="string" />

    <ResponseField name="s" type="string" />

    <ResponseField name="yParity" type="string" />

    <ResponseField name="v" type="string" />

    <ResponseField name="hash" type="string" />

    <ResponseField name="blockHash" type="string" />

    <ResponseField name="blockNumber" type="string" />

    <ResponseField name="transactionIndex" type="string" />

    <ResponseField name="from" type="string" />

    <ResponseField name="gasPrice" type="string" />
  </Expandable>
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_getTransactionByBlockHashAndIndex",
    "params": [
      "0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae",
      "0x1"
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
      "type": "0x2",
      "chainId": "0x1",
      "nonce": "0x16d",
      "gas": "0x46a02",
      "maxFeePerGas": "0x7fc1a20a8",
      "maxPriorityFeePerGas": "0x59682f00",
      "to": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
      "value": "0x4a6ed55bbcc180",
      "accessList": [],
      "input": "0x5ae401dc...",
      "r": "0x7f2153019a74025d83a73effdd91503ceecefac7e35dd933adc1901c875539aa",
      "s": "0x334ab2f714796d13c825fddf12aad01438db3a8152b2fe3ef7827707c25ecab3",
      "yParity": "0x0",
      "v": "0x0",
      "hash": "0x0e07d8b53ed3d91314c80e53cf25bcde02084939395845cbb625b029d568135c",
      "blockHash": "0x883f974b17ca7b28cb970798d1c80f4d4bb427473dc6d39b2a7fe24edc02902d",
      "blockNumber": "0xe26e6d",
      "transactionIndex": "0xad",
      "from": "0x3cf412d970474804623bb4e3a42de13f9bca5436",
      "gasPrice": "0x50101df3a"
    }
  }
  ```
</CodeGroup>

## eth\_getTransactionByBlockNumberAndIndex

按区块编号和交易索引位置返回交易信息。

<a href="/zh/reference/json-rpc/playground?method=eth_getTransactionByBlockNumberAndIndex" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="block_tag" type="string" required>
  区块号(十六进制)或标签:`latest`、`safe`、`finalized`、`pending`。
</ParamField>

<ParamField body="index" type="string" required>
  交易索引位置(十六进制编码整数)。
</ParamField>

**返回值**

<ResponseField name="result" type="object">
  交易对象,如未找到则返回 `null`。

  <Expandable title="properties">
    <ResponseField name="type" type="string" />

    <ResponseField name="chainId" type="string" />

    <ResponseField name="nonce" type="string" />

    <ResponseField name="gas" type="string" />

    <ResponseField name="maxFeePerGas" type="string" />

    <ResponseField name="maxPriorityFeePerGas" type="string" />

    <ResponseField name="to" type="string" />

    <ResponseField name="value" type="string" />

    <ResponseField name="accessList" type="array" />

    <ResponseField name="input" type="string" />

    <ResponseField name="r" type="string" />

    <ResponseField name="s" type="string" />

    <ResponseField name="yParity" type="string" />

    <ResponseField name="v" type="string" />

    <ResponseField name="hash" type="string" />

    <ResponseField name="blockHash" type="string" />

    <ResponseField name="blockNumber" type="string" />

    <ResponseField name="transactionIndex" type="string" />

    <ResponseField name="from" type="string" />

    <ResponseField name="gasPrice" type="string" />
  </Expandable>
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_getTransactionByBlockNumberAndIndex",
    "params": [
      "latest",
      "0x1"
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
      "type": "0x2",
      "chainId": "0x1",
      "nonce": "0x16d",
      "gas": "0x46a02",
      "maxFeePerGas": "0x7fc1a20a8",
      "maxPriorityFeePerGas": "0x59682f00",
      "to": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
      "value": "0x4a6ed55bbcc180",
      "accessList": [],
      "input": "0x5ae401dc...",
      "r": "0x7f2153019a74025d83a73effdd91503ceecefac7e35dd933adc1901c875539aa",
      "s": "0x334ab2f714796d13c825fddf12aad01438db3a8152b2fe3ef7827707c25ecab3",
      "yParity": "0x0",
      "v": "0x0",
      "hash": "0x0e07d8b53ed3d91314c80e53cf25bcde02084939395845cbb625b029d568135c",
      "blockHash": "0x883f974b17ca7b28cb970798d1c80f4d4bb427473dc6d39b2a7fe24edc02902d",
      "blockNumber": "0xe26e6d",
      "transactionIndex": "0xad",
      "from": "0x3cf412d970474804623bb4e3a42de13f9bca5436",
      "gasPrice": "0x50101df3a"
    }
  }
  ```
</CodeGroup>

## eth\_getTransactionByHash

按交易哈希返回请求的交易信息。

<a href="/zh/reference/json-rpc/playground?method=eth_getTransactionByHash" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="tx_hash" type="string" required>
  32 字节交易哈希(十六进制编码)。
</ParamField>

**返回值**

<ResponseField name="result" type="object">
  交易对象,如未找到则返回 `null`。

  <Expandable title="properties">
    <ResponseField name="type" type="string" />

    <ResponseField name="chainId" type="string" />

    <ResponseField name="nonce" type="string" />

    <ResponseField name="gas" type="string" />

    <ResponseField name="maxFeePerGas" type="string" />

    <ResponseField name="maxPriorityFeePerGas" type="string" />

    <ResponseField name="to" type="string" />

    <ResponseField name="value" type="string" />

    <ResponseField name="accessList" type="array" />

    <ResponseField name="input" type="string" />

    <ResponseField name="r" type="string" />

    <ResponseField name="s" type="string" />

    <ResponseField name="yParity" type="string" />

    <ResponseField name="v" type="string" />

    <ResponseField name="hash" type="string" />

    <ResponseField name="blockHash" type="string" />

    <ResponseField name="blockNumber" type="string" />

    <ResponseField name="transactionIndex" type="string" />

    <ResponseField name="from" type="string" />

    <ResponseField name="gasPrice" type="string" />
  </Expandable>
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_getTransactionByHash",
    "params": [
      "0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae"
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
      "type": "0x2",
      "chainId": "0x1",
      "nonce": "0x16d",
      "gas": "0x46a02",
      "maxFeePerGas": "0x7fc1a20a8",
      "maxPriorityFeePerGas": "0x59682f00",
      "to": "0x68b3465833fb72a70ecdf485e0e4c7bd8665fc45",
      "value": "0x4a6ed55bbcc180",
      "accessList": [],
      "input": "0x5ae401dc...",
      "r": "0x7f2153019a74025d83a73effdd91503ceecefac7e35dd933adc1901c875539aa",
      "s": "0x334ab2f714796d13c825fddf12aad01438db3a8152b2fe3ef7827707c25ecab3",
      "yParity": "0x0",
      "v": "0x0",
      "hash": "0x0e07d8b53ed3d91314c80e53cf25bcde02084939395845cbb625b029d568135c",
      "blockHash": "0x883f974b17ca7b28cb970798d1c80f4d4bb427473dc6d39b2a7fe24edc02902d",
      "blockNumber": "0xe26e6d",
      "transactionIndex": "0xad",
      "from": "0x3cf412d970474804623bb4e3a42de13f9bca5436",
      "gasPrice": "0x50101df3a"
    }
  }
  ```
</CodeGroup>

## eth\_getTransactionCount

返回从某地址发送的交易数量。

<a href="/zh/reference/json-rpc/playground?method=eth_getTransactionCount" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="account" type="string" required>
  20 字节账户地址(十六进制编码)。
</ParamField>

<ParamField body="block" type="string" required>
  区块标签(`latest`、`safe`、`finalized`、`pending`)或 32 字节区块哈希。
</ParamField>

**返回值**

<ResponseField name="result" type="string">
  从该地址发送的交易数,十六进制编码。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_getTransactionCount",
    "params": [
      "0x407d73d8a49eeb85d32cf465507dd71d507100c1",
      "latest"
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x..."
  }
  ```
</CodeGroup>

## eth\_getTransactionReceipt

按交易哈希返回交易回执。

<a href="/zh/reference/json-rpc/playground?method=eth_getTransactionReceipt" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="tx_hash" type="string" required>
  32 字节交易哈希(十六进制编码)。
</ParamField>

**返回值**

<ResponseField name="result" type="object">
  交易回执对象,如未找到则返回 `null`。

  <Expandable title="properties">
    <ResponseField name="type" type="string" />

    <ResponseField name="status" type="string" />

    <ResponseField name="cumulativeGasUsed" type="string" />

    <ResponseField name="logs" type="array" />

    <ResponseField name="logsBloom" type="string" />

    <ResponseField name="transactionHash" type="string" />

    <ResponseField name="transactionIndex" type="string" />

    <ResponseField name="blockHash" type="string" />

    <ResponseField name="blockNumber" type="string" />

    <ResponseField name="gasUsed" type="string" />

    <ResponseField name="effectiveGasPrice" type="string" />

    <ResponseField name="from" type="string" />

    <ResponseField name="to" type="string" />

    <ResponseField name="contractAddress" type="string" />
  </Expandable>
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_getTransactionReceipt",
    "params": [
      "0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae"
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
      "type": "0x2",
      "status": "0x1",
      "cumulativeGasUsed": "0xa42aec",
      "logs": [
        {
          "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
          "topics": [
            "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925"
          ],
          "data": "0x00000000000000000000000000000000000000000052b7d2dcc80cd2e4000000",
          "blockHash": "0x4acbdefb861ef4adedb135ca52865f6743451bfbfa35db78076f881a40401a5e",
          "blockNumber": "0x129f4b9",
          "transactionHash": "0x21f6554c28453a01e7276c1db2fc1695bb512b170818bfa98fa8136433100616",
          "transactionIndex": "0x7f",
          "logIndex": "0x118",
          "removed": false
        }
      ],
      "logsBloom": "0x00000000...",
      "transactionHash": "0x21f6554c28453a01e7276c1db2fc1695bb512b170818bfa98fa8136433100616",
      "transactionIndex": "0x7f",
      "blockHash": "0x4acbdefb861ef4adedb135ca52865f6743451bfbfa35db78076f881a40401a5e",
      "blockNumber": "0x129f4b9",
      "gasUsed": "0xbde1",
      "effectiveGasPrice": "0xfb0f6e8c9",
      "from": "0x9a53bfba35269414f3b2d20b52ca01b15932c7b2",
      "to": "0xdac17f958d2ee523a2206206994597c13d831ec7",
      "contractAddress": null
    }
  }
  ```
</CodeGroup>

## eth\_maxPriorityFeePerGas

返回当前每 gas 的 maxPriorityFeePerGas(单位:wei)。

<a href="/zh/reference/json-rpc/playground?method=eth_maxPriorityFeePerGas" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

该方法不接受任何参数。

**返回值**

<ResponseField name="result" type="string">
  当前每 gas 的最大优先费(单位:wei),十六进制编码。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_maxPriorityFeePerGas",
    "params": [],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x4b7"
  }
  ```
</CodeGroup>

## eth\_sendRawTransaction

提交原始交易。对于 EIP-4844 交易,原始形式必须为网络形式。
这意味着它包含 blobs、KZG 承诺和 KZG 证明。

<a href="/zh/reference/json-rpc/playground?method=eth_sendRawTransaction" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="hex_tx" type="string" required>
  已签名的交易数据(十六进制编码)。
</ParamField>

**返回值**

<ResponseField name="result" type="string">
  32 字节交易哈希。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_sendRawTransaction",
    "params": [
      "0x..."
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x..."
  }
  ```
</CodeGroup>

## eth\_sendRawTransactionSync

<a href="/zh/reference/json-rpc/playground?method=eth_sendRawTransactionSync" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="hex_tx" type="string" required>
  已签名的交易数据(十六进制编码)。
</ParamField>

<ParamField body="timeout_ms" type="integer" required />

**返回值**

<ResponseField name="result" type="object">
  <Expandable title="properties">
    <ResponseField name="type" type="string" />

    <ResponseField name="status" type="string" />

    <ResponseField name="cumulativeGasUsed" type="string" />

    <ResponseField name="logs" type="array" />

    <ResponseField name="logsBloom" type="string" />

    <ResponseField name="transactionHash" type="string" />

    <ResponseField name="transactionIndex" type="string" />

    <ResponseField name="blockHash" type="string" />

    <ResponseField name="blockNumber" type="string" />

    <ResponseField name="gasUsed" type="string" />

    <ResponseField name="effectiveGasPrice" type="string" />

    <ResponseField name="from" type="string" />

    <ResponseField name="to" type="string" />

    <ResponseField name="contractAddress" type="string" />
  </Expandable>
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_sendRawTransactionSync",
    "params": [
      "0x...",
      "0x..."
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
      "type": "0x2",
      "status": "0x1",
      "cumulativeGasUsed": "0xa42aec",
      "logs": [
        {
          "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
          "topics": [
            "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925"
          ],
          "data": "0x00000000000000000000000000000000000000000052b7d2dcc80cd2e4000000",
          "blockHash": "0x4acbdefb861ef4adedb135ca52865f6743451bfbfa35db78076f881a40401a5e",
          "blockNumber": "0x129f4b9",
          "transactionHash": "0x21f6554c28453a01e7276c1db2fc1695bb512b170818bfa98fa8136433100616",
          "transactionIndex": "0x7f",
          "logIndex": "0x118",
          "removed": false
        }
      ],
      "logsBloom": "0x00000000...",
      "transactionHash": "0x21f6554c28453a01e7276c1db2fc1695bb512b170818bfa98fa8136433100616",
      "transactionIndex": "0x7f",
      "blockHash": "0x4acbdefb861ef4adedb135ca52865f6743451bfbfa35db78076f881a40401a5e",
      "blockNumber": "0x129f4b9",
      "gasUsed": "0xbde1",
      "effectiveGasPrice": "0xfb0f6e8c9",
      "from": "0x9a53bfba35269414f3b2d20b52ca01b15932c7b2",
      "to": "0xdac17f958d2ee523a2206206994597c13d831ec7",
      "contractAddress": null
    }
  }
  ```
</CodeGroup>

## eth\_syncing

返回一个包含同步状态数据的对象,或者返回 false。

<a href="/zh/reference/json-rpc/playground?method=eth_syncing" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

该方法不接受任何参数。

**返回值**

<ResponseField name="result" type="boolean">
  如果未在同步则为 `false`,否则返回包含同步状态数据的对象。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "eth_syncing",
    "params": [],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": false
  }
  ```
</CodeGroup>

## debug\_getRawBlock

返回 RLP 编码的区块。

<a href="/zh/reference/json-rpc/playground?method=debug_getRawBlock" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="block" type="string" required>
  区块号(十六进制)或标签:`latest`、`safe`、`finalized`、`pending`。
</ParamField>

**返回值**

<ResponseField name="result" type="string">
  RLP 编码的区块数据。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "debug_getRawBlock",
    "params": [
      "latest"
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x..."
  }
  ```
</CodeGroup>

## debug\_getRawHeader

返回 RLP 编码的区块头。

<a href="/zh/reference/json-rpc/playground?method=debug_getRawHeader" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="block" type="string" required>
  区块号(十六进制)或标签:`latest`、`safe`、`finalized`、`pending`。
</ParamField>

**返回值**

<ResponseField name="result" type="string">
  RLP 编码的区块头数据。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "debug_getRawHeader",
    "params": [
      "latest"
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x..."
  }
  ```
</CodeGroup>

## debug\_getRawReceipts

返回 EIP-2718 二进制编码回执的数组。

<a href="/zh/reference/json-rpc/playground?method=debug_getRawReceipts" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="block" type="string" required>
  区块号(十六进制)或标签:`latest`、`safe`、`finalized`、`pending`。
</ParamField>

**返回值**

<ResponseField name="result" type="array">
  EIP-2718 二进制编码的回执数组。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "debug_getRawReceipts",
    "params": [
      "latest"
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": [
      "0x..."
    ]
  }
  ```
</CodeGroup>

## debug\_getRawTransaction

返回 EIP-2718 二进制编码交易的数组。

<a href="/zh/reference/json-rpc/playground?method=debug_getRawTransaction" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="tx_hash" type="string" required>
  32 字节交易哈希(十六进制编码)。
</ParamField>

**返回值**

<ResponseField name="result" type="string">
  EIP-2718 二进制编码的交易。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "debug_getRawTransaction",
    "params": [
      "0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae"
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x..."
  }
  ```
</CodeGroup>

## debug\_traceBlockByHash

通过 tracer 执行由区块哈希指定的区块中的所有交易并返回跟踪结果。

<a href="/zh/reference/json-rpc/playground?method=debug_traceBlockByHash" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="block_hash" type="string" required>
  32 字节区块哈希(十六进制编码)。
</ParamField>

<ParamField body="tracer" type="object" required>
  Tracer 配置对象。

  <Expandable title="properties">
    <ParamField body="tracer" type="string">
      Tracer 类型:`callTracer` 或 `prestateTracer`。
    </ParamField>

    <ParamField body="tracerConfig" type="object">
      <Expandable title="properties">
        <ParamField body="onlyTopCall" type="boolean">
          callTracer 的 onlyTopCall 选项,对 prestateTracer 忽略
        </ParamField>

        <ParamField body="diffMode" type="boolean">
          prestateTracer 的 diff 模式,对 callTracer 忽略
        </ParamField>

        <ParamField body="withLog" type="boolean">
          callTracer 的日志选项,对 prestateTracer 忽略
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

**返回值**

<ResponseField name="result" type="object">
  跟踪结果对象数组,每笔交易一个。

  <Expandable title="properties">
    <ResponseField name="txHash" type="string" />

    <ResponseField name="result" type="object" />
  </Expandable>
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "debug_traceBlockByHash",
    "params": [
      "0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae",
      {
        "tracer": "callTracer"
      }
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x..."
  }
  ```
</CodeGroup>

## debug\_traceBlockByNumber

通过 tracer 执行由区块编号指定的区块中的所有交易并返回跟踪结果。

<a href="/zh/reference/json-rpc/playground?method=debug_traceBlockByNumber" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="block_number" type="string" required>
  区块号(十六进制)或标签:`latest`、`safe`、`finalized`、`pending`。
</ParamField>

<ParamField body="tracer" type="object" required>
  Tracer 配置对象。

  <Expandable title="properties">
    <ParamField body="tracer" type="string">
      Tracer 类型:`callTracer` 或 `prestateTracer`。
    </ParamField>

    <ParamField body="tracerConfig" type="object">
      <Expandable title="properties">
        <ParamField body="onlyTopCall" type="boolean">
          callTracer 的 onlyTopCall 选项,对 prestateTracer 忽略
        </ParamField>

        <ParamField body="diffMode" type="boolean">
          prestateTracer 的 diff 模式,对 callTracer 忽略
        </ParamField>

        <ParamField body="withLog" type="boolean">
          callTracer 的日志选项,对 prestateTracer 忽略
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

**返回值**

<ResponseField name="result" type="object">
  跟踪结果对象数组,每笔交易一个。

  <Expandable title="properties">
    <ResponseField name="txHash" type="string" />

    <ResponseField name="result" type="object" />
  </Expandable>
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "debug_traceBlockByNumber",
    "params": [
      "latest",
      {
        "tracer": "callTracer"
      }
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x..."
  }
  ```
</CodeGroup>

## debug\_traceCall

通过执行一次 eth call 返回跟踪结果。

<a href="/zh/reference/json-rpc/playground?method=debug_traceCall" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="transaction" type="object" required>
  交易调用对象。

  <Expandable title="properties">
    <ParamField body="from" type="string" />

    <ParamField body="to" type="string" />

    <ParamField body="gas" type="string" />

    <ParamField body="maxFeePerGas" type="string" />

    <ParamField body="maxPriorityFeePerGas" type="string" />

    <ParamField body="value" type="string" />

    <ParamField body="input" type="string" />

    <ParamField body="data" type="string" />

    <ParamField body="nonce" type="string" />

    <ParamField body="chainId" type="string" />

    <ParamField body="accessList" type="string" />

    <ParamField body="authorizationList" type="string" />
  </Expandable>
</ParamField>

<ParamField body="block" type="string" required>
  区块标签(`latest`、`safe`、`finalized`、`pending`)或 32 字节区块哈希。
</ParamField>

<ParamField body="tracer" type="object" required>
  Tracer 配置对象。

  <Expandable title="properties">
    <ParamField body="tracer" type="string">
      Tracer 类型:`callTracer` 或 `prestateTracer`。
    </ParamField>

    <ParamField body="tracerConfig" type="object">
      <Expandable title="properties">
        <ParamField body="onlyTopCall" type="boolean">
          callTracer 的 onlyTopCall 选项,对 prestateTracer 忽略
        </ParamField>

        <ParamField body="diffMode" type="boolean">
          prestateTracer 的 diff 模式,对 callTracer 忽略
        </ParamField>

        <ParamField body="withLog" type="boolean">
          callTracer 的日志选项,对 prestateTracer 忽略
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

**返回值**

<ResponseField name="result" type="object">
  跟踪结果。结构取决于所用的 tracer。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "debug_traceCall",
    "params": [
      {
        "to": "0x...",
        "data": "0x..."
      },
      "latest",
      {
        "tracer": "callTracer",
        "tracerConfig": {
          "onlyTopCall": false
        }
      }
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x..."
  }
  ```
</CodeGroup>

## debug\_traceTransaction

返回给定交易的所有跟踪信息。

<a href="/zh/reference/json-rpc/playground?method=debug_traceTransaction" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="tx_hash" type="string" required>
  32 字节交易哈希(十六进制编码)。
</ParamField>

<ParamField body="tracer" type="object" required>
  Tracer 配置对象。

  <Expandable title="properties">
    <ParamField body="tracer" type="string">
      Tracer 类型:`callTracer` 或 `prestateTracer`。
    </ParamField>

    <ParamField body="tracerConfig" type="object">
      <Expandable title="properties">
        <ParamField body="onlyTopCall" type="boolean">
          callTracer 的 onlyTopCall 选项,对 prestateTracer 忽略
        </ParamField>

        <ParamField body="diffMode" type="boolean">
          prestateTracer 的 diff 模式,对 callTracer 忽略
        </ParamField>

        <ParamField body="withLog" type="boolean">
          callTracer 的日志选项,对 prestateTracer 忽略
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

**返回值**

<ResponseField name="result" type="object">
  跟踪结果对象。

  <Expandable title="properties">
    <ResponseField name="type" type="string" />

    <ResponseField name="from" type="string" />

    <ResponseField name="to" type="string" post={["optional"]} />

    <ResponseField name="value" type="string" post={["optional"]} />

    <ResponseField name="gas" type="string" />

    <ResponseField name="gasUsed" type="string" />

    <ResponseField name="input" type="string" />

    <ResponseField name="output" type="string" />

    <ResponseField name="error" type="string" post={["optional"]} />

    <ResponseField name="revertReason" type="string" post={["optional"]} />

    <ResponseField name="logs" type="array" />
  </Expandable>
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "debug_traceTransaction",
    "params": [
      "0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae",
      {
        "tracer": "callTracer"
      }
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x..."
  }
  ```
</CodeGroup>

## admin\_ethCallStatistics

返回关于 eth\_call 容量的统计信息,包括未激活的执行器和排队请求

<a href="/zh/reference/json-rpc/playground?method=admin_ethCallStatistics" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

该方法不接受任何参数。

**返回值**

<ResponseField name="result" type="object">
  包含 eth\_call 容量统计的对象。

  <Expandable title="properties">
    <ResponseField name="inactiveExecutors" type="string" />

    <ResponseField name="queuedRequests" type="string" />

    <ResponseField name="oldestRequestAgeMs" type="string" />

    <ResponseField name="averageRequestAgeMs" type="string" />

    <ResponseField name="totalRequests" type="string" />

    <ResponseField name="totalErrors" type="string" />

    <ResponseField name="queueRejections" type="string" />
  </Expandable>
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "admin_ethCallStatistics",
    "params": [],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x..."
  }
  ```
</CodeGroup>

## net\_version

返回当前网络 ID。

<a href="/zh/reference/json-rpc/playground?method=net_version" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

该方法不接受任何参数。

**返回值**

<ResponseField name="result" type="string">
  当前网络/链 ID,字符串形式。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "net_version",
    "params": [],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x..."
  }
  ```
</CodeGroup>

## txpool\_statusByAddress

返回来自给定地址的挂起交易的状态。

<a href="/zh/reference/json-rpc/playground?method=txpool_statusByAddress" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="address" type="string" required>
  20 字节账户地址(十六进制编码)。
</ParamField>

**返回值**

<ResponseField name="result" type="object">
  nonce 到交易状态的映射。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "txpool_statusByAddress",
    "params": [
      "0x407d73d8a49eeb85d32cf465507dd71d507100c1"
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x..."
  }
  ```
</CodeGroup>

## txpool\_statusByHash

按哈希返回挂起交易的状态。

<a href="/zh/reference/json-rpc/playground?method=txpool_statusByHash" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

<ParamField body="hash" type="string" required>
  32 字节交易哈希(十六进制编码)。
</ParamField>

**返回值**

<ResponseField name="result" type="object">
  交易状态对象。

  <Expandable title="properties">
    <ResponseField name="status" type="string" />

    <ResponseField name="reason" type="string" post={["optional"]} />
  </Expandable>
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "txpool_statusByHash",
    "params": [
      "0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae"
    ],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x..."
  }
  ```
</CodeGroup>

## web3\_clientVersion

返回 Monad 客户端版本。

<a href="/zh/reference/json-rpc/playground?method=web3_clientVersion" style={{textDecoration: 'none', borderBottom: 'none'}} className="group px-4 py-1.5 relative inline-flex items-center text-sm font-medium bg-transparent">
  <span className="absolute inset-0 bg-[#836EF9] rounded-xl group-hover:opacity-[0.9]" />

  <span className="z-10 text-white mr-2">在 RPC Playground 中打开</span>

  <svg width="3" height="24" viewBox="0 -9 3 24" className="h-5 overflow-visible text-white/90">
    <path d="M0 0L3 3L0 6" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
  </svg>
</a>

**参数**

该方法不接受任何参数。

**返回值**

<ResponseField name="result" type="string">
  Monad 客户端版本字符串。
</ResponseField>

**示例**

<CodeGroup>
  ```json Request theme={null}
  {
    "jsonrpc": "2.0",
    "method": "web3_clientVersion",
    "params": [],
    "id": 1
  }
  ```

  ```json Response theme={null}
  {
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x..."
  }
  ```
</CodeGroup>
