I am trying to create structure for ink smart contract but it fails on build giving error
Error msg
-the trait parity_scale_codec::WrapperTypeEncode
is not implemented for ink_storage::Mapping<u32, [u8; 32]
-required because of the requirements on the impl of parity_scale_codec::Encode
for ink_storage::Mapping<u32, [u8; 32]>
Struct details
#[derive(Default, Encode, Decode, Debug, SpreadLayout, SpreadAllocate)]
#[cfg_attr(feature = "std", derive(StorageLayout))]
pub struct Sample {
pub roots: Mapping<u32, [u8; 32]>
}
Do I need to implement parity_scale_codec::Encode
? Any advice or help here is much appreciated.
Thank you!!