Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
polkadot-sdk
Commits
e7e20182
Commit
e7e20182
authored
2 years ago
by
Shawn Tabrizi
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
nit improvements to pallet template (#11968)
parent
df074219
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
substrate/bin/node-template/pallets/template/src/lib.rs
+4
-4
4 additions, 4 deletions
substrate/bin/node-template/pallets/template/src/lib.rs
substrate/bin/node-template/pallets/template/src/mock.rs
+2
-2
2 additions, 2 deletions
substrate/bin/node-template/pallets/template/src/mock.rs
with
6 additions
and
6 deletions
substrate/bin/node-template/pallets/template/src/lib.rs
+
4
−
4
View file @
e7e20182
...
...
@@ -19,6 +19,10 @@ pub mod pallet {
use
frame_support
::
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.
#[pallet::config]
pub
trait
Config
:
frame_system
::
Config
{
...
...
@@ -26,10 +30,6 @@ pub mod pallet {
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.
// https://docs.substrate.io/main-docs/build/runtime-storage/
#[pallet::storage]
...
...
This diff is collapsed.
Click to expand it.
substrate/bin/node-template/pallets/template/src/mock.rs
+
2
−
2
View file @
e7e20182
...
...
@@ -17,8 +17,8 @@ frame_support::construct_runtime!(
NodeBlock
=
Block
,
UncheckedExtrinsic
=
UncheckedExtrinsic
,
{
System
:
frame_system
::{
Pallet
,
Call
,
Config
,
Storage
,
Event
<
T
>
}
,
TemplateModule
:
pallet_template
::{
Pallet
,
Call
,
Storage
,
Event
<
T
>
}
,
System
:
frame_system
,
TemplateModule
:
pallet_template
,
}
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment