Skip to main content

state_getStorage

Description#

Read SCALE‑encoded storage for a key (optionally at a specific block). Use to fetch on‑chain state deterministically and to implement historical reads.

Returns the SCALE-encoded storage value for a given key.

Parameters#

ParameterTypeRequiredDescription
storageKeystringYesHex-encoded key (e.g., ${S.storageCodeKey} for :code)
blockHashstringNoOptional block hash; latest if omitted

Code Examples#

curl -X POST https://api-bittensor-mainnet.n.dwellir.com/YOUR_API_KEY \
+ -H 'Content-Type: application/json' \
+ -d '{"jsonrpc":"2.0","method":"state_getStorage","params":["0x3a636f6465"],"id":1}'