Skip to main content

state_getMetadata

Returns the runtime metadata on Moonbeam.

Use Cases#

  • Runtime introspection - Discover available pallets and calls
  • Extrinsic building - Get call and type information for cross-chain DeFi, multi-chain dApps, and Ethereum-to-Polkadot bridging via XCM, Axelar, LayerZero, and Wormhole
  • Storage key generation - Build storage keys from metadata
  • Client generation - Auto-generate typed APIs

Parameters#

ParameterTypeRequiredDescription
blockHashStringNoBlock hash for historical metadata

Request#

{
"jsonrpc": "2.0",
"method": "state_getMetadata",
"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_getMetadata",
"params": [],
"id": 1
}'