Skip to content
Snippets Groups Projects
Commit e7e20182 authored by Shawn Tabrizi's avatar Shawn Tabrizi Committed by GitHub
Browse files

nit improvements to pallet template (#11968)

parent df074219
No related merge requests found
...@@ -19,6 +19,10 @@ pub mod pallet { ...@@ -19,6 +19,10 @@ pub mod pallet {
use frame_support::pallet_prelude::*; use frame_support::pallet_prelude::*;
use frame_system::pallet_prelude::*; use frame_system::pallet_prelude::*;
#[pallet::pallet]
#[pallet::generate_store(pub(super) trait Store)]
pub struct Pallet<T>(_);
/// Configure the pallet by specifying the parameters and types on which it depends. /// Configure the pallet by specifying the parameters and types on which it depends.
#[pallet::config] #[pallet::config]
pub trait Config: frame_system::Config { pub trait Config: frame_system::Config {
...@@ -26,10 +30,6 @@ pub mod pallet { ...@@ -26,10 +30,6 @@ pub mod pallet {
type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>; type Event: From<Event<Self>> + IsType<<Self as frame_system::Config>::Event>;
} }
#[pallet::pallet]
#[pallet::generate_store(pub(super) trait Store)]
pub struct Pallet<T>(_);
// The pallet's runtime storage items. // The pallet's runtime storage items.
// https://docs.substrate.io/main-docs/build/runtime-storage/ // https://docs.substrate.io/main-docs/build/runtime-storage/
#[pallet::storage] #[pallet::storage]
......
...@@ -17,8 +17,8 @@ frame_support::construct_runtime!( ...@@ -17,8 +17,8 @@ frame_support::construct_runtime!(
NodeBlock = Block, NodeBlock = Block,
UncheckedExtrinsic = UncheckedExtrinsic, UncheckedExtrinsic = UncheckedExtrinsic,
{ {
System: frame_system::{Pallet, Call, Config, Storage, Event<T>}, System: frame_system,
TemplateModule: pallet_template::{Pallet, Call, Storage, Event<T>}, TemplateModule: pallet_template,
} }
); );
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment