state_getStorageAt - JSON-RPC Method
Description
Returns the SCALE-encoded value under a storage key at the given block hash. Use this for historical queries and deterministic reads.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
key | string | Yes | Hex-encoded storage key |
at | string | Yes | Block hash to query at |
Returns
Hex-encoded SCALE value, or null
if the key does not exist.
Request Example
Query the :code
key (runtime Wasm) at a finalized block:
curl -s https://api-moonriver.n.dwellir.com/YOUR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc":"2.0",
"id":1,
"method":"state_getStorageAt",
"params":["0x3a636f6465", "0x1849c7bc2c547b315fef716c6f2fb6f5e256da60482a013286caf975d035f766"]
}'
Tip: Replace the block hash with the current finalized head from
chain_getFinalizedHead
.