Module storage

Module storage 

Source
Expand description

This module contains functions for decoding storage keys and values.

Structs§

StorageInfo
Information about a storage entry.
StorageKey
Details about a storage key.
StorageKeyInfo
Information about a single key within a storage entry.
StorageKeyPart
The decoded representation of a storage key.
StorageKeyPartValue
Information about the value contained within a storage key part hash.

Enums§

StorageHasher
Hasher used by storage maps
StorageInfoError
An error returned trying to access storage type information.
StorageKeyDecodeError
An error returned trying to decode storage bytes.
StorageKeyEncodeError
An error returned trying to encode storage keys.
StorageValueDecodeError
An error returned trying to decode storage bytes.

Traits§

IntoStorageKeys
This can be implemented for anything that can be converted into something implementing StorageKeys. It is implemented by default for tuples up to length 10, vectors and arrays (where the values all implement scale_encode::EncodeAsType).
StorageKeys
Since scale_encode::EncodeAsType is not dyn safe, this trait is used to iterate through and encode a set of keys.
StorageTypeInfo
This is implemented for all metadatas exposed from frame_metadata and is responsible for extracting the type IDs and related info needed to decode storage entries.

Functions§

decode_storage_key
Decode a storage key, returning information about it.
decode_storage_key_current
Decode a storage key in a modern runtime, returning information about it.
decode_storage_key_with_info
Decode a storage key, returning information about it.
decode_storage_value
Decode a storage value.
decode_storage_value_current
Decode a storage value in a modern (V14-metadata-or-later) runtime.
decode_storage_value_with_info
Decode a storage value.
encode_prefix
Encode a storage key prefix from a pallet name and storage entry name. This prefix is the first 32 bytes of any storage key which comes from a pallet, and is essentially twox_128(pallet_name) + twox_128(storage_entry_name).
encode_storage_key
Encode a complete storage key for a given pallet and storage entry and a set of keys that are each able to be encoded via scale_encode::EncodeAsType.
encode_storage_key_to
Encode a complete storage key for a given pallet and storage entry and a set of keys that are each able to be encoded via scale_encode::EncodeAsType.
encode_storage_key_with_info_to
Encode a complete storage key for a given pallet and storage entry and a set of keys that are each able to be encoded via scale_encode::EncodeAsType.