Questions tagged [kitties-tutorial]
Posts pertaining to the Kitties tutorial.
6
questions
1
vote
1
answer
58
views
I am trying Substrate Kitties Workshop
I am trying substrate kitties Workshop. After setting environment and paste the bare-bone code of kitties pallet , when I run cargo build --release the following error occur after 2-3 minutes when ...
2
votes
3
answers
412
views
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]: ...
4
votes
1
answer
57
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:
// ...
4
votes
1
answer
109
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 ...
4
votes
1
answer
134
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 ...
12
votes
2
answers
572
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::...