POSTeth_getBlockTransactionCountByHash

Returns the number of transactions in the block specified by its block hash.

Request Body
idintegerrequired
jsonrpcstringrequired
methodstringrequired
paramsoneOf[]required

Pass the following parameters as an array with the appropriate types.

  1. block hash: The block hash to query as a 64-character hex string.
params[0]string

Block hash is the unique identifier of a block. The block hash is represented as a 64-character hexadecimal string.

Responses

응답 본문이 없습니다.

X-API-KEY
RequestCU14
cURL
curl -X POST "https://optimism-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0x59f63e3840e0f4a1659074c1a4021e881a268a52d31958688da1d66bfbf6d2ca"
  ]
}'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x64"
}