Docs

state_callAt - Bittensor RPC Method

Execute a runtime API call at a specific block hash on Bittensor.

Executes a runtime API function with SCALE-encoded parameters at a specific block hash. This is a variant of state_call that requires an explicit block hash, making it useful for historical queries. You can invoke any runtime API function exposed by the Bittensor runtime, such as Metadata_metadata, AccountNonceApi_account_nonce, or TransactionPaymentApi_query_info.

Parameters

ParameterTypeRequiredDescription
methodstringYesRuntime API function name (e.g. "Metadata_metadata", "AccountNonceApi_account_nonce").
datastringYesHex-encoded SCALE-encoded call parameters. Use "0x" for functions that take no arguments.
blockHashstringYesHex-encoded block hash to execute the call against.

Response

FieldTypeDescription
resultstringHex-encoded SCALE-encoded return value. Must be decoded according to the runtime API's return type.

Code Examples

Use Cases

  • Historical metadata -- Retrieve the runtime metadata as it existed at a past block to correctly decode storage and extrinsics from that era.
  • Fee estimation at past blocks -- Call TransactionPaymentApi_query_info at historical blocks to analyze fee trends over time.
  • Cross-version analysis -- Compare runtime API outputs across different blocks to track how Bittensor subnet parameters or staking rules evolved.

Notes

  • The data parameter must be SCALE-encoded. Use a library such as @polkadot/types or parity-scale-codec to encode input and decode output.
  • Requires an archive node for historical block hashes. Non-archive nodes only retain recent state.
  • This method is equivalent to state_call with an explicit block hash parameter.