mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 10:57:56 +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:
@@ -27,12 +27,12 @@ pub trait Hashable: Sized {
|
||||
|
||||
impl<T: Codec> Hashable for T {
|
||||
fn blake2_256(&self) -> [u8; 32] {
|
||||
blake2_256(&self.encode())
|
||||
self.using_encoded(blake2_256)
|
||||
}
|
||||
fn twox_128(&self) -> [u8; 16] {
|
||||
twox_128(&self.encode())
|
||||
self.using_encoded(twox_128)
|
||||
}
|
||||
fn twox_256(&self) -> [u8; 32] {
|
||||
twox_256(&self.encode())
|
||||
self.using_encoded(twox_256)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user