Expand description
This module contains functions for decoding storage keys and values.
- See
decode_storage_key
anddecode_storage_value
to decode storage keys or values from modern or historic runtimes. - See
decode_storage_key_current
anddecode_storage_value_current
to decode modern storage keys and values. - See
encode_prefix
to encode storage prefixes, andencode_storage_key
to encode storage keys.
Structs§
- Storage
Info - Information about a storage entry.
- Storage
Key - Details about a storage key.
- Storage
KeyInfo - Information about a single key within a storage entry.
- Storage
KeyPart - The decoded representation of a storage key.
- Storage
KeyPart Value - Information about the value contained within a storage key part hash.
Enums§
- Storage
Hasher - Hasher used by storage maps
- Storage
Info Error - An error returned trying to access storage type information.
- Storage
KeyDecode Error - An error returned trying to decode storage bytes.
- Storage
KeyEncode Error - An error returned trying to encode storage keys.
- Storage
Value Decode Error - An error returned trying to decode storage bytes.
Traits§
- Into
Storage Keys - 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 implementscale_encode::EncodeAsType
). - Storage
Keys - Since
scale_encode::EncodeAsType
is not dyn safe, this trait is used to iterate through and encode a set of keys. - Storage
Type Info - 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
.