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.
StorageKeyValueDecodeError
An error returned trying to decode the values in storage keys
StorageValueDecodeError
An error returned trying to decode storage bytes.

Traits§

DecodableValues
Implementors of this trait are capable of decoding multiple values from bytes into an output type such as a tuple or fixed size array.
EncodableValues
Since scale_encode::EncodeAsType is not dyn safe, this trait is used to iterate through and encode a set of values.
IntoDecodableValues
This can be implemented for any type that can be decoded into in multiple steps via scale_decode::DecodeAsType. The common use case is to decode some sets of bytes into a tuple of multiple types, step by step. As well as tuples up to size 12, Implementations also exist and arrays.
IntoEncodableValues
This can be implemented for anything that can be encoded in multiple steps into a set of values via scale_encode::EncodeAsType. The common use case is to encode a tuple of multiple types, step by step, into bytes. As well as tuples up to size 12, Implementations also exist for Vecs and arrays.
StorageEntryInfo
This can be implemented for anything capable of providing information about the available Storage Entries
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_default_storage_value_with_info
Decode the default storage value given some StorageInfo.
decode_storage_key
Decode a storage key, returning information about it.
decode_storage_key_values
Attempt to decode the values attached to parts of a storage key into the provided output type. decode_storage_key and related functions take a storage key and return information (in the form of StorageKey) which describes each of the parts of the key.
decode_storage_key_with_info
Decode a storage key, returning information about it.
decode_storage_value
Decode a storage value.
decode_storage_value_with_info
Decode a storage value.
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_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_suffix
Encode the end part of a storage key (ie everything except for the prefix that can be encoded via encode_storage_key_prefix) 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_suffix_to
Encode the end part of a storage key (ie everything except for the prefix that can be encoded via encode_storage_key_prefix) 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_suffix_with_info_to
Encode the end part of a storage key (ie everything except for the prefix that can be encoded via encode_storage_key_prefix) 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
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. Write the response to the provided Vec.

Type Aliases§

StorageEntry
An entry denoting a pallet or a constant name.