Skip to main content

starknet_getBlockWithTxHashes

Returns block information of the specified block, including a list of transaction hashes.

Parameters

block_id: [Required] The block parameter object containing one of the following:

  • block_hash: (string) Block hash.
  • block_number: (integer) Decimal block number.
  • One of the string tags latest or pending.

Returns

A block object or pending block object containing:

  • status: The status of the block (PENDING, ACCEPTED_ON_L2, ACCEPTED_ON_L1, or REJECTED).
  • block_hash: The block hash. This is not included in a pending block object.
  • parent_hash: The hash of this block's parent.
  • block_number: The block number. This is not included in a pending block object.
  • new_root: The new global state root. This is not included in a pending block object.
  • timestamp: The time at which the block was created.
  • sequencer_address: The StarkNet identity of the sequencer submitting this block.
  • l1_gas_price: The price of L1 gas in the block. An object containing price_in_fri (gas price denominated in fri) or price_in_wei (gas price denominated in wei).
  • starknet_version: Version of the current StarkNet protocol.
  • transactions: An array of transaction hashes included in this block.

Example

Replace YOUR-API-KEY with an API key from your Infura dashboard.

Request

curl https://starknet-mainnet.infura.io/v3/YOUR-API-KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "starknet_getBlockWithTxHashes",
"params": {
"block_id": {
"block_hash": "0x041b10c45dc3f39372f7b9409261cac9d880c5d75a5bb077d028db20b1bd76c4"
}
},
"id": 0
}'

Response

{
"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",
"l1_gas_price": {
"price_in_wei": "0xab3d3c644"
},
"starknet_version": "0.12.2",
"transactions": ["0x6a19b22f4fe4018d4d60ff844770a5459534d0a69f850f3c9cdcf70a132df94", "0x5fb5b63f0226ef426c81168d0235269398b63aa145ca6a3c47294caa691cfdc", "0x7af3c8de416f943660ac19ff1b12f552897eabc8316807320cddbeadf9bc01e", "0x2de627287f870f91dfd4e929df03980c994f6ffaa2d1cbf8d0e942fdf0c84d4", "0x7d1439901f2af25627470e18348787cbee190ae08ea3fac2be9fc3b6357a948", "0x119986a68f01623d2193ad1e26338b3dcc1f9a8add4503893e30bde7d6b80d1", "0x19e2e79abfb5495c4d8e7683ea19c918b7c8c2977517de4d232abfc15221d8f", "0x4e72fd133424d979d5ecca4d36481892bb549ddef779f1bc6340f001a682fe3", "0x7a7aa878974390c5546550c45fdcd66bd353063c22cff7f6b98211bb415043f", "0x1d1220e61366b36701332b3b74587443c3d08a3418c2c1fed3db9548b8940ec", "0x5458747fd956625cd857a4d07f51315b3781f9163b5b7987df59ce821a7d6f7", "0x402222e40e37eb6579b2785b53c51ce18e5e45a858f7ba1839ef875aa0f6c7f", "0x3539f55ea7282a543403278bd365f87c5622aa4d497ee56af6cb61ae8ed1d15", "0x68e8e3015ec6377176a944992fa8e28aab4f68dab07c4dde87bc8167c08ebf6", "0x47b3ff195d403d5197a9114055274f12181c56b3095aa6dfa1fa1e0e2ec27f6", "0x465ef3fd70dcc90adee9ae232935a83dd5c41e67c6b6fab6d5dbfe84fbd75c2", "0x305de8770bbbee4a09e22621b91d1f3ee9a81a07646a09fa9dfbbea296c152f", "0x4f8811a176b673fec7b56621dab0bff369f4463588aaf69cb6570956e10c25a", "0x3d77c910504507c826768091fe743533fdc9a8707e3043303a65f626f540ab0", "0x6d27aac48f79fc959a09f552d3327d30ea51bd0d1fb0dbb1e7e79eb0ae99077", "0x1972a1cb17120d32cd598e516672b31350163408fbb16cafe80389a83047755", "0x4907cf31e42fc59bb8e2ea6113b0ef8c3c70b092aa5ef72e64cd9c96ad3cb3e", "0x12dfaa3fc3a275cf2160f1b98403ddcc18a3e05a2c5cd9caf77009a0fa09992", "0x91354783b608a433cf98d19edb6639db9ba411cbe624a9d5aeb76345498ccc", "0x74e6323b9a458566bf2939fa2eab72a06ae9c61b173ef67a9331d0bbd746e", "0x1b061e37822c7233045c6750e4a5155730d24b5c530c50bb1e4fd682b5304c9", "0x226fed48f1add6d3ad5a85be4e2c2032b0218a6428e6a9c131e39f7cd46f76f", "0x55d830026b39f839cc7c309c3a70a01ac8a72224571da9ad17cebb2fc885695", "0x724cc4e4d9e24143abb7307208123577c7e36c37b977e4b56289b89bed7179f", "0xe7055b5f28f258df552694dcefea9dad076f1dedb053f4fdd7a1fc616c88f0", "0x5a2d0b0159078f4e05b440990c5035c530fe462e01bea690aad40fa88055da7", "0xe95220158ac886ef53014504d0abe85285c29c9619bfe120e123116e12db67", "0x41d2032e3cc6e44a4148b489781156e86fdf060988fc05567150a964a0cf2a0", "0x23685839dac61dd10bc1ce09653549adfd4f5e271fa003446742868e9a05d17", "0x1879fb020ecb591e824316103107c912f1ea9b7ebe3826db8946ac899aae067", "0x79a40be06ba57890040b900cc77693082cead101de7047ba5ca75fb662f583c", "0x53f11d85ee1e250e0047b3d9a7e2d64e410165ef6279662686a68f32a2b7c9d", "0x55ba4f854a49fe915e97a120dca973d3e86b6cc846497487fd075ee0ea66b0", "0x913c67b1e4001a3b40443ea3ad736b56c5afb68b9304b21f936dfa4ca2bc74", "0x1fd7dc1d327547b100e28f55a74ec40a96c5e645afc456ee8616614480989ff", "0x5ad1db62e4824188c06568eabd1f6f60673d3c24e8335437d3a90ddce208e29", "0x34bf36c31b3e44b4c2e76ed4243c8d83f66681f8d97b48a958c54026a0bba9d", "0x3917638733704590bb38dd4e264dd50fa97861d4b3289762f492c39237a1c67", "0x19466a532ba216c84ea9f56dd4f7a5cb37d491612fc8197068e3ae7eb3e4d24", "0x3aec8bfe1601ed9e84cd374a3d7b4522d368dd81d59f9f7eed24a0977e16a63", "0x15cc76efede4779e0626cc9455b870dbd3c39023a6a3d5b343953eb1da7423", "0x145f16e44be68a0a56e1c5fed55db411c1caac022a2daeb91323d845059c690", "0x973674f1b71a6329b354f5533c8e0a9a1a59cff4fb8714bb8314418af22fe1", "0x39fe0e652cc0cddd7936924f64641170aeca4fe690058c02f2df54f41b38962", "0x3a32d48539508c865cbca3bb6648825c9641425fc9554be2dea6376db80e159", "0x53f11e55a96e3a809667d5758d2604baf0dca32e2a9baa0aefdce5fda392020", "0x39b03ae51f182195fa9ee4aa361afbbdc7ada31f467d8c4b793e90add2b60c7", "0x6cdd403ebc3acb2218523f3311024a31731b16d9985b875c7589cce6bc1595d", "0x25755bf3e49a8c911c431f7ae8d16ac20a6275bb95fabac8a30212a560aeca3", "0x3b77efc5725186b67dcbb939b513b8471a7c3a1af84e67d0dffefd1b6f0fc37", "0xaed67850897d736381002a877474ff5a30d0e1e6b72dc1ff79dc42d4aa358a", "0x61e1c3b2735d81133236f81fe2b9855966a30381ede8c6711bfb22b184e0c38", "0x2a91aebdf9346ce984426fb5b72fdb58636e14c903cdd9670a656d60c86e08d", "0x5dd6a1941c3b4ae2442b24db1527955459850a48920369306b6e5c9af431a27", "0x5ecf3fde654402b72cccca619051b73150149a992ffad2f8614814267ba81d1", "0x728559d1ae47d08cb76a97e613cc94aa01380387ef369539254ccdb92ae0379", "0x6c2acdafb5dad6d64098c65b1cd33c74c0fe77d28f6f551245694e3edfabb1", "0x4088dceb1e51274a41259d8abc2336999f3305a0525e5311fc316e01fe83d45", "0x21b5c0db57fb61d977aec75bfb9662e63116ed09854744efc86ad48aae58463", "0x12f22e9091c698bca8fe503aea557e31418a884db2f2ed18bc8b655d391c4af", "0x4b2a530e1a331b327ded25e9f5e86d101743f0dfba4b5a1a25061557ab2b1ce", "0x4b60ac7980f64a3a723cc10662f3bd32673addbaca86f12de2ddf12747d215f", "0xf4c29ec66f689665eb37b5acfbfcaecab9a08a6ea9ea92a4475ea302c0d75d", "0x3d2df4c4ada5c94949e804691890136d44f5fe462372b45d531a2ba694a5073", "0x30cbb4d3f5d4d67a9c308576484e7c5232285ea3260b6eed87f64ff40c0b059", "0x7d724bfc8e81f2d7a6e5e65addfd993acf857780a1a618651a3e170b0b23fd9", "0x5d5c1c82c1fc35c9405689e6fa7a2c020395af52ce412dce5bf49a212477339", "0x617af6328e447002109f1c12d5280493ca1a17eb2fad93048113306d949f2f9", "0x7faecea29d75f5cc1e42216ed2edc07f6b54c600e892d52ad5233a5957a028e", "0x67b9151ce5334ade1fcdeca59c0e7dc5c6062526b8a8f3ccfa583184e2774d6", "0x6a0b4cf4cd5fbcce79ea433f8d14127124843a9c84f8dd8ede0879c9e0a8b4a", "0x50a12f79fac66fc0539433f1cb7aefe3705d944dad28ed9dd364f3596fa3ceb", "0x4fe426dcae2a30816764c1e247ce1bc1d7842787421cceb1967de5a47f901c7", "0x2dfac50eaed7ccf19bd09e1a10db43286f5a789ce374a58a56ea77de04cb14e", "0x1b2b41d01cef36a82330eddb75eae0f6f3e94a4a799b4400d17c86e6ada4657", "0x6873a856f503f86e4e4bb187c8142966fa030030005b3967371e98836af045f", "0x59c158d8673ca6f77421cc85e54fa097cda673bc7034ab4f28880e6a645cd25", "0x61ca47d997b1d73b774200a1ac356a2890ad0a6d0f93e9751d71d0e0f2fba5", "0x5228f835fb10cc5db551c4c65364ddda6bd1058cfe803f87044d9704caf903a", "0x5232c402534064fae933db6cc63c50be76a503e1a33dbe32d755f245735cec2", "0x42d2c06b5a3db9dca6a615e1fe81d2b11b21ee4b4c891c10b70cc63b08c60f8", "0x9c6a72c3f49032519043915215f92dd5c1914e6ab548c3e3619f70b472a9d1", "0x50af21e19b12e44bb6cbf9dde901593e16d4708403b096984f1423dd1f07594", "0x3778c11b029612720e60161d30f47a64a2eebd6b6c714495251ca3231f33873", "0x48ea633caf5a1eae263216d7e3c33ec7b4c1b10627bd1c37e49789a80112e03", "0x6298260739f887174e32297e4c9efa0ec6fe0c81a952163c1797016d5d44f7a", "0x7aba11ae89d8d79010c4e092161a8ab095e9b396ce6596a992a381b78632f57", "0x431451f7583fcdee2831a12d80d4d57c253a714ae6dd1ec2a53735d4c345f3a", "0x6cae53f22dbd03d535e430eb0ac90b7b7f541c71306c8413557b6c2d0532b9", "0x131216a8d9372e571dbe9baa12814faa52740c02ffc1f7653e69d2b86ff7ffb", "0x76b970d837bc5be03aef97c6385256482e2efde56fed1d7771ebd7760781c4", "0x65beda587edf5f45734fe239b1fa62e2fb4c8389c8fd0e3c2118886e85d4c2b", "0x647834320613e4afe139c83be5dd7ddffd3b284bfdade91238fddc31b874ac4", "0x5ab5d89897e9ed61bb13a80ce8ae470e1c0d9094abd3aa65bd2ee4f40db721c", "0xf5b414d49b7035bf0ebf978e9f6853bbcfa0c39a5faee86a66f7b66f4d7da0", "0xcca2ccb142a3e1bd5d2d2011e495f17a53924de5048518bd3195afc29ea1f2", "0x7168aa7f9412a3b22ce55a10b3514b2a403b382c76d55b81c01c58a938ce507", "0x4c347cf2a75ec1791c9955367867b691cff13c32beb0963940959baca37775b", "0x6de3fb7574121333466be710f13e6d317db9a5564d44fa05eff6cbe870ef1bc", "0x7db10ec88b84dcb96d10d2c8c047fdc9e0fabfab55fb2d218bff4103d75fc5c", "0x4a9bbf937d5fb24e3bf940f1718cf108340281054380f56a751c9cb23670e25", "0x78cc5dd5518d0018752a4b167c2612224e412e0a2e430401aac01c736cd035b", "0x2ef83d51bf4a8c7bfae2899e0cc8b31fdb989f715cc1db2be92e5bfc52c209f", "0x221d9ff51aba26ba01176fe3553666384f48bf29d125c20a34cf82704de7cec", "0x3a76adc8d114069ad5c6348e16a288b291fd212fc5d3eed166148690b0bcf80", "0x7217ca04871b7b39c0e390ec99127f0edca6eb8f992b89a4ec1b35bd78035de", "0x25a28b54cee6efe4b6b44f25861d2b1e6e0f18b696dd0998663ed034f4fea9", "0x5708e0fdac5d433fea00163d0d75d0d0f055b392b5055731f76ef4ec1cd8abd", "0x28ffa60afc8c5a045d455b3a5502d6cc83e95e0950f0cffe426a66f81a7c6cb", "0x78292dfeb6cc498e7fba715c6cd7b1a1f5212a5601d4e86a200e87606b791ba", "0x6bd46d7f3bdb4c517aaab3d3967d1a2c6b8e96b0204fb2165dda87ec3360cf", "0x785e61d8819f322a0f2df63a1c09248af35436f43a673dbd00360216ab1c9c9", "0x30b0e27832e38146232aa482bf3a7abe22c5310b141b81fb06b53956e018218", "0x5514a31b2f70b774ffa3bac4b36ab6fc41355fe2dca6c38400c3289adc3bf1a", "0x3a426adb3769ccfa2b55cfe4bacf5add83fca4853089d4b9cc051e1be257cec", "0x74172e5f3c485fa76442353377477e095333b1f5a761e4188fb8d02c6c0d1b2", "0x3a485ff5eae627cbd862c4609dc3fafb028a9f9bb0bc9911fac9d76ff2de9c0", "0x3b66291ef9b42b8ee29b8370071a7a6ea19bf315535df4db730baab370af4fb", "0x24b9c0f27934f22b9c7d8bb1b28b7b640403d8beae241342912865774988a0", "0x351a586cad8bde5ffbde99b7f9ea1d4865439357822608a38b0d8b1479e6358", "0x1a7bcf9e94fe4cd9c85de1ba0e1b9941c42399054d39c4f519f9fba8dc223de", "0x21159bcfb54ef6bb52ad93fa631aa36c2424a9747e434818c4bb4722582a713", "0x188b884c9e507a007c639c4547984b90c1cecc0cf2221e156b1b075b3fb7655", "0x56d15b44d0640869cd9be489497264e00dd73df5455b003078ff56a98aba149", "0x2eddfaa325c18d8845ff721b75808216d6ef391160d67c609bc30f59393bf9", "0x74cb241a323c476dc2287c1754aa75b6156f21e9f93f6df364c97b977683462", "0x13fed22d5c67af47f9e84e072bf782461f6f682d14235803fd2dc178c1e383e", "0x439e88605bb0a6e172c3d599257f38140018ea81910a6480ff1b63638ebd268", "0x1e795281ec4cc4d3e76902a8e713b8355a52fb9c46883169e3dc0e509e374f6", "0x1ac511e20f9ab384e7c1cb7706c284d06ee1a05d8131ad7cc20341e9c344e32", "0x2c96bd9bdcd0173d8dd08cb735bb234ba082acab6b956255b627d7e944f9817", "0xddfd7272311b588c92adf91d75d7352177a55728104b7c745b716e3c2f54b2", "0x4998af8695aea3e9301f1db32f89101d6725a2b04442b600bf2b71fd9b80449", "0x4d8f684a8c58df7ef4d1fdb7643d5b34d488363e246d9bf575b7323f0c372f6", "0x78625b74ad44bb049b0344eb16be7abef9de9aa5fd212ddfee196e8505bba0", "0x1cfe4e308ce443529962e17d877994ca647c42cc53ff303e02085c70f19f3a5", "0x7657f6571b83fcdd524d672e4ba178432a60eadbf9683399557a54c3526b1d3", "0x34da350253263c647dbd153c9eb6186c06f2bfd7b32b8c70786774b14a9157a", "0x23a0ec2f7faecb95595d19ed28dd9c320835d1aaee7b1d52c1b93d56b92e7cd", "0x44b8afa4dbfd64240f380390653a59e12f974aee68b52a20cacd3681d143304", "0x5eb267c6da61f84812fa2776ddcc7f19b920fd9e50cd3096c88cb053acb27f9", "0x6011b791c3c4e81f3e897f216e524680ebd11686201d9554e2cee2aee0e9ecc", "0x2a0e8e734bbbf135c7eb094b4ac9566e4b925c8cc155171744ee6c7e175a00f", "0x1c429d2c8fcf7687063cfdb951afa3da8cb0ffae8fd560058c1813a9e1fbcb8", "0x121aaba2894a63cce81acabb559eb2c114f4859dc5803e0b91349ec398d2eb0"]
},
"id": 0
}