ðŸ“Ąframe_system

The system crate that defines the core types for runtimes.

frame_system

You'll see this everywhere and wonder why. WHY!? WHAT IS THIS!? The same is true for frame_support but over time they start making sense.

frame_system is the System crate that defines the core types for runtime such as Account ID, Header, Version, Hash, Origin, etc., as well as core storage items such as Block Hash, Block Number, Events, etc.

Luckily, substrate_ makes it easy by including the pallet_prelude in both crates. Use this with the wildcard * and move on. You'll come back to it and it'll make more sense.

#[frame_support::pallet]
pub mod pallet {
    use frame_support::pallet_prelude::*;
    use frame_system::pallet_prelude::*;
    // other pallet dependencies...

frame_support

Last updated