Skip to main content

starknet_getStateUpdate RPC Method

Get the information about the result of executing the requested block.

Updated on
Mar 18, 2024

Parameters

block_id
string
REQUIRED

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

Returns

result
object

The information about the state update of the requested block. It contains one of the following objects:

STATE_UPDATE
object

(Optional) The state update object which contains the following fields:

block_hash
string

The block hash

old_root
string

The previous global state root

new_root
string

The new global state root

state_diff
object

The state diff object which contains the following objects:

storage_entries
array

The previous global state root

key
string

The key value

value
string

The value

deprecated_declared_classes
array

The hash of the declared class

class_hash
string

The hash of the contract code

address
string

The address of the contract

declared_classes
array

The declared class hash and compiled class hash

class_hash
string

The hash of the declared class

compiled_class_hash
string

The Cairo assembly hash corresponding to the declared class

deployed_contracts
array

The contract deployed as part of the state update

class_hash
string

The hash of the contract code

address
string

The address of the contract

replaced_classes
array

The list of contracts whose class was replaced

class_hash
string

The new class hash

contract_address
string

The address of the contract whose class was replaced

nonces
array

The updated nonce per contract address

nonce
string

The nonce for the given address at the end of the block

contract_address
string

The address of the contract

PRE_CONFIRMED_STATE_UPDATE
object

(Optional) The pre-confirmed state update object which contains the following fields:

old_root
string

The previous global state root

state_diff
object

The state diff object which contains the following objects:

storage_entries
array

The previous global state root

key
string

The key value

value
string

The value

deprecated_declared_classes
array

The hash of the declared class

class_hash
string

The hash of the contract code

address
string

The address of the contract

declared_classes
array

The declared class hash and compiled class hash

class_hash
string

The hash of the declared class

compiled_class_hash
string

The Cairo assembly hash corresponding to the declared class

deployed_contracts
array

The contract deployed as part of the state update

class_hash
string

The hash of the contract code

address
string

The address of the contract

replaced_classes
array

The list of contracts whose class was replaced

class_hash
string

The new class hash

contract_address
string

The address of the contract whose class was replaced

nonces
array

The updated nonce per contract address

nonce
string

The nonce for the given address at the end of the block

contract_address
string

The address of the contract

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