mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-15 08:01:09 +00:00
Switch All construct_runtimes to New Syntax (#2979)
Clean up all the old syntax. --------- Co-authored-by: command-bot <> Co-authored-by: gupnik <nikhilgupta.iitk@gmail.com> Co-authored-by: Nikhil Gupta <17176722+gupnik@users.noreply.github.com> Co-authored-by: Maksym H <1177472+mordamax@users.noreply.github.com>
This commit is contained in:
@@ -63,7 +63,7 @@ type SignedExtra = (
|
||||
);
|
||||
|
||||
construct_runtime!(
|
||||
pub struct Runtime {
|
||||
pub enum Runtime {
|
||||
System: frame_system,
|
||||
Timestamp: pallet_timestamp,
|
||||
|
||||
|
||||
@@ -258,7 +258,7 @@ impl pallet_template::Config for Runtime {
|
||||
|
||||
// Create the runtime by composing the FRAME pallets that were previously configured.
|
||||
construct_runtime!(
|
||||
pub struct Runtime {
|
||||
pub enum Runtime {
|
||||
System: frame_system,
|
||||
Timestamp: pallet_timestamp,
|
||||
Aura: pallet_aura,
|
||||
|
||||
@@ -2083,8 +2083,7 @@ impl pallet_mixnet::Config for Runtime {
|
||||
}
|
||||
|
||||
construct_runtime!(
|
||||
pub struct Runtime
|
||||
{
|
||||
pub enum Runtime {
|
||||
System: frame_system,
|
||||
Utility: pallet_utility,
|
||||
Babe: pallet_babe,
|
||||
@@ -2099,11 +2098,11 @@ construct_runtime!(
|
||||
AssetConversionTxPayment: pallet_asset_conversion_tx_payment,
|
||||
ElectionProviderMultiPhase: pallet_election_provider_multi_phase,
|
||||
Staking: pallet_staking,
|
||||
Beefy: pallet_beefy::{Pallet, Call, Storage, Config<T>, ValidateUnsigned},
|
||||
Beefy: pallet_beefy,
|
||||
// MMR leaf construction must be before session in order to have leaf contents
|
||||
// refer to block<N-1> consistently. see substrate issue #11797 for details.
|
||||
Mmr: pallet_mmr::{Pallet, Storage},
|
||||
MmrLeaf: pallet_beefy_mmr::{Pallet, Storage},
|
||||
Mmr: pallet_mmr,
|
||||
MmrLeaf: pallet_beefy_mmr,
|
||||
Session: pallet_session,
|
||||
Democracy: pallet_democracy,
|
||||
Council: pallet_collective::<Instance1>,
|
||||
@@ -2118,7 +2117,7 @@ construct_runtime!(
|
||||
ImOnline: pallet_im_online,
|
||||
AuthorityDiscovery: pallet_authority_discovery,
|
||||
Offences: pallet_offences,
|
||||
Historical: pallet_session_historical::{Pallet},
|
||||
Historical: pallet_session_historical,
|
||||
RandomnessCollectiveFlip: pallet_insecure_randomness_collective_flip,
|
||||
Identity: pallet_identity,
|
||||
Society: pallet_society,
|
||||
|
||||
@@ -37,9 +37,9 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Assets: pallet_assets::{Pallet, Call, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
Assets: pallet_assets,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -35,9 +35,9 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
AtomicSwap: pallet_atomic_swap::{Pallet, Call, Event<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
AtomicSwap: pallet_atomic_swap,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -35,9 +35,9 @@ const SLOT_DURATION: u64 = 2;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},
|
||||
Aura: pallet_aura::{Pallet, Storage, Config<T>},
|
||||
System: frame_system,
|
||||
Timestamp: pallet_timestamp,
|
||||
Aura: pallet_aura,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -187,9 +187,9 @@ mod tests {
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>},
|
||||
AuthorityDiscovery: pallet_authority_discovery::{Pallet, Config<T>},
|
||||
System: frame_system,
|
||||
Session: pallet_session,
|
||||
AuthorityDiscovery: pallet_authority_discovery,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -108,8 +108,8 @@ mod tests {
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Authorship: pallet_authorship::{Pallet, Storage},
|
||||
System: frame_system,
|
||||
Authorship: pallet_authorship,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -68,10 +68,9 @@ impl bags_list::Config for Runtime {
|
||||
|
||||
type Block = frame_system::mocking::MockBlock<Runtime>;
|
||||
frame_support::construct_runtime!(
|
||||
pub struct Runtime
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Storage, Event<T>, Config<T>},
|
||||
BagsList: bags_list::{Pallet, Call, Storage, Event<T>},
|
||||
pub enum Runtime {
|
||||
System: frame_system,
|
||||
BagsList: bags_list,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -75,11 +75,10 @@ impl VariantCount for TestId {
|
||||
}
|
||||
|
||||
frame_support::construct_runtime!(
|
||||
pub struct Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>},
|
||||
pub enum Test {
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
TransactionPayment: pallet_transaction_payment,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -49,11 +49,11 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>},
|
||||
Mmr: pallet_mmr::{Pallet, Storage},
|
||||
Beefy: pallet_beefy::{Pallet, Config<T>, Storage},
|
||||
BeefyMmr: pallet_beefy_mmr::{Pallet, Storage},
|
||||
System: frame_system,
|
||||
Session: pallet_session,
|
||||
Mmr: pallet_mmr,
|
||||
Beefy: pallet_beefy,
|
||||
BeefyMmr: pallet_beefy_mmr,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -350,8 +350,8 @@ mod mock {
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Baseline: crate::{Pallet, Call, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
Baseline: crate,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -170,8 +170,8 @@ mod mock {
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Baseline: crate::{Pallet, Call, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
Baseline: crate,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ pub mod mock {
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -70,8 +70,8 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
TestPallet: pallet_test::{Pallet, Call, Storage},
|
||||
System: frame_system,
|
||||
TestPallet: pallet_test,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -80,8 +80,8 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
TestPallet: pallet_test::{Pallet, Call, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
TestPallet: pallet_test,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -44,12 +44,12 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Bounties: pallet_bounties::{Pallet, Call, Storage, Event<T>},
|
||||
Bounties1: pallet_bounties::<Instance1>::{Pallet, Call, Storage, Event<T>},
|
||||
Treasury: pallet_treasury::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Treasury1: pallet_treasury::<Instance1>::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
Bounties: pallet_bounties,
|
||||
Bounties1: pallet_bounties::<Instance1>,
|
||||
Treasury: pallet_treasury,
|
||||
Treasury1: pallet_treasury::<Instance1>,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -46,11 +46,11 @@ type BountiesError = pallet_bounties::Error<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Bounties: pallet_bounties::{Pallet, Call, Storage, Event<T>},
|
||||
Treasury: pallet_treasury::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
ChildBounties: pallet_child_bounties::{Pallet, Call, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
Bounties: pallet_bounties,
|
||||
Treasury: pallet_treasury,
|
||||
ChildBounties: pallet_child_bounties,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -38,11 +38,11 @@ pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic<u32, u64,
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Event<T>},
|
||||
Collective: pallet_collective::<Instance1>::{Pallet, Call, Event<T>, Origin<T>, Config<T>},
|
||||
CollectiveMajority: pallet_collective::<Instance2>::{Pallet, Call, Event<T>, Origin<T>, Config<T>},
|
||||
DefaultCollective: pallet_collective::{Pallet, Call, Event<T>, Origin<T>, Config<T>},
|
||||
Democracy: mock_democracy::{Pallet, Call, Event<T>},
|
||||
System: frame_system,
|
||||
Collective: pallet_collective::<Instance1>,
|
||||
CollectiveMajority: pallet_collective::<Instance2>,
|
||||
DefaultCollective: pallet_collective,
|
||||
Democracy: mock_democracy,
|
||||
}
|
||||
);
|
||||
|
||||
@@ -176,6 +176,7 @@ impl ExtBuilder {
|
||||
|
||||
pub fn build(self) -> sp_io::TestExternalities {
|
||||
let mut ext: sp_io::TestExternalities = RuntimeGenesisConfig {
|
||||
system: frame_system::GenesisConfig::default(),
|
||||
collective: pallet_collective::GenesisConfig {
|
||||
members: self.collective_members,
|
||||
phantom: Default::default(),
|
||||
|
||||
@@ -233,10 +233,10 @@ impl pallet_message_queue::Config for Runtime {
|
||||
|
||||
construct_runtime!(
|
||||
pub enum Runtime {
|
||||
System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
ParasOrigin: origin::{Pallet, Origin},
|
||||
XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin},
|
||||
MessageQueue: pallet_message_queue::{Pallet, Event<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
ParasOrigin: origin,
|
||||
XcmPallet: pallet_xcm,
|
||||
MessageQueue: pallet_message_queue,
|
||||
}
|
||||
);
|
||||
|
||||
@@ -71,13 +71,13 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},
|
||||
Randomness: pallet_insecure_randomness_collective_flip::{Pallet, Storage},
|
||||
Utility: pallet_utility::{Pallet, Call, Storage, Event},
|
||||
Contracts: pallet_contracts::{Pallet, Call, Storage, Event<T>, HoldReason},
|
||||
Proxy: pallet_proxy::{Pallet, Call, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
Timestamp: pallet_timestamp,
|
||||
Randomness: pallet_insecure_randomness_collective_flip,
|
||||
Utility: pallet_utility,
|
||||
Contracts: pallet_contracts,
|
||||
Proxy: pallet_proxy,
|
||||
Dummy: pallet_dummy
|
||||
}
|
||||
);
|
||||
|
||||
@@ -37,9 +37,9 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Voting: pallet_conviction_voting::{Pallet, Call, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
Voting: pallet_conviction_voting,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -41,8 +41,8 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
CoreFellowship: pallet_core_fellowship::{Pallet, Call, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
CoreFellowship: pallet_core_fellowship,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -55,11 +55,11 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
Preimage: pallet_preimage,
|
||||
Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event<T>},
|
||||
Democracy: pallet_democracy::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Scheduler: pallet_scheduler,
|
||||
Democracy: pallet_democracy,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -54,11 +54,10 @@ pub type UncheckedExtrinsic =
|
||||
sp_runtime::generic::UncheckedExtrinsic<AccountId, RuntimeCall, (), ()>;
|
||||
|
||||
frame_support::construct_runtime!(
|
||||
pub struct Runtime
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Event<T>, Config<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Event<T>, Config<T>},
|
||||
MultiPhase: multi_phase::{Pallet, Call, Event<T>},
|
||||
pub enum Runtime {
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
MultiPhase: multi_phase,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -194,9 +194,8 @@ mod tests {
|
||||
pub type Block = sp_runtime::generic::Block<Header, UncheckedExtrinsic>;
|
||||
|
||||
frame_support::construct_runtime!(
|
||||
pub struct Runtime
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Event<T>},
|
||||
pub enum Runtime {
|
||||
System: frame_system,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -1454,9 +1454,9 @@ mod tests {
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Event<T>, Config<T>},
|
||||
Elections: elections_phragmen::{Pallet, Call, Event<T>, Config<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
Elections: elections_phragmen,
|
||||
}
|
||||
);
|
||||
|
||||
@@ -1507,6 +1507,7 @@ mod tests {
|
||||
*m.borrow_mut() = self.genesis_members.iter().map(|(m, _)| *m).collect::<Vec<_>>()
|
||||
});
|
||||
let mut ext: sp_io::TestExternalities = RuntimeGenesisConfig {
|
||||
system: frame_system::GenesisConfig::default(),
|
||||
balances: pallet_balances::GenesisConfig::<Test> {
|
||||
balances: vec![
|
||||
(1, 10 * self.balance_factor),
|
||||
|
||||
@@ -39,9 +39,9 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Example: pallet_example_basic::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
Example: pallet_example_basic,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ pub mod tests {
|
||||
type Block = frame_system::mocking::MockBlock<Runtime>;
|
||||
|
||||
frame_support::construct_runtime!(
|
||||
pub struct Runtime {
|
||||
pub enum Runtime {
|
||||
System: frame_system,
|
||||
DefaultPallet: pallet_default_config_example,
|
||||
}
|
||||
|
||||
@@ -33,9 +33,9 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Example: pallet_dev_mode::{Pallet, Call, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
Example: pallet_dev_mode,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ mod tests {
|
||||
use frame::testing_prelude::*;
|
||||
|
||||
construct_runtime!(
|
||||
pub struct Runtime {
|
||||
pub enum Runtime {
|
||||
System: frame_system,
|
||||
MyPallet: my_pallet,
|
||||
}
|
||||
|
||||
@@ -41,8 +41,8 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Example: example_offchain_worker::{Pallet, Call, Storage, Event<T>, ValidateUnsigned},
|
||||
System: frame_system,
|
||||
Example: example_offchain_worker,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ pub type Balance = u32;
|
||||
|
||||
type Block = frame_system::mocking::MockBlock<Runtime>;
|
||||
frame_support::construct_runtime!(
|
||||
pub struct Runtime {
|
||||
pub enum Runtime {
|
||||
System: frame_system,
|
||||
TasksExample: tasks_example,
|
||||
}
|
||||
|
||||
@@ -897,12 +897,11 @@ mod tests {
|
||||
}
|
||||
|
||||
frame_support::construct_runtime!(
|
||||
pub struct Runtime
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>},
|
||||
Custom: custom::{Pallet, Call, ValidateUnsigned, Inherent},
|
||||
pub enum Runtime {
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
TransactionPayment: pallet_transaction_payment,
|
||||
Custom: custom,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -181,7 +181,7 @@ impl fast_unstake::Config for Runtime {
|
||||
type Block = frame_system::mocking::MockBlock<Runtime>;
|
||||
|
||||
frame_support::construct_runtime!(
|
||||
pub struct Runtime {
|
||||
pub enum Runtime {
|
||||
System: frame_system,
|
||||
Timestamp: pallet_timestamp,
|
||||
Balances: pallet_balances,
|
||||
|
||||
@@ -33,8 +33,8 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Glutton: pallet_glutton::{Pallet, Event},
|
||||
System: frame_system,
|
||||
Glutton: pallet_glutton,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -47,9 +47,9 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Identity: pallet_identity::{Pallet, Call, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
Identity: pallet_identity,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -42,12 +42,11 @@ use crate::Config;
|
||||
type Block = frame_system::mocking::MockBlock<Runtime>;
|
||||
|
||||
frame_support::construct_runtime!(
|
||||
pub struct Runtime
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>},
|
||||
ImOnline: imonline::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Historical: pallet_session_historical::{Pallet},
|
||||
pub enum Runtime {
|
||||
System: frame_system,
|
||||
Session: pallet_session,
|
||||
ImOnline: imonline,
|
||||
Historical: pallet_session_historical,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Indices: pallet_indices::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
Indices: pallet_indices,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -179,8 +179,8 @@ mod tests {
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
CollectiveFlip: pallet_insecure_randomness_collective_flip::{Pallet, Storage},
|
||||
System: frame_system,
|
||||
CollectiveFlip: pallet_insecure_randomness_collective_flip,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -37,9 +37,9 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Lottery: pallet_lottery::{Pallet, Call, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
Lottery: pallet_lottery,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -541,8 +541,8 @@ mod tests {
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Membership: pallet_membership::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
System: frame_system,
|
||||
Membership: pallet_membership,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
MMR: pallet_mmr::{Pallet, Storage},
|
||||
System: frame_system,
|
||||
MMR: pallet_mmr,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -52,8 +52,8 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
MessageQueue: pallet_message_queue,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
MessageQueue: pallet_message_queue,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -32,9 +32,9 @@ type Block = frame_system::mocking::MockBlockU32<Test>;
|
||||
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test {
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Multisig: pallet_multisig::{Pallet, Call, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
Multisig: pallet_multisig,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -36,9 +36,9 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Nfts: pallet_nfts::{Pallet, Call, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
Nfts: pallet_nfts,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -36,10 +36,8 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
NodeAuthorization: pallet_node_authorization::{
|
||||
Pallet, Call, Storage, Config<T>, Event<T>,
|
||||
},
|
||||
System: frame_system,
|
||||
NodeAuthorization: pallet_node_authorization,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -180,14 +180,13 @@ impl crate::Config for Runtime {}
|
||||
type Block = frame_system::mocking::MockBlock<Runtime>;
|
||||
|
||||
frame_support::construct_runtime!(
|
||||
pub struct Runtime
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Event<T>},
|
||||
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Staking: pallet_staking::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
VoterList: pallet_bags_list::<Instance1>::{Pallet, Call, Storage, Event<T>},
|
||||
Pools: pallet_nomination_pools::{Pallet, Call, Storage, Event<T>, FreezeReason},
|
||||
pub enum Runtime {
|
||||
System: frame_system,
|
||||
Timestamp: pallet_timestamp,
|
||||
Balances: pallet_balances,
|
||||
Staking: pallet_staking,
|
||||
VoterList: pallet_bags_list::<Instance1>,
|
||||
Pools: pallet_nomination_pools,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -295,11 +295,10 @@ impl pools::Config for Runtime {
|
||||
|
||||
type Block = frame_system::mocking::MockBlock<Runtime>;
|
||||
frame_support::construct_runtime!(
|
||||
pub struct Runtime
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Storage, Event<T>, Config<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Pools: pools::{Pallet, Call, Storage, Event<T>, FreezeReason},
|
||||
pub enum Runtime {
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
Pools: pools,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -192,14 +192,13 @@ impl pallet_nomination_pools::Config for Runtime {
|
||||
type Block = frame_system::mocking::MockBlock<Runtime>;
|
||||
|
||||
frame_support::construct_runtime!(
|
||||
pub struct Runtime
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Event<T>},
|
||||
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Staking: pallet_staking::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
VoterList: pallet_bags_list::<Instance1>::{Pallet, Call, Storage, Event<T>},
|
||||
Pools: pallet_nomination_pools::{Pallet, Call, Storage, Event<T>, FreezeReason},
|
||||
pub enum Runtime {
|
||||
System: frame_system,
|
||||
Timestamp: pallet_timestamp,
|
||||
Balances: pallet_balances,
|
||||
Staking: pallet_staking,
|
||||
VoterList: pallet_bags_list::<Instance1>,
|
||||
Pools: pallet_nomination_pools,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -227,9 +227,9 @@ frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: system::{Pallet, Call, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Staking: pallet_staking::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>},
|
||||
Balances: pallet_balances,
|
||||
Staking: pallet_staking,
|
||||
Session: pallet_session,
|
||||
ImOnline: pallet_im_online::{Pallet, Call, Storage, Event<T>, ValidateUnsigned, Config<T>},
|
||||
Offences: pallet_offences::{Pallet, Storage, Event},
|
||||
Historical: pallet_session_historical::{Pallet},
|
||||
|
||||
@@ -68,10 +68,9 @@ pub fn with_on_offence_fractions<R, F: FnOnce(&mut Vec<Perbill>) -> R>(f: F) ->
|
||||
type Block = frame_system::mocking::MockBlock<Runtime>;
|
||||
|
||||
frame_support::construct_runtime!(
|
||||
pub struct Runtime
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Offences: offences::{Pallet, Storage, Event},
|
||||
pub enum Runtime {
|
||||
System: frame_system,
|
||||
Offences: offences,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -35,10 +35,10 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Proxy: proxy::{Pallet, Call, Storage, Event<T>},
|
||||
Utility: pallet_utility::{Pallet, Call, Event},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
Proxy: proxy,
|
||||
Utility: pallet_utility,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@ type Class = Rank;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Club: pallet_ranked_collective::{Pallet, Call, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
Club: pallet_ranked_collective,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -35,9 +35,9 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Recovery: recovery::{Pallet, Call, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
Recovery: recovery,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -34,8 +34,8 @@ pub type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Remark: pallet_remark::{ Pallet, Call, Event<T> },
|
||||
System: frame_system,
|
||||
Remark: pallet_remark,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -48,13 +48,13 @@ pub const BLOCK_TIME: u64 = 1000;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Staking: pallet_staking::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>},
|
||||
RootOffences: root_offences::{Pallet, Call, Storage, Event<T>},
|
||||
Historical: pallet_session::historical::{Pallet, Storage},
|
||||
System: frame_system,
|
||||
Timestamp: pallet_timestamp,
|
||||
Balances: pallet_balances,
|
||||
Staking: pallet_staking,
|
||||
Session: pallet_session,
|
||||
RootOffences: root_offences,
|
||||
Historical: pallet_session::historical,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -40,8 +40,8 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Salary: pallet_salary::{Pallet, Call, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
Salary: pallet_salary,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -97,10 +97,10 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Logger: logger::{Pallet, Call, Event<T>},
|
||||
Scheduler: scheduler::{Pallet, Call, Storage, Event<T>},
|
||||
Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>, HoldReason},
|
||||
System: frame_system,
|
||||
Logger: logger,
|
||||
Scheduler: scheduler,
|
||||
Preimage: pallet_preimage,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -37,9 +37,9 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
ScoredPool: pallet_scored_pool::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
ScoredPool: pallet_scored_pool,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -38,10 +38,10 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Staking: pallet_staking::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
Staking: pallet_staking,
|
||||
Session: pallet_session,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -82,9 +82,9 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>},
|
||||
Historical: pallet_session_historical::{Pallet},
|
||||
System: frame_system,
|
||||
Session: pallet_session,
|
||||
Historical: pallet_session_historical,
|
||||
}
|
||||
);
|
||||
|
||||
@@ -92,8 +92,8 @@ frame_support::construct_runtime!(
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>},
|
||||
System: frame_system,
|
||||
Session: pallet_session,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -39,9 +39,9 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Society: pallet_society::{Pallet, Call, Storage, Event<T>, Config<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
Society: pallet_society,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -1071,9 +1071,9 @@ mod mock {
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
StateTrieMigration: pallet_state_trie_migration::{Pallet, Call, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
StateTrieMigration: pallet_state_trie_migration,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -98,9 +98,9 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Sudo: sudo::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Logger: logger::{Pallet, Call, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
Sudo: sudo,
|
||||
Logger: logger,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
//! order to get all the pallet parts for each pallet.
|
||||
//!
|
||||
//! Pallets can define their parts:
|
||||
//! - Implicitely: `System: frame_system`
|
||||
//! - Implicitly: `System: frame_system`
|
||||
//! - Explicitly: `System: frame_system::{Pallet, Call}`
|
||||
//!
|
||||
//! The `construct_runtime` transitions from the implicit definition to the explict one.
|
||||
@@ -172,7 +172,7 @@
|
||||
//!
|
||||
//! This call has no implicit pallet parts, thus it will expand to the runtime construction:
|
||||
//! ```ignore
|
||||
//! pub struct Runtime { ... }
|
||||
//! pub enum Runtime { ... }
|
||||
//! pub struct Call { ... }
|
||||
//! impl Call ...
|
||||
//! pub enum Origin { ... }
|
||||
@@ -342,7 +342,7 @@ fn construct_runtime_final_expansion(
|
||||
syn::Error::new(
|
||||
pallets_token.span.join(),
|
||||
"`System` pallet declaration is missing. \
|
||||
Please add this line: `System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},`",
|
||||
Please add this line: `System: frame_system,`",
|
||||
)
|
||||
})?;
|
||||
if !system_pallet.cfg_pattern.is_empty() {
|
||||
|
||||
@@ -2291,7 +2291,7 @@ pub mod pallet_macros {
|
||||
/// # type Block = frame_system::mocking::MockBlock<Self>;
|
||||
/// # }
|
||||
/// construct_runtime! {
|
||||
/// pub struct Runtime {
|
||||
/// pub enum Runtime {
|
||||
/// System: frame_system,
|
||||
/// Custom: custom_pallet
|
||||
/// }
|
||||
|
||||
@@ -254,10 +254,10 @@ pub fn migrate_from_pallet_version_to_storage_version<
|
||||
/// construct_runtime! {
|
||||
/// pub enum Runtime
|
||||
/// {
|
||||
/// System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>} = 0,
|
||||
/// System: frame_system = 0,
|
||||
///
|
||||
/// SomePalletToRemove: pallet_something::{Pallet, Call, Storage, Event<T>} = 1,
|
||||
/// AnotherPalletToRemove: pallet_something_else::{Pallet, Call, Storage, Event<T>} = 2,
|
||||
/// SomePalletToRemove: pallet_something = 1,
|
||||
/// AnotherPalletToRemove: pallet_something_else = 2,
|
||||
///
|
||||
/// YourOtherPallets...
|
||||
/// }
|
||||
|
||||
@@ -83,7 +83,7 @@ pub type Block = generic::Block<Header, UncheckedExtrinsic>;
|
||||
pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<u32, RuntimeCall, Signature, ()>;
|
||||
|
||||
construct_runtime!(
|
||||
pub struct Runtime {
|
||||
pub enum Runtime {
|
||||
System: renamed_frame_system,
|
||||
}
|
||||
);
|
||||
|
||||
@@ -68,8 +68,8 @@ mod tests {
|
||||
construct_runtime! {
|
||||
pub struct Runtime
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Pallet: pallet::{Pallet, Config<T>},
|
||||
System: frame_system,
|
||||
Pallet: pallet,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
error: `System` pallet declaration is missing. Please add this line: `System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},`
|
||||
error: `System` pallet declaration is missing. Please add this line: `System: frame_system,`
|
||||
--> tests/construct_runtime_ui/missing_system_module.rs:22:2
|
||||
|
|
||||
22 | / {
|
||||
|
||||
+1
-1
@@ -64,7 +64,7 @@ pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic<u64, Runti
|
||||
pub type Block = sp_runtime::generic::Block<Header, UncheckedExtrinsic>;
|
||||
|
||||
frame_support::construct_runtime!(
|
||||
pub struct Runtime
|
||||
pub enum Runtime
|
||||
{
|
||||
// Exclude part `Storage` in order not to check its metadata in tests.
|
||||
System: frame_system,
|
||||
|
||||
@@ -201,7 +201,6 @@ pub type Block = generic::Block<Header, UncheckedExtrinsic>;
|
||||
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Runtime
|
||||
|
||||
{
|
||||
System: frame_system,
|
||||
FinalKeysNone: no_instance,
|
||||
|
||||
@@ -278,24 +278,14 @@ pub type Block = generic::Block<Header, UncheckedExtrinsic>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Runtime
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Event<T>},
|
||||
Module1_1: module1::<Instance1>::{
|
||||
Pallet, Call, Storage, Event<T>, Config<T>, Origin<T>, Inherent
|
||||
},
|
||||
Module1_2: module1::<Instance2>::{
|
||||
Pallet, Call, Storage, Event<T>, Config<T>, Origin<T>, Inherent
|
||||
},
|
||||
Module2: module2::{Pallet, Call, Storage, Event<T>, Config<T>, Origin<T>, Inherent},
|
||||
Module2_1: module2::<Instance1>::{
|
||||
Pallet, Call, Storage, Event<T>, Config<T>, Origin<T>, Inherent
|
||||
},
|
||||
Module2_2: module2::<Instance2>::{
|
||||
Pallet, Call, Storage, Event<T>, Config<T>, Origin<T>, Inherent
|
||||
},
|
||||
Module2_3: module2::<Instance3>::{
|
||||
Pallet, Call, Storage, Event<T>, Config<T>, Origin<T>, Inherent
|
||||
},
|
||||
Module3: module3::{Pallet, Call},
|
||||
System: frame_system,
|
||||
Module1_1: module1::<Instance1>,
|
||||
Module1_2: module1::<Instance2>,
|
||||
Module2: module2,
|
||||
Module2_1: module2::<Instance1>,
|
||||
Module2_2: module2::<Instance2>,
|
||||
Module2_3: module2::<Instance3>,
|
||||
Module3: module3,
|
||||
}
|
||||
);
|
||||
|
||||
@@ -350,6 +340,7 @@ impl module3::Config for Runtime {
|
||||
|
||||
fn new_test_ext() -> sp_io::TestExternalities {
|
||||
RuntimeGenesisConfig {
|
||||
system: Default::default(),
|
||||
module_1_1: module1::GenesisConfig { value: 3, test: 2 },
|
||||
module_1_2: module1::GenesisConfig { value: 4, test: 5 },
|
||||
module_2: module2::GenesisConfig {
|
||||
|
||||
@@ -176,7 +176,7 @@ impl frame_system::Config for Runtime {
|
||||
impl module::Config for Runtime {}
|
||||
|
||||
frame_support::construct_runtime!(
|
||||
pub struct Runtime {
|
||||
pub enum Runtime {
|
||||
System: frame_system,
|
||||
Module: module,
|
||||
}
|
||||
|
||||
@@ -57,8 +57,8 @@ impl frame_system::Config for Runtime {
|
||||
construct_runtime! {
|
||||
pub struct Runtime
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Pallet: test_pallet::{Pallet, Config<T>},
|
||||
System: frame_system,
|
||||
Pallet: test_pallet,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ impl frame_system::Config for Runtime {
|
||||
impl Config for Runtime {}
|
||||
|
||||
frame_support::construct_runtime!(
|
||||
pub struct Runtime {
|
||||
pub enum Runtime {
|
||||
System: frame_system,
|
||||
MyPallet: pallet,
|
||||
}
|
||||
|
||||
@@ -66,8 +66,8 @@ impl dummy_pallet::Config for Test {}
|
||||
construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>} = 0,
|
||||
DummyPallet: dummy_pallet::{Pallet, Config<T>, Storage} = 1,
|
||||
System: frame_system = 0,
|
||||
DummyPallet: dummy_pallet = 1,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -47,10 +47,9 @@ mod module {
|
||||
type Block = frame_system::mocking::MockBlock<Runtime>;
|
||||
|
||||
frame_support::construct_runtime!(
|
||||
pub struct Runtime
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Module: module::{Pallet, Event},
|
||||
pub enum Runtime {
|
||||
System: frame_system,
|
||||
Module: module,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ type Block = mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@ type Moment = u64;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent},
|
||||
System: frame_system,
|
||||
Timestamp: pallet_timestamp,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -44,12 +44,12 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Treasury: pallet_treasury::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Treasury1: pallet_treasury::<Instance1>::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Tips: pallet_tips::{Pallet, Call, Storage, Event<T>},
|
||||
Tips1: pallet_tips::<Instance1>::{Pallet, Call, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
Treasury: pallet_treasury,
|
||||
Treasury1: pallet_treasury::<Instance1>,
|
||||
Tips: pallet_tips,
|
||||
Tips1: pallet_tips::<Instance1>,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ type Balance = u64;
|
||||
type AccountId = u64;
|
||||
|
||||
frame_support::construct_runtime!(
|
||||
pub struct Runtime {
|
||||
pub enum Runtime {
|
||||
System: system,
|
||||
Balances: pallet_balances,
|
||||
TransactionPayment: pallet_transaction_payment,
|
||||
|
||||
@@ -84,7 +84,7 @@ pub mod pallet_dummy {
|
||||
impl pallet_dummy::Config for Runtime {}
|
||||
|
||||
frame_support::construct_runtime!(
|
||||
pub struct Runtime {
|
||||
pub enum Runtime {
|
||||
System: system,
|
||||
SkipFeeless: pallet_skip_feeless_payment,
|
||||
DummyPallet: pallet_dummy,
|
||||
|
||||
@@ -36,8 +36,8 @@ type Block = frame_system::mocking::MockBlock<Runtime>;
|
||||
frame_support::construct_runtime!(
|
||||
pub struct Runtime
|
||||
{
|
||||
System: system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
System: system,
|
||||
Balances: pallet_balances,
|
||||
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>},
|
||||
}
|
||||
);
|
||||
|
||||
@@ -33,11 +33,9 @@ pub type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
TransactionStorage: pallet_transaction_storage::{
|
||||
Pallet, Call, Storage, Config<T>, Inherent, Event<T>, HoldReason
|
||||
},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
TransactionStorage: pallet_transaction_storage,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -47,9 +47,9 @@ type TreasuryCall = crate::Call<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Treasury: treasury::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
Treasury: treasury,
|
||||
Utility: pallet_utility,
|
||||
}
|
||||
);
|
||||
|
||||
@@ -35,9 +35,9 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Uniques: pallet_uniques::{Pallet, Call, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
Uniques: pallet_uniques,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -129,14 +129,14 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Timestamp: pallet_timestamp::{Call, Inherent},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
RootTesting: pallet_root_testing::{Pallet, Call, Storage, Event<T>},
|
||||
System: frame_system,
|
||||
Timestamp: pallet_timestamp,
|
||||
Balances: pallet_balances,
|
||||
RootTesting: pallet_root_testing,
|
||||
Council: pallet_collective::<Instance1>,
|
||||
Utility: utility::{Pallet, Call, Event},
|
||||
Example: example::{Pallet, Call},
|
||||
Democracy: mock_democracy::{Pallet, Call, Event<T>},
|
||||
Utility: utility,
|
||||
Example: example,
|
||||
Democracy: mock_democracy,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -33,9 +33,9 @@ type Block = frame_system::mocking::MockBlock<Test>;
|
||||
frame_support::construct_runtime!(
|
||||
pub enum Test
|
||||
{
|
||||
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
|
||||
Vesting: pallet_vesting::{Pallet, Call, Storage, Event<T>, Config<T>},
|
||||
System: frame_system,
|
||||
Balances: pallet_balances,
|
||||
Vesting: pallet_vesting,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -282,7 +282,7 @@ pub use sp_api_proc_macro::decl_runtime_apis;
|
||||
/// #
|
||||
/// # /// The declaration of the `Runtime` type is done by the `construct_runtime!` macro
|
||||
/// # /// in a real runtime.
|
||||
/// # pub struct Runtime {}
|
||||
/// # pub enum Runtime {}
|
||||
/// #
|
||||
/// # sp_api::decl_runtime_apis! {
|
||||
/// # /// Declare the api trait.
|
||||
@@ -361,7 +361,7 @@ pub use sp_api_proc_macro::decl_runtime_apis;
|
||||
/// let's say you want to implement a staging version of the runtime api and put it behind a
|
||||
/// feature flag. You can do it this way:
|
||||
/// ```ignore
|
||||
/// pub struct Runtime {}
|
||||
/// pub enum Runtime {}
|
||||
/// sp_api::decl_runtime_apis! {
|
||||
/// pub trait ApiWithStagingMethod {
|
||||
/// fn stable_one(data: u64);
|
||||
|
||||
@@ -24,7 +24,7 @@ use substrate_test_runtime_client::runtime::{Block, Hash};
|
||||
|
||||
/// The declaration of the `Runtime` type is done by the `construct_runtime!` macro in a real
|
||||
/// runtime.
|
||||
pub struct Runtime {}
|
||||
pub enum Runtime {}
|
||||
|
||||
decl_runtime_apis! {
|
||||
pub trait Api {
|
||||
|
||||
@@ -42,8 +42,8 @@ use sp_storage::{StorageData, StorageKey};
|
||||
/// # construct_runtime!(
|
||||
/// # pub enum TestRuntime
|
||||
/// # {
|
||||
/// # System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
|
||||
/// # Test: pallet_test::{Pallet, Storage},
|
||||
/// # System: frame_system,
|
||||
/// # Test: pallet_test,
|
||||
/// # }
|
||||
/// # );
|
||||
/// #
|
||||
|
||||
Reference in New Issue
Block a user