1

Actually I want to define a storage without config trait but if I'm doing this then I'm getting lot of error. Is it possible?

/// Author of current block.
    #[pallet::storage]
    pub type Author<T: Config> = StorageMap<_, Blake2_128Concat, u64, T::AccountId, OptionQuery>;

Need to define like this:

/// Author of current block.
    #[pallet::storage]
    pub type Author = StorageMap<_, Blake2_128Concat, u64, AccountId, OptionQuery>;

1 Answer 1

1

The config trait is used for the implementation of multiple traits during the macro expansion. Hence, this is not possible.

Why do you want to omit it anyways?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.