I would like to map T::AccountId to a custom struct I have Amendments <AccountId:
#[pallet::storage]
#[pallet::getter(fn declaration_map)]
pub(super) type Declarations<T: Config> = StorageMap
<
_,
Blake2_128Concat,
T::AccountId,
Amendment<T::AccountId>,
ValueQuery
>;
However when I try to use T::AccountId in this context I get this error:
error[E0277]: the trait bound `<T as frame_system::Config>::AccountId: std::default::Default` is not satisfied
--> pallets/template/src/lib.rs:243:12
|
243 | #[pallet::storage]
| ^^^^^^^ the trait `std::default::Default` is not implemented for `<T as frame_system::Config>::AccountId`
It makes sense that T::AccountId doesn't have a default since it wouldn't make sense for it to have one. However I understand that a map in this context probably can't take a AccountId without having a default value for it. Is there a way for me to get around this so I can still map the AccountIds?