mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 07:01:05 +00:00
storage doublemap in decl_storage (#1918)
* factorization * introduce GenericUnhashedStorage * implement generator and storage * impl double map in storage macro * improve StorageDoubleMapXX methods * remove storage from example and impl test * remove old comments * wasm compatible * improve imports * rename storages * update runtime impl version * make code less verbose * impl hash config for second key in double map hash available are all of Hashable trait * use double map in decl_storage for contract * fix double map config issue * add hasher into metadata * update impl version and build wasm * doc * add attrs * update metadata version * update runtime version * fix unused storage
This commit is contained in:
@@ -263,6 +263,12 @@ pub enum StorageFunctionType {
|
||||
value: DecodeDifferentStr,
|
||||
is_linked: bool,
|
||||
},
|
||||
DoubleMap {
|
||||
key1: DecodeDifferentStr,
|
||||
key2: DecodeDifferentStr,
|
||||
value: DecodeDifferentStr,
|
||||
key2_hasher: DecodeDifferentStr,
|
||||
},
|
||||
}
|
||||
|
||||
/// A storage function modifier.
|
||||
@@ -304,8 +310,10 @@ pub enum RuntimeMetadata {
|
||||
V0(RuntimeMetadataDeprecated),
|
||||
/// Version 1 for runtime metadata. No longer used.
|
||||
V1(RuntimeMetadataDeprecated),
|
||||
/// Version 2 for runtime metadata.
|
||||
V2(RuntimeMetadataV2),
|
||||
/// Version 2 for runtime metadata. No longer used.
|
||||
V2(RuntimeMetadataDeprecated),
|
||||
/// Version 3 for runtime metadata.
|
||||
V3(RuntimeMetadataV3),
|
||||
}
|
||||
|
||||
/// Enum that should fail.
|
||||
@@ -325,10 +333,10 @@ impl Decode for RuntimeMetadataDeprecated {
|
||||
}
|
||||
}
|
||||
|
||||
/// The metadata of a runtime version 2.
|
||||
/// The metadata of a runtime.
|
||||
#[derive(Eq, Encode, PartialEq)]
|
||||
#[cfg_attr(feature = "std", derive(Decode, Debug, Serialize))]
|
||||
pub struct RuntimeMetadataV2 {
|
||||
pub struct RuntimeMetadataV3 {
|
||||
pub modules: DecodeDifferentArray<ModuleMetadata>,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user