Comment on page
starknet_getBlockWithTxs
Get block information with full transactions given the block id.
The
starknet_getBlockWithTxs
command allows users to obtain block information with full transactions after providing the block id.BLOCK_PARAM
- Expected one of block_number
, block_hash
, latest
, pending
.The resulting block information with full transactions.
Request
curl https://starknet-mainnet.blastapi.io/<project-id>
-X POST \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"starknet_getBlockWithTxs","params":["latest"],"id":0}'
Result
{
"jsonrpc": "2.0",
"result": {
"status": "ACCEPTED_ON_L2",
"block_hash": "0x18ec1a3931bb5a286f801a950e1153bd427d6d3811591cc01e6f074615a1f76",
"parent_hash": "0x413229e9996b3025feb6b276a33249fb0ff0f92d8aeea284deb35ea4093dea2",
"block_number": 4503,
"new_root": "0xc95a878188acf408e285027bd5e7674a88529b8c65ef6c1999b3569aea8bc8",
"timestamp": 1661246333,
"sequencer_address": "0x5dcd266a80b8a5f29f04d779c6b166b80150c24f2180a75e82427242dab20a9",
"transactions": [{
"type": "DEPLOY",
"transaction_hash": "0x6a19b22f4fe4018d4d60ff844770a5459534d0a69f850f3c9cdcf70a132df94",
"version": "0x0",
"contract_address": "0x2809a6fafc77b11645acc6770f25110272ce3cc26c7315afe3580d3ab1cb424",
"contract_address_salt": "0xcb51dcb95881662b9e07ef07a58b4357ce30d416809a63e294e6ef6f03a1ba",
"class_hash": "0x4d1f4cf4ef520c768a326d34f919227e1f075effda532f57cbaec6a1228db88",
"constructor_calldata": ["0x673e3747b6f9cc2daf2c1f4766bd2ff809d7b6b2f09ac15ecaf33004716f188", "0x79dc0da7c54b95f10aa182ad0a46400db63156920adb65eca2654c0945a463", "0x2", "0x7bf0f343233a86c9ed342a3a8ba8896e1f36270cf38d2fd974ef3f77ba0cfb4", "0x6b648b36b074a91eee55730f5f5e075ec19c0a8f9ffb0903cefeee93b6ff328"]
}, {
"type": "INVOKE",
"transaction_hash": "0x5fb5b63f0226ef426c81168d0235269398b63aa145ca6a3c47294caa691cfdc",
"max_fee": "0x1ff973cafa7fff",
"version": "0x0",
"signature": ["0x5a1c0af2b96c461a9753e383107e2bba1849cdf6029ffaa2b97533ada03789f", "0x7261a61b45dcfe48d85fb6a687ed6a888816ba601871679dd32dcb99652de84"],
"nonce": "0x0",
"contract_address": "0x7c57808b9cea7130c44aab2f8ca6147b04408943b48c6d8c3c83eb8cfdd8c0b",
"entry_point_selector": "0x15d40a3d6ca2ac30f4031e42be28da9b056fef9bb7357ac5e85627ee876e5ad",
"calldata": ["0x1", "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7", "0x83afd3f4caedc6eebf44246fe54e38c95e3179a5ec9ea81740eca5b482d12e", "0x0", "0x3", "0x3", "0x20b55314a52c19b78626a26d48ffd4a9b3e21b45cf3bc7bdf01ea52c4088860", "0x20f7338adef002", "0x0", "0x1457"]
},
..............
Last modified 1yr ago