Skip to main content

state_call – Mythos JSON-RPC Method

Executes a runtime API call against the current or historical state. This let's you query information exposed through runtime APIs (such as staking, bridge, or NFT helpers) without crafting extrinsics.

Parameters#

ParameterTypeRequiredDescription
methodstringYesRuntime API function name (for example Metadata_metadataAtVersion).
datastringYesSCALE-encoded parameters for the runtime API call.
atstringNoBlock hash to execute the call against. Defaults to latest.

Request Example#

{
"jsonrpc": "2.0",
"method": "state_call",
"params": [
"Metadata_metadataAtVersion",
"0x0c000000"
],
"id": 1
}

Tips#

  • Always encode parameters using the correct SCALE types—use polkadot.js or subxt helpers to avoid manual encoding errors.
  • Provide a block hash to obtain deterministic results for marketplace accounting or dispute resolution.
  • Check rpc_methods to confirm which runtime APIs are exposed by your node build.