I'm developing a Substrate-based
blockchain and using StorageDoubleMap
to store label details. The StorageDoubleMap is defined as follows:
#[pallet::storage]
#[pallet::unbounded]
#[pallet::getter(fn labels)]
pub(super) type Labels<T: Config> = StorageDoubleMap<
_,
Twox64Concat,
HashId<T>,
Twox64Concat,
AccountOf<T>,
LabelsDetail<T>,
OptionQuery,
>;
I need to retrieve LabelsDetail using just the label_id (of type HashId<T>)
, without knowing the AccountOf<T>
.
What are the best practices for this scenario? Is it possible to find the LabelsDetail
using only label_id
, or do I need to change my storage structure or use additional indexing?