Questions tagged [kitties-tutorial]

Posts pertaining to the Kitties tutorial.

Filter by
Sorted by
Tagged with
3 votes
1 answer
42 views

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: // ...
user avatar
2 votes
1 answer
37 views

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 ...
user avatar
2 votes
1 answer
32 views

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 ...
user avatar
  • 1,597
7 votes
1 answer
97 views

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/lib.rs:42:15 | 42 | #[pallet::...
user avatar
  • 9,195