JSON-RPC

JSON-RPC

通过 JSON-RPC 发送请求,查阅各链支持的全部方法、CU 权重与错误码;eth_getLogs 日志查询的区块跨度超出该链上限会返回 -32602,单个批量请求最多 100 个调用,方法签名见完整参考。

概述

所有请求按 计算单位(CU) 计量,并按 key 进行限流。

  • 入口:POST /v1/{chain}/{api_key}(key 放在路径中)或 POST /v1/{chain}(key 放在请求头中)。Robinhood Chain 的 {chain} 是 robinhood_mainnet:https://api.blockvectra.com/v1/robinhood_mainnet。同一个 API key 可用于所有已支持的链
  • 协议:HTTP POST,单个调用或批量
  • 计量:请求到达时,其全部 CU 开销立即计入该 key 的突发容量;每个被受理并得到应答的调用按该方法公布的 CU 权重计费,不计费的情况见错误参考。按小时账期结算扣费(向下取整为整单位,余数结转下一期,账期结束约 15 分钟后执行)
  • 以太坊:有自己的方法清单,状态窗口以 state_window_blocks 为准,见支持的链 → 以太坊。

关于全部方法的完整参数 schema、方法签名与交互式测试,请参阅完整参考。关于路径版本、向后兼容规则与对接建议,请参阅 API 版本与兼容性。

获取 API key 与发出第一个请求见快速上手,其中也说明了 key 的传递方式与批量请求。

常用调用示例

常用调用的完整示例。

日志查询(eth_getLogs)

按合约地址和 topic 过滤最近一段区块的日志——这里以 ERC-20 的 Transfer 事件(topic 为 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef)为例。eth_getLogs 的当前 CU 权重见下方CU 计量规则表;区块跨度超过该链 max_logs_block_range(取自 GET /v1/chains)的请求会被拒绝并返回 -32602。

export BLOCKVECTRA_API_KEY=rgw_your_api_key

curl -X POST "https://api.blockvectra.com/v1/robinhood_mainnet" \
  -H 'Content-Type: application/json' \
  -H "x-api-key: $BLOCKVECTRA_API_KEY" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_getLogs",
    "params": [{
      "fromBlock": "0x45a2409",
      "toBlock": "0x45a2609",
      "address": "0x1111111111111111111111111111111111111111",
      "topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]
    }],
    "id": 1
  }'

交易 Trace(debug_traceTransaction)

用 callTracer 追踪一笔交易的内部调用。debug_traceTransaction 的当前 CU 权重见下方CU 计量规则表。和其他读状态的方法一样,目标区块若超出该链的近期状态窗口就会被拒绝(-32011)。窗口大小为该链的 state_window_blocks(取自 GET /v1/chains)。在提供 trace 的链上,历史 trace 请使用 Data API。

export BLOCKVECTRA_API_KEY=rgw_your_api_key

curl -X POST "https://api.blockvectra.com/v1/robinhood_mainnet" \
  -H 'Content-Type: application/json' \
  -H "x-api-key: $BLOCKVECTRA_API_KEY" \
  -d '{
    "jsonrpc": "2.0",
    "method": "debug_traceTransaction",
    "params": ["0xYOUR_TRANSACTION_HASH", {"tracer": "callTracer"}],
    "id": 1
  }'

CU 计量规则

各 JSON-RPC 方法的计算单位(CU)权重。

方法名权重(CU)
eth_blockNumber1
eth_chainId1
eth_getBlockByNumber5
eth_blobBaseFee10
eth_feeHistory10
eth_gasPrice10
eth_getBalance10
eth_getBlockByHash10
eth_getBlockReceipts10
eth_getBlockTransactionCountByHash10
eth_getBlockTransactionCountByNumber10
eth_getCode10
eth_getHeaderByHash10
eth_getHeaderByNumber10
eth_getProof10
eth_getRawTransactionByBlockHashAndIndex10
eth_getRawTransactionByBlockNumberAndIndex10
eth_getRawTransactionByHash10
eth_getStorageAt10
eth_getTransactionByBlockHashAndIndex10
eth_getTransactionByBlockNumberAndIndex10
eth_getTransactionByHash10
eth_getTransactionCount10
eth_getTransactionReceipt10
eth_getUncleByBlockHashAndIndex10
eth_getUncleByBlockNumberAndIndex10
eth_getUncleCountByBlockHash10
eth_getUncleCountByBlockNumber10
eth_maxPriorityFeePerGas10
eth_syncing10
net_version10
web3_clientVersion10
web3_sha310
eth_call15
eth_createAccessList20
eth_estimateGas20
eth_simulateV120
eth_getLogs30
eth_sendRawTransaction30
debug_traceBlockByHash100
debug_traceBlockByNumber100
debug_traceCall100
debug_traceTransaction100
trace_block100
trace_call100
trace_get100
trace_replayTransaction100
trace_transaction100

方法策略

可用方法因链而异,下面按链分别列出,其他说明见支持的链。只有匹配允许的方法名或模式的方法才可调用,其他方法返回 -32601 method not available。

以下各链均允许

  • eth_blockNumber
  • eth_call
  • eth_chainId
  • eth_estimateGas
  • eth_gasPrice
  • eth_getBalance
  • eth_getBlockByHash
  • eth_getBlockByNumber
  • eth_getBlockTransactionCountByHash
  • eth_getBlockTransactionCountByNumber
  • eth_getCode
  • eth_getLogs
  • eth_getStorageAt
  • eth_getTransactionByBlockHashAndIndex
  • eth_getTransactionByBlockNumberAndIndex
  • eth_getTransactionByHash
  • eth_getTransactionCount
  • eth_getTransactionReceipt
  • eth_sendRawTransaction
  • eth_syncing
  • net_version
  • web3_clientVersion

Arbitrum One

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 5,000 个区块

另外允许

  • debug_traceBlockByHash
  • debug_traceBlockByNumber
  • debug_traceCall
  • debug_traceTransaction
  • eth_blobBaseFee
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_maxPriorityFeePerGas
  • eth_simulateV1
  • web3_sha3

Arc

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口:—

另外允许

  • eth_blobBaseFee
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_maxPriorityFeePerGas
  • eth_simulateV1
  • web3_sha3

Avalanche C-Chain

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 128 个区块

另外允许

  • debug_traceBlockByHash
  • debug_traceBlockByNumber
  • debug_traceCall
  • debug_traceTransaction
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_maxPriorityFeePerGas
  • web3_sha3

Base

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 10,000 个区块

另外允许

  • eth_maxPriorityFeePerGas
  • eth_blobBaseFee
  • eth_feeHistory
  • eth_createAccessList
  • eth_getProof
  • eth_simulateV1
  • eth_getBlockReceipts
  • eth_getRawTransactionByHash
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getUncleCountByBlockNumber
  • eth_getUncleCountByBlockHash
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleByBlockHashAndIndex
  • eth_getHeaderByNumber
  • eth_getHeaderByHash
  • web3_sha3

Berachain

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 9,000 个区块

另外允许

  • eth_blobBaseFee
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_maxPriorityFeePerGas
  • eth_simulateV1
  • web3_sha3

Boba

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 80,000 个区块

另外允许

  • eth_blobBaseFee
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_maxPriorityFeePerGas
  • eth_simulateV1
  • web3_sha3

BNB Smart Chain

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 100 个区块

另外允许

  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_maxPriorityFeePerGas

Celo

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 864,000 个区块

另外允许

  • eth_blobBaseFee
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_maxPriorityFeePerGas
  • eth_simulateV1
  • web3_sha3

以太坊

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 250,000 个区块

另外允许

  • debug_traceBlockByHash
  • debug_traceBlockByNumber
  • debug_traceCall
  • debug_traceTransaction
  • eth_blobBaseFee
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getProof
  • eth_maxPriorityFeePerGas
  • trace_block
  • trace_call
  • trace_get
  • trace_replayTransaction
  • trace_transaction
  • web3_sha3

Ethereum Sepolia

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口:—

另外允许

  • eth_blobBaseFee
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getProof
  • eth_maxPriorityFeePerGas
  • web3_sha3

Fraxtal

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 10,000 个区块

另外允许

  • eth_blobBaseFee
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_maxPriorityFeePerGas
  • eth_simulateV1
  • web3_sha3

Gnosis

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 262,000 个区块

另外允许

  • eth_blobBaseFee
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_maxPriorityFeePerGas
  • eth_simulateV1
  • web3_sha3

HyperEVM

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口:—

另外允许

  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_maxPriorityFeePerGas

Ink

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 9,000 个区块

另外允许

  • eth_blobBaseFee
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_maxPriorityFeePerGas
  • eth_simulateV1
  • web3_sha3

Katana

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 86,400 个区块

另外允许

  • eth_blobBaseFee
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_maxPriorityFeePerGas
  • eth_simulateV1
  • web3_sha3

Linea

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 128 个区块

另外允许

  • eth_blobBaseFee
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_maxPriorityFeePerGas
  • eth_simulateV1
  • web3_sha3

Metal L2

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 10,000 个区块

另外允许

  • eth_blobBaseFee
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_maxPriorityFeePerGas
  • eth_simulateV1
  • web3_sha3

Mode

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 10,000 个区块

另外允许

  • eth_blobBaseFee
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_maxPriorityFeePerGas
  • eth_simulateV1
  • web3_sha3

OP Mainnet

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 1,296,000 个区块

另外允许

  • eth_blobBaseFee
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_maxPriorityFeePerGas
  • eth_simulateV1
  • web3_sha3

Polygon

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 126 个区块

另外允许

  • debug_traceBlockByHash
  • debug_traceBlockByNumber
  • debug_traceCall
  • debug_traceTransaction
  • eth_blobBaseFee
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_maxPriorityFeePerGas
  • eth_simulateV1
  • web3_sha3

Robinhood Chain

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 900 个区块

另外允许

  • eth_maxPriorityFeePerGas
  • eth_blobBaseFee
  • eth_feeHistory
  • eth_createAccessList
  • eth_getProof
  • eth_simulateV1
  • eth_getBlockReceipts
  • eth_getRawTransactionByHash
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getUncleCountByBlockNumber
  • eth_getUncleCountByBlockHash
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleByBlockHashAndIndex
  • eth_getHeaderByNumber
  • eth_getHeaderByHash
  • web3_sha3
  • debug_traceTransaction
  • debug_traceCall
  • debug_traceBlockByNumber
  • debug_traceBlockByHash

Robinhood Chain Testnet

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 1,023 个区块

另外允许

  • debug_traceBlockByHash
  • debug_traceBlockByNumber
  • debug_traceCall
  • debug_traceTransaction
  • eth_blobBaseFee
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_maxPriorityFeePerGas
  • eth_simulateV1
  • web3_sha3

Rootstock

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 6,000 个区块

另外允许

  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • web3_sha3

Soneium

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 9,000 个区块

另外允许

  • eth_blobBaseFee
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_maxPriorityFeePerGas
  • eth_simulateV1
  • web3_sha3

Sonic

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 11,000 个区块

另外允许

  • debug_traceBlockByHash
  • debug_traceBlockByNumber
  • debug_traceCall
  • debug_traceTransaction
  • eth_blobBaseFee
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_maxPriorityFeePerGas
  • eth_simulateV1
  • web3_sha3

Unichain

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 85,500 个区块

另外允许

  • eth_blobBaseFee
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_maxPriorityFeePerGas
  • eth_simulateV1
  • web3_sha3

World Chain

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 30,000 个区块

另外允许

  • eth_blobBaseFee
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_maxPriorityFeePerGas
  • eth_simulateV1
  • web3_sha3

X Layer

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 250,000 个区块

另外允许

  • debug_traceBlockByHash
  • debug_traceBlockByNumber
  • debug_traceCall
  • debug_traceTransaction
  • eth_blobBaseFee
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_maxPriorityFeePerGas
  • eth_simulateV1
  • web3_sha3

Zora

eth_getLogs 单次最大块跨度 1,000 个区块;状态窗口 10,000 个区块

另外允许

  • eth_blobBaseFee
  • eth_createAccessList
  • eth_feeHistory
  • eth_getBlockReceipts
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_maxPriorityFeePerGas
  • eth_simulateV1
  • web3_sha3

限制:

  • 批量:每个请求最多 100 个调用;同时受该 key 的 CU 突发容量限制,见下文。
  • 请求体:最大 2 MiB(见完整 OpenAPI 参考中的“10. Limits at a glance”)
  • CU 突发:每个 API key 均有 CU 令牌桶(cu_per_sec 补充速率、burst_cu 突发容量——默认 100 CU/s、突发 400 CU;付费充值后每个 key 至少 2,000 CU/s、突发 10,000 CU,更高的自定义限额保持不变;在控制台 Keys 表按 key 显示)。单个请求(包括整批 JSON-RPC 批量调用)的 CU 总开销若超过该 key 的突发容量,会被拒绝并返回 -32022 request_exceeds_burst(request cost <N> CU exceeds burst capacity <M> CU);请拆分为更小的批次。

错误码表

全部错误码、是否计费与处理方式见错误参考。

完整 OpenAPI 参考

完整的机器可读规范(含所有方法签名、请求与响应 schema 及交互式参数详情)见完整 OpenAPI 参考。

最后更新:

本页目录