diff --git a/pallets/collator-selection/src/lib.rs b/pallets/collator-selection/src/lib.rs index 05f9db98c13..3dba6846cc3 100644 --- a/pallets/collator-selection/src/lib.rs +++ b/pallets/collator-selection/src/lib.rs @@ -165,7 +165,6 @@ pub mod pallet { } #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] pub struct Pallet(_); /// The invulnerable, fixed collators. diff --git a/pallets/dmp-queue/src/lib.rs b/pallets/dmp-queue/src/lib.rs index cc4fd4e5719..6512bb94811 100644 --- a/pallets/dmp-queue/src/lib.rs +++ b/pallets/dmp-queue/src/lib.rs @@ -90,7 +90,6 @@ pub mod pallet { use frame_system::pallet_prelude::*; #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] #[pallet::storage_version(migration::STORAGE_VERSION)] #[pallet::without_storage_info] pub struct Pallet(_); diff --git a/pallets/dmp-queue/src/migration.rs b/pallets/dmp-queue/src/migration.rs index 82c1e8b6eb1..b360f5a7bd4 100644 --- a/pallets/dmp-queue/src/migration.rs +++ b/pallets/dmp-queue/src/migration.rs @@ -16,7 +16,7 @@ //! A module that is responsible for migration of storage. -use crate::{Config, Pallet, Store, DEFAULT_POV_SIZE}; +use crate::{Config, Configuration, Overweight, Pallet, DEFAULT_POV_SIZE}; use frame_support::{ pallet_prelude::*, traits::StorageVersion, @@ -74,7 +74,7 @@ pub fn migrate_to_v1() -> Weight { } }; - if let Err(_) = as Store>::Configuration::translate(|pre| pre.map(translate)) { + if let Err(_) = Configuration::::translate(|pre| pre.map(translate)) { log::error!( target: "dmp_queue", "unexpected error when performing translation of the QueueConfig type during storage upgrade to v2" @@ -89,7 +89,7 @@ pub fn migrate_to_v1() -> Weight { /// NOTE: Only use this function if you know what you're doing. Default to using /// `migrate_to_latest`. pub fn migrate_to_v2() -> Weight { - let overweight_messages = as Store>::Overweight::initialize_counter() as u64; + let overweight_messages = Overweight::::initialize_counter() as u64; T::DbWeight::get().reads_writes(overweight_messages, 1) } diff --git a/pallets/parachain-system/src/lib.rs b/pallets/parachain-system/src/lib.rs index 587d9051eaf..97c6cfe368d 100644 --- a/pallets/parachain-system/src/lib.rs +++ b/pallets/parachain-system/src/lib.rs @@ -158,7 +158,6 @@ pub mod pallet { #[pallet::pallet] #[pallet::storage_version(migration::STORAGE_VERSION)] - #[pallet::generate_store(pub(super) trait Store)] #[pallet::without_storage_info] pub struct Pallet(_); diff --git a/pallets/parachain-system/src/migration.rs b/pallets/parachain-system/src/migration.rs index 514675b89ac..e3d1e11a51b 100644 --- a/pallets/parachain-system/src/migration.rs +++ b/pallets/parachain-system/src/migration.rs @@ -14,7 +14,7 @@ // You should have received a copy of the GNU General Public License // along with Cumulus. If not, see . -use crate::{Config, Pallet, Store}; +use crate::{Config, Pallet, ReservedDmpWeightOverride, ReservedXcmpWeightOverride}; use frame_support::{ traits::{Get, StorageVersion}, weights::Weight, @@ -52,18 +52,14 @@ mod v2 { pub fn migrate() -> Weight { let translate = |pre: u64| -> Weight { Weight::from_parts(pre, DEFAULT_POV_SIZE) }; - if as Store>::ReservedXcmpWeightOverride::translate(|pre| pre.map(translate)) - .is_err() - { + if ReservedXcmpWeightOverride::::translate(|pre| pre.map(translate)).is_err() { log::error!( target: "parachain_system", "unexpected error when performing translation of the ReservedXcmpWeightOverride type during storage upgrade to v2" ); } - if as Store>::ReservedDmpWeightOverride::translate(|pre| pre.map(translate)) - .is_err() - { + if ReservedDmpWeightOverride::::translate(|pre| pre.map(translate)).is_err() { log::error!( target: "parachain_system", "unexpected error when performing translation of the ReservedDmpWeightOverride type during storage upgrade to v2" diff --git a/pallets/solo-to-para/src/lib.rs b/pallets/solo-to-para/src/lib.rs index 56b4ef4b4dc..515dd385e7b 100644 --- a/pallets/solo-to-para/src/lib.rs +++ b/pallets/solo-to-para/src/lib.rs @@ -35,7 +35,6 @@ pub mod pallet { } #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] #[pallet::without_storage_info] pub struct Pallet(_); diff --git a/pallets/xcm/src/lib.rs b/pallets/xcm/src/lib.rs index 1bcfcdcce73..f230ced5dc5 100644 --- a/pallets/xcm/src/lib.rs +++ b/pallets/xcm/src/lib.rs @@ -41,7 +41,6 @@ pub mod pallet { use frame_system::pallet_prelude::*; #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] pub struct Pallet(_); /// The module configuration trait. diff --git a/pallets/xcmp-queue/src/lib.rs b/pallets/xcmp-queue/src/lib.rs index 5a74544d5f2..df2b78ebc20 100644 --- a/pallets/xcmp-queue/src/lib.rs +++ b/pallets/xcmp-queue/src/lib.rs @@ -79,7 +79,6 @@ pub mod pallet { use frame_system::pallet_prelude::*; #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] #[pallet::storage_version(migration::STORAGE_VERSION)] #[pallet::without_storage_info] pub struct Pallet(_); @@ -763,13 +762,13 @@ impl Pallet { sent_at: RelayBlockNumber, xcm: Vec, ) -> OverweightIndex { - let index = ::OverweightCount::mutate(|count| { + let index = OverweightCount::::mutate(|count| { let index = *count; *count += 1; index }); - ::Overweight::insert(index, (sender, sent_at, xcm)); + Overweight::::insert(index, (sender, sent_at, xcm)); index } diff --git a/pallets/xcmp-queue/src/migration.rs b/pallets/xcmp-queue/src/migration.rs index 2dc3a8c3e23..f6ece1da1a8 100644 --- a/pallets/xcmp-queue/src/migration.rs +++ b/pallets/xcmp-queue/src/migration.rs @@ -16,7 +16,7 @@ //! A module that is responsible for migration of storage. -use crate::{Config, Pallet, Store, DEFAULT_POV_SIZE}; +use crate::{Config, Overweight, Pallet, QueueConfig, DEFAULT_POV_SIZE}; use frame_support::{ pallet_prelude::*, traits::StorageVersion, @@ -94,7 +94,7 @@ pub fn migrate_to_v2() -> Weight { } }; - if let Err(_) = as Store>::QueueConfig::translate(|pre| pre.map(translate)) { + if let Err(_) = QueueConfig::::translate(|pre| pre.map(translate)) { log::error!( target: super::LOG_TARGET, "unexpected error when performing translation of the QueueConfig type during storage upgrade to v2" @@ -105,7 +105,7 @@ pub fn migrate_to_v2() -> Weight { } pub fn migrate_to_v3() -> Weight { - let overweight_messages = as Store>::Overweight::initialize_counter() as u64; + let overweight_messages = Overweight::::initialize_counter() as u64; T::DbWeight::get().reads_writes(overweight_messages, 1) } diff --git a/parachain-template/pallets/template/src/lib.rs b/parachain-template/pallets/template/src/lib.rs index 11ef8d4e96b..5f3252bfc3a 100644 --- a/parachain-template/pallets/template/src/lib.rs +++ b/parachain-template/pallets/template/src/lib.rs @@ -27,7 +27,6 @@ pub mod pallet { } #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] pub struct Pallet(_); // The pallet's runtime storage items. diff --git a/parachains/pallets/parachain-info/src/lib.rs b/parachains/pallets/parachain-info/src/lib.rs index 9cb20c9f1e6..d61387aaeb6 100644 --- a/parachains/pallets/parachain-info/src/lib.rs +++ b/parachains/pallets/parachain-info/src/lib.rs @@ -27,7 +27,6 @@ pub mod pallet { use frame_system::pallet_prelude::*; #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] pub struct Pallet(_); #[pallet::config] diff --git a/parachains/pallets/ping/src/lib.rs b/parachains/pallets/ping/src/lib.rs index 2c9e5a40aff..956457f5916 100644 --- a/parachains/pallets/ping/src/lib.rs +++ b/parachains/pallets/ping/src/lib.rs @@ -40,7 +40,6 @@ pub mod pallet { use frame_system::pallet_prelude::*; #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] pub struct Pallet(_); /// The module configuration trait. diff --git a/test/runtime/src/test_pallet.rs b/test/runtime/src/test_pallet.rs index 59b82bd256e..bc72ef19505 100644 --- a/test/runtime/src/test_pallet.rs +++ b/test/runtime/src/test_pallet.rs @@ -23,7 +23,6 @@ pub mod pallet { use frame_system::pallet_prelude::*; #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] pub struct Pallet(_); #[pallet::config]