eth_getBlockByHash
PolygonC1Returns block information by block hash. Like eth_getBlockByNumber, the second parameter selects full transaction objects or hashes.
Endpoint
POST https://api.1st-node.com/v1/polygon/rpcParameters
| Name | Type | Description |
|---|---|---|
| hash | DATA, 32 bytes | Block hash. |
| fullTx | Boolean | true for full transaction objects, false for hashes. |
Returns
Object — the block, or null if not found.
Request
curl https://api.1st-node.com/v1/polygon/rpc \
-H "Authorization: Bearer $ONE_KEY" \
-H "content-type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getBlockByHash",
"params": ["0xbf2…", false]
}'{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getBlockByHash",
"params": ["0xbf2…", false]
}Response
{
"jsonrpc": "2.0",
"id": 1,
"result": { "number": "0x12d4e2a", "hash": "0xbf2…", "transactions": ["0x…"] }
}More blocks methods on Polygon
充值、拿密钥、上线。
自助开通。支持加密货币或银行卡。按额度计费——重型原语更贵,简单调用很便宜。
获取 API 密钥