Moves all test runtimes to use derive_impl (#2409)

Step in https://github.com/paritytech/polkadot-sdk/issues/171

This PR adds `derive_impl` on all `frame_system` config impls for mock
runtimes. The overridden configs are maintained as of now to ensure
minimal changes.

---------

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
gupnik
2023-11-28 18:43:57 +05:30
committed by GitHub
parent 6a417eb9c2
commit cd8741c8b5
130 changed files with 433 additions and 261 deletions
+2 -1
View File
@@ -19,7 +19,7 @@ use core::marker::PhantomData;
use cumulus_pallet_parachain_system::AnyRelayNumber; use cumulus_pallet_parachain_system::AnyRelayNumber;
use cumulus_primitives_core::{ChannelInfo, IsSystem, ParaId}; use cumulus_primitives_core::{ChannelInfo, IsSystem, ParaId};
use frame_support::{ use frame_support::{
parameter_types, derive_impl, parameter_types,
traits::{ConstU32, Everything, Nothing, OriginTrait}, traits::{ConstU32, Everything, Nothing, OriginTrait},
BoundedSlice, BoundedSlice,
}; };
@@ -55,6 +55,7 @@ parameter_types! {
type AccountId = u64; type AccountId = u64;
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = Everything; type BaseCallFilter = Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -122,7 +122,7 @@ impl<T: Get<MultiLocation>> ContainsPair<MultiAsset, MultiLocation> for AssetsFr
mod tests { mod tests {
use super::*; use super::*;
use frame_support::{ use frame_support::{
parameter_types, derive_impl, parameter_types,
traits::{ConstU32, FindAuthor, ValidatorRegistration}, traits::{ConstU32, FindAuthor, ValidatorRegistration},
PalletId, PalletId,
}; };
@@ -155,6 +155,7 @@ mod tests {
pub const MaxReserves: u32 = 50; pub const MaxReserves: u32 = 50;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type RuntimeOrigin = RuntimeOrigin; type RuntimeOrigin = RuntimeOrigin;
@@ -18,7 +18,7 @@
pub use crate as pallet_collective_content; pub use crate as pallet_collective_content;
use crate::WeightInfo; use crate::WeightInfo;
use frame_support::{ use frame_support::{
ord_parameter_types, parameter_types, derive_impl, ord_parameter_types, parameter_types,
traits::{ConstU32, ConstU64}, traits::{ConstU32, ConstU64},
weights::Weight, weights::Weight,
}; };
@@ -55,6 +55,7 @@ impl pallet_collective_content::Config for Test {
type WeightInfo = CCWeightInfo; type WeightInfo = CCWeightInfo;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = (); type BaseCallFilter = ();
type BlockWeights = (); type BlockWeights = ();
@@ -44,7 +44,7 @@ use sp_version::RuntimeVersion;
// A few exports that help ease life for downstream crates. // A few exports that help ease life for downstream crates.
pub use frame_support::{ pub use frame_support::{
construct_runtime, construct_runtime, derive_impl,
dispatch::DispatchClass, dispatch::DispatchClass,
genesis_builder_helper::{build_config, create_default_config}, genesis_builder_helper::{build_config, create_default_config},
parameter_types, parameter_types,
@@ -134,6 +134,8 @@ parameter_types! {
.build_or_panic(); .build_or_panic();
pub const SS58Prefix: u8 = 42; pub const SS58Prefix: u8 = 42;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
/// The identifier used to distinguish between accounts. /// The identifier used to distinguish between accounts.
type AccountId = AccountId; type AccountId = AccountId;
@@ -52,7 +52,7 @@ use sp_version::RuntimeVersion;
// A few exports that help ease life for downstream crates. // A few exports that help ease life for downstream crates.
pub use frame_support::{ pub use frame_support::{
construct_runtime, construct_runtime, derive_impl,
dispatch::DispatchClass, dispatch::DispatchClass,
genesis_builder_helper::{build_config, create_default_config}, genesis_builder_helper::{build_config, create_default_config},
parameter_types, parameter_types,
@@ -143,6 +143,7 @@ parameter_types! {
pub const SS58Prefix: u8 = 42; pub const SS58Prefix: u8 = 42;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
/// The identifier used to distinguish between accounts. /// The identifier used to distinguish between accounts.
type AccountId = AccountId; type AccountId = AccountId;
@@ -35,7 +35,7 @@ pub mod xcm_config;
use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases;
use cumulus_primitives_core::{AggregateMessageOrigin, ParaId}; use cumulus_primitives_core::{AggregateMessageOrigin, ParaId};
use frame_support::{ use frame_support::{
construct_runtime, construct_runtime, derive_impl,
dispatch::DispatchClass, dispatch::DispatchClass,
genesis_builder_helper::{build_config, create_default_config}, genesis_builder_helper::{build_config, create_default_config},
pallet_prelude::Weight, pallet_prelude::Weight,
@@ -323,6 +323,7 @@ parameter_types! {
// Configure FRAME pallets to include in runtime. // Configure FRAME pallets to include in runtime.
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
/// The identifier used to distinguish between accounts. /// The identifier used to distinguish between accounts.
type AccountId = AccountId; type AccountId = AccountId;
@@ -39,7 +39,7 @@ use sp_version::RuntimeVersion;
// A few exports that help ease life for downstream crates. // A few exports that help ease life for downstream crates.
pub use frame_support::{ pub use frame_support::{
construct_runtime, construct_runtime, derive_impl,
dispatch::DispatchClass, dispatch::DispatchClass,
genesis_builder_helper::{build_config, create_default_config}, genesis_builder_helper::{build_config, create_default_config},
match_types, parameter_types, match_types, parameter_types,
@@ -184,6 +184,7 @@ parameter_types! {
pub const SS58Prefix: u8 = 42; pub const SS58Prefix: u8 = 42;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
/// The identifier used to distinguish between accounts. /// The identifier used to distinguish between accounts.
type AccountId = AccountId; type AccountId = AccountId;
@@ -636,7 +636,7 @@ mod tests {
use crate::{assigned_slots, mock::TestRegistrar, slots}; use crate::{assigned_slots, mock::TestRegistrar, slots};
use ::test_helpers::{dummy_head_data, dummy_validation_code}; use ::test_helpers::{dummy_head_data, dummy_validation_code};
use frame_support::{assert_noop, assert_ok, parameter_types}; use frame_support::{assert_noop, assert_ok, derive_impl, parameter_types};
use frame_system::EnsureRoot; use frame_system::EnsureRoot;
use pallet_balances; use pallet_balances;
use primitives::BlockNumber; use primitives::BlockNumber;
@@ -679,6 +679,8 @@ mod tests {
parameter_types! { parameter_types! {
pub const BlockHashCount: u32 = 250; pub const BlockHashCount: u32 = 250;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+4 -1
View File
@@ -677,7 +677,8 @@ mod tests {
use crate::{auctions, mock::TestRegistrar}; use crate::{auctions, mock::TestRegistrar};
use ::test_helpers::{dummy_hash, dummy_head_data, dummy_validation_code}; use ::test_helpers::{dummy_hash, dummy_head_data, dummy_validation_code};
use frame_support::{ use frame_support::{
assert_noop, assert_ok, assert_storage_noop, ord_parameter_types, parameter_types, assert_noop, assert_ok, assert_storage_noop, derive_impl, ord_parameter_types,
parameter_types,
traits::{ConstU32, EitherOfDiverse, OnFinalize, OnInitialize}, traits::{ConstU32, EitherOfDiverse, OnFinalize, OnInitialize},
}; };
use frame_system::{EnsureRoot, EnsureSignedBy}; use frame_system::{EnsureRoot, EnsureSignedBy};
@@ -705,6 +706,8 @@ mod tests {
parameter_types! { parameter_types! {
pub const BlockHashCount: u32 = 250; pub const BlockHashCount: u32 = 250;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+3 -1
View File
@@ -710,7 +710,7 @@ mod tests {
use crate::claims; use crate::claims;
use claims::Call as ClaimsCall; use claims::Call as ClaimsCall;
use frame_support::{ use frame_support::{
assert_err, assert_noop, assert_ok, assert_err, assert_noop, assert_ok, derive_impl,
dispatch::{GetDispatchInfo, Pays}, dispatch::{GetDispatchInfo, Pays},
ord_parameter_types, parameter_types, ord_parameter_types, parameter_types,
traits::{ConstU32, ExistenceRequirement, WithdrawReasons}, traits::{ConstU32, ExistenceRequirement, WithdrawReasons},
@@ -739,6 +739,8 @@ mod tests {
parameter_types! { parameter_types! {
pub const BlockHashCount: u32 = 250; pub const BlockHashCount: u32 = 250;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -863,7 +863,7 @@ mod tests {
use super::*; use super::*;
use frame_support::{ use frame_support::{
assert_noop, assert_ok, parameter_types, assert_noop, assert_ok, derive_impl, parameter_types,
traits::{ConstU32, OnFinalize, OnInitialize}, traits::{ConstU32, OnFinalize, OnInitialize},
}; };
use primitives::Id as ParaId; use primitives::Id as ParaId;
@@ -900,6 +900,7 @@ mod tests {
type BlockNumber = u64; type BlockNumber = u64;
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2
View File
@@ -192,6 +192,7 @@ pub mod benchmarks {
mod tests { mod tests {
use super::*; use super::*;
use frame_support::{ use frame_support::{
derive_impl,
dispatch::DispatchClass, dispatch::DispatchClass,
parameter_types, parameter_types,
traits::{ traits::{
@@ -237,6 +238,7 @@ mod tests {
pub const AvailableBlockRatio: Perbill = Perbill::one(); pub const AvailableBlockRatio: Perbill = Perbill::one();
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type RuntimeOrigin = RuntimeOrigin; type RuntimeOrigin = RuntimeOrigin;
@@ -25,7 +25,7 @@ use crate::{
traits::{AuctionStatus, Auctioneer, Leaser, Registrar as RegistrarT}, traits::{AuctionStatus, Auctioneer, Leaser, Registrar as RegistrarT},
}; };
use frame_support::{ use frame_support::{
assert_noop, assert_ok, parameter_types, assert_noop, assert_ok, derive_impl, parameter_types,
traits::{ConstU32, Currency, OnFinalize, OnInitialize}, traits::{ConstU32, Currency, OnFinalize, OnInitialize},
weights::Weight, weights::Weight,
PalletId, PalletId,
@@ -114,6 +114,7 @@ parameter_types! {
); );
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = BlockWeights; type BlockWeights = BlockWeights;
@@ -699,7 +699,7 @@ mod tests {
mock::conclude_pvf_checking, paras_registrar, traits::Registrar as RegistrarTrait, mock::conclude_pvf_checking, paras_registrar, traits::Registrar as RegistrarTrait,
}; };
use frame_support::{ use frame_support::{
assert_noop, assert_ok, assert_noop, assert_ok, derive_impl,
error::BadOrigin, error::BadOrigin,
parameter_types, parameter_types,
traits::{ConstU32, OnFinalize, OnInitialize}, traits::{ConstU32, OnFinalize, OnInitialize},
@@ -751,6 +751,7 @@ mod tests {
limits::BlockLength::max_with_normal_ratio(4 * 1024 * 1024, NORMAL_RATIO); limits::BlockLength::max_with_normal_ratio(4 * 1024 * 1024, NORMAL_RATIO);
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type RuntimeOrigin = RuntimeOrigin; type RuntimeOrigin = RuntimeOrigin;
+3 -1
View File
@@ -484,7 +484,7 @@ mod tests {
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are required. // or public keys. `u64` is used as the `AccountId` and no `Signature`s are required.
use crate::purchase; use crate::purchase;
use frame_support::{ use frame_support::{
assert_noop, assert_ok, ord_parameter_types, parameter_types, assert_noop, assert_ok, derive_impl, ord_parameter_types, parameter_types,
traits::{Currency, WithdrawReasons}, traits::{Currency, WithdrawReasons},
}; };
use sp_runtime::{ use sp_runtime::{
@@ -511,6 +511,8 @@ mod tests {
parameter_types! { parameter_types! {
pub const BlockHashCount: u32 = 250; pub const BlockHashCount: u32 = 250;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+3 -1
View File
@@ -505,7 +505,7 @@ mod tests {
use crate::{mock::TestRegistrar, slots}; use crate::{mock::TestRegistrar, slots};
use ::test_helpers::{dummy_head_data, dummy_validation_code}; use ::test_helpers::{dummy_head_data, dummy_validation_code};
use frame_support::{assert_noop, assert_ok, parameter_types}; use frame_support::{assert_noop, assert_ok, derive_impl, parameter_types};
use frame_system::EnsureRoot; use frame_system::EnsureRoot;
use pallet_balances; use pallet_balances;
use primitives::BlockNumber; use primitives::BlockNumber;
@@ -529,6 +529,8 @@ mod tests {
parameter_types! { parameter_types! {
pub const BlockHashCount: u32 = 250; pub const BlockHashCount: u32 = 250;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -25,7 +25,7 @@ use crate::{
}; };
use frame_support::{ use frame_support::{
assert_ok, parameter_types, assert_ok, derive_impl, parameter_types,
traits::{ traits::{
Currency, ProcessMessage, ProcessMessageError, ValidatorSet, ValidatorSetWithIdentification, Currency, ProcessMessage, ProcessMessageError, ValidatorSet, ValidatorSetWithIdentification,
}, },
@@ -94,6 +94,7 @@ parameter_types! {
pub type AccountId = u64; pub type AccountId = u64;
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = BlockWeights; type BlockWeights = BlockWeights;
@@ -45,6 +45,8 @@ parameter_types! {
pub BlockWeights: frame_system::limits::BlockWeights = pub BlockWeights: frame_system::limits::BlockWeights =
frame_system::limits::BlockWeights::simple_max(Weight::from_parts(1024, u64::MAX)); frame_system::limits::BlockWeights::simple_max(Weight::from_parts(1024, u64::MAX));
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = Everything; type BaseCallFilter = Everything;
type BlockWeights = (); type BlockWeights = ();
@@ -51,6 +51,7 @@ parameter_types! {
frame_system::limits::BlockWeights::simple_max(Weight::from_parts(1024, u64::MAX)); frame_system::limits::BlockWeights::simple_max(Weight::from_parts(1024, u64::MAX));
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = Everything; type BaseCallFilter = Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -16,7 +16,7 @@
use codec::Encode; use codec::Encode;
use frame_support::{ use frame_support::{
construct_runtime, match_types, parameter_types, construct_runtime, derive_impl, match_types, parameter_types,
traits::{ traits::{
AsEnsureOriginWithArg, ConstU128, ConstU32, Contains, Equals, Everything, EverythingBut, AsEnsureOriginWithArg, ConstU128, ConstU32, Contains, Equals, Everything, EverythingBut,
Nothing, Nothing,
@@ -246,6 +246,7 @@ parameter_types! {
pub const BlockHashCount: u64 = 250; pub const BlockHashCount: u64 = 250;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type RuntimeOrigin = RuntimeOrigin; type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall; type RuntimeCall = RuntimeCall;
+1 -1
View File
@@ -21,7 +21,7 @@
fn ui() { fn ui() {
// Only run the ui tests when `RUN_UI_TESTS` is set. // Only run the ui tests when `RUN_UI_TESTS` is set.
if std::env::var("RUN_UI_TESTS").is_err() { if std::env::var("RUN_UI_TESTS").is_err() {
return; return
} }
// As trybuild is using `cargo check`, we don't need the real WASM binaries. // As trybuild is using `cargo check`, we don't need the real WASM binaries.
+2 -1
View File
@@ -15,7 +15,7 @@
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>. // along with Polkadot. If not, see <http://www.gnu.org/licenses/>.
use frame_support::{ use frame_support::{
construct_runtime, parameter_types, construct_runtime, derive_impl, parameter_types,
traits::{ConstU32, Everything, Nothing}, traits::{ConstU32, Everything, Nothing},
weights::Weight, weights::Weight,
}; };
@@ -76,6 +76,7 @@ parameter_types! {
pub const BlockHashCount: u64 = 250; pub const BlockHashCount: u64 = 250;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
type RuntimeOrigin = RuntimeOrigin; type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall; type RuntimeCall = RuntimeCall;
@@ -19,7 +19,7 @@
use codec::{Decode, Encode}; use codec::{Decode, Encode};
use core::marker::PhantomData; use core::marker::PhantomData;
use frame_support::{ use frame_support::{
construct_runtime, parameter_types, construct_runtime, derive_impl, parameter_types,
traits::{ContainsPair, EnsureOrigin, EnsureOriginWithArg, Everything, EverythingBut, Nothing}, traits::{ContainsPair, EnsureOrigin, EnsureOriginWithArg, Everything, EverythingBut, Nothing},
weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight}, weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight},
}; };
@@ -63,6 +63,7 @@ parameter_types! {
pub const BlockHashCount: u64 = 250; pub const BlockHashCount: u64 = 250;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
type RuntimeOrigin = RuntimeOrigin; type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall; type RuntimeCall = RuntimeCall;
@@ -17,7 +17,7 @@
//! Relay chain runtime mock. //! Relay chain runtime mock.
use frame_support::{ use frame_support::{
construct_runtime, parameter_types, construct_runtime, derive_impl, parameter_types,
traits::{AsEnsureOriginWithArg, Everything, Nothing, ProcessMessage, ProcessMessageError}, traits::{AsEnsureOriginWithArg, Everything, Nothing, ProcessMessage, ProcessMessageError},
weights::{Weight, WeightMeter}, weights::{Weight, WeightMeter},
}; };
@@ -49,6 +49,7 @@ parameter_types! {
pub const BlockHashCount: u64 = 250; pub const BlockHashCount: u64 = 250;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
type RuntimeOrigin = RuntimeOrigin; type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall; type RuntimeCall = RuntimeCall;
@@ -18,7 +18,7 @@
use codec::{Decode, Encode}; use codec::{Decode, Encode};
use frame_support::{ use frame_support::{
construct_runtime, parameter_types, construct_runtime, derive_impl, parameter_types,
traits::{Everything, Nothing}, traits::{Everything, Nothing},
weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight}, weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight},
}; };
@@ -52,6 +52,7 @@ parameter_types! {
pub const BlockHashCount: u64 = 250; pub const BlockHashCount: u64 = 250;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
type RuntimeOrigin = RuntimeOrigin; type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall; type RuntimeCall = RuntimeCall;
@@ -17,7 +17,7 @@
//! Relay chain runtime mock. //! Relay chain runtime mock.
use frame_support::{ use frame_support::{
construct_runtime, parameter_types, construct_runtime, derive_impl, parameter_types,
traits::{Everything, Nothing, ProcessMessage, ProcessMessageError}, traits::{Everything, Nothing, ProcessMessage, ProcessMessageError},
weights::{Weight, WeightMeter}, weights::{Weight, WeightMeter},
}; };
@@ -48,6 +48,7 @@ parameter_types! {
pub const BlockHashCount: u64 = 250; pub const BlockHashCount: u64 = 250;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
type RuntimeOrigin = RuntimeOrigin; type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall; type RuntimeCall = RuntimeCall;
@@ -1,5 +1,8 @@
use crate as pallet_template; use crate as pallet_template;
use frame_support::traits::{ConstU16, ConstU64}; use frame_support::{
derive_impl,
traits::{ConstU16, ConstU64},
};
use sp_core::H256; use sp_core::H256;
use sp_runtime::{ use sp_runtime::{
traits::{BlakeTwo256, IdentityLookup}, traits::{BlakeTwo256, IdentityLookup},
@@ -17,6 +20,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
@@ -763,7 +763,7 @@ impl<Block: BlockT, BE: Backend<Block>> SubscriptionsInner<Block, BE> {
// blocks. // blocks.
for hash in hashes.clone() { for hash in hashes.clone() {
if !sub.contains_block(hash) { if !sub.contains_block(hash) {
return Err(SubscriptionManagementError::BlockHashAbsent); return Err(SubscriptionManagementError::BlockHashAbsent)
} }
} }
+2 -1
View File
@@ -21,7 +21,7 @@ use super::*;
use crate as pallet_asset_conversion; use crate as pallet_asset_conversion;
use frame_support::{ use frame_support::{
construct_runtime, construct_runtime, derive_impl,
instances::{Instance1, Instance2}, instances::{Instance1, Instance2},
ord_parameter_types, parameter_types, ord_parameter_types, parameter_types,
traits::{AsEnsureOriginWithArg, ConstU128, ConstU32, ConstU64}, traits::{AsEnsureOriginWithArg, ConstU128, ConstU32, ConstU64},
@@ -48,6 +48,7 @@ construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+5 -1
View File
@@ -18,7 +18,10 @@
//! The crate's mock. //! The crate's mock.
use crate as pallet_asset_rate; use crate as pallet_asset_rate;
use frame_support::traits::{ConstU16, ConstU64}; use frame_support::{
derive_impl,
traits::{ConstU16, ConstU64},
};
use sp_core::H256; use sp_core::H256;
use sp_runtime::{ use sp_runtime::{
traits::{BlakeTwo256, IdentityLookup}, traits::{BlakeTwo256, IdentityLookup},
@@ -36,6 +39,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -22,7 +22,7 @@ use crate as pallet_assets;
use codec::Encode; use codec::Encode;
use frame_support::{ use frame_support::{
construct_runtime, parameter_types, construct_runtime, derive_impl, parameter_types,
traits::{AsEnsureOriginWithArg, ConstU32, ConstU64}, traits::{AsEnsureOriginWithArg, ConstU32, ConstU64},
}; };
use sp_core::H256; use sp_core::H256;
@@ -46,6 +46,7 @@ construct_runtime!(
type AccountId = u64; type AccountId = u64;
type AssetId = u32; type AssetId = u32;
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+5 -1
View File
@@ -20,7 +20,10 @@
use super::*; use super::*;
use crate as pallet_atomic_swap; use crate as pallet_atomic_swap;
use frame_support::traits::{ConstU32, ConstU64}; use frame_support::{
derive_impl,
traits::{ConstU32, ConstU64},
};
use sp_core::H256; use sp_core::H256;
use sp_runtime::{ use sp_runtime::{
traits::{BlakeTwo256, IdentityLookup}, traits::{BlakeTwo256, IdentityLookup},
@@ -38,6 +41,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -21,7 +21,7 @@
use crate as pallet_aura; use crate as pallet_aura;
use frame_support::{ use frame_support::{
parameter_types, derive_impl, parameter_types,
traits::{ConstU32, ConstU64, DisabledValidators}, traits::{ConstU32, ConstU64, DisabledValidators},
}; };
use sp_consensus_aura::{ed25519::AuthorityId, AuthorityIndex}; use sp_consensus_aura::{ed25519::AuthorityId, AuthorityIndex};
@@ -41,6 +41,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
@@ -169,7 +169,7 @@ mod tests {
use super::*; use super::*;
use crate as pallet_authority_discovery; use crate as pallet_authority_discovery;
use frame_support::{ use frame_support::{
parameter_types, derive_impl, parameter_types,
traits::{ConstU32, ConstU64}, traits::{ConstU32, ConstU64},
}; };
use sp_application_crypto::Pair; use sp_application_crypto::Pair;
@@ -225,6 +225,7 @@ mod tests {
pub const Offset: BlockNumber = 0; pub const Offset: BlockNumber = 0;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+3 -1
View File
@@ -22,7 +22,7 @@
use crate::{self as pallet_balances, AccountData, Config, CreditOf, Error, Pallet}; use crate::{self as pallet_balances, AccountData, Config, CreditOf, Error, Pallet};
use codec::{Decode, Encode, MaxEncodedLen}; use codec::{Decode, Encode, MaxEncodedLen};
use frame_support::{ use frame_support::{
assert_err, assert_noop, assert_ok, assert_storage_noop, assert_err, assert_noop, assert_ok, assert_storage_noop, derive_impl,
dispatch::{DispatchInfo, GetDispatchInfo}, dispatch::{DispatchInfo, GetDispatchInfo},
parameter_types, parameter_types,
traits::{ traits::{
@@ -90,6 +90,8 @@ parameter_types! {
); );
pub static ExistentialDeposit: u64 = 1; pub static ExistentialDeposit: u64 = 1;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = BlockWeights; type BlockWeights = BlockWeights;
@@ -339,6 +339,7 @@ frame_benchmarking::benchmarks! {
#[cfg(test)] #[cfg(test)]
mod mock { mod mock {
use frame_support::derive_impl;
use sp_runtime::{testing::H256, BuildStorage}; use sp_runtime::{testing::H256, BuildStorage};
type AccountId = u64; type AccountId = u64;
@@ -354,6 +355,7 @@ mod mock {
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
@@ -162,6 +162,7 @@ fn noop_is_free() {
} }
mod mock { mod mock {
use frame_support::derive_impl;
use sp_runtime::testing::H256; use sp_runtime::testing::H256;
type Block = frame_system::mocking::MockBlock<Test>; type Block = frame_system::mocking::MockBlock<Test>;
@@ -174,6 +175,7 @@ mod mock {
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
@@ -110,6 +110,7 @@ benchmarks! {
#[cfg(test)] #[cfg(test)]
pub mod mock { pub mod mock {
use frame_support::derive_impl;
use sp_runtime::{testing::H256, BuildStorage}; use sp_runtime::{testing::H256, BuildStorage};
type AccountId = u64; type AccountId = u64;
@@ -124,6 +125,7 @@ pub mod mock {
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -19,7 +19,7 @@
#![cfg(test)] #![cfg(test)]
use frame_support::{parameter_types, traits::ConstU32}; use frame_support::{derive_impl, parameter_types, traits::ConstU32};
use sp_runtime::{ use sp_runtime::{
testing::H256, testing::H256,
traits::{BlakeTwo256, IdentityLookup}, traits::{BlakeTwo256, IdentityLookup},
@@ -75,6 +75,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
@@ -19,7 +19,7 @@
#![cfg(test)] #![cfg(test)]
use frame_support::traits::ConstU32; use frame_support::{derive_impl, traits::ConstU32};
use sp_runtime::{ use sp_runtime::{
testing::H256, testing::H256,
traits::{BlakeTwo256, IdentityLookup}, traits::{BlakeTwo256, IdentityLookup},
@@ -85,6 +85,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -23,7 +23,7 @@ use super::*;
use crate as pallet_bounties; use crate as pallet_bounties;
use frame_support::{ use frame_support::{
assert_noop, assert_ok, parameter_types, assert_noop, assert_ok, derive_impl, parameter_types,
traits::{ traits::{
tokens::{PayFromAccount, UnityAssetBalanceConversion}, tokens::{PayFromAccount, UnityAssetBalanceConversion},
ConstU32, ConstU64, OnInitialize, ConstU32, ConstU64, OnInitialize,
@@ -59,6 +59,7 @@ parameter_types! {
type Balance = u64; type Balance = u64;
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -19,7 +19,7 @@
use crate::{test_fungibles::TestFungibles, *}; use crate::{test_fungibles::TestFungibles, *};
use frame_support::{ use frame_support::{
assert_ok, ensure, ord_parameter_types, parameter_types, assert_ok, derive_impl, ensure, ord_parameter_types, parameter_types,
traits::{ traits::{
fungible::{Balanced, Credit, Inspect, ItemOf, Mutate}, fungible::{Balanced, Credit, Inspect, ItemOf, Mutate},
nonfungible::Inspect as NftInspect, nonfungible::Inspect as NftInspect,
@@ -47,6 +47,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -23,7 +23,7 @@ use super::*;
use crate as pallet_child_bounties; use crate as pallet_child_bounties;
use frame_support::{ use frame_support::{
assert_noop, assert_ok, parameter_types, assert_noop, assert_ok, derive_impl, parameter_types,
traits::{ traits::{
tokens::{PayFromAccount, UnityAssetBalanceConversion}, tokens::{PayFromAccount, UnityAssetBalanceConversion},
ConstU32, ConstU64, OnInitialize, ConstU32, ConstU64, OnInitialize,
@@ -62,6 +62,7 @@ parameter_types! {
type Balance = u64; type Balance = u64;
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+3 -1
View File
@@ -18,7 +18,7 @@
use super::{Event as CollectiveEvent, *}; use super::{Event as CollectiveEvent, *};
use crate as pallet_collective; use crate as pallet_collective;
use frame_support::{ use frame_support::{
assert_noop, assert_ok, assert_noop, assert_ok, derive_impl,
dispatch::Pays, dispatch::Pays,
parameter_types, parameter_types,
traits::{ConstU32, ConstU64, StorageVersion}, traits::{ConstU32, ConstU64, StorageVersion},
@@ -90,6 +90,8 @@ parameter_types! {
frame_system::limits::BlockWeights::simple_max(Weight::MAX); frame_system::limits::BlockWeights::simple_max(Weight::MAX);
pub static MaxProposalWeight: Weight = default_max_proposal_weight(); pub static MaxProposalWeight: Weight = default_max_proposal_weight();
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = BlockWeights; type BlockWeights = BlockWeights;
@@ -23,7 +23,7 @@ use crate::{
}; };
use core::marker::PhantomData; use core::marker::PhantomData;
use frame_support::{ use frame_support::{
construct_runtime, parameter_types, construct_runtime, derive_impl, parameter_types,
traits::{AsEnsureOriginWithArg, Contains, ContainsPair, Everything, EverythingBut, Nothing}, traits::{AsEnsureOriginWithArg, Contains, ContainsPair, Everything, EverythingBut, Nothing},
weights::{ weights::{
constants::{WEIGHT_PROOF_SIZE_PER_MB, WEIGHT_REF_TIME_PER_SECOND}, constants::{WEIGHT_PROOF_SIZE_PER_MB, WEIGHT_REF_TIME_PER_SECOND},
@@ -53,6 +53,7 @@ parameter_types! {
pub const BlockHashCount: u64 = 250; pub const BlockHashCount: u64 = 250;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
type RuntimeOrigin = RuntimeOrigin; type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall; type RuntimeCall = RuntimeCall;
@@ -17,7 +17,7 @@
//! Relay chain runtime mock. //! Relay chain runtime mock.
use frame_support::{ use frame_support::{
construct_runtime, parameter_types, construct_runtime, derive_impl, parameter_types,
traits::{Contains, Everything, Nothing}, traits::{Contains, Everything, Nothing},
weights::Weight, weights::Weight,
}; };
@@ -47,6 +47,7 @@ parameter_types! {
pub const BlockHashCount: u64 = 250; pub const BlockHashCount: u64 = 250;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
type RuntimeOrigin = RuntimeOrigin; type RuntimeOrigin = RuntimeOrigin;
type RuntimeCall = RuntimeCall; type RuntimeCall = RuntimeCall;
+3
View File
@@ -42,6 +42,7 @@ use assert_matches::assert_matches;
use codec::Encode; use codec::Encode;
use frame_support::{ use frame_support::{
assert_err, assert_err_ignore_postinfo, assert_err_with_weight, assert_noop, assert_ok, assert_err, assert_err_ignore_postinfo, assert_err_with_weight, assert_noop, assert_ok,
derive_impl,
dispatch::{DispatchErrorWithPostInfo, PostDispatchInfo}, dispatch::{DispatchErrorWithPostInfo, PostDispatchInfo},
parameter_types, parameter_types,
storage::child, storage::child,
@@ -332,6 +333,8 @@ parameter_types! {
); );
pub static ExistentialDeposit: u64 = 1; pub static ExistentialDeposit: u64 = 1;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = BlockWeights; type BlockWeights = BlockWeights;
@@ -20,7 +20,7 @@
use std::collections::BTreeMap; use std::collections::BTreeMap;
use frame_support::{ use frame_support::{
assert_noop, assert_ok, parameter_types, assert_noop, assert_ok, derive_impl, parameter_types,
traits::{ConstU32, ConstU64, Contains, Polling, VoteTally}, traits::{ConstU32, ConstU64, Contains, Polling, VoteTally},
}; };
use sp_core::H256; use sp_core::H256;
@@ -51,6 +51,7 @@ impl Contains<RuntimeCall> for BaseFilter {
} }
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = BaseFilter; type BaseCallFilter = BaseFilter;
type BlockWeights = (); type BlockWeights = ();
+3 -1
View File
@@ -20,7 +20,7 @@
use std::collections::BTreeMap; use std::collections::BTreeMap;
use frame_support::{ use frame_support::{
assert_noop, assert_ok, ord_parameter_types, assert_noop, assert_ok, derive_impl, ord_parameter_types,
pallet_prelude::Weight, pallet_prelude::Weight,
parameter_types, parameter_types,
traits::{tokens::GetSalary, ConstU32, ConstU64, Everything, IsInVec, TryMapSuccess}, traits::{tokens::GetSalary, ConstU32, ConstU64, Everything, IsInVec, TryMapSuccess},
@@ -50,6 +50,8 @@ parameter_types! {
pub BlockWeights: frame_system::limits::BlockWeights = pub BlockWeights: frame_system::limits::BlockWeights =
frame_system::limits::BlockWeights::simple_max(Weight::from_parts(1_000_000, u64::max_value())); frame_system::limits::BlockWeights::simple_max(Weight::from_parts(1_000_000, u64::max_value()));
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = Everything; type BaseCallFilter = Everything;
type BlockWeights = (); type BlockWeights = ();
+3 -1
View File
@@ -20,7 +20,7 @@
use super::*; use super::*;
use crate as pallet_democracy; use crate as pallet_democracy;
use frame_support::{ use frame_support::{
assert_noop, assert_ok, ord_parameter_types, parameter_types, assert_noop, assert_ok, derive_impl, ord_parameter_types, parameter_types,
traits::{ traits::{
ConstU32, ConstU64, Contains, EqualPrivilegeOnly, OnInitialize, SortedMembers, ConstU32, ConstU64, Contains, EqualPrivilegeOnly, OnInitialize, SortedMembers,
StorePreimage, StorePreimage,
@@ -77,6 +77,8 @@ parameter_types! {
Weight::from_parts(frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND, u64::MAX), Weight::from_parts(frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND, u64::MAX),
); );
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = BaseFilter; type BaseCallFilter = BaseFilter;
type BlockWeights = BlockWeights; type BlockWeights = BlockWeights;
@@ -21,7 +21,7 @@ use frame_election_provider_support::{
bounds::{DataProviderBounds, ElectionBounds}, bounds::{DataProviderBounds, ElectionBounds},
data_provider, onchain, ElectionDataProvider, NposSolution, SequentialPhragmen, data_provider, onchain, ElectionDataProvider, NposSolution, SequentialPhragmen,
}; };
pub use frame_support::{assert_noop, assert_ok, pallet_prelude::GetDefault}; pub use frame_support::{assert_noop, assert_ok, derive_impl, pallet_prelude::GetDefault};
use frame_support::{ use frame_support::{
parameter_types, parameter_types,
traits::{ConstU32, Hooks}, traits::{ConstU32, Hooks},
@@ -204,6 +204,7 @@ pub fn witness() -> SolutionOrSnapshotSize {
.unwrap_or_default() .unwrap_or_default()
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
type SS58Prefix = (); type SS58Prefix = ();
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
@@ -182,7 +182,7 @@ impl<T: Config> ElectionProvider for OnChainExecution<T> {
mod tests { mod tests {
use super::*; use super::*;
use crate::{ElectionProvider, PhragMMS, SequentialPhragmen}; use crate::{ElectionProvider, PhragMMS, SequentialPhragmen};
use frame_support::{assert_noop, parameter_types}; use frame_support::{assert_noop, derive_impl, parameter_types};
use sp_npos_elections::Support; use sp_npos_elections::Support;
use sp_runtime::Perbill; use sp_runtime::Perbill;
type AccountId = u64; type AccountId = u64;
@@ -200,6 +200,7 @@ mod tests {
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
type SS58Prefix = (); type SS58Prefix = ();
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
@@ -1307,7 +1307,7 @@ mod tests {
use super::*; use super::*;
use crate as elections_phragmen; use crate as elections_phragmen;
use frame_support::{ use frame_support::{
assert_noop, assert_ok, assert_noop, assert_ok, derive_impl,
dispatch::DispatchResultWithPostInfo, dispatch::DispatchResultWithPostInfo,
parameter_types, parameter_types,
traits::{ConstU32, ConstU64, OnInitialize}, traits::{ConstU32, ConstU64, OnInitialize},
@@ -1321,6 +1321,7 @@ mod tests {
}; };
use substrate_test_utils::assert_eq_uvec; use substrate_test_utils::assert_eq_uvec;
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -19,7 +19,7 @@
use crate::*; use crate::*;
use frame_support::{ use frame_support::{
assert_ok, assert_ok, derive_impl,
dispatch::{DispatchInfo, GetDispatchInfo}, dispatch::{DispatchInfo, GetDispatchInfo},
traits::{ConstU64, OnInitialize}, traits::{ConstU64, OnInitialize},
}; };
@@ -45,6 +45,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
@@ -18,7 +18,7 @@
//! Tests for pallet-dev-mode. //! Tests for pallet-dev-mode.
use crate::*; use crate::*;
use frame_support::{assert_ok, traits::ConstU64}; use frame_support::{assert_ok, derive_impl, traits::ConstU64};
use sp_core::H256; use sp_core::H256;
use sp_runtime::{ use sp_runtime::{
traits::{BlakeTwo256, IdentityLookup}, traits::{BlakeTwo256, IdentityLookup},
@@ -39,6 +39,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
@@ -19,7 +19,7 @@ use crate as example_offchain_worker;
use crate::*; use crate::*;
use codec::Decode; use codec::Decode;
use frame_support::{ use frame_support::{
assert_ok, parameter_types, assert_ok, derive_impl, parameter_types,
traits::{ConstU32, ConstU64}, traits::{ConstU32, ConstU64},
}; };
use sp_core::{ use sp_core::{
@@ -46,6 +46,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -761,7 +761,7 @@ mod tests {
}; };
use frame_support::{ use frame_support::{
assert_err, parameter_types, assert_err, derive_impl, parameter_types,
traits::{fungible, ConstU32, ConstU64, ConstU8, Currency}, traits::{fungible, ConstU32, ConstU64, ConstU8, Currency},
weights::{ConstantMultiplier, IdentityFee, RuntimeDbWeight, Weight, WeightToFee}, weights::{ConstantMultiplier, IdentityFee, RuntimeDbWeight, Weight, WeightToFee},
}; };
@@ -917,6 +917,7 @@ mod tests {
write: 100, write: 100,
}; };
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = BlockWeights; type BlockWeights = BlockWeights;
+2 -1
View File
@@ -19,7 +19,7 @@ use super::*;
use crate as pallet_glutton; use crate as pallet_glutton;
use frame_support::{ use frame_support::{
assert_ok, assert_ok, derive_impl,
traits::{ConstU32, ConstU64}, traits::{ConstU32, ConstU64},
}; };
use sp_core::H256; use sp_core::H256;
@@ -38,6 +38,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -27,7 +27,7 @@ use frame_election_provider_support::{
onchain, SequentialPhragmen, onchain, SequentialPhragmen,
}; };
use frame_support::{ use frame_support::{
parameter_types, derive_impl, parameter_types,
traits::{ConstU128, ConstU32, ConstU64, KeyOwnerProofSystem, OnFinalize, OnInitialize}, traits::{ConstU128, ConstU32, ConstU64, KeyOwnerProofSystem, OnFinalize, OnInitialize},
}; };
use pallet_session::historical as pallet_session_historical; use pallet_session::historical as pallet_session_historical;
@@ -66,6 +66,7 @@ impl_opaque_keys! {
} }
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -25,7 +25,7 @@ use crate::{
use codec::{Decode, Encode}; use codec::{Decode, Encode};
use frame_support::{ use frame_support::{
assert_noop, assert_ok, ord_parameter_types, parameter_types, assert_noop, assert_ok, derive_impl, ord_parameter_types, parameter_types,
traits::{ConstU32, ConstU64, EitherOfDiverse, Get}, traits::{ConstU32, ConstU64, EitherOfDiverse, Get},
BoundedVec, BoundedVec,
}; };
@@ -47,6 +47,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -20,7 +20,7 @@
#![cfg(test)] #![cfg(test)]
use frame_support::{ use frame_support::{
parameter_types, derive_impl, parameter_types,
traits::{ConstU32, ConstU64}, traits::{ConstU32, ConstU64},
weights::Weight, weights::Weight,
}; };
@@ -113,6 +113,7 @@ pub fn new_test_ext() -> sp_io::TestExternalities {
result result
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+5 -1
View File
@@ -20,7 +20,10 @@
#![cfg(test)] #![cfg(test)]
use crate::{self as pallet_indices, Config}; use crate::{self as pallet_indices, Config};
use frame_support::traits::{ConstU32, ConstU64}; use frame_support::{
derive_impl,
traits::{ConstU32, ConstU64},
};
use sp_core::H256; use sp_core::H256;
use sp_runtime::BuildStorage; use sp_runtime::BuildStorage;
@@ -35,6 +38,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
@@ -169,7 +169,7 @@ mod tests {
}; };
use frame_support::{ use frame_support::{
parameter_types, derive_impl, parameter_types,
traits::{ConstU32, ConstU64, OnInitialize, Randomness}, traits::{ConstU32, ConstU64, OnInitialize, Randomness},
}; };
use frame_system::limits; use frame_system::limits;
@@ -189,6 +189,7 @@ mod tests {
::max(2 * 1024); ::max(2 * 1024);
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -21,7 +21,7 @@ use super::*;
use crate as pallet_lottery; use crate as pallet_lottery;
use frame_support::{ use frame_support::{
parameter_types, derive_impl, parameter_types,
traits::{ConstU32, ConstU64, OnFinalize, OnInitialize}, traits::{ConstU32, ConstU64, OnFinalize, OnInitialize},
}; };
use frame_support_test::TestRandomness; use frame_support_test::TestRandomness;
@@ -47,6 +47,7 @@ parameter_types! {
pub const AvailableBlockRatio: Perbill = Perbill::one(); pub const AvailableBlockRatio: Perbill = Perbill::one();
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -531,7 +531,7 @@ mod tests {
}; };
use frame_support::{ use frame_support::{
assert_noop, assert_ok, ord_parameter_types, parameter_types, assert_noop, assert_ok, derive_impl, ord_parameter_types, parameter_types,
traits::{ConstU32, ConstU64, StorageVersion}, traits::{ConstU32, ConstU64, StorageVersion},
}; };
use frame_system::EnsureSignedBy; use frame_system::EnsureSignedBy;
@@ -551,6 +551,7 @@ mod tests {
pub static Prime: Option<u64> = None; pub static Prime: Option<u64> = None;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
@@ -38,7 +38,7 @@ use crate::{
use crate as pallet_message_queue; use crate as pallet_message_queue;
use frame_support::{ use frame_support::{
parameter_types, derive_impl, parameter_types,
traits::{ConstU32, ConstU64}, traits::{ConstU32, ConstU64},
}; };
use rand::{rngs::StdRng, Rng, SeedableRng}; use rand::{rngs::StdRng, Rng, SeedableRng};
@@ -57,6 +57,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+3 -1
View File
@@ -24,7 +24,7 @@ use super::*;
use crate as pallet_message_queue; use crate as pallet_message_queue;
use frame_support::{ use frame_support::{
parameter_types, derive_impl, parameter_types,
traits::{ConstU32, ConstU64}, traits::{ConstU32, ConstU64},
}; };
use sp_core::H256; use sp_core::H256;
@@ -43,6 +43,8 @@ frame_support::construct_runtime!(
MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event<T>}, MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event<T>},
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
@@ -21,7 +21,7 @@ use super::*;
use crate as pallet_nft_fractionalization; use crate as pallet_nft_fractionalization;
use frame_support::{ use frame_support::{
construct_runtime, parameter_types, construct_runtime, derive_impl, parameter_types,
traits::{AsEnsureOriginWithArg, ConstU32, ConstU64}, traits::{AsEnsureOriginWithArg, ConstU32, ConstU64},
BoundedVec, PalletId, BoundedVec, PalletId,
}; };
@@ -49,6 +49,8 @@ construct_runtime!(
Nfts: pallet_nfts, Nfts: pallet_nfts,
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -21,7 +21,7 @@ use super::*;
use crate as pallet_nfts; use crate as pallet_nfts;
use frame_support::{ use frame_support::{
construct_runtime, parameter_types, construct_runtime, derive_impl, parameter_types,
traits::{AsEnsureOriginWithArg, ConstU32, ConstU64}, traits::{AsEnsureOriginWithArg, ConstU32, ConstU64},
}; };
use sp_core::H256; use sp_core::H256;
@@ -46,6 +46,7 @@ pub type Signature = MultiSignature;
pub type AccountPublic = <Signature as Verify>::Signer; pub type AccountPublic = <Signature as Verify>::Signer;
pub type AccountId = <AccountPublic as IdentifyAccount>::AccountId; pub type AccountId = <AccountPublic as IdentifyAccount>::AccountId;
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -253,7 +253,7 @@ mod tests {
use crate as pallet_nicks; use crate as pallet_nicks;
use frame_support::{ use frame_support::{
assert_noop, assert_ok, ord_parameter_types, assert_noop, assert_ok, derive_impl, ord_parameter_types,
traits::{ConstU32, ConstU64}, traits::{ConstU32, ConstU64},
}; };
use frame_system::EnsureSignedBy; use frame_system::EnsureSignedBy;
@@ -274,6 +274,7 @@ mod tests {
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -20,7 +20,7 @@
use crate::{self as pallet_nis, Perquintill, WithMaximumOf}; use crate::{self as pallet_nis, Perquintill, WithMaximumOf};
use frame_support::{ use frame_support::{
ord_parameter_types, parameter_types, derive_impl, ord_parameter_types, parameter_types,
traits::{ traits::{
fungible::Inspect, ConstU16, ConstU32, ConstU64, Everything, OnFinalize, OnInitialize, fungible::Inspect, ConstU16, ConstU32, ConstU64, Everything, OnFinalize, OnInitialize,
StorageMapShim, StorageMapShim,
@@ -50,6 +50,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = Everything; type BaseCallFilter = Everything;
type BlockWeights = (); type BlockWeights = ();
@@ -21,7 +21,7 @@ use super::*;
use crate as pallet_node_authorization; use crate as pallet_node_authorization;
use frame_support::{ use frame_support::{
ord_parameter_types, derive_impl, ord_parameter_types,
traits::{ConstU32, ConstU64}, traits::{ConstU32, ConstU64},
}; };
use frame_system::EnsureSignedBy; use frame_system::EnsureSignedBy;
@@ -43,6 +43,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type DbWeight = (); type DbWeight = ();
@@ -17,7 +17,7 @@
use crate::VoterBagsListInstance; use crate::VoterBagsListInstance;
use frame_election_provider_support::VoteWeight; use frame_election_provider_support::VoteWeight;
use frame_support::{pallet_prelude::*, parameter_types, traits::ConstU64, PalletId}; use frame_support::{derive_impl, pallet_prelude::*, parameter_types, traits::ConstU64, PalletId};
use sp_runtime::{ use sp_runtime::{
traits::{Convert, IdentityLookup}, traits::{Convert, IdentityLookup},
BuildStorage, FixedU128, Perbill, BuildStorage, FixedU128, Perbill,
@@ -28,6 +28,7 @@ type Nonce = u32;
type BlockNumber = u64; type BlockNumber = u64;
type Balance = u128; type Balance = u128;
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -17,7 +17,7 @@
use super::*; use super::*;
use crate::{self as pools}; use crate::{self as pools};
use frame_support::{assert_ok, parameter_types, traits::fungible::Mutate, PalletId}; use frame_support::{assert_ok, derive_impl, parameter_types, traits::fungible::Mutate, PalletId};
use frame_system::RawOrigin; use frame_system::RawOrigin;
use sp_runtime::{BuildStorage, FixedU128}; use sp_runtime::{BuildStorage, FixedU128};
use sp_staking::{OnStakingUpdate, Stake}; use sp_staking::{OnStakingUpdate, Stake};
@@ -209,6 +209,7 @@ impl sp_staking::StakingInterface for StakingMock {
} }
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
type SS58Prefix = (); type SS58Prefix = ();
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
@@ -17,7 +17,7 @@
use frame_election_provider_support::VoteWeight; use frame_election_provider_support::VoteWeight;
use frame_support::{ use frame_support::{
assert_ok, assert_ok, derive_impl,
pallet_prelude::*, pallet_prelude::*,
parameter_types, parameter_types,
traits::{ConstU64, ConstU8}, traits::{ConstU64, ConstU8},
@@ -38,6 +38,7 @@ pub(crate) type T = Runtime;
pub(crate) const POOL1_BONDED: AccountId = 20318131474730217858575332831085u128; pub(crate) const POOL1_BONDED: AccountId = 20318131474730217858575332831085u128;
pub(crate) const POOL1_REWARD: AccountId = 20397359637244482196168876781421u128; pub(crate) const POOL1_REWARD: AccountId = 20397359637244482196168876781421u128;
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
@@ -25,7 +25,7 @@ use frame_election_provider_support::{
onchain, SequentialPhragmen, onchain, SequentialPhragmen,
}; };
use frame_support::{ use frame_support::{
parameter_types, derive_impl, parameter_types,
traits::{ConstU32, ConstU64}, traits::{ConstU32, ConstU64},
}; };
use frame_system as system; use frame_system as system;
@@ -40,6 +40,7 @@ type AccountId = u64;
type Nonce = u32; type Nonce = u32;
type Balance = u64; type Balance = u64;
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -23,7 +23,7 @@ use crate as offences;
use crate::Config; use crate::Config;
use codec::Encode; use codec::Encode;
use frame_support::{ use frame_support::{
parameter_types, derive_impl, parameter_types,
traits::{ConstU32, ConstU64}, traits::{ConstU32, ConstU64},
weights::{constants::RocksDbWeight, Weight}, weights::{constants::RocksDbWeight, Weight},
}; };
@@ -75,6 +75,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+5 -1
View File
@@ -20,7 +20,10 @@
#![cfg(feature = "std")] #![cfg(feature = "std")]
use crate::{paged_list::StoragePagedListMeta, Config, ListPrefix}; use crate::{paged_list::StoragePagedListMeta, Config, ListPrefix};
use frame_support::traits::{ConstU16, ConstU64}; use frame_support::{
derive_impl,
traits::{ConstU16, ConstU64},
};
use sp_core::H256; use sp_core::H256;
use sp_runtime::{ use sp_runtime::{
traits::{BlakeTwo256, IdentityLookup}, traits::{BlakeTwo256, IdentityLookup},
@@ -38,6 +41,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -21,7 +21,7 @@ use super::*;
use crate as pallet_preimage; use crate as pallet_preimage;
use frame_support::{ use frame_support::{
ord_parameter_types, derive_impl, ord_parameter_types,
traits::{fungible::HoldConsideration, ConstU32, ConstU64, Everything}, traits::{fungible::HoldConsideration, ConstU32, ConstU64, Everything},
weights::constants::RocksDbWeight, weights::constants::RocksDbWeight,
}; };
@@ -43,6 +43,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = Everything; type BaseCallFilter = Everything;
type BlockWeights = (); type BlockWeights = ();
@@ -20,7 +20,7 @@
use std::collections::BTreeMap; use std::collections::BTreeMap;
use frame_support::{ use frame_support::{
assert_noop, assert_ok, assert_noop, assert_ok, derive_impl,
error::BadOrigin, error::BadOrigin,
parameter_types, parameter_types,
traits::{ConstU16, ConstU32, ConstU64, EitherOf, Everything, MapSuccess, Polling}, traits::{ConstU16, ConstU32, ConstU64, EitherOf, Everything, MapSuccess, Polling},
@@ -45,6 +45,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = Everything; type BaseCallFilter = Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -21,7 +21,7 @@ use super::*;
use crate as recovery; use crate as recovery;
use frame_support::{ use frame_support::{
parameter_types, derive_impl, parameter_types,
traits::{ConstU32, ConstU64, OnFinalize, OnInitialize}, traits::{ConstU32, ConstU64, OnFinalize, OnInitialize},
}; };
use sp_core::H256; use sp_core::H256;
@@ -41,6 +41,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -21,7 +21,7 @@ use super::*;
use crate as pallet_referenda; use crate as pallet_referenda;
use codec::{Decode, Encode, MaxEncodedLen}; use codec::{Decode, Encode, MaxEncodedLen};
use frame_support::{ use frame_support::{
assert_ok, ord_parameter_types, parameter_types, assert_ok, derive_impl, ord_parameter_types, parameter_types,
traits::{ traits::{
ConstU32, ConstU64, Contains, EqualPrivilegeOnly, OnInitialize, OriginTrait, Polling, ConstU32, ConstU64, Contains, EqualPrivilegeOnly, OnInitialize, OriginTrait, Polling,
SortedMembers, SortedMembers,
@@ -59,6 +59,7 @@ impl Contains<RuntimeCall> for BaseFilter {
parameter_types! { parameter_types! {
pub MaxWeight: Weight = Weight::from_parts(2_000_000_000_000, u64::MAX); pub MaxWeight: Weight = Weight::from_parts(2_000_000_000_000, u64::MAX);
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = BaseFilter; type BaseCallFilter = BaseFilter;
type BlockWeights = (); type BlockWeights = ();
+5 -1
View File
@@ -18,7 +18,10 @@
//! Test environment for remarks pallet. //! Test environment for remarks pallet.
use crate as pallet_remark; use crate as pallet_remark;
use frame_support::traits::{ConstU16, ConstU32, ConstU64}; use frame_support::{
derive_impl,
traits::{ConstU16, ConstU32, ConstU64},
};
use sp_core::H256; use sp_core::H256;
use sp_runtime::{ use sp_runtime::{
traits::{BlakeTwo256, IdentityLookup}, traits::{BlakeTwo256, IdentityLookup},
@@ -36,6 +39,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -23,7 +23,7 @@ use frame_election_provider_support::{
onchain, SequentialPhragmen, onchain, SequentialPhragmen,
}; };
use frame_support::{ use frame_support::{
parameter_types, derive_impl, parameter_types,
traits::{ConstU32, ConstU64, Hooks, OneSessionHandler}, traits::{ConstU32, ConstU64, Hooks, OneSessionHandler},
}; };
use pallet_staking::StakerStatus; use pallet_staking::StakerStatus;
@@ -84,6 +84,7 @@ impl sp_runtime::BoundToRuntimeAppPublic for OtherSessionHandler {
type Public = UintAuthorityId; type Public = UintAuthorityId;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -23,7 +23,7 @@ use super::*;
use crate as pallet_safe_mode; use crate as pallet_safe_mode;
use frame_support::{ use frame_support::{
parameter_types, derive_impl, parameter_types,
traits::{ConstU64, Everything, InsideBoth, InstanceFilter, IsInVec, SafeModeNotify}, traits::{ConstU64, Everything, InsideBoth, InstanceFilter, IsInVec, SafeModeNotify},
}; };
use frame_system::EnsureSignedBy; use frame_system::EnsureSignedBy;
@@ -33,6 +33,7 @@ use sp_runtime::{
BuildStorage, BuildStorage,
}; };
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = InsideBoth<Everything, SafeMode>; type BaseCallFilter = InsideBoth<Everything, SafeMode>;
type BlockWeights = (); type BlockWeights = ();
+3 -1
View File
@@ -20,7 +20,7 @@
use std::collections::BTreeMap; use std::collections::BTreeMap;
use frame_support::{ use frame_support::{
assert_noop, assert_ok, assert_noop, assert_ok, derive_impl,
pallet_prelude::Weight, pallet_prelude::Weight,
parameter_types, parameter_types,
traits::{tokens::ConvertRank, ConstU32, ConstU64, Everything}, traits::{tokens::ConvertRank, ConstU32, ConstU64, Everything},
@@ -49,6 +49,8 @@ parameter_types! {
pub BlockWeights: frame_system::limits::BlockWeights = pub BlockWeights: frame_system::limits::BlockWeights =
frame_system::limits::BlockWeights::simple_max(Weight::from_parts(1_000_000, 0)); frame_system::limits::BlockWeights::simple_max(Weight::from_parts(1_000_000, 0));
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = Everything; type BaseCallFilter = Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -21,7 +21,7 @@ use super::*;
use crate as pallet_scored_pool; use crate as pallet_scored_pool;
use frame_support::{ use frame_support::{
construct_runtime, ord_parameter_types, parameter_types, construct_runtime, derive_impl, ord_parameter_types, parameter_types,
traits::{ConstU32, ConstU64}, traits::{ConstU32, ConstU64},
}; };
use frame_system::EnsureSignedBy; use frame_system::EnsureSignedBy;
@@ -51,6 +51,7 @@ ord_parameter_types! {
pub const ScoreOrigin: u64 = 3; pub const ScoreOrigin: u64 = 3;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
@@ -24,7 +24,7 @@ use frame_election_provider_support::{
onchain, SequentialPhragmen, onchain, SequentialPhragmen,
}; };
use frame_support::{ use frame_support::{
parameter_types, derive_impl, parameter_types,
traits::{ConstU32, ConstU64}, traits::{ConstU32, ConstU64},
}; };
use sp_runtime::{traits::IdentityLookup, BuildStorage}; use sp_runtime::{traits::IdentityLookup, BuildStorage};
@@ -45,6 +45,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -35,7 +35,7 @@ use sp_staking::SessionIndex;
use sp_state_machine::BasicExternalities; use sp_state_machine::BasicExternalities;
use frame_support::{ use frame_support::{
parameter_types, derive_impl, parameter_types,
traits::{ConstU32, ConstU64}, traits::{ConstU32, ConstU64},
}; };
@@ -232,6 +232,7 @@ pub fn new_test_ext() -> sp_io::TestExternalities {
sp_io::TestExternalities::new(t) sp_io::TestExternalities::new(t)
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -21,7 +21,7 @@ use super::*;
use crate as pallet_society; use crate as pallet_society;
use frame_support::{ use frame_support::{
assert_noop, assert_ok, ord_parameter_types, parameter_types, assert_noop, assert_ok, derive_impl, ord_parameter_types, parameter_types,
traits::{ConstU32, ConstU64}, traits::{ConstU32, ConstU64},
}; };
use frame_support_test::TestRandomness; use frame_support_test::TestRandomness;
@@ -58,6 +58,7 @@ ord_parameter_types! {
pub const MaxBids: u32 = 10; pub const MaxBids: u32 = 10;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -23,7 +23,7 @@ use frame_election_provider_support::{
onchain, SequentialPhragmen, VoteWeight, onchain, SequentialPhragmen, VoteWeight,
}; };
use frame_support::{ use frame_support::{
assert_ok, ord_parameter_types, parameter_types, assert_ok, derive_impl, ord_parameter_types, parameter_types,
traits::{ traits::{
ConstU64, Currency, EitherOfDiverse, FindAuthor, Get, Hooks, Imbalance, OnUnbalanced, ConstU64, Currency, EitherOfDiverse, FindAuthor, Get, Hooks, Imbalance, OnUnbalanced,
OneSessionHandler, OneSessionHandler,
@@ -124,6 +124,7 @@ parameter_types! {
pub static Offset: BlockNumber = 0; pub static Offset: BlockNumber = 0;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
@@ -1051,7 +1051,7 @@ mod mock {
use super::*; use super::*;
use crate as pallet_state_trie_migration; use crate as pallet_state_trie_migration;
use frame_support::{ use frame_support::{
parameter_types, derive_impl, parameter_types,
traits::{ConstU32, ConstU64, Hooks}, traits::{ConstU32, ConstU64, Hooks},
weights::Weight, weights::Weight,
}; };
@@ -1081,6 +1081,7 @@ mod mock {
pub const SS58Prefix: u8 = 42; pub const SS58Prefix: u8 = 42;
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type BlockWeights = (); type BlockWeights = ();
+2 -1
View File
@@ -21,7 +21,7 @@ use super::*;
use crate as pallet_statement; use crate as pallet_statement;
use frame_support::{ use frame_support::{
ord_parameter_types, derive_impl, ord_parameter_types,
traits::{ConstU32, ConstU64, Everything}, traits::{ConstU32, ConstU64, Everything},
weights::constants::RocksDbWeight, weights::constants::RocksDbWeight,
}; };
@@ -47,6 +47,7 @@ frame_support::construct_runtime!(
} }
); );
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = Everything; type BaseCallFilter = Everything;
type BlockWeights = (); type BlockWeights = ();
+5 -1
View File
@@ -19,7 +19,10 @@
use super::*; use super::*;
use crate as sudo; use crate as sudo;
use frame_support::traits::{ConstU32, Contains}; use frame_support::{
derive_impl,
traits::{ConstU32, Contains},
};
use sp_core::{ConstU64, H256}; use sp_core::{ConstU64, H256};
use sp_io; use sp_io;
use sp_runtime::{ use sp_runtime::{
@@ -108,6 +111,7 @@ impl Contains<RuntimeCall> for BlockEverything {
} }
} }
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test { impl frame_system::Config for Test {
type BaseCallFilter = BlockEverything; type BaseCallFilter = BlockEverything;
type BlockWeights = (); type BlockWeights = ();
@@ -15,7 +15,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
use frame_support::construct_runtime; use frame_support::{construct_runtime, derive_impl};
use sp_core::sr25519; use sp_core::sr25519;
use sp_runtime::{generic, traits::BlakeTwo256}; use sp_runtime::{generic, traits::BlakeTwo256};
@@ -36,6 +36,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Sign
impl pallet::Config for Runtime {} impl pallet::Config for Runtime {}
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type RuntimeOrigin = RuntimeOrigin; type RuntimeOrigin = RuntimeOrigin;
@@ -1,7 +1,7 @@
error: The number of pallets exceeds the maximum number of tuple elements. To increase this limit, enable the tuples-96 feature of [frame_support]. error: The number of pallets exceeds the maximum number of tuple elements. To increase this limit, enable the tuples-96 feature of [frame_support].
--> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:66:2 --> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:67:2
| |
66 | pub struct Runtime 67 | pub struct Runtime
| ^^^ | ^^^
error[E0412]: cannot find type `RuntimeCall` in this scope error[E0412]: cannot find type `RuntimeCall` in this scope
@@ -22,38 +22,38 @@ error[E0412]: cannot find type `Runtime` in this scope
| ^^^^^^^ not found in this scope | ^^^^^^^ not found in this scope
error[E0412]: cannot find type `Runtime` in this scope error[E0412]: cannot find type `Runtime` in this scope
--> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:39:31 --> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:40:31
| |
39 | impl frame_system::Config for Runtime { 40 | impl frame_system::Config for Runtime {
| ^^^^^^^ not found in this scope | ^^^^^^^ not found in this scope
error[E0412]: cannot find type `RuntimeOrigin` in this scope error[E0412]: cannot find type `RuntimeOrigin` in this scope
--> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:41:23 --> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:42:23
| |
41 | type RuntimeOrigin = RuntimeOrigin; 42 | type RuntimeOrigin = RuntimeOrigin;
| ^^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeOrigin` | ^^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeOrigin`
error[E0412]: cannot find type `RuntimeCall` in this scope error[E0412]: cannot find type `RuntimeCall` in this scope
--> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:43:21 --> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:44:21
| |
43 | type RuntimeCall = RuntimeCall; 44 | type RuntimeCall = RuntimeCall;
| ^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeCall` | ^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeCall`
error[E0412]: cannot find type `RuntimeEvent` in this scope error[E0412]: cannot find type `RuntimeEvent` in this scope
--> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:49:22 --> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:50:22
| |
49 | type RuntimeEvent = RuntimeEvent; 50 | type RuntimeEvent = RuntimeEvent;
| ^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeEvent` | ^^^^^^^^^^^^ help: you might have meant to use the associated type: `Self::RuntimeEvent`
error[E0412]: cannot find type `PalletInfo` in this scope error[E0412]: cannot find type `PalletInfo` in this scope
--> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:55:20 --> tests/construct_runtime_ui/number_of_pallets_exceeds_tuple_size.rs:56:20
| |
55 | type PalletInfo = PalletInfo; 56 | type PalletInfo = PalletInfo;
| ^^^^^^^^^^ | ^^^^^^^^^^
| |
help: you might have meant to use the associated type help: you might have meant to use the associated type
| |
55 | type PalletInfo = Self::PalletInfo; 56 | type PalletInfo = Self::PalletInfo;
| ~~~~~~~~~~~~~~~~ | ~~~~~~~~~~~~~~~~
help: consider importing one of these items help: consider importing one of these items
| |
@@ -15,7 +15,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
use frame_support::construct_runtime; use frame_support::{construct_runtime, derive_impl};
use sp_core::sr25519; use sp_core::sr25519;
use sp_runtime::{generic, traits::BlakeTwo256}; use sp_runtime::{generic, traits::BlakeTwo256};
@@ -61,6 +61,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Sign
impl pallet::Config for Runtime {} impl pallet::Config for Runtime {}
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type RuntimeOrigin = RuntimeOrigin; type RuntimeOrigin = RuntimeOrigin;
@@ -1,13 +1,13 @@
error[E0080]: evaluation of constant value failed error[E0080]: evaluation of constant value failed
--> tests/construct_runtime_ui/pallet_error_too_large.rs:90:1 --> tests/construct_runtime_ui/pallet_error_too_large.rs:91:1
| |
90 | / construct_runtime! { 91 | / construct_runtime! {
91 | | pub struct Runtime 92 | | pub struct Runtime
92 | | { 93 | | {
93 | | System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>}, 94 | | System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
94 | | Pallet: pallet::{Pallet}, 95 | | Pallet: pallet::{Pallet},
95 | | } 96 | | }
96 | | } 97 | | }
| |_^ the evaluated program panicked at 'The maximum encoded size of the error type in the `Pallet` pallet exceeds `MAX_MODULE_ERROR_ENCODED_SIZE`', $DIR/tests/construct_runtime_ui/pallet_error_too_large.rs:90:1 | |_^ the evaluated program panicked at 'The maximum encoded size of the error type in the `Pallet` pallet exceeds `MAX_MODULE_ERROR_ENCODED_SIZE`', $DIR/tests/construct_runtime_ui/pallet_error_too_large.rs:91:1
| |
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -15,7 +15,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
use frame_support::construct_runtime; use frame_support::{construct_runtime, derive_impl};
use sp_core::sr25519; use sp_core::sr25519;
use sp_runtime::{generic, traits::BlakeTwo256}; use sp_runtime::{generic, traits::BlakeTwo256};
@@ -36,6 +36,7 @@ pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Sign
impl pallet::Config for Runtime {} impl pallet::Config for Runtime {}
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime { impl frame_system::Config for Runtime {
type BaseCallFilter = frame_support::traits::Everything; type BaseCallFilter = frame_support::traits::Everything;
type RuntimeOrigin = RuntimeOrigin; type RuntimeOrigin = RuntimeOrigin;
@@ -4,13 +4,13 @@ error: `Pallet` does not have #[pallet::call] defined, perhaps you should remove
22 | #[frame_support::pallet] 22 | #[frame_support::pallet]
| ^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^
... ...
65 | / construct_runtime! { 66 | / construct_runtime! {
66 | | pub struct Runtime 67 | | pub struct Runtime
67 | | { 68 | | {
68 | | System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>}, 69 | | System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
69 | | Pallet: pallet::{Pallet, Call}, 70 | | Pallet: pallet::{Pallet, Call},
70 | | } 71 | | }
71 | | } 72 | | }
| |_- in this macro invocation | |_- in this macro invocation
| |
= note: this error originates in the macro `pallet::__substrate_call_check::is_call_part_defined` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info) = note: this error originates in the macro `pallet::__substrate_call_check::is_call_part_defined` which comes from the expansion of the macro `construct_runtime` (in Nightly builds, run with -Z macro-backtrace for more info)

Some files were not shown because too many files have changed in this diff Show More