pub trait StorageDoubleMapKeyProvider {
    type Hasher1: StorageHasher;
    type Key1: FullCodec;
    type Hasher2: StorageHasher;
    type Key2: FullCodec;
    type Value: FullCodec;

    const MAP_NAME: &'static str;

    // Provided method
    fn final_key(
        pallet_prefix: &str,
        key1: &Self::Key1,
        key2: &Self::Key2
    ) -> StorageKey { ... }
}
Expand description

Can be use to access the runtime storage key of a StorageDoubleMap.

Required Associated Types§

source

type Hasher1: StorageHasher

The same as StorageDoubleMap::Hasher1.

source

type Key1: FullCodec

The same as StorageDoubleMap::Key1.

source

type Hasher2: StorageHasher

The same as StorageDoubleMap::Hasher2.

source

type Key2: FullCodec

The same as StorageDoubleMap::Key2.

source

type Value: FullCodec

The same as StorageDoubleMap::Value.

Required Associated Constants§

source

const MAP_NAME: &'static str

The name of the variable that holds the StorageDoubleMap.

Provided Methods§

source

fn final_key( pallet_prefix: &str, key1: &Self::Key1, key2: &Self::Key2 ) -> StorageKey

This is a copy of the frame_support::storage::generator::StorageDoubleMap::storage_double_map_final_key.

We’re using it because to call storage_double_map_final_key directly, we need access to the runtime and pallet instance, which (sometimes) is impossible.

Object Safety§

This trait is not object safe.

Implementors§