-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Migrate pallet-nicks to pallet attribute macro. #8723
Conversation
| } | ||
| /// The minimum length a name may be. | ||
| #[pallet::constant] | ||
| type MinLength: Get<u32>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it should be fine to change it to Get<u32> here? The type in metadata is Get<u32>. Cannot find a better way to keep metadata type as Get<u32> type without changing the type in Config. #[pallet::extra_constant] seems for this scenario but the constant name will change, as functions in it should be named as snake case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes it is better now to me too
| } | ||
| /// The minimum length a name may be. | ||
| #[pallet::constant] | ||
| type MinLength: Get<u32>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes it is better now to me too
|
bot merge |
|
Trying merge. |
* Migrate pallet-nicks to pallet attribute macro. * Fix constants.
Part of #7882.
Converts the
Nickspallet to the new pallet attribute macro introduced in #6877.Following the upgrade guidelines here: https://crates.parity.io/frame_support/attr.pallet.html#upgrade-guidelines.
From https://crates.parity.io/frame_support/attr.pallet.html#checking-upgrade-guidelines
So users of the
Nickspallet must be careful about the name they used inconstruct_runtime!. Hence theruntime-migrationlabel, which might not be needed depending on the configuration of theNickspallet.