5

I was digging into substrate's storage_info macro
https://docs.substrate.io/v3/runtime/macros/#palletgenerate_storage_info.

To get hands dirty checked code from
https://github.com/yourarj/substrate-node-template/blob/3d4e7f18e0e1141975e7bb74a6ea64c9eef0dabe/pallets/kittens/src/lib.rs#L13
which is fork of official substrate-node-template

But not able to compile with the specified macro

my code looks something like

enter image description here

   Compiling pallet-kittens v4.0.0-dev (/home/awesome/workspaces/subsstrate/yourarj/substrate-node-template/pallets/kittens)
error: expected one of: `generate_store`, `without_storage_info`, `storage_version`
  --> pallets/kittens/src/lib.rs:14:12
   |
14 |     #[pallet::generate_storage_info]
   |               ^^^^^^^^^^^^^^^^^^^^^

1 Answer 1

5

generate_storage_info is now the default. So, you don't need to specify it anymore. For your error here it means, just remove this attribute.

For reference, it means that if you are just developing a pallet and don't need the storage_info for now. You can use without_storage_info and then it will not be required.

2
  • 1
    Shouldn't the documentation be updated to reflect that?
    – Georges
    Mar 28, 2022 at 20:12
  • 1
    There is already an open pr.
    – bkchr
    Mar 28, 2022 at 20:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.