Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Migrate pallet-template to pallet attribute macro #7981

Merged
merged 5 commits into from Jan 26, 2021

Conversation

g2udevelopment
Copy link
Contributor

Part of #7882.

Migrates the Template pallet in node-template to the new attribute macro's. Tried to keep the documentation as is.

Because it is a template ea example pallet I don't think there are storage changes to think of. If needed I can help with modifying the tutorials if needed and when this is pushed to substrate-developers-hub.

@thiolliere

#[pallet::storage]
#[pallet::getter(fn something)]
// Learn more about declaring storage items:
// https://substrate.dev/docs/en/knowledgebase/runtime/storage#declaring-storage-items
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are mixing here spaces and tabs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed the indentations.

@thiolliere thiolliere added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. labels Jan 26, 2021
Copy link
Contributor

@thiolliere thiolliere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, looks good to me, would be greate to also make use of construct_runtime in the tests instead of impl_out_* but we can do in another PR

bin/node-template/pallets/template/src/lib.rs Outdated Show resolved Hide resolved
bin/node-template/pallets/template/src/lib.rs Outdated Show resolved Hide resolved
@g2udevelopment
Copy link
Contributor Author

thanks, looks good to me, would be greate to also make use of construct_runtime in the tests instead of impl_out_* but we can do in another PR

Thanks, I will convert the tests as well in a separate PR.

@bkchr bkchr merged commit 4888ac6 into paritytech:master Jan 26, 2021
@g2udevelopment g2udevelopment deleted the gw-pallet-template-framev2 branch January 26, 2021 16:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants