API Reference

eth_getBlockTransactionCountByHash - Scroll

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

Parameters

DATA, 32 Bytes - Hash of a block.

params: [
	"0x5dd67817dfc1e5d3185ba664df15de1aee4f321986b5c4dfc6eabe1ccb81858f",
];

Returns

QUANTITY - Integer of the number of transactions in this block.

Example

Request

curl --location --request POST 'https://scroll-testnet.unifra.io/v1/your-api-key' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_getBlockTransactionCountByHash",
    "params": [
        "0xdecf7d1109c108ec3c01cd71e9bff4bd5b8790b86654f95e495012eb66524e25"
    ],
    "id": 0
}'

Result

{
    "jsonrpc": "2.0",
    "id": 0,
    "result": "0x1"
}
Language
Click Try It! to start a request and see the response here!