2

use frame_support::pallet_prelude::; use frame_system::pallet_prelude::; use scale_info::{prelude::vec}; use frame_support::inherent::Vec;

#[pallet::pallet]
#[pallet::generate_store(pub(super) trait Store)]
#[pallet::without_storage_info]
pub struct Pallet<T>(_);




/// Configure the pallet by specifying the parameters and types on which it depends.
#[pallet::config]
pub trait Config: frame_system::Config {
    /// Because this pallet emits events, it depends on the runtime's definition of an event.
    type RuntimeEvent: From<Event<Self>> + IsType<<Self as frame_system::Config>::RuntimeEvent>;
}

#[pallet::storage]
#[pallet::getter(fn user)]
pub type User<T:Config> = StorageValue<_, T::AccountId, ValueQuery>;

If I want to add this line then i get the error: pub type User<T:Config> = StorageValue<_, T::AccountId, ValueQuery>; enter image description here

But I'm successfully able to add this: pub type User<T:Config> = StorageValue<_, Vec<T::AccountId>, ValueQuery>;

How to solve the above error ?

1

0

Browse other questions tagged or ask your own question.