post https://api.infstones.com/starknet/mainnet/
Get block information with full transactions given the block id
Parameters
BLOCK PARAMETER
Object Name | Required | Type | Detail |
---|---|---|---|
BLOCK PARAMETER | ✅ | String | "block_hash", "block_number", "latest", "pending" |
"params": [
{
"block_hash": "0x03b6581f3222ff1f79c0e9959462aef03bd464999e998292772a0c51da53f9b1"
}
]
Result
A block object.
Example
Request
curl <your-endpoint> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "starknet_getBlockWithTxs",
"params": [
{
"block_hash": "0x046396353132a86d5e024559d3a87c66ab005f5a13663ff500c6747f077f2388"
}
]
}'
Return
{
"jsonrpc": "2.0",
"result": {
"status": "ACCEPTED_ON_L1",
"block_hash": "0x46396353132a86d5e024559d3a87c66ab005f5a13663ff500c6747f077f2388",
"parent_hash": "0x79c0054853f42c623dc4f99061cbbb71fb4037f26a3f77593e30b1350256736",
"block_number": 5000,
"new_root": "0x327d167f9fac69c468baa2b4b2447b11c57c733860084ffb897801df3087c5f",
"timestamp": 1663330598,
"sequencer_address": "0x5dcd266a80b8a5f29f04d779c6b166b80150c24f2180a75e82427242dab20a9",
"transactions": [
{
"type": "L1_HANDLER",
"transaction_hash": "0x3fd9be6818f3543002b9e460d35033d223f51397e45bf57c5a0b6829f04cf20",
"version": "0x0",
"nonce": "0xaa5e",
"contract_address": "0x73314940630fd6dcda0d772d4c972c4e0a9946bef9dabf4ef84eda8ef542b82",
"entry_point_selector": "0x2d757788a8d8d6f21d1cd40bce38a8222d70654214e96ff95d8086e684fbee5",
"calldata": [
"0xae0ee0a63a2ce6baeeffe56e7714fb4efe48d419",
"0x7f3dbefa25f49f1f31c134614dd2bccf72152149a30ab8f304302c7b6e5dbfe",
"0x2386f26fc10000",
"0x0"
]
},
...
]
},
"id": 1
}