Skip to main content

state_getMetadata

Returns the runtime metadata on Astar.

Use Cases#

  • Runtime introspection - Discover available pallets and calls
  • Extrinsic building - Get call and type information for cross-chain DeFi, multi-VM smart contracts, and XCM-enabled interoperability with Ethereum and Cosmos
  • 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-astar.n.dwellir.com/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "state_getMetadata",
"params": [],
"id": 1
}'