eth_getBlockTransactionCountByHash

Returns the number of transactions in the block with the given block hash.

Parameters

  • block hash: (string) [Required] A string representing the hash (32 bytes) of a block.

Returns

An integer representing the number of transactions in the block.

Example

Request

curl https://rpc.testnet.radiustech.xyz/<YOUR-RPC-ENDPOINT> \
  -X POST \
  -H "Content-Type: application/json" \
  -d '
{
  "jsonrpc": "2.0",     
  "method": "eth_getBlockTransactionCountByHash",
  "params": [
    "0x194b8d0d353"
  ],
  "id": 1
}
'

Response

{
  "jsonrpc": "2.0",
  "result": 1,
  "id": 1
}

Last updated

Was this helpful?