I want to create a HashMap
storage item in ink!.
#[ink(storage)]
pub struct item {
shipment: ink_storage::collections::HashMap<
(AccountId, AccountId),
ink_storage::collections::Vec<u128>,
>,
}
And initialize it:
#[ink(constructor)]
pub fn new() -> Self {
Self {
shipment: ink_storage::collections::HashMap::new(),
}
}
I encountered this error message
the trait
PackedLayout
is not implemented for `ink_storage::Vec