starknet_getStateUpdate

Get the information about the result of executing the requested block

Parameters

  • BLOCK PARAMETER
Object NameRequiredTypeDetail
BLOCK PARAMETERString"block_hash", "block_number", "latest"
"params": [
    "latest"
]

Result

Result fields

KeyTypeDetail
block_hashStringA field element. represented by at most 63 hex digits
new_rootStringThe new global state root
old_rootStringThe previous global state root
state_diffstate_diff objectThe change in state applied in this block, given as a mapping of addresses to the new values and/or new contracts

Example

Request

curl <your-endpoint> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "starknet_getStateUpdate",
    "params": [
        "latest"
    ]
}'

Return

{
    "jsonrpc": "2.0",
    "result": {
        "block_hash": "0x46396353132a86d5e024559d3a87c66ab005f5a13663ff500c6747f077f2388",
        "new_root": "0x327d167f9fac69c468baa2b4b2447b11c57c733860084ffb897801df3087c5f",
        "old_root": "0x489ec76427428d01832f7052c59abcf779aa4d90095e551f0ef00468c626d6b",
        "state_diff": {
            "storage_diffs": [
                {
                    "address": "0x5cba59057cc7a148b6a90de14281ab5b95b3e177fc5537360132e19001265ed",
                    "storage_entries": [
                        {
                            "key": "0xf920571b9f85bdd92a867cfdc73319d0f8836f0e69e06e4c5566b6203f75cc",
                            "value": "0x3e327de1c40540b98d05cbcb13552008e36f0ec8d61d46956d2f9752c294328"
                        },
                        {
                            "key": "0x1ccc09c8a19948e048de7add6929589945e25f22059c7345aaf7837188d8d05",
                            "value": "0x4b1b696913e713e10198710a9b2befbe3f6749d01d10ec4bba266dc8341bcb"
                        }
                    ]
                },
                ...
            ],
            "declared_contract_hashes": [],
            "deployed_contracts": [
                {
                    "address": "0x31a7db15aaa325d45465c612b9e8292212de3c39ef66c23d54025a03e51c94",
                    "class_hash": "0x25ec026985a3bf9d0cc1fe17326b245dfdc3ff89b8fde106542a3ea56c5a918"
                },
                ...
            ],
            "nonces": []
        }
    },
    "id": 1
}
        
Language
Click Try It! to start a request and see the response here!