This will be set to whatever string the user uses when configuring their runtime. i.e. :
construct_runtime!(
pub enum Runtime where
Block = Block,
NodeBlock = opaque::Block,
UncheckedExtrinsic = UncheckedExtrinsic
{
System: system::{Module, Call, Config, Storage, Event<T>},
RandomnessCollectiveFlip: randomness_collective_flip::{Module, Call, Storage},
Timestamp: timestamp::{Module, Call, Storage, Inherent},
Aura: aura::{Module, Config<T>, Inherent(Timestamp)},
Grandpa: grandpa::{Module, Call, Storage, Config, Event},
Balances: balances::{Module, Call, Storage, Config<T>, Event<T>},
TransactionPayment: transaction_payment::{Module, Storage},
Sudo: sudo::{Module, Call, Config<T>, Storage, Event<T>},
// Used for the module template in `./template.rs`
TemplateModule: template::{Module, Call, Storage, Event<T>},
}
);
const MODULE_ID: LockIdentifier = *b"py/elect";
It is likely we will not be able to get this done in time for merging: #5010
However, long term, we should have the
construct_runtime!macro generate aModuleToStringtype in each module's configuration trait.This will be set to whatever string the user uses when configuring their runtime. i.e. :
Would generate a
ModuleToStringof"TemplateModule".This value should then automatically get used by the
decl_storagemacro.Additionally, we could use this value for populating unique
MODULE_IDs. For example: