Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Blockchain by (12.7k points)

Substrate uses a lot of macros to make it easier to write runtime modules:

construct_runtime!

decl_module!

decl_storage!

decl_event!

etc...

However, it is hard to understand what these macros actually do and what the final code looks like. How can I dig deeper into these macros and expansions?

1 Answer

0 votes
by (29.5k points)

Hi, try doing the following

cargo install cargo-expand

then just call it from your crate

cargo expand

Browse Categories

...