JoshOrndorff / recipes

A Hands-On Cookbook for Aspiring Blockchain Chefs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Charity pallet information missing

herou opened this issue · comments

commented

I copied and pasted the pallets/charity into another node in order to use it and I was having this issue:

elioprifti@Elios-MacBook-Air substrate-node-template % cargo run -- --dev --tmp
warning: /Users/elioprifti/substrate-node-template/Cargo.toml: unused manifest key: workspace.librocksdb-sys
   Compiling node-template v3.0.0 (/Users/elioprifti/substrate-node-template/node)
error[E0063]: missing field `charity` in initializer of `GenesisConfig`
   --> node/src/chain_spec.rs:136:2
    |
136 |     GenesisConfig {
    |     ^^^^^^^^^^^^^ missing `charity`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0063`.
error: could not compile `node-template`

To learn more, run the command again with --verbose.
elioprifti@Elios-MacBook-Air substrate-node-template % 

I had to add this charity: Some(Default::default()), line of code inside GenesisConfig brackets to make charity pallet working.
I think we should include information in recipes documentation that some pallets need to be initialized from Genesis.

Reply to this issue with some hints and let me create a PR for this missing information.

Thank you!
@JoshOrndorff

My recommendation is to add a new recipe specifically about the genesis config. Then if you think it is a good idea, you can add a sentence like this to charity and any other recipes that need it.

This pallet uses a [genesis config]. If you are installing this in a new chain, you will need to configure its genesis. Learn more about that in the recipe on [genesis configs]

Or something similar.