Questions tagged [kitties-tutorial]

Posts pertaining to the Kitties tutorial.

Filter by
Sorted by
Tagged with
2 votes
2 answers

the trait bound `Kitty<T>: TypeInfo` is not satisfied

I was following the substrate kitties tutorial where i needed to create a storage map where the id is mapped to the kitty struct which is created. But i am getting the following error. error[E0277]: ...
0 votes
0 answers

Kitties tutorial - StorageValue error

I'm following the kitties tutorial p1 and I have some problems in the section "Add storage items". I replaced the ACTION line with this in pallet/kitties/src/ #[pallet::storage] #[...
  • 63
3 votes
1 answer

TypeError: api.query.substrateKitties.countForKitties is not a function

I'm following the Substrate Kitties tutorial, and I've run into some problems getting the front end working. The backend node seems to be working just fine, but this code snippet for the front end: // ...
3 votes
1 answer

What is the benefit of using Serde::Serialize/Deserialize on defined types?

As an example, in the Kitties tutorial : #[derive(Clone, Encode, Decode, PartialEq, RuntimeDebug, TypeInfo, MaxEncodedLen)] #[cfg_attr(feature = "std", derive(Serialize, Deserialize))] pub ...
3 votes
1 answer

How can I configure genesis state for my pallet's tests without hardcoding it?

I've been writing tests for pallet-kitties and have configured the genesis state inside my mock runtime by setting the storage items for two kitties (one Male and one Female) and their owners (with ...
  • 1,932
10 votes
1 answer

How to fix `parity_scale_codec::MaxEncodedLen` is not implemented for `T`?

When building my pallet, I run into the error: error[E0277]: the trait bound `T: parity_scale_codec::MaxEncodedLen` is not satisfied --> pallets/template/src/ | 42 | #[pallet::...
  • 12.3k