Closed Jovonni closed 5 years ago
I believe runtime_primitives
is imported as primitives
:
https://github.com/paritytech/substrate/blob/master/node-template/runtime/Cargo.toml#L16
And parity_codec
is imported as codec
:
https://github.com/paritytech/substrate/blob/master/node-template/runtime/Cargo.toml#L11
The secondary error may go away once you correctly import the things, so I would check first if you still have the other errors after this fix.
In terms of updating the code for 2.0. We are planning on doing a complete re-write of the whole tutorial for 2.0, since we can do it better the second time around :)
That being said, there are probably other samples across the substrate-developer-hub
team that you can update to use 2.0
The As
stuff has also been removed, see: https://stackoverflow.com/questions/56081117/how-do-you-convert-between-substrate-specific-types-and-rust-primitive-types
I am using v2.0 (current repo), and I am building through the collectable workshop code on: https://substrate.dev/substrate-collectables-workshop/#/1/storing-a-structure
The imports used
the error:
and
I am assuming the name of the libraries has changed, or maybe the location of submodules has changed. I can get the workshop working with "substrate-package", but it isn't too far from working with the updated repo.
Also, I make a struct:
and, inside my decl_storage! macro, I use:
the following error occurs
Inside my decl_module, I create a Struct:
and I can also pass in a Hash, and Balance:
and declare the same Struct like:
The above is not working, any suggestions regarding these errors?
I'd love to help update the workshop code for the newer versions
BTW this is using substrate 2.0 Do you know of the correct module/library import syntax?... this is strange