state

call(method: Text, data: Bytes, at?: BlockHash): Bytes

  • interface: api.rpc.state.call

  • jsonrpc: state_call (alias=state_callAt)

  • summary: Calls a contract (pallet) at a block's state.

getChildReadProof(childStorageKey: PrefixedStorageKey, keys: Vec<StorageKey>, at?: BlockHash): ReadProof

  • interface: api.rpc.state.getChildReadProof

  • jsonrpc: state_getChildReadProof

  • summary: Returns proof of storage for child key entries at a specific block state.

getKeys(key: StorageKey, at?: BlockHash): Vec<StorageKey>

  • interface: api.rpc.state.getKeys

  • jsonrpc: state_getKeys

  • summary: Retrieves the keys with a certain prefix.

  • deprecated: Use api.rpc.state.getKeysPaged to retrieve keys.

getKeysPaged(key: StorageKey, count: u32, startKey?: StorageKey, at?: BlockHash): Vec<StorageKey>

  • interface: api.rpc.state.getKeysPaged

  • jsonrpc: state_getKeysPaged (alias=state_getKeysPagedAt)

  • summary: Returns the keys with prefix with pagination support.

getMetadata(at?: BlockHash): Metadata

  • interface: api.rpc.state.getMetadata

  • jsonrpc: state_getMetadata

  • summary: Returns the runtime metadata.

getPairs(prefix: StorageKey, at?: BlockHash): Vec<KeyValue>

  • interface: api.rpc.state.getPairs

  • jsonrpc: state_getPairs

  • summary: Returns the keys with prefix, leaves empty to get all the keys (deprecated: Use getKeysPaged).

  • deprecated: Use api.rpc.state.getKeysPaged to retrieve keys.

getReadProof(keys: Vec<StorageKey>, at?: BlockHash): ReadProof

  • interface: api.rpc.state.getReadProof

  • jsonrpc: state_getReadProof

  • summary: Returns proof of storage entries at a specific block state.

getRuntimeVersion(at?: BlockHash): RuntimeVersion

  • interface: api.rpc.state.getRuntimeVersion

  • jsonrpc: state_getRuntimeVersion (alias=chain_getRuntimeVersion)

  • summary: Gets the runtime version.

getStorage(key: StorageKey, at?: BlockHash): StorageData

  • interface: api.rpc.state.getStorage

  • jsonrpc: state_getStorage (alias=state_getStorageAt)

  • summary: Retrieves the storage for a key.

getStorageHash(key: StorageKey, at?: BlockHash): Hash

  • interface: api.rpc.state.getStorageHash

  • jsonrpc: state_getStorageHash (alias=state_getStorageHashAt)

  • summary: Retrieves the storage hash.

getStorageSize(key: StorageKey, at?: BlockHash): u64

  • interface: api.rpc.state.getStorageSize

  • jsonrpc: state_getStorageSize (alias=state_getStorageSizeAt)

  • summary: Retrieves the storage size.

queryStorage(keys: Vec<StorageKey>, fromBlock: Hash, toBlock?: BlockHash): Vec<StorageChangeSet>

  • interface: api.rpc.state.queryStorage

  • jsonrpc: state_queryStorage

  • summary: Queries historical storage entries (by key) starting from a start block.

queryStorageAt(keys: Vec<StorageKey>, at?: BlockHash): Vec<StorageChangeSet>

  • interface: api.rpc.state.queryStorageAt

  • jsonrpc: state_queryStorageAt

  • summary: Queries storage entries (by key) starting at block hash given as the second parameter.

subscribeRuntimeVersion(): RuntimeVersion

  • interface: api.rpc.state.subscribeRuntimeVersion

  • jsonrpc: state_subscribeRuntimeVersion

  • summary: Retrieves the runtime version via subscription.

subscribeStorage(keys?: Vec<StorageKey>): StorageChangeSet

  • interface: api.rpc.state.subscribeStorage

  • jsonrpc: state_subscribeStorage

  • summary: Subscribes to storage changes for the provided keys.

traceBlock(block: Hash, targets: Option<Text>, storageKeys: Option<Text>, methods: Option<Text>): TraceBlockResponse

  • interface: api.rpc.state.traceBlock

  • jsonrpc: state_traceBlock

  • summary: Provides a way to trace the re-execution of a single block.

Last updated