-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Migrate pallet-transaction-payment
to new pallet attribute macro
#9087
Migrate pallet-transaction-payment
to new pallet attribute macro
#9087
Conversation
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
pallet-transaciont-payment
to new pallet attribute macropallet-transaction-payment
to new pallet attribute macro
|
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.
polkadot and kusama use TransactionPayment
for pallet name, so no need for migration there.
frame/transaction-payment/src/lib.rs
Outdated
pub(super) type StorageVersion<T: Config> = StorageValue<_, Releases, ValueQuery>; | ||
|
||
#[pallet::genesis_config] | ||
pub struct GenesisConfig<T> { |
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 removed the generic here as it is not needed
(but also I think we should remove the GenesisConfig completly and remove the Releases
storage. If people wonder about which version their pallet is, then they should look at the pallet version stored.
Note that substrate node sand polkadot/kusama nodes don't run this genesis config (it is not configured in construct_runtime).
But we can do in a follow-up PR)
some tests needs fix. EDIT: I think it is about having proper mock environment in some tests. |
…ansaction-payment
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.
Mostly syntax changes; if it compiles, it works.
bot merge |
Trying merge. |
…9087) * Migrate pallet-transaciont-payment to new pallet attribute macro Signed-off-by: koushiro <koushiro.cqx@gmail.com> * remove generic from genesis config * fix test * fix tests * fix deprecated * fix tests Signed-off-by: koushiro <koushiro.cqx@gmail.com> Co-authored-by: thiolliere <gui.thiolliere@gmail.com> Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
Part of #7882
Migrate the
pallet-transaction-payment
to the new pallet attribute macro.From https://crates.parity.io/frame_support/attr.pallet.html#checking-upgrade-guidelines
So users of the pallet must be careful about the name they used in
construct_runtime!
. Hence theruntime-migration
label, which might not be needed depending on the configuration of the pallet.cc @shawntabrizi @thiolliere
polkadot
andkusama
useTransactionPayment
as pallet name, thus no need for migrationpolkadot companion: paritytech/polkadot#3267