Migrate pallet-transaction-payment to new pallet attribute macro#9087
Migrate pallet-transaction-payment to new pallet attribute macro#90879 commits merged intoparitytech:masterfrom koushiro:migrate-pallet-transaction-payment
pallet-transaction-payment to new pallet attribute macro#9087Conversation
Signed-off-by: koushiro <koushiro.cqx@gmail.com>
pallet-transaciont-payment to new pallet attribute macropallet-transaction-payment to new pallet attribute macro
|
gui1117
left a comment
There was a problem hiding this comment.
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.
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
KiChjang
left a comment
There was a problem hiding this comment.
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-paymentto 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-migrationlabel, which might not be needed depending on the configuration of the pallet.cc @shawntabrizi @thiolliere
polkadotandkusamauseTransactionPaymentas pallet name, thus no need for migrationpolkadot companion: paritytech/polkadot#3267