⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today →
Skip to main content

state_getMetadata – Mythos JSON-RPC Method

Returns the SCALE-encoded runtime metadata for the active Mythos runtime. Clients decode this blob to understand pallets, storage layouts, constants, and extrinsic signatures.

Parameters

This method takes no parameters.

Returns

FieldTypeDescription
resultstringHex-encoded runtime metadata.

Request Example

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

Usage Tips

  • Cache metadata and only refresh after a runtime upgrade to avoid unnecessary downloads.
  • Use polkadot.js (api.runtimeMetadata) or subxt codegen to process the response.
  • Historical metadata is available by supplying a block hash to state_getMetadata via the at parameter (JSON-RPC v2 extension).