mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 03:01:07 +00:00
Enhance decl storage (#777)
* enhance macro decl_storage() * update the state root hash * fix one comment
This commit is contained in:
@@ -29,6 +29,8 @@ extern crate serde;
|
||||
|
||||
extern crate sr_std as rstd;
|
||||
extern crate sr_io as runtime_io;
|
||||
#[cfg(feature = "std")]
|
||||
pub extern crate sr_primitives as runtime_primitives;
|
||||
extern crate substrate_metadata;
|
||||
|
||||
extern crate mashup;
|
||||
|
||||
@@ -188,7 +188,11 @@ mod tests {
|
||||
|
||||
decl_storage! {
|
||||
trait Store for Module<T: Trait> as TestStorage {
|
||||
StorageMethod : u32;
|
||||
StorageMethod : Option<u32>;
|
||||
}
|
||||
add_extra_genesis {
|
||||
config(_marker) : ::std::marker::PhantomData<T>;
|
||||
build(|_, _| {});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -312,7 +316,7 @@ mod tests {
|
||||
functions: DecodeDifferent::Encode(&[
|
||||
StorageFunctionMetadata {
|
||||
name: DecodeDifferent::Encode("StorageMethod"),
|
||||
modifier: StorageFunctionModifier::None,
|
||||
modifier: StorageFunctionModifier::Optional,
|
||||
ty: StorageFunctionType::Plain(DecodeDifferent::Encode("u32")),
|
||||
documentation: DecodeDifferent::Encode(&[]),
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user