Expand description
This module contains functions for decoding storage keys and values.
- See
decode_storage_keyanddecode_storage_valueto decode storage keys or values from modern or historic runtimes. - See
encode_storage_key_prefixto encode storage prefixes, andencode_storage_keyto encode storage keys. - See
StorageTypeInfofor the underlying trait which provides storage entry information. - See
StorageEntryInfofor a underlying trait which provides information about the available storage entries.
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
KeyValue Decode Error - An error returned trying to decode the values in storage keys
- Storage
Value Decode Error - An error returned trying to decode storage bytes.
Traits§
- Decodable
Values - Implementors of this trait are capable of decoding multiple values from bytes into an output type such as a tuple or fixed size array.
- Encodable
Values - Since
scale_encode::EncodeAsTypeis not dyn safe, this trait is used to iterate through and encode a set of values. - Into
Decodable Values - 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. - Into
Encodable Values - 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. - Storage
Entry Info - This can be implemented for anything capable of providing information about the available Storage Entries
- Storage
Type Info - This is implemented for all metadatas exposed from
frame_metadataand 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_keyand related functions take a storage key and return information (in the form ofStorageKey) 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 viascale_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 viascale_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 viascale_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 providedVec.
Type Aliases§
- Storage
Entry - An entry denoting a pallet or a constant name.