Skip to main content

state_getStorage

Returns a storage entry at a specific key on Moonbeam.

Why Moonbeam? Build on the cross-chain connected EVM platform on Polkadot with $65M+ TVL and 100+ projects with full EVM compatibility on Polkadot, native XCM cross-chain messaging, 10K+ TPS, 24% staking APR, and $0.015 transaction costs.

Use Cases#

  • State queries - Read on-chain storage values
  • Account balances - Query account data for cross-chain DeFi, multi-chain dApps, and Ethereum-to-Polkadot bridging via XCM, Axelar, LayerZero, and Wormhole
  • Pallet storage - Access runtime storage items
  • Historical state - Query state at specific blocks

Parameters#

ParameterTypeRequiredDescription
keyStringYesStorage key (hex-encoded)
blockHashStringNoBlock hash for historical query

Request#

{
"jsonrpc": "2.0",
"method": "state_getStorage",
"params": [""],
"id": 1
}

Code Examples#

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