Expand description
§Default Config Pallet Example
A simple example of a FRAME pallet that utilizes frame_support::derive_impl
to demonstrate
the simpler way to implement Config
trait of pallets. This example only showcases this in a
mock.rs
environment, but the same applies to a real runtime as well.
See the source code of tests
for a real examples.
Study the following types:
pallet::DefaultConfig
, and how it differs frompallet::Config
.pallet::config_preludes::TestDefaultConfig
and how it implementspallet::DefaultConfig
.- Notice how
pallet::DefaultConfig
is independent offrame_system::Config
.
Modules§
- The
pallet
module in each FRAME pallet hosts the most important items needed to construct this pallet.