Skip to main content

starknet_getBlockWithTxHashes RPC Method

Return block information, including transaction hashes, for the specified block ID.

Updated on
Mar 18, 2024

Parameters

block_id
string
REQUIRED

The hash of the requested block, the block number (height) of the requested block, or a block tag (latest, pre_confirmed, or l1_accepted)

Returns

result
object

The result object which can be one of the following object:

BLOCK_WITH_TX_HASHES
object

(Optional) The block with transaction hashes object which have the following fields

status
string

The block status, which can be one of - 'PRE_CONFIRMED', 'ACCEPTED_ON_L2', 'ACCEPTED_ON_L1'

block_hash
string

The block hash

parent_hash
string

The parent block hash

block_number
integer

The block number (its height)

new_root
string

The new global state root

timestamp
integer

The time in which the block was created, encoded in Unix time

sequencer_address
string

The StarkNet identity of the sequencer submitting this block

l1_gas_price
object

The price of l1 gas in the block

price_in_fri
string

The price of one unit of the given resource, denominated in fri (10^-18 strk)

price_in_wei
string

The price of one unit of the given resource, denominated in wei

l2_gas_price
object

The price of l2 gas in the block

price_in_fri
string

The price of one unit of the given resource, denominated in fri (10^-18 strk)

price_in_wei
string

The price of one unit of the given resource, denominated in wei

l1_data_gas_price
object

The price of l1 data gas in the block

price_in_fri
string

The price of one unit of the given resource, denominated in fri (10^-18 strk)

price_in_wei
string

The price of one unit of the given resource, denominated in wei

l1_da_mode
string

It specifies whether the data of this block is published via blob data or calldata. It can be one of - 'BLOB' or 'CALLDATA'. This field will not be present if the status of the block is posted to L1

starknet_version
string

The semver of the current Starknet protocol

transactions
array

The hashes of the transactions included in this block

PRE_CONFIRMED_BLOCK_WITH_TX_HASHES
object

(Optional) The pre-confirmed block with transaction hashes object which have the following fields. Note that this object will be deprecated upon decentralization

transactions
array

The hashes of the transactions included in this block

block_number
integer

The block number of the block that the proposer is currently building. Note that this is a local view of the node, whose accuracy depends on its polling interval length

timestamp
integer

The time in which the block was created, encoded in Unix time

sequencer_address
string

The StarkNet identity of the sequencer submitting this block

l1_gas_price
object

The price of l1 gas in the block

price_in_fri
string

The price of one unit of the given resource, denominated in fri (10^-18 strk)

price_in_wei
string

The price of one unit of the given resource, denominated in wei

l2_gas_price
object

The price of l2 gas in the block

price_in_fri
string

The price of one unit of the given resource, denominated in fri (10^-18 strk)

price_in_wei
string

The price of one unit of the given resource, denominated in wei

l1_data_gas_price
object

The price of l1 data gas in the block

price_in_fri
string

The price of one unit of the given resource, denominated in fri (10^-18 strk)

price_in_wei
string

The price of one unit of the given resource, denominated in wei

l1_da_mode
string

It specifies whether the data of this block is published via blob data or calldata. It can be one of - 'BLOB' or 'CALLDATA'

starknet_version
string

The semver of the current Starknet protocol

Request
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free