I want to store String value, some topics are using Vec, but I encounted this error: error[E0599]: no function or associated item named 'max_encoded_len' found for struct 'Vec<u8>' in the current scope
My code:
#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]
#[scale_info(skip_type_params(T))]
#[codec(mel_bound())]
pub struct BizAmount<T: Config> {
pub amount: u32,
pub price: Option<BalanceOf<T>>,
pub organization: Organization,
pub owner: AccountOf<T>,
}
#[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)]
#[cfg_attr(feature = "std", derive(Serialize, Deserialize))]
pub struct Organization {
pub name: Vec<u8>,
pub code: Vec<u8>,
}
#[pallet::pallet]
#[pallet::generate_store(pub(super) trait Store)]
pub struct Pallet<T>(_);
I searched on google and not found any stuffs. Thank for your help!