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β
Parameter | Type | Required | Description |
---|---|---|---|
method | string | Yes | Runtime API function name (for example Metadata_metadataAtVersion ). |
data | string | Yes | SCALE-encoded parameters for the runtime API call. |
at | string | No | Block 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.