Expand description
A representation of the metadata provided by a substrate based node. This representation is optimized to be used by Subxt and related crates, and is independent of the different versions of metadata that can be provided from a node.
Typically, this will be constructed by either:
- Calling
Metadata::decode()given some metadata bytes obtained from a node (this usescodec::Decode). - Obtaining
frame_metadata::RuntimeMetadataPrefixed, and then using.try_into()to convert it intoMetadata.
Structs§
- Constant
Metadata - Metadata for a single constant.
- Custom
Metadata - Metadata of custom types with custom values, basically the same as
frame_metadata::v15::CustomMetadata<PortableForm>>. - Custom
Value Metadata - Basically the same as
frame_metadata::v15::CustomValueMetadata<PortableForm>>, but borrowed. - Extrinsic
Metadata - Metadata for the extrinsic type.
- Metadata
- Node metadata. This can be constructed by providing some compatible
frame_metadatawhich is then decoded into this. We aim to preserve all of the existing information in the incoming metadata while optimizing the format a little for Subxt’s use cases. - Metadata
Hasher - Obtain a hash representation of our metadata or some part of it.
This is obtained by calling
crate::Metadata::hasher(). - Method
Param Metadata - Metadata for a single input parameter to a runtime API method / pallet view function.
- Outer
Enums Metadata - Metadata for the outer enums.
- Pallet
Metadata - Metadata for a specific pallet.
- Runtime
ApiMetadata - Metadata for the available runtime APIs.
- Runtime
ApiMethod Metadata - Metadata for a single runtime API method.
- Storage
Entry Metadata - Metadata for a single storage entry.
- Storage
Metadata - Metadata for the storage entries in a pallet.
- Transaction
Extension Metadata - Metadata for the signed extensions used by extrinsics.
- View
Function Metadata - Metadata for the available View Functions. Currently these exist only at the pallet level, but eventually they could exist at the runtime level too.
Enums§
- Storage
Entry Modifier - Is the storage entry optional, or does it have a default value.
- Storage
Entry Type - The type of a storage entry.
- Storage
Hasher - Hasher used by storage maps.
- TryFrom
Error - An error emitted if something goes wrong converting
frame_metadatatypes intocrate::Metadata.
Constants§
- SUPPORTED_
METADATA_ VERSIONS - The metadata versions that we support converting into
crate::Metadata. These are ordest from highest to lowest, so that the metadata we’d want to pick first is first in the array.