eth_getBlockTransactionCountByHash-polygon

Returns the number of transactions in a block from a block matching the given block hash.

Parameters

  • DATA, 32 Bytes - hash of a block
curl https://polygon-mainnet-archive.allthatnode.com/8U3JLUhzIDg3GShvy9hkCCSYkLGc11kj \
--request POST \
--header "Content-Type: application/json" \
--data '{
    "jsonrpc":"2.0",
    "id":1,
    "method":"eth_getBlockTransactionCountByHash",
    "params":[
       "0x558e5c517c13ec8a0bf9e1e23da48602d35c6af972b5a86d5adad4252abeff24"
    ]
}'

Returns

  • QUANTITY - integer of the number of transactions in this block.
{"jsonrpc":"2.0","id":1,"result":"0x2a"}

Try Yourself

Language
Click Try It! to start a request and see the response here!