From 757ae372f7f07d9a7a4f62f646baa5e388ec5531 Mon Sep 17 00:00:00 2001 From: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Date: Mon, 22 Jan 2024 08:15:53 +0100 Subject: [PATCH] Switch All `construct_runtime`s to New Syntax (#2979) Clean up all the old syntax. --------- Co-authored-by: command-bot <> Co-authored-by: gupnik Co-authored-by: Nikhil Gupta <17176722+gupnik@users.noreply.github.com> Co-authored-by: Maksym H <1177472+mordamax@users.noreply.github.com> --- cumulus/parachain-template/runtime/src/lib.rs | 2 +- .../assets/asset-hub-rococo/src/lib.rs | 57 ++++---- .../assets/asset-hub-westend/src/lib.rs | 58 ++++---- .../bridge-hubs/bridge-hub-rococo/src/lib.rs | 72 +++++----- .../bridge-hubs/bridge-hub-westend/src/lib.rs | 46 +++--- .../collectives-westend/src/lib.rs | 72 +++++----- .../contracts/contracts-rococo/src/lib.rs | 42 +++--- .../glutton/glutton-westend/src/lib.rs | 22 ++- .../runtimes/people/people-rococo/src/lib.rs | 40 +++--- .../runtimes/people/people-westend/src/lib.rs | 40 +++--- .../runtimes/starters/seedling/src/lib.rs | 20 ++- .../runtimes/starters/shell/src/lib.rs | 18 ++- .../runtimes/testing/penpal/src/lib.rs | 40 +++--- .../testing/rococo-parachain/src/lib.rs | 32 ++--- docs/sdk/src/guides/your_first_pallet/mod.rs | 6 +- docs/sdk/src/polkadot_sdk/cumulus.rs | 2 +- docs/sdk/src/polkadot_sdk/frame_runtime.rs | 4 +- .../runtime/common/src/assigned_slots/mod.rs | 14 +- polkadot/runtime/common/src/auctions.rs | 6 +- polkadot/runtime/common/src/claims.rs | 8 +- polkadot/runtime/common/src/crowdloan/mod.rs | 6 +- polkadot/runtime/common/src/impls.rs | 8 +- .../runtime/common/src/integration_tests.rs | 26 ++-- .../runtime/common/src/paras_registrar/mod.rs | 14 +- polkadot/runtime/common/src/purchase.rs | 8 +- polkadot/runtime/common/src/slots/mod.rs | 6 +- polkadot/runtime/rococo/src/lib.rs | 132 +++++++++--------- polkadot/runtime/test-runtime/src/lib.rs | 70 +++++----- polkadot/runtime/westend/src/lib.rs | 120 ++++++++-------- .../src/fungible/mock.rs | 6 +- .../pallet-xcm-benchmarks/src/generic/mock.rs | 6 +- polkadot/xcm/pallet-xcm/src/mock.rs | 12 +- .../xcm/xcm-builder/src/tests/pay/mock.rs | 2 +- polkadot/xcm/xcm-builder/tests/mock/mod.rs | 8 +- .../xcm-simulator/example/src/parachain.rs | 10 +- .../xcm-simulator/example/src/relay_chain.rs | 12 +- .../xcm/xcm-simulator/fuzzer/src/parachain.rs | 8 +- .../xcm-simulator/fuzzer/src/relay_chain.rs | 10 +- substrate/bin/minimal/runtime/src/lib.rs | 2 +- .../bin/node-template/runtime/src/lib.rs | 2 +- substrate/bin/node/runtime/src/lib.rs | 11 +- substrate/frame/assets/src/mock.rs | 6 +- substrate/frame/atomic-swap/src/tests.rs | 6 +- substrate/frame/aura/src/mock.rs | 6 +- .../frame/authority-discovery/src/lib.rs | 6 +- substrate/frame/authorship/src/lib.rs | 4 +- substrate/frame/bags-list/src/mock.rs | 7 +- substrate/frame/balances/src/tests/mod.rs | 9 +- substrate/frame/beefy-mmr/src/mock.rs | 10 +- .../benchmarking/pov/src/benchmarking.rs | 4 +- substrate/frame/benchmarking/pov/src/tests.rs | 4 +- substrate/frame/benchmarking/src/baseline.rs | 2 +- substrate/frame/benchmarking/src/tests.rs | 4 +- .../frame/benchmarking/src/tests_instance.rs | 4 +- substrate/frame/bounties/src/tests.rs | 12 +- substrate/frame/child-bounties/src/tests.rs | 10 +- substrate/frame/collective/src/tests.rs | 11 +- .../contracts/mock-network/src/relay_chain.rs | 10 +- substrate/frame/contracts/src/tests.rs | 14 +- .../frame/conviction-voting/src/tests.rs | 6 +- substrate/frame/core-fellowship/src/tests.rs | 4 +- substrate/frame/democracy/src/tests.rs | 8 +- .../election-provider-multi-phase/src/mock.rs | 9 +- .../election-provider-support/src/onchain.rs | 5 +- substrate/frame/elections-phragmen/src/lib.rs | 7 +- substrate/frame/examples/basic/src/tests.rs | 6 +- .../frame/examples/default-config/src/lib.rs | 2 +- .../frame/examples/dev-mode/src/tests.rs | 6 +- .../frame/examples/frame-crate/src/lib.rs | 2 +- .../examples/offchain-worker/src/tests.rs | 4 +- substrate/frame/examples/tasks/src/mock.rs | 2 +- substrate/frame/executive/src/lib.rs | 11 +- substrate/frame/fast-unstake/src/mock.rs | 2 +- substrate/frame/glutton/src/mock.rs | 4 +- substrate/frame/identity/src/tests.rs | 6 +- substrate/frame/im-online/src/mock.rs | 11 +- substrate/frame/indices/src/mock.rs | 6 +- .../src/lib.rs | 4 +- substrate/frame/lottery/src/mock.rs | 6 +- substrate/frame/membership/src/lib.rs | 4 +- .../frame/merkle-mountain-range/src/mock.rs | 4 +- .../message-queue/src/integration_test.rs | 4 +- substrate/frame/message-queue/src/mock.rs | 4 +- substrate/frame/multisig/src/tests.rs | 6 +- substrate/frame/nfts/src/mock.rs | 6 +- .../frame/node-authorization/src/mock.rs | 6 +- .../nomination-pools/benchmarking/src/mock.rs | 15 +- substrate/frame/nomination-pools/src/mock.rs | 9 +- .../nomination-pools/test-staking/src/mock.rs | 15 +- .../frame/offences/benchmarking/src/mock.rs | 6 +- substrate/frame/offences/src/mock.rs | 7 +- substrate/frame/proxy/src/tests.rs | 8 +- .../frame/ranked-collective/src/tests.rs | 4 +- substrate/frame/recovery/src/mock.rs | 6 +- substrate/frame/remark/src/mock.rs | 4 +- substrate/frame/root-offences/src/mock.rs | 14 +- substrate/frame/salary/src/tests.rs | 4 +- substrate/frame/scheduler/src/mock.rs | 8 +- substrate/frame/scored-pool/src/mock.rs | 6 +- .../frame/session/benchmarking/src/mock.rs | 8 +- substrate/frame/session/src/mock.rs | 10 +- substrate/frame/society/src/mock.rs | 6 +- .../frame/state-trie-migration/src/lib.rs | 6 +- substrate/frame/sudo/src/mock.rs | 6 +- .../procedural/src/construct_runtime/mod.rs | 6 +- substrate/frame/support/src/lib.rs | 2 +- substrate/frame/support/src/migrations.rs | 6 +- .../support/test/compile_pass/src/lib.rs | 2 +- .../support/test/stg_frame_crate/src/lib.rs | 4 +- .../missing_system_module.stderr | 2 +- .../pass/composite_enum_instance.rs | 2 +- .../frame/support/test/tests/final_keys.rs | 1 - .../frame/support/test/tests/instance.rs | 27 ++-- .../frame/support/test/tests/issue2219.rs | 2 +- .../pallet_ui/pass/no_std_genesis_config.rs | 4 +- .../support/test/tests/storage_layers.rs | 2 +- .../support/test/tests/versioned_migration.rs | 4 +- substrate/frame/system/benches/bench.rs | 7 +- .../frame/system/benchmarking/src/mock.rs | 2 +- substrate/frame/system/src/mock.rs | 2 +- substrate/frame/timestamp/src/mock.rs | 4 +- substrate/frame/tips/src/tests.rs | 12 +- .../asset-tx-payment/src/mock.rs | 2 +- .../skip-feeless-payment/src/mock.rs | 2 +- .../frame/transaction-payment/src/mock.rs | 4 +- .../frame/transaction-storage/src/mock.rs | 8 +- substrate/frame/treasury/src/tests.rs | 6 +- substrate/frame/uniques/src/mock.rs | 6 +- substrate/frame/utility/src/tests.rs | 14 +- substrate/frame/vesting/src/mock.rs | 6 +- substrate/primitives/api/src/lib.rs | 4 +- .../api/test/tests/decl_and_impl.rs | 2 +- substrate/utils/frame/rpc/support/src/lib.rs | 4 +- 133 files changed, 795 insertions(+), 850 deletions(-) diff --git a/cumulus/parachain-template/runtime/src/lib.rs b/cumulus/parachain-template/runtime/src/lib.rs index 1ef018a8ca34..0ab36eba315d 100644 --- a/cumulus/parachain-template/runtime/src/lib.rs +++ b/cumulus/parachain-template/runtime/src/lib.rs @@ -493,7 +493,7 @@ impl pallet_parachain_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 support stuff. System: frame_system = 0, ParachainSystem: cumulus_pallet_parachain_system = 1, diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs index 0f379a6f7bc3..a812e747f00b 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs @@ -895,48 +895,45 @@ construct_runtime!( pub enum Runtime { // System support stuff. - System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, - ParachainSystem: cumulus_pallet_parachain_system::{ - Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned, - } = 1, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 4, + System: frame_system = 0, + ParachainSystem: cumulus_pallet_parachain_system = 1, + Timestamp: pallet_timestamp = 3, + ParachainInfo: parachain_info = 4, // Monetary stuff. - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 10, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 11, - AssetTxPayment: pallet_asset_conversion_tx_payment::{Pallet, Event} = 13, + Balances: pallet_balances = 10, + TransactionPayment: pallet_transaction_payment = 11, + AssetTxPayment: pallet_asset_conversion_tx_payment = 13, // Collator support. the order of these 5 are important and shall not change. - Authorship: pallet_authorship::{Pallet, Storage} = 20, - CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event, Config} = 21, - Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 22, - Aura: pallet_aura::{Pallet, Storage, Config} = 23, - AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24, + Authorship: pallet_authorship = 20, + CollatorSelection: pallet_collator_selection = 21, + Session: pallet_session = 22, + Aura: pallet_aura = 23, + AuraExt: cumulus_pallet_aura_ext = 24, // XCM helpers. - XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 30, - PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 31, - CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, - MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 34, + XcmpQueue: cumulus_pallet_xcmp_queue = 30, + PolkadotXcm: pallet_xcm = 31, + CumulusXcm: cumulus_pallet_xcm = 32, + MessageQueue: pallet_message_queue = 34, // Handy utilities. - Utility: pallet_utility::{Pallet, Call, Event} = 40, - Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 41, - Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 42, + Utility: pallet_utility = 40, + Multisig: pallet_multisig = 41, + Proxy: pallet_proxy = 42, // Bridge utilities. - ToWestendXcmRouter: pallet_xcm_bridge_hub_router::::{Pallet, Storage, Call} = 45, + ToWestendXcmRouter: pallet_xcm_bridge_hub_router:: = 45, // The main stage. - Assets: pallet_assets::::{Pallet, Call, Storage, Event} = 50, - Uniques: pallet_uniques::{Pallet, Call, Storage, Event} = 51, - Nfts: pallet_nfts::{Pallet, Call, Storage, Event} = 52, - ForeignAssets: pallet_assets::::{Pallet, Call, Storage, Event} = 53, - NftFractionalization: pallet_nft_fractionalization::{Pallet, Call, Storage, Event, HoldReason} = 54, - - PoolAssets: pallet_assets::::{Pallet, Call, Storage, Event} = 55, - AssetConversion: pallet_asset_conversion::{Pallet, Call, Storage, Event} = 56, + Assets: pallet_assets:: = 50, + Uniques: pallet_uniques = 51, + Nfts: pallet_nfts = 52, + ForeignAssets: pallet_assets:: = 53, + NftFractionalization: pallet_nft_fractionalization = 54, + PoolAssets: pallet_assets:: = 55, + AssetConversion: pallet_asset_conversion = 56, #[cfg(feature = "state-trie-version-1")] StateTrieMigration: pallet_state_trie_migration = 70, diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs index 310726349fa6..b4bcc716513a 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -870,48 +870,46 @@ construct_runtime!( pub enum Runtime { // System support stuff. - System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, - ParachainSystem: cumulus_pallet_parachain_system::{ - Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned, - } = 1, + System: frame_system = 0, + ParachainSystem: cumulus_pallet_parachain_system = 1, // RandomnessCollectiveFlip = 2 removed - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 4, + Timestamp: pallet_timestamp = 3, + ParachainInfo: parachain_info = 4, // Monetary stuff. - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 10, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 11, - // AssetTxPayment: pallet_asset_tx_payment::{Pallet, Event} = 12, - AssetTxPayment: pallet_asset_conversion_tx_payment::{Pallet, Event} = 13, + Balances: pallet_balances = 10, + TransactionPayment: pallet_transaction_payment = 11, + // AssetTxPayment: pallet_asset_tx_payment = 12, + AssetTxPayment: pallet_asset_conversion_tx_payment = 13, // Collator support. the order of these 5 are important and shall not change. - Authorship: pallet_authorship::{Pallet, Storage} = 20, - CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event, Config} = 21, - Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 22, - Aura: pallet_aura::{Pallet, Storage, Config} = 23, - AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24, + Authorship: pallet_authorship = 20, + CollatorSelection: pallet_collator_selection = 21, + Session: pallet_session = 22, + Aura: pallet_aura = 23, + AuraExt: cumulus_pallet_aura_ext = 24, // XCM helpers. - XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 30, - PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 31, - CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, + XcmpQueue: cumulus_pallet_xcmp_queue = 30, + PolkadotXcm: pallet_xcm = 31, + CumulusXcm: cumulus_pallet_xcm = 32, // Bridge utilities. - ToRococoXcmRouter: pallet_xcm_bridge_hub_router::::{Pallet, Storage, Call} = 34, - MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 35, + ToRococoXcmRouter: pallet_xcm_bridge_hub_router:: = 34, + MessageQueue: pallet_message_queue = 35, // Handy utilities. - Utility: pallet_utility::{Pallet, Call, Event} = 40, - Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 41, - Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 42, + Utility: pallet_utility = 40, + Multisig: pallet_multisig = 41, + Proxy: pallet_proxy = 42, // The main stage. - Assets: pallet_assets::::{Pallet, Call, Storage, Event} = 50, - Uniques: pallet_uniques::{Pallet, Call, Storage, Event} = 51, - Nfts: pallet_nfts::{Pallet, Call, Storage, Event} = 52, - ForeignAssets: pallet_assets::::{Pallet, Call, Storage, Event} = 53, - NftFractionalization: pallet_nft_fractionalization::{Pallet, Call, Storage, Event, HoldReason} = 54, - PoolAssets: pallet_assets::::{Pallet, Call, Storage, Event} = 55, - AssetConversion: pallet_asset_conversion::{Pallet, Call, Storage, Event} = 56, + Assets: pallet_assets:: = 50, + Uniques: pallet_uniques = 51, + Nfts: pallet_nfts = 52, + ForeignAssets: pallet_assets:: = 53, + NftFractionalization: pallet_nft_fractionalization = 54, + PoolAssets: pallet_assets:: = 55, + AssetConversion: pallet_asset_conversion = 56, } ); diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index f84ff0799b9c..4a3ef8ac4e8c 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -666,68 +666,66 @@ construct_runtime!( pub enum Runtime { // System support stuff. - System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, - ParachainSystem: cumulus_pallet_parachain_system::{ - Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned, - } = 1, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 3, + System: frame_system = 0, + ParachainSystem: cumulus_pallet_parachain_system = 1, + Timestamp: pallet_timestamp = 2, + ParachainInfo: parachain_info = 3, // Monetary stuff. - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 10, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 11, + Balances: pallet_balances = 10, + TransactionPayment: pallet_transaction_payment = 11, // Collator support. The order of these 4 are important and shall not change. - Authorship: pallet_authorship::{Pallet, Storage} = 20, - CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event, Config} = 21, - Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 22, - Aura: pallet_aura::{Pallet, Storage, Config} = 23, - AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24, + Authorship: pallet_authorship = 20, + CollatorSelection: pallet_collator_selection = 21, + Session: pallet_session = 22, + Aura: pallet_aura = 23, + AuraExt: cumulus_pallet_aura_ext = 24, // XCM helpers. - XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 30, - PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 31, - CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, + XcmpQueue: cumulus_pallet_xcmp_queue = 30, + PolkadotXcm: pallet_xcm = 31, + CumulusXcm: cumulus_pallet_xcm = 32, // Handy utilities. - Utility: pallet_utility::{Pallet, Call, Event} = 40, - Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 36, + Utility: pallet_utility = 40, + Multisig: pallet_multisig = 36, // Bridge relayers pallet, used by several bridges here. - BridgeRelayers: pallet_bridge_relayers::{Pallet, Call, Storage, Event} = 47, + BridgeRelayers: pallet_bridge_relayers = 47, // With-Westend GRANDPA bridge module. - BridgeWestendGrandpa: pallet_bridge_grandpa::::{Pallet, Call, Storage, Event, Config} = 48, + BridgeWestendGrandpa: pallet_bridge_grandpa:: = 48, // With-Westend parachain bridge module. - BridgeWestendParachains: pallet_bridge_parachains::::{Pallet, Call, Storage, Event} = 49, + BridgeWestendParachains: pallet_bridge_parachains:: = 49, // With-Westend messaging bridge module. - BridgeWestendMessages: pallet_bridge_messages::::{Pallet, Call, Storage, Event, Config} = 51, + BridgeWestendMessages: pallet_bridge_messages:: = 51, // With-Westend bridge hub pallet. - XcmOverBridgeHubWestend: pallet_xcm_bridge_hub::::{Pallet} = 52, + XcmOverBridgeHubWestend: pallet_xcm_bridge_hub:: = 52, // With-Rococo Bulletin GRANDPA bridge module. // - // we can't use `BridgeRococoBulletinGrandpa` name here, because the same Bulletin runtime will be - // used for both Rococo and Polkadot Bulletin chains AND this name affects runtime storage keys, used - // by the relayer process - BridgePolkadotBulletinGrandpa: pallet_bridge_grandpa::::{Pallet, Call, Storage, Event, Config} = 60, + // we can't use `BridgeRococoBulletinGrandpa` name here, because the same Bulletin runtime + // will be used for both Rococo and Polkadot Bulletin chains AND this name affects runtime + // storage keys, used by the relayer process. + BridgePolkadotBulletinGrandpa: pallet_bridge_grandpa:: = 60, // With-Rococo Bulletin messaging bridge module. // - // we can't use `BridgeRococoBulletinMessages` name here, because the same Bulletin runtime will be - // used for both Rococo and Polkadot Bulletin chains AND this name affects runtime storage keys, used - // by this runtime and the relayer process - BridgePolkadotBulletinMessages: pallet_bridge_messages::::{Pallet, Call, Storage, Event, Config} = 61, + // we can't use `BridgeRococoBulletinMessages` name here, because the same Bulletin runtime + // will be used for both Rococo and Polkadot Bulletin chains AND this name affects runtime + // storage keys, used by this runtime and the relayer process. + BridgePolkadotBulletinMessages: pallet_bridge_messages:: = 61, // With-Rococo Bulletin bridge hub pallet. - XcmOverPolkadotBulletin: pallet_xcm_bridge_hub::::{Pallet} = 62, + XcmOverPolkadotBulletin: pallet_xcm_bridge_hub:: = 62, - EthereumInboundQueue: snowbridge_pallet_inbound_queue::{Pallet, Call, Storage, Event} = 80, - EthereumOutboundQueue: snowbridge_pallet_outbound_queue::{Pallet, Call, Storage, Event} = 81, - EthereumBeaconClient: snowbridge_pallet_ethereum_client::{Pallet, Call, Storage, Event} = 82, - EthereumSystem: snowbridge_pallet_system::{Pallet, Call, Storage, Config, Event} = 83, + EthereumInboundQueue: snowbridge_pallet_inbound_queue = 80, + EthereumOutboundQueue: snowbridge_pallet_outbound_queue = 81, + EthereumBeaconClient: snowbridge_pallet_ethereum_client = 82, + EthereumSystem: snowbridge_pallet_system = 83, // Message Queue. Importantly, is registered last so that messages are processed after // the `on_initialize` hooks of bridging pallets. - MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 250, + MessageQueue: pallet_message_queue = 250, } ); diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs index e90b5668c03d..08dd129d84b6 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs @@ -460,43 +460,41 @@ construct_runtime!( pub enum Runtime { // System support stuff. - System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, - ParachainSystem: cumulus_pallet_parachain_system::{ - Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned, - } = 1, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 3, + System: frame_system = 0, + ParachainSystem: cumulus_pallet_parachain_system = 1, + Timestamp: pallet_timestamp = 2, + ParachainInfo: parachain_info = 3, // Monetary stuff. - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 10, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 11, + Balances: pallet_balances = 10, + TransactionPayment: pallet_transaction_payment = 11, // Collator support. The order of these 4 are important and shall not change. - Authorship: pallet_authorship::{Pallet, Storage} = 20, - CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event, Config} = 21, - Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 22, - Aura: pallet_aura::{Pallet, Storage, Config} = 23, - AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24, + Authorship: pallet_authorship = 20, + CollatorSelection: pallet_collator_selection = 21, + Session: pallet_session = 22, + Aura: pallet_aura = 23, + AuraExt: cumulus_pallet_aura_ext = 24, // XCM helpers. - XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 30, - PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 31, - CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, + XcmpQueue: cumulus_pallet_xcmp_queue = 30, + PolkadotXcm: pallet_xcm = 31, + CumulusXcm: cumulus_pallet_xcm = 32, // Handy utilities. - Utility: pallet_utility::{Pallet, Call, Event} = 40, - Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 36, + Utility: pallet_utility = 40, + Multisig: pallet_multisig = 36, // Bridging stuff. - BridgeRelayers: pallet_bridge_relayers::{Pallet, Call, Storage, Event} = 41, - BridgeRococoGrandpa: pallet_bridge_grandpa::::{Pallet, Call, Storage, Event, Config} = 42, - BridgeRococoParachains: pallet_bridge_parachains::::{Pallet, Call, Storage, Event} = 43, - BridgeRococoMessages: pallet_bridge_messages::::{Pallet, Call, Storage, Event, Config} = 44, - XcmOverBridgeHubRococo: pallet_xcm_bridge_hub::::{Pallet} = 45, + BridgeRelayers: pallet_bridge_relayers = 41, + BridgeRococoGrandpa: pallet_bridge_grandpa:: = 42, + BridgeRococoParachains: pallet_bridge_parachains:: = 43, + BridgeRococoMessages: pallet_bridge_messages:: = 44, + XcmOverBridgeHubRococo: pallet_xcm_bridge_hub:: = 45, // Message Queue. Importantly, is registered last so that messages are processed after // the `on_initialize` hooks of bridging pallets. - MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 250, + MessageQueue: pallet_message_queue = 250, } ); diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs index 3aff46716363..be7beafc89af 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs @@ -635,64 +635,62 @@ construct_runtime!( pub enum Runtime { // System support stuff. - System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, - ParachainSystem: cumulus_pallet_parachain_system::{ - Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned, - } = 1, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 3, + System: frame_system = 0, + ParachainSystem: cumulus_pallet_parachain_system = 1, + Timestamp: pallet_timestamp = 2, + ParachainInfo: parachain_info = 3, // Monetary stuff. - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 10, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 11, + Balances: pallet_balances = 10, + TransactionPayment: pallet_transaction_payment = 11, // Collator support. the order of these 5 are important and shall not change. - Authorship: pallet_authorship::{Pallet, Storage} = 20, - CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event, Config} = 21, - Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 22, - Aura: pallet_aura::{Pallet, Storage, Config} = 23, - AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24, + Authorship: pallet_authorship = 20, + CollatorSelection: pallet_collator_selection = 21, + Session: pallet_session = 22, + Aura: pallet_aura = 23, + AuraExt: cumulus_pallet_aura_ext = 24, // XCM helpers. - XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 30, - PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 31, - CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, - MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 34, + XcmpQueue: cumulus_pallet_xcmp_queue = 30, + PolkadotXcm: pallet_xcm = 31, + CumulusXcm: cumulus_pallet_xcm = 32, + MessageQueue: pallet_message_queue = 34, // Handy utilities. - Utility: pallet_utility::{Pallet, Call, Event} = 40, - Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 41, - Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 42, - Preimage: pallet_preimage::{Pallet, Call, Storage, Event, HoldReason} = 43, - Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event} = 44, - AssetRate: pallet_asset_rate::{Pallet, Call, Storage, Event} = 45, + Utility: pallet_utility = 40, + Multisig: pallet_multisig = 41, + Proxy: pallet_proxy = 42, + Preimage: pallet_preimage = 43, + Scheduler: pallet_scheduler = 44, + AssetRate: pallet_asset_rate = 45, // The main stage. // The Alliance. - Alliance: pallet_alliance::{Pallet, Call, Storage, Event, Config} = 50, - AllianceMotion: pallet_collective::::{Pallet, Call, Storage, Origin, Event, Config} = 51, + Alliance: pallet_alliance = 50, + AllianceMotion: pallet_collective:: = 51, // The Fellowship. // pub type FellowshipCollectiveInstance = pallet_ranked_collective::Instance1; - FellowshipCollective: pallet_ranked_collective::::{Pallet, Call, Storage, Event} = 60, + FellowshipCollective: pallet_ranked_collective:: = 60, // pub type FellowshipReferendaInstance = pallet_referenda::Instance1; - FellowshipReferenda: pallet_referenda::::{Pallet, Call, Storage, Event} = 61, - FellowshipOrigins: pallet_fellowship_origins::{Origin} = 62, + FellowshipReferenda: pallet_referenda:: = 61, + FellowshipOrigins: pallet_fellowship_origins = 62, // pub type FellowshipCoreInstance = pallet_core_fellowship::Instance1; - FellowshipCore: pallet_core_fellowship::::{Pallet, Call, Storage, Event} = 63, + FellowshipCore: pallet_core_fellowship:: = 63, // pub type FellowshipSalaryInstance = pallet_salary::Instance1; - FellowshipSalary: pallet_salary::::{Pallet, Call, Storage, Event} = 64, + FellowshipSalary: pallet_salary:: = 64, // pub type FellowshipTreasuryInstance = pallet_treasury::Instance1; - FellowshipTreasury: pallet_treasury::::{Pallet, Call, Storage, Event} = 65, + FellowshipTreasury: pallet_treasury:: = 65, // Ambassador Program. - AmbassadorCollective: pallet_ranked_collective::::{Pallet, Call, Storage, Event} = 70, - AmbassadorReferenda: pallet_referenda::::{Pallet, Call, Storage, Event} = 71, - AmbassadorOrigins: pallet_ambassador_origins::{Origin} = 72, - AmbassadorCore: pallet_core_fellowship::::{Pallet, Call, Storage, Event} = 73, - AmbassadorSalary: pallet_salary::::{Pallet, Call, Storage, Event} = 74, - AmbassadorContent: pallet_collective_content::::{Pallet, Call, Storage, Event} = 75, + AmbassadorCollective: pallet_ranked_collective:: = 70, + AmbassadorReferenda: pallet_referenda:: = 71, + AmbassadorOrigins: pallet_ambassador_origins = 72, + AmbassadorCore: pallet_core_fellowship:: = 73, + AmbassadorSalary: pallet_salary:: = 74, + AmbassadorContent: pallet_collective_content:: = 75, } ); diff --git a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs index 707766ca2262..f1c5acb4952f 100644 --- a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs @@ -376,40 +376,38 @@ construct_runtime!( pub enum Runtime { // System support stuff. - System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, - ParachainSystem: cumulus_pallet_parachain_system::{ - Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned, - } = 1, - RandomnessCollectiveFlip: pallet_insecure_randomness_collective_flip::{Pallet, Storage} = 2, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 4, + System: frame_system = 0, + ParachainSystem: cumulus_pallet_parachain_system = 1, + RandomnessCollectiveFlip: pallet_insecure_randomness_collective_flip = 2, + Timestamp: pallet_timestamp = 3, + ParachainInfo: parachain_info = 4, // Monetary stuff. - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 10, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 11, + Balances: pallet_balances = 10, + TransactionPayment: pallet_transaction_payment = 11, // Collator support. The order of these 5 are important and shall not change. - Authorship: pallet_authorship::{Pallet, Storage} = 20, - CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event, Config} = 21, - Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 22, - Aura: pallet_aura::{Pallet, Storage, Config} = 23, - AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24, + Authorship: pallet_authorship = 20, + CollatorSelection: pallet_collator_selection = 21, + Session: pallet_session = 22, + Aura: pallet_aura = 23, + AuraExt: cumulus_pallet_aura_ext = 24, // XCM helpers. - XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 30, - PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 31, - CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, - MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 34, + XcmpQueue: cumulus_pallet_xcmp_queue = 30, + PolkadotXcm: pallet_xcm = 31, + CumulusXcm: cumulus_pallet_xcm = 32, + MessageQueue: pallet_message_queue = 34, // Smart Contracts. - Contracts: pallet_contracts::{Pallet, Call, Storage, Event, HoldReason} = 40, + Contracts: pallet_contracts = 40, // Handy utilities. - Utility: pallet_utility::{Pallet, Call, Event} = 50, - Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 51, + Utility: pallet_utility = 50, + Multisig: pallet_multisig = 51, // Sudo - Sudo: pallet_sudo::{Pallet, Call, Config, Event, Storage} = 100, + Sudo: pallet_sudo = 100, } ); diff --git a/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs b/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs index 15899e49195a..9fbbdc61feac 100644 --- a/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs @@ -274,26 +274,24 @@ impl pallet_sudo::Config for Runtime { construct_runtime! { pub enum Runtime { - System: frame_system::{Pallet, Call, Storage, Config, Event} = 0, - ParachainSystem: cumulus_pallet_parachain_system::{ - Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned, - } = 1, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 2, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 3, + System: frame_system = 0, + ParachainSystem: cumulus_pallet_parachain_system = 1, + ParachainInfo: parachain_info = 2, + Timestamp: pallet_timestamp = 3, // DMP handler. - CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Storage, Event, Origin} = 10, - MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 11, + CumulusXcm: cumulus_pallet_xcm = 10, + MessageQueue: pallet_message_queue = 11, // The main stage. - Glutton: pallet_glutton::{Pallet, Call, Storage, Event, Config} = 20, + Glutton: pallet_glutton = 20, // Collator support - Aura: pallet_aura::{Pallet, Storage, Config} = 30, - AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 31, + Aura: pallet_aura = 30, + AuraExt: cumulus_pallet_aura_ext = 31, // Sudo. - Sudo: pallet_sudo::{Pallet, Call, Storage, Event, Config} = 255, + Sudo: pallet_sudo = 255, } } diff --git a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs index 21c24086cbee..7836208eb623 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs @@ -400,39 +400,37 @@ construct_runtime!( pub enum Runtime { // System support stuff. - System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, - ParachainSystem: cumulus_pallet_parachain_system::{ - Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned, - } = 1, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 3, + System: frame_system = 0, + ParachainSystem: cumulus_pallet_parachain_system = 1, + Timestamp: pallet_timestamp = 2, + ParachainInfo: parachain_info = 3, // Monetary stuff. - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 10, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 11, + Balances: pallet_balances = 10, + TransactionPayment: pallet_transaction_payment = 11, // Collator support. The order of these 5 are important and shall not change. - Authorship: pallet_authorship::{Pallet, Storage} = 20, - CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event, Config} = 21, - Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 22, - Aura: pallet_aura::{Pallet, Storage, Config} = 23, - AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24, + Authorship: pallet_authorship = 20, + CollatorSelection: pallet_collator_selection = 21, + Session: pallet_session = 22, + Aura: pallet_aura = 23, + AuraExt: cumulus_pallet_aura_ext = 24, // XCM & related - XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 30, - PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 31, - CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, - MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 34, + XcmpQueue: cumulus_pallet_xcmp_queue = 30, + PolkadotXcm: pallet_xcm = 31, + CumulusXcm: cumulus_pallet_xcm = 32, + MessageQueue: pallet_message_queue = 34, // Handy utilities. - Utility: pallet_utility::{Pallet, Call, Event} = 40, - Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 41, + Utility: pallet_utility = 40, + Multisig: pallet_multisig = 41, // The main stage. - Identity: pallet_identity::{Pallet, Call, Storage, Event} = 50, + Identity: pallet_identity = 50, // To migrate deposits - IdentityMigrator: identity_migrator::{Pallet, Call, Event} = 248, + IdentityMigrator: identity_migrator = 248, } ); diff --git a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs index 4015d841b811..750bf5b2c3eb 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs @@ -408,39 +408,37 @@ construct_runtime!( pub enum Runtime { // System support stuff. - System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, - ParachainSystem: cumulus_pallet_parachain_system::{ - Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned, - } = 1, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 3, + System: frame_system = 0, + ParachainSystem: cumulus_pallet_parachain_system = 1, + Timestamp: pallet_timestamp = 2, + ParachainInfo: parachain_info = 3, // Monetary stuff. - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 10, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 11, + Balances: pallet_balances = 10, + TransactionPayment: pallet_transaction_payment = 11, // Collator support. The order of these 5 are important and shall not change. - Authorship: pallet_authorship::{Pallet, Storage} = 20, - CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event, Config} = 21, - Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 22, - Aura: pallet_aura::{Pallet, Storage, Config} = 23, - AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24, + Authorship: pallet_authorship = 20, + CollatorSelection: pallet_collator_selection = 21, + Session: pallet_session = 22, + Aura: pallet_aura = 23, + AuraExt: cumulus_pallet_aura_ext = 24, // XCM helpers. - XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 30, - PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 31, - CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, - MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 34, + XcmpQueue: cumulus_pallet_xcmp_queue = 30, + PolkadotXcm: pallet_xcm = 31, + CumulusXcm: cumulus_pallet_xcm = 32, + MessageQueue: pallet_message_queue = 34, // Handy utilities. - Utility: pallet_utility::{Pallet, Call, Event} = 40, - Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 41, + Utility: pallet_utility = 40, + Multisig: pallet_multisig = 41, // The main stage. - Identity: pallet_identity::{Pallet, Call, Storage, Event} = 50, + Identity: pallet_identity = 50, // To migrate deposits - IdentityMigrator: identity_migrator::{Pallet, Call, Event} = 248, + IdentityMigrator: identity_migrator = 248, } ); diff --git a/cumulus/parachains/runtimes/starters/seedling/src/lib.rs b/cumulus/parachains/runtimes/starters/seedling/src/lib.rs index cb868627e799..ba077ef88794 100644 --- a/cumulus/parachains/runtimes/starters/seedling/src/lib.rs +++ b/cumulus/parachains/runtimes/starters/seedling/src/lib.rs @@ -230,17 +230,15 @@ impl pallet_timestamp::Config for Runtime { construct_runtime! { pub enum Runtime { - System: frame_system::{Pallet, Call, Storage, Config, Event}, - Sudo: pallet_sudo::{Pallet, Call, Storage, Config, Event}, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, - - ParachainSystem: cumulus_pallet_parachain_system::{ - Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned, - }, - ParachainInfo: parachain_info::{Pallet, Storage, Config}, - SoloToPara: cumulus_pallet_solo_to_para::{Pallet, Call, Storage, Event}, - Aura: pallet_aura::{Pallet, Storage, Config}, - AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config}, + System: frame_system, + Sudo: pallet_sudo, + Timestamp: pallet_timestamp, + + ParachainSystem: cumulus_pallet_parachain_system, + ParachainInfo: parachain_info, + SoloToPara: cumulus_pallet_solo_to_para, + Aura: pallet_aura, + AuraExt: cumulus_pallet_aura_ext, } } diff --git a/cumulus/parachains/runtimes/starters/shell/src/lib.rs b/cumulus/parachains/runtimes/starters/shell/src/lib.rs index de95969f71d1..457394760d98 100644 --- a/cumulus/parachains/runtimes/starters/shell/src/lib.rs +++ b/cumulus/parachains/runtimes/starters/shell/src/lib.rs @@ -258,19 +258,17 @@ impl pallet_timestamp::Config for Runtime { construct_runtime! { pub enum Runtime { - System: frame_system::{Pallet, Call, Storage, Config, Event}, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, + System: frame_system, + Timestamp: pallet_timestamp, - ParachainSystem: cumulus_pallet_parachain_system::{ - Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned, - }, - ParachainInfo: parachain_info::{Pallet, Storage, Config}, + ParachainSystem: cumulus_pallet_parachain_system, + ParachainInfo: parachain_info, - CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Storage, Event, Origin}, - MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event}, + CumulusXcm: cumulus_pallet_xcm, + MessageQueue: pallet_message_queue, - Aura: pallet_aura::{Pallet, Storage, Config}, - AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config}, + Aura: pallet_aura, + AuraExt: cumulus_pallet_aura_ext, } } diff --git a/cumulus/parachains/runtimes/testing/penpal/src/lib.rs b/cumulus/parachains/runtimes/testing/penpal/src/lib.rs index 37a8454d62a5..d33f51df5a9a 100644 --- a/cumulus/parachains/runtimes/testing/penpal/src/lib.rs +++ b/cumulus/parachains/runtimes/testing/penpal/src/lib.rs @@ -634,36 +634,34 @@ construct_runtime!( pub enum Runtime { // System support stuff. - System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, - ParachainSystem: cumulus_pallet_parachain_system::{ - Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned, - } = 1, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 3, + System: frame_system = 0, + ParachainSystem: cumulus_pallet_parachain_system = 1, + Timestamp: pallet_timestamp = 2, + ParachainInfo: parachain_info = 3, // Monetary stuff. - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 10, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 11, - AssetTxPayment: pallet_asset_tx_payment::{Pallet, Event} = 12, + Balances: pallet_balances = 10, + TransactionPayment: pallet_transaction_payment = 11, + AssetTxPayment: pallet_asset_tx_payment = 12, // Collator support. The order of these 4 are important and shall not change. - Authorship: pallet_authorship::{Pallet, Storage} = 20, - CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event, Config} = 21, - Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 22, - Aura: pallet_aura::{Pallet, Storage, Config} = 23, - AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 24, + Authorship: pallet_authorship = 20, + CollatorSelection: pallet_collator_selection = 21, + Session: pallet_session = 22, + Aura: pallet_aura = 23, + AuraExt: cumulus_pallet_aura_ext = 24, // XCM helpers. - XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 30, - PolkadotXcm: pallet_xcm::{Pallet, Call, Event, Origin, Config} = 31, - CumulusXcm: cumulus_pallet_xcm::{Pallet, Event, Origin} = 32, - MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 34, + XcmpQueue: cumulus_pallet_xcmp_queue = 30, + PolkadotXcm: pallet_xcm = 31, + CumulusXcm: cumulus_pallet_xcm = 32, + MessageQueue: pallet_message_queue = 34, // The main stage. - Assets: pallet_assets::::{Pallet, Call, Storage, Event} = 50, - ForeignAssets: pallet_assets::::{Pallet, Call, Storage, Event} = 51, + Assets: pallet_assets:: = 50, + ForeignAssets: pallet_assets:: = 51, - Sudo: pallet_sudo::{Pallet, Call, Storage, Event, Config} = 255, + Sudo: pallet_sudo = 255, } ); diff --git a/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs index 795efa39247a..999cc480ce0a 100644 --- a/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -603,30 +603,28 @@ impl pallet_aura::Config for Runtime { construct_runtime! { pub enum Runtime { - System: frame_system::{Pallet, Call, Storage, Config, Event}, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, - Sudo: pallet_sudo::{Pallet, Call, Storage, Config, Event}, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event}, + System: frame_system, + Timestamp: pallet_timestamp, + Sudo: pallet_sudo, + TransactionPayment: pallet_transaction_payment, - ParachainSystem: cumulus_pallet_parachain_system::{ - Pallet, Call, Config, Storage, Inherent, Event, ValidateUnsigned, - } = 20, - ParachainInfo: parachain_info::{Pallet, Storage, Config} = 21, + ParachainSystem: cumulus_pallet_parachain_system = 20, + ParachainInfo: parachain_info = 21, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 30, - Assets: pallet_assets::{Pallet, Call, Storage, Event} = 31, + Balances: pallet_balances = 30, + Assets: pallet_assets = 31, - Aura: pallet_aura::{Pallet, Config}, - AuraExt: cumulus_pallet_aura_ext::{Pallet, Config}, + Aura: pallet_aura, + AuraExt: cumulus_pallet_aura_ext, // XCM helpers. - XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event} = 50, - PolkadotXcm: pallet_xcm::{Pallet, Call, Event, Origin, Config} = 51, - CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event, Origin} = 52, + XcmpQueue: cumulus_pallet_xcmp_queue = 50, + PolkadotXcm: pallet_xcm = 51, + CumulusXcm: cumulus_pallet_xcm = 52, // RIP DmpQueue 53 - MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 54, + MessageQueue: pallet_message_queue = 54, - Spambot: cumulus_ping::{Pallet, Call, Storage, Event} = 99, + Spambot: cumulus_ping = 99, } } diff --git a/docs/sdk/src/guides/your_first_pallet/mod.rs b/docs/sdk/src/guides/your_first_pallet/mod.rs index 24eada44a83a..ea23af51ec9d 100644 --- a/docs/sdk/src/guides/your_first_pallet/mod.rs +++ b/docs/sdk/src/guides/your_first_pallet/mod.rs @@ -428,8 +428,8 @@ pub mod pallet { use crate::guides::your_first_pallet::pallet as pallet_currency; construct_runtime!( - pub struct Runtime { - // ---^^^^^^ This is where `struct Runtime` is defined. + pub enum Runtime { + // ---^^^^^^ This is where `enum Runtime` is defined. System: frame_system, Currency: pallet_currency, } @@ -708,7 +708,7 @@ pub mod pallet_v2 { use crate::guides::your_first_pallet::pallet_v2 as pallet_currency; construct_runtime!( - pub struct Runtime { + pub enum Runtime { System: frame_system, Currency: pallet_currency, } diff --git a/docs/sdk/src/polkadot_sdk/cumulus.rs b/docs/sdk/src/polkadot_sdk/cumulus.rs index 07a48c92d807..60c4839f9e2d 100644 --- a/docs/sdk/src/polkadot_sdk/cumulus.rs +++ b/docs/sdk/src/polkadot_sdk/cumulus.rs @@ -55,7 +55,7 @@ mod tests { #[docify::export(CR)] construct_runtime!( - pub struct Runtime { + pub enum Runtime { // system-level pallets. System: frame_system, Timestamp: pallet_timestamp, diff --git a/docs/sdk/src/polkadot_sdk/frame_runtime.rs b/docs/sdk/src/polkadot_sdk/frame_runtime.rs index 32dc2045e3a4..c9eba7d64bd4 100644 --- a/docs/sdk/src/polkadot_sdk/frame_runtime.rs +++ b/docs/sdk/src/polkadot_sdk/frame_runtime.rs @@ -156,9 +156,9 @@ mod tests { use super::pallet as pallet_example; use frame::{prelude::*, testing_prelude::*}; - // The major macro that amalgamates pallets into `struct Runtime` + // The major macro that amalgamates pallets into `enum Runtime` construct_runtime!( - pub struct Runtime { + pub enum Runtime { System: frame_system, Example: pallet_example, } diff --git a/polkadot/runtime/common/src/assigned_slots/mod.rs b/polkadot/runtime/common/src/assigned_slots/mod.rs index de8c00df9ddf..9976a7be548f 100644 --- a/polkadot/runtime/common/src/assigned_slots/mod.rs +++ b/polkadot/runtime/common/src/assigned_slots/mod.rs @@ -658,13 +658,13 @@ mod tests { frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Configuration: parachains_configuration::{Pallet, Call, Storage, Config}, - ParasShared: parachains_shared::{Pallet, Call, Storage}, - Parachains: parachains_paras::{Pallet, Call, Storage, Config, Event}, - Slots: slots::{Pallet, Call, Storage, Event}, - AssignedSlots: assigned_slots::{Pallet, Call, Storage, Event}, + System: frame_system, + Balances: pallet_balances, + Configuration: parachains_configuration, + ParasShared: parachains_shared, + Parachains: parachains_paras, + Slots: slots, + AssignedSlots: assigned_slots, } ); diff --git a/polkadot/runtime/common/src/auctions.rs b/polkadot/runtime/common/src/auctions.rs index baa66d83a3ff..0bd5ed1e733e 100644 --- a/polkadot/runtime/common/src/auctions.rs +++ b/polkadot/runtime/common/src/auctions.rs @@ -697,9 +697,9 @@ mod tests { frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Auctions: auctions::{Pallet, Call, Storage, Event}, + System: frame_system, + Balances: pallet_balances, + Auctions: auctions, } ); diff --git a/polkadot/runtime/common/src/claims.rs b/polkadot/runtime/common/src/claims.rs index 4cddab969c08..5b87cc9619ed 100644 --- a/polkadot/runtime/common/src/claims.rs +++ b/polkadot/runtime/common/src/claims.rs @@ -727,10 +727,10 @@ mod tests { frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Vesting: pallet_vesting::{Pallet, Call, Storage, Config, Event}, - Claims: claims::{Pallet, Call, Storage, Config, Event, ValidateUnsigned}, + System: frame_system, + Balances: pallet_balances, + Vesting: pallet_vesting, + Claims: claims, } ); diff --git a/polkadot/runtime/common/src/crowdloan/mod.rs b/polkadot/runtime/common/src/crowdloan/mod.rs index 77ef406e5798..b7dd06aee3a4 100644 --- a/polkadot/runtime/common/src/crowdloan/mod.rs +++ b/polkadot/runtime/common/src/crowdloan/mod.rs @@ -888,9 +888,9 @@ mod tests { frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Crowdloan: crowdloan::{Pallet, Call, Storage, Event}, + System: frame_system, + Balances: pallet_balances, + Crowdloan: crowdloan, } ); diff --git a/polkadot/runtime/common/src/impls.rs b/polkadot/runtime/common/src/impls.rs index a9edb1966270..79ace0972ade 100644 --- a/polkadot/runtime/common/src/impls.rs +++ b/polkadot/runtime/common/src/impls.rs @@ -242,10 +242,10 @@ mod tests { frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Authorship: pallet_authorship::{Pallet, Storage}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event}, + System: frame_system, + Authorship: pallet_authorship, + Balances: pallet_balances, + Treasury: pallet_treasury, } ); diff --git a/polkadot/runtime/common/src/integration_tests.rs b/polkadot/runtime/common/src/integration_tests.rs index b536b80e2452..2bf21bbde951 100644 --- a/polkadot/runtime/common/src/integration_tests.rs +++ b/polkadot/runtime/common/src/integration_tests.rs @@ -74,25 +74,25 @@ frame_support::construct_runtime!( pub enum Test { // System Stuff - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Babe: pallet_babe::{Pallet, Call, Storage, Config, ValidateUnsigned}, + System: frame_system, + Balances: pallet_balances, + Babe: pallet_babe, // Parachains Runtime - Configuration: configuration::{Pallet, Call, Storage, Config}, - Paras: paras::{Pallet, Call, Storage, Event, Config}, - ParasShared: shared::{Pallet, Call, Storage}, - ParachainsOrigin: origin::{Pallet, Origin}, + Configuration: configuration, + Paras: paras, + ParasShared: shared, + ParachainsOrigin: origin, // Para Onboarding Pallets - Registrar: paras_registrar::{Pallet, Call, Storage, Event}, - Auctions: auctions::{Pallet, Call, Storage, Event}, - Crowdloan: crowdloan::{Pallet, Call, Storage, Event}, - Slots: slots::{Pallet, Call, Storage, Event}, + Registrar: paras_registrar, + Auctions: auctions, + Crowdloan: crowdloan, + Slots: slots, // Migrators - Identity: pallet_identity::{Pallet, Call, Storage, Event}, - IdentityMigrator: identity_migrator::{Pallet, Call, Event}, + Identity: pallet_identity, + IdentityMigrator: identity_migrator, } ); diff --git a/polkadot/runtime/common/src/paras_registrar/mod.rs b/polkadot/runtime/common/src/paras_registrar/mod.rs index 448490b34a7f..a3bdc1b1b0f5 100644 --- a/polkadot/runtime/common/src/paras_registrar/mod.rs +++ b/polkadot/runtime/common/src/paras_registrar/mod.rs @@ -724,13 +724,13 @@ mod tests { frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Configuration: configuration::{Pallet, Call, Storage, Config}, - Parachains: paras::{Pallet, Call, Storage, Config, Event}, - ParasShared: shared::{Pallet, Call, Storage}, - Registrar: paras_registrar::{Pallet, Call, Storage, Event}, - ParachainsOrigin: origin::{Pallet, Origin}, + System: frame_system, + Balances: pallet_balances, + Configuration: configuration, + Parachains: paras, + ParasShared: shared, + Registrar: paras_registrar, + ParachainsOrigin: origin, } ); diff --git a/polkadot/runtime/common/src/purchase.rs b/polkadot/runtime/common/src/purchase.rs index f43f16b838cb..146a90fca866 100644 --- a/polkadot/runtime/common/src/purchase.rs +++ b/polkadot/runtime/common/src/purchase.rs @@ -499,10 +499,10 @@ mod tests { frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Vesting: pallet_vesting::{Pallet, Call, Storage, Config, Event}, - Purchase: purchase::{Pallet, Call, Storage, Event}, + System: frame_system, + Balances: pallet_balances, + Vesting: pallet_vesting, + Purchase: purchase, } ); diff --git a/polkadot/runtime/common/src/slots/mod.rs b/polkadot/runtime/common/src/slots/mod.rs index 58bd1d53aed6..be02aa9961cc 100644 --- a/polkadot/runtime/common/src/slots/mod.rs +++ b/polkadot/runtime/common/src/slots/mod.rs @@ -520,9 +520,9 @@ mod tests { frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Slots: slots::{Pallet, Call, Storage, Event}, + System: frame_system, + Balances: pallet_balances, + Slots: slots, } ); diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 51c00336bef7..2d49f0b99e95 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -1315,135 +1315,131 @@ construct_runtime! { pub enum Runtime { // Basic stuff; balances is uncallable initially. - System: frame_system::{Pallet, Call, Storage, Config, Event} = 0, + System: frame_system = 0, // Babe must be before session. - Babe: pallet_babe::{Pallet, Call, Storage, Config, ValidateUnsigned} = 1, + Babe: pallet_babe = 1, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2, - Indices: pallet_indices::{Pallet, Call, Storage, Config, Event} = 3, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 4, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 33, + Timestamp: pallet_timestamp = 2, + Indices: pallet_indices = 3, + Balances: pallet_balances = 4, + TransactionPayment: pallet_transaction_payment = 33, // Consensus support. // Authorship must be before session in order to note author in the correct session and era. - Authorship: pallet_authorship::{Pallet, Storage} = 5, - Offences: pallet_offences::{Pallet, Storage, Event} = 7, - Historical: session_historical::{Pallet} = 34, + Authorship: pallet_authorship = 5, + Offences: pallet_offences = 7, + Historical: session_historical = 34, // BEEFY Bridges support. - Beefy: pallet_beefy::{Pallet, Call, Storage, Config, ValidateUnsigned} = 240, + Beefy: pallet_beefy = 240, // MMR leaf construction must be before session in order to have leaf contents // refer to block consistently. see substrate issue #11797 for details. - Mmr: pallet_mmr::{Pallet, Storage} = 241, - MmrLeaf: pallet_beefy_mmr::{Pallet, Storage} = 242, + Mmr: pallet_mmr = 241, + MmrLeaf: pallet_beefy_mmr = 242, - Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 8, - Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config, Event, ValidateUnsigned} = 10, - AuthorityDiscovery: pallet_authority_discovery::{Pallet, Config} = 12, + Session: pallet_session = 8, + Grandpa: pallet_grandpa = 10, + AuthorityDiscovery: pallet_authority_discovery = 12, // Governance stuff; uncallable initially. - Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 18, - ConvictionVoting: pallet_conviction_voting::{Pallet, Call, Storage, Event} = 20, - Referenda: pallet_referenda::{Pallet, Call, Storage, Event} = 21, + Treasury: pallet_treasury = 18, + ConvictionVoting: pallet_conviction_voting = 20, + Referenda: pallet_referenda = 21, // pub type FellowshipCollectiveInstance = pallet_ranked_collective::Instance1; - FellowshipCollective: pallet_ranked_collective::::{ - Pallet, Call, Storage, Event - } = 22, + FellowshipCollective: pallet_ranked_collective:: = 22, // pub type FellowshipReferendaInstance = pallet_referenda::Instance2; - FellowshipReferenda: pallet_referenda::::{ - Pallet, Call, Storage, Event - } = 23, - Origins: pallet_custom_origins::{Origin} = 43, - Whitelist: pallet_whitelist::{Pallet, Call, Storage, Event} = 44, + FellowshipReferenda: pallet_referenda:: = 23, + Origins: pallet_custom_origins = 43, + Whitelist: pallet_whitelist = 44, // Claims. Usable initially. - Claims: claims::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 19, + Claims: claims = 19, // Utility module. - Utility: pallet_utility::{Pallet, Call, Event} = 24, + Utility: pallet_utility = 24, // Less simple identity module. - Identity: pallet_identity::{Pallet, Call, Storage, Event} = 25, + Identity: pallet_identity = 25, // Society module. - Society: pallet_society::{Pallet, Call, Storage, Event} = 26, + Society: pallet_society = 26, // Social recovery module. - Recovery: pallet_recovery::{Pallet, Call, Storage, Event} = 27, + Recovery: pallet_recovery = 27, // Vesting. Usable initially, but removed once all vesting is finished. - Vesting: pallet_vesting::{Pallet, Call, Storage, Event, Config} = 28, + Vesting: pallet_vesting = 28, // System scheduler. - Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event} = 29, + Scheduler: pallet_scheduler = 29, // Proxy module. Late addition. - Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 30, + Proxy: pallet_proxy = 30, // Multisig module. Late addition. - Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 31, + Multisig: pallet_multisig = 31, // Preimage registrar. - Preimage: pallet_preimage::{Pallet, Call, Storage, Event, HoldReason} = 32, + Preimage: pallet_preimage = 32, // Asset rate. - AssetRate: pallet_asset_rate::{Pallet, Call, Storage, Event} = 39, + AssetRate: pallet_asset_rate = 39, // Bounties modules. - Bounties: pallet_bounties::{Pallet, Call, Storage, Event} = 35, + Bounties: pallet_bounties = 35, ChildBounties: pallet_child_bounties = 40, // NIS pallet. - Nis: pallet_nis::{Pallet, Call, Storage, Event, HoldReason} = 38, + Nis: pallet_nis = 38, // pub type NisCounterpartInstance = pallet_balances::Instance2; NisCounterpartBalances: pallet_balances:: = 45, // Parachains pallets. Start indices at 50 to leave room. - ParachainsOrigin: parachains_origin::{Pallet, Origin} = 50, - Configuration: parachains_configuration::{Pallet, Call, Storage, Config} = 51, - ParasShared: parachains_shared::{Pallet, Call, Storage} = 52, - ParaInclusion: parachains_inclusion::{Pallet, Call, Storage, Event} = 53, - ParaInherent: parachains_paras_inherent::{Pallet, Call, Storage, Inherent} = 54, - ParaScheduler: parachains_scheduler::{Pallet, Storage} = 55, - Paras: parachains_paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 56, - Initializer: parachains_initializer::{Pallet, Call, Storage} = 57, - Dmp: parachains_dmp::{Pallet, Storage} = 58, - Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event, Config} = 60, - ParaSessionInfo: parachains_session_info::{Pallet, Storage} = 61, - ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event} = 62, - ParasSlashing: parachains_slashing::{Pallet, Call, Storage, ValidateUnsigned} = 63, - MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 64, - OnDemandAssignmentProvider: parachains_assigner_on_demand::{Pallet, Call, Storage, Event} = 66, - ParachainsAssignmentProvider: parachains_assigner_parachains::{Pallet} = 67, - CoretimeAssignmentProvider: parachains_assigner_coretime::{Pallet, Storage} = 68, + ParachainsOrigin: parachains_origin = 50, + Configuration: parachains_configuration = 51, + ParasShared: parachains_shared = 52, + ParaInclusion: parachains_inclusion = 53, + ParaInherent: parachains_paras_inherent = 54, + ParaScheduler: parachains_scheduler = 55, + Paras: parachains_paras = 56, + Initializer: parachains_initializer = 57, + Dmp: parachains_dmp = 58, + Hrmp: parachains_hrmp = 60, + ParaSessionInfo: parachains_session_info = 61, + ParasDisputes: parachains_disputes = 62, + ParasSlashing: parachains_slashing = 63, + MessageQueue: pallet_message_queue = 64, + OnDemandAssignmentProvider: parachains_assigner_on_demand = 66, + ParachainsAssignmentProvider: parachains_assigner_parachains = 67, + CoretimeAssignmentProvider: parachains_assigner_coretime = 68, // Parachain Onboarding Pallets. Start indices at 70 to leave room. - Registrar: paras_registrar::{Pallet, Call, Storage, Event, Config} = 70, - Slots: slots::{Pallet, Call, Storage, Event} = 71, - Auctions: auctions::{Pallet, Call, Storage, Event} = 72, - Crowdloan: crowdloan::{Pallet, Call, Storage, Event} = 73, - Coretime: coretime::{Pallet, Call, Event} = 74, + Registrar: paras_registrar = 70, + Slots: slots = 71, + Auctions: auctions = 72, + Crowdloan: crowdloan = 73, + Coretime: coretime = 74, // Pallet for sending XCM. - XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, + XcmPallet: pallet_xcm = 99, // Pallet for migrating Identity to a parachain. To be removed post-migration. - IdentityMigrator: identity_migrator::{Pallet, Call, Event} = 248, + IdentityMigrator: identity_migrator = 248, - ParasSudoWrapper: paras_sudo_wrapper::{Pallet, Call} = 250, - AssignedSlots: assigned_slots::{Pallet, Call, Storage, Event, Config} = 251, + ParasSudoWrapper: paras_sudo_wrapper = 250, + AssignedSlots: assigned_slots = 251, // Validator Manager pallet. - ValidatorManager: validator_manager::{Pallet, Call, Storage, Event} = 252, + ValidatorManager: validator_manager = 252, // State trie migration pallet, only temporary. StateTrieMigration: pallet_state_trie_migration = 254, // Root testing pallet. - RootTesting: pallet_root_testing::{Pallet, Call, Storage, Event} = 249, + RootTesting: pallet_root_testing = 249, // Sudo. - Sudo: pallet_sudo::{Pallet, Call, Storage, Event, Config} = 255, + Sudo: pallet_sudo = 255, } } diff --git a/polkadot/runtime/test-runtime/src/lib.rs b/polkadot/runtime/test-runtime/src/lib.rs index 18bcb16834e2..51c199b7a054 100644 --- a/polkadot/runtime/test-runtime/src/lib.rs +++ b/polkadot/runtime/test-runtime/src/lib.rs @@ -670,52 +670,52 @@ construct_runtime! { pub enum Runtime { // Basic stuff; balances is uncallable initially. - System: frame_system::{Pallet, Call, Storage, Config, Event}, + System: frame_system, // Must be before session. - Babe: pallet_babe::{Pallet, Call, Storage, Config}, + Babe: pallet_babe, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, - Indices: pallet_indices::{Pallet, Call, Storage, Config, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event}, + Timestamp: pallet_timestamp, + Indices: pallet_indices, + Balances: pallet_balances, + TransactionPayment: pallet_transaction_payment, // Consensus support. - Authorship: pallet_authorship::{Pallet, Storage}, - Staking: pallet_staking::{Pallet, Call, Storage, Config, Event}, - Offences: pallet_offences::{Pallet, Storage, Event}, - Historical: session_historical::{Pallet}, - Session: pallet_session::{Pallet, Call, Storage, Event, Config}, - Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config, Event}, - AuthorityDiscovery: pallet_authority_discovery::{Pallet, Config}, + Authorship: pallet_authorship, + Staking: pallet_staking, + Offences: pallet_offences, + Historical: session_historical, + Session: pallet_session, + Grandpa: pallet_grandpa, + AuthorityDiscovery: pallet_authority_discovery, // Claims. Usable initially. - Claims: claims::{Pallet, Call, Storage, Event, Config, ValidateUnsigned}, + Claims: claims, // Vesting. Usable initially, but removed once all vesting is finished. - Vesting: pallet_vesting::{Pallet, Call, Storage, Event, Config}, + Vesting: pallet_vesting, // Parachains runtime modules - Configuration: parachains_configuration::{Pallet, Call, Storage, Config}, - ParaInclusion: parachains_inclusion::{Pallet, Call, Storage, Event}, - ParaInherent: parachains_paras_inherent::{Pallet, Call, Storage, Inherent}, - Initializer: parachains_initializer::{Pallet, Call, Storage}, - Paras: parachains_paras::{Pallet, Call, Storage, Event, ValidateUnsigned}, - ParasShared: parachains_shared::{Pallet, Call, Storage}, - Scheduler: parachains_scheduler::{Pallet, Storage}, - ParasSudoWrapper: paras_sudo_wrapper::{Pallet, Call}, - ParasOrigin: parachains_origin::{Pallet, Origin}, - ParaSessionInfo: parachains_session_info::{Pallet, Storage}, - Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event}, - Dmp: parachains_dmp::{Pallet, Storage}, - Xcm: pallet_xcm::{Pallet, Call, Event, Origin}, - ParasDisputes: parachains_disputes::{Pallet, Storage, Event}, - ParasSlashing: parachains_slashing::{Pallet, Call, Storage, ValidateUnsigned}, - ParaAssignmentProvider: parachains_assigner_parachains::{Pallet}, - - Sudo: pallet_sudo::{Pallet, Call, Storage, Config, Event}, - - TestNotifier: pallet_test_notifier::{Pallet, Call, Event}, + Configuration: parachains_configuration, + ParaInclusion: parachains_inclusion, + ParaInherent: parachains_paras_inherent, + Initializer: parachains_initializer, + Paras: parachains_paras, + ParasShared: parachains_shared, + Scheduler: parachains_scheduler, + ParasSudoWrapper: paras_sudo_wrapper, + ParasOrigin: parachains_origin, + ParaSessionInfo: parachains_session_info, + Hrmp: parachains_hrmp, + Dmp: parachains_dmp, + Xcm: pallet_xcm, + ParasDisputes: parachains_disputes, + ParasSlashing: parachains_slashing, + ParaAssignmentProvider: parachains_assigner_parachains, + + Sudo: pallet_sudo, + + TestNotifier: pallet_test_notifier, } } diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index 941193ba9414..adfb2083254a 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -1397,121 +1397,121 @@ construct_runtime! { pub enum Runtime { // Basic stuff; balances is uncallable initially. - System: frame_system::{Pallet, Call, Storage, Config, Event} = 0, + System: frame_system = 0, // Babe must be before session. - Babe: pallet_babe::{Pallet, Call, Storage, Config, ValidateUnsigned} = 1, + Babe: pallet_babe = 1, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 2, - Indices: pallet_indices::{Pallet, Call, Storage, Config, Event} = 3, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 4, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 26, + Timestamp: pallet_timestamp = 2, + Indices: pallet_indices = 3, + Balances: pallet_balances = 4, + TransactionPayment: pallet_transaction_payment = 26, // Consensus support. // Authorship must be before session in order to note author in the correct session and era. - Authorship: pallet_authorship::{Pallet, Storage} = 5, - Staking: pallet_staking::{Pallet, Call, Storage, Config, Event} = 6, - Offences: pallet_offences::{Pallet, Storage, Event} = 7, - Historical: session_historical::{Pallet} = 27, + Authorship: pallet_authorship = 5, + Staking: pallet_staking = 6, + Offences: pallet_offences = 7, + Historical: session_historical = 27, // BEEFY Bridges support. - Beefy: pallet_beefy::{Pallet, Call, Storage, Config, ValidateUnsigned} = 200, - // MMR leaf construction must be before session in order to have leaf contents - // refer to block consistently. see substrate issue #11797 for details. - Mmr: pallet_mmr::{Pallet, Storage} = 201, - BeefyMmrLeaf: pallet_beefy_mmr::{Pallet, Storage} = 202, + Beefy: pallet_beefy = 200, + // MMR leaf construction must be before session in order to have leaf contents refer to + // block consistently. see substrate issue #11797 for details. + Mmr: pallet_mmr = 201, + BeefyMmrLeaf: pallet_beefy_mmr = 202, - Session: pallet_session::{Pallet, Call, Storage, Event, Config} = 8, - Grandpa: pallet_grandpa::{Pallet, Call, Storage, Config, Event, ValidateUnsigned} = 10, - AuthorityDiscovery: pallet_authority_discovery::{Pallet, Config} = 12, + Session: pallet_session = 8, + Grandpa: pallet_grandpa = 10, + AuthorityDiscovery: pallet_authority_discovery = 12, // Utility module. - Utility: pallet_utility::{Pallet, Call, Event} = 16, + Utility: pallet_utility = 16, // Less simple identity module. - Identity: pallet_identity::{Pallet, Call, Storage, Event} = 17, + Identity: pallet_identity = 17, // Social recovery module. - Recovery: pallet_recovery::{Pallet, Call, Storage, Event} = 18, + Recovery: pallet_recovery = 18, // Vesting. Usable initially, but removed once all vesting is finished. - Vesting: pallet_vesting::{Pallet, Call, Storage, Event, Config} = 19, + Vesting: pallet_vesting = 19, // System scheduler. - Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event} = 20, + Scheduler: pallet_scheduler = 20, // Preimage registrar. - Preimage: pallet_preimage::{Pallet, Call, Storage, Event, HoldReason} = 28, + Preimage: pallet_preimage = 28, // Sudo. - Sudo: pallet_sudo::{Pallet, Call, Storage, Event, Config} = 21, + Sudo: pallet_sudo = 21, // Proxy module. Late addition. - Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 22, + Proxy: pallet_proxy = 22, // Multisig module. Late addition. - Multisig: pallet_multisig::{Pallet, Call, Storage, Event} = 23, + Multisig: pallet_multisig = 23, // Election pallet. Only works with staking, but placed here to maintain indices. - ElectionProviderMultiPhase: pallet_election_provider_multi_phase::{Pallet, Call, Storage, Event, ValidateUnsigned} = 24, + ElectionProviderMultiPhase: pallet_election_provider_multi_phase = 24, // Provides a semi-sorted list of nominators for staking. - VoterList: pallet_bags_list::::{Pallet, Call, Storage, Event} = 25, + VoterList: pallet_bags_list:: = 25, // Nomination pools for staking. - NominationPools: pallet_nomination_pools::{Pallet, Call, Storage, Event, Config, FreezeReason} = 29, + NominationPools: pallet_nomination_pools = 29, // Fast unstake pallet: extension to staking. FastUnstake: pallet_fast_unstake = 30, // OpenGov - ConvictionVoting: pallet_conviction_voting::{Pallet, Call, Storage, Event} = 31, - Referenda: pallet_referenda::{Pallet, Call, Storage, Event} = 32, - Origins: pallet_custom_origins::{Origin} = 35, - Whitelist: pallet_whitelist::{Pallet, Call, Storage, Event} = 36, + ConvictionVoting: pallet_conviction_voting = 31, + Referenda: pallet_referenda = 32, + Origins: pallet_custom_origins = 35, + Whitelist: pallet_whitelist = 36, // Treasury - Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event} = 37, + Treasury: pallet_treasury = 37, // Parachains pallets. Start indices at 40 to leave room. - ParachainsOrigin: parachains_origin::{Pallet, Origin} = 41, - Configuration: parachains_configuration::{Pallet, Call, Storage, Config} = 42, - ParasShared: parachains_shared::{Pallet, Call, Storage} = 43, - ParaInclusion: parachains_inclusion::{Pallet, Call, Storage, Event} = 44, - ParaInherent: parachains_paras_inherent::{Pallet, Call, Storage, Inherent} = 45, - ParaScheduler: parachains_scheduler::{Pallet, Storage} = 46, - Paras: parachains_paras::{Pallet, Call, Storage, Event, Config, ValidateUnsigned} = 47, - Initializer: parachains_initializer::{Pallet, Call, Storage} = 48, - Dmp: parachains_dmp::{Pallet, Storage} = 49, + ParachainsOrigin: parachains_origin = 41, + Configuration: parachains_configuration = 42, + ParasShared: parachains_shared = 43, + ParaInclusion: parachains_inclusion = 44, + ParaInherent: parachains_paras_inherent = 45, + ParaScheduler: parachains_scheduler = 46, + Paras: parachains_paras = 47, + Initializer: parachains_initializer = 48, + Dmp: parachains_dmp = 49, // RIP Ump 50 - Hrmp: parachains_hrmp::{Pallet, Call, Storage, Event, Config} = 51, - ParaSessionInfo: parachains_session_info::{Pallet, Storage} = 52, - ParasDisputes: parachains_disputes::{Pallet, Call, Storage, Event} = 53, - ParasSlashing: parachains_slashing::{Pallet, Call, Storage, ValidateUnsigned} = 54, - ParachainsAssignmentProvider: parachains_assigner_parachains::{Pallet} = 55, + Hrmp: parachains_hrmp = 51, + ParaSessionInfo: parachains_session_info = 52, + ParasDisputes: parachains_disputes = 53, + ParasSlashing: parachains_slashing = 54, + ParachainsAssignmentProvider: parachains_assigner_parachains = 55, // Parachain Onboarding Pallets. Start indices at 60 to leave room. - Registrar: paras_registrar::{Pallet, Call, Storage, Event, Config} = 60, - Slots: slots::{Pallet, Call, Storage, Event} = 61, - ParasSudoWrapper: paras_sudo_wrapper::{Pallet, Call} = 62, - Auctions: auctions::{Pallet, Call, Storage, Event} = 63, - Crowdloan: crowdloan::{Pallet, Call, Storage, Event} = 64, - AssignedSlots: assigned_slots::{Pallet, Call, Storage, Event, Config} = 65, + Registrar: paras_registrar = 60, + Slots: slots = 61, + ParasSudoWrapper: paras_sudo_wrapper = 62, + Auctions: auctions = 63, + Crowdloan: crowdloan = 64, + AssignedSlots: assigned_slots = 65, // Pallet for sending XCM. - XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config} = 99, + XcmPallet: pallet_xcm = 99, // Generalized message queue - MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event} = 100, + MessageQueue: pallet_message_queue = 100, // Asset rate. - AssetRate: pallet_asset_rate::{Pallet, Call, Storage, Event} = 101, + AssetRate: pallet_asset_rate = 101, // Root testing pallet. - RootTesting: pallet_root_testing::{Pallet, Call, Storage, Event} = 102, + RootTesting: pallet_root_testing = 102, // Pallet for migrating Identity to a parachain. To be removed post-migration. - IdentityMigrator: identity_migrator::{Pallet, Call, Event} = 248, + IdentityMigrator: identity_migrator = 248, } } diff --git a/polkadot/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs b/polkadot/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs index bb4b7ff6276f..f1d1b2fdef3e 100644 --- a/polkadot/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs +++ b/polkadot/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs @@ -34,9 +34,9 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - XcmBalancesBenchmark: xcm_balances_benchmark::{Pallet}, + System: frame_system, + Balances: pallet_balances, + XcmBalancesBenchmark: xcm_balances_benchmark, } ); diff --git a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mock.rs b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mock.rs index 4dd677217fcc..656c675b6307 100644 --- a/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mock.rs +++ b/polkadot/xcm/pallet-xcm-benchmarks/src/generic/mock.rs @@ -39,9 +39,9 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - XcmGenericBenchmarks: generic::{Pallet}, + System: frame_system, + Balances: pallet_balances, + XcmGenericBenchmarks: generic, } ); diff --git a/polkadot/xcm/pallet-xcm/src/mock.rs b/polkadot/xcm/pallet-xcm/src/mock.rs index 3ce32fa46d32..1ca30963d595 100644 --- a/polkadot/xcm/pallet-xcm/src/mock.rs +++ b/polkadot/xcm/pallet-xcm/src/mock.rs @@ -139,12 +139,12 @@ pub mod pallet_test_notifier { construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Storage, Config, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - AssetsPallet: pallet_assets::{Pallet, Call, Storage, Config, Event}, - ParasOrigin: origin::{Pallet, Origin}, - XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin, Config}, - TestNotifier: pallet_test_notifier::{Pallet, Call, Event}, + System: frame_system, + Balances: pallet_balances, + AssetsPallet: pallet_assets, + ParasOrigin: origin, + XcmPallet: pallet_xcm, + TestNotifier: pallet_test_notifier, } ); diff --git a/polkadot/xcm/xcm-builder/src/tests/pay/mock.rs b/polkadot/xcm/xcm-builder/src/tests/pay/mock.rs index 01ff8c29f3da..76198f84ed68 100644 --- a/polkadot/xcm/xcm-builder/src/tests/pay/mock.rs +++ b/polkadot/xcm/xcm-builder/src/tests/pay/mock.rs @@ -40,7 +40,7 @@ pub type BlockNumber = u32; pub type AccountId = AccountId32; construct_runtime!( - pub struct Test { + pub enum Test { System: frame_system, Balances: pallet_balances, Assets: pallet_assets, diff --git a/polkadot/xcm/xcm-builder/tests/mock/mod.rs b/polkadot/xcm/xcm-builder/tests/mock/mod.rs index 2e89313a68e0..73df22561d12 100644 --- a/polkadot/xcm/xcm-builder/tests/mock/mod.rs +++ b/polkadot/xcm/xcm-builder/tests/mock/mod.rs @@ -250,10 +250,10 @@ type Block = frame_system::mocking::MockBlock; construct_runtime!( pub enum Runtime { - System: frame_system::{Pallet, Call, Storage, Config, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - ParasOrigin: origin::{Pallet, Origin}, - XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin}, + System: frame_system, + Balances: pallet_balances, + ParasOrigin: origin, + XcmPallet: pallet_xcm, } ); diff --git a/polkadot/xcm/xcm-simulator/example/src/parachain.rs b/polkadot/xcm/xcm-simulator/example/src/parachain.rs index 0b6c573f464e..3adfa95d2e85 100644 --- a/polkadot/xcm/xcm-simulator/example/src/parachain.rs +++ b/polkadot/xcm/xcm-simulator/example/src/parachain.rs @@ -457,10 +457,10 @@ type Block = frame_system::mocking::MockBlock; construct_runtime!( pub enum Runtime { - System: frame_system::{Pallet, Call, Storage, Config, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - MsgQueue: mock_msg_queue::{Pallet, Storage, Event}, - PolkadotXcm: pallet_xcm::{Pallet, Call, Event, Origin}, - ForeignUniques: pallet_uniques::{Pallet, Call, Storage, Event}, + System: frame_system, + Balances: pallet_balances, + MsgQueue: mock_msg_queue, + PolkadotXcm: pallet_xcm, + ForeignUniques: pallet_uniques, } ); diff --git a/polkadot/xcm/xcm-simulator/example/src/relay_chain.rs b/polkadot/xcm/xcm-simulator/example/src/relay_chain.rs index 946b932b05e3..d9ed6e800aa2 100644 --- a/polkadot/xcm/xcm-simulator/example/src/relay_chain.rs +++ b/polkadot/xcm/xcm-simulator/example/src/relay_chain.rs @@ -281,11 +281,11 @@ impl pallet_message_queue::Config for Runtime { construct_runtime!( pub enum Runtime { - System: frame_system::{Pallet, Call, Storage, Config, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - ParasOrigin: origin::{Pallet, Origin}, - XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin}, - Uniques: pallet_uniques::{Pallet, Call, Storage, Event}, - MessageQueue: pallet_message_queue::{Pallet, Event}, + System: frame_system, + Balances: pallet_balances, + ParasOrigin: origin, + XcmPallet: pallet_xcm, + Uniques: pallet_uniques, + MessageQueue: pallet_message_queue, } ); diff --git a/polkadot/xcm/xcm-simulator/fuzzer/src/parachain.rs b/polkadot/xcm/xcm-simulator/fuzzer/src/parachain.rs index 41fc5af97088..8a89f8cb0e76 100644 --- a/polkadot/xcm/xcm-simulator/fuzzer/src/parachain.rs +++ b/polkadot/xcm/xcm-simulator/fuzzer/src/parachain.rs @@ -360,9 +360,9 @@ type Block = frame_system::mocking::MockBlock; construct_runtime!( pub enum Runtime { - System: frame_system::{Pallet, Call, Storage, Config, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - MsgQueue: mock_msg_queue::{Pallet, Storage, Event}, - PolkadotXcm: pallet_xcm::{Pallet, Call, Event, Origin}, + System: frame_system, + Balances: pallet_balances, + MsgQueue: mock_msg_queue, + PolkadotXcm: pallet_xcm, } ); diff --git a/polkadot/xcm/xcm-simulator/fuzzer/src/relay_chain.rs b/polkadot/xcm/xcm-simulator/fuzzer/src/relay_chain.rs index d3f91b013173..143f8974f3e8 100644 --- a/polkadot/xcm/xcm-simulator/fuzzer/src/relay_chain.rs +++ b/polkadot/xcm/xcm-simulator/fuzzer/src/relay_chain.rs @@ -252,10 +252,10 @@ impl pallet_message_queue::Config for Runtime { construct_runtime!( pub enum Runtime { - System: frame_system::{Pallet, Call, Storage, Config, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - ParasOrigin: origin::{Pallet, Origin}, - XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin}, - MessageQueue: pallet_message_queue::{Pallet, Event}, + System: frame_system, + Balances: pallet_balances, + ParasOrigin: origin, + XcmPallet: pallet_xcm, + MessageQueue: pallet_message_queue, } ); diff --git a/substrate/bin/minimal/runtime/src/lib.rs b/substrate/bin/minimal/runtime/src/lib.rs index efee400c3f59..610289693d91 100644 --- a/substrate/bin/minimal/runtime/src/lib.rs +++ b/substrate/bin/minimal/runtime/src/lib.rs @@ -63,7 +63,7 @@ type SignedExtra = ( ); construct_runtime!( - pub struct Runtime { + pub enum Runtime { System: frame_system, Timestamp: pallet_timestamp, diff --git a/substrate/bin/node-template/runtime/src/lib.rs b/substrate/bin/node-template/runtime/src/lib.rs index 5f399edda987..e9ccd5697dfe 100644 --- a/substrate/bin/node-template/runtime/src/lib.rs +++ b/substrate/bin/node-template/runtime/src/lib.rs @@ -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, diff --git a/substrate/bin/node/runtime/src/lib.rs b/substrate/bin/node/runtime/src/lib.rs index 1043e5017dc3..d7598adb5a22 100644 --- a/substrate/bin/node/runtime/src/lib.rs +++ b/substrate/bin/node/runtime/src/lib.rs @@ -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, ValidateUnsigned}, + Beefy: pallet_beefy, // MMR leaf construction must be before session in order to have leaf contents // refer to block 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::, @@ -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, diff --git a/substrate/frame/assets/src/mock.rs b/substrate/frame/assets/src/mock.rs index a4d85b64922f..d60f53583367 100644 --- a/substrate/frame/assets/src/mock.rs +++ b/substrate/frame/assets/src/mock.rs @@ -37,9 +37,9 @@ type Block = frame_system::mocking::MockBlock; construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Assets: pallet_assets::{Pallet, Call, Storage, Event}, + System: frame_system, + Balances: pallet_balances, + Assets: pallet_assets, } ); diff --git a/substrate/frame/atomic-swap/src/tests.rs b/substrate/frame/atomic-swap/src/tests.rs index 7e2f22b18360..58502aa4f93c 100644 --- a/substrate/frame/atomic-swap/src/tests.rs +++ b/substrate/frame/atomic-swap/src/tests.rs @@ -35,9 +35,9 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - AtomicSwap: pallet_atomic_swap::{Pallet, Call, Event}, + System: frame_system, + Balances: pallet_balances, + AtomicSwap: pallet_atomic_swap, } ); diff --git a/substrate/frame/aura/src/mock.rs b/substrate/frame/aura/src/mock.rs index d38a8583819e..d87fea8fc81e 100644 --- a/substrate/frame/aura/src/mock.rs +++ b/substrate/frame/aura/src/mock.rs @@ -35,9 +35,9 @@ const SLOT_DURATION: u64 = 2; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, - Aura: pallet_aura::{Pallet, Storage, Config}, + System: frame_system, + Timestamp: pallet_timestamp, + Aura: pallet_aura, } ); diff --git a/substrate/frame/authority-discovery/src/lib.rs b/substrate/frame/authority-discovery/src/lib.rs index 3044b41e31de..640c0c8759eb 100644 --- a/substrate/frame/authority-discovery/src/lib.rs +++ b/substrate/frame/authority-discovery/src/lib.rs @@ -187,9 +187,9 @@ mod tests { frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Session: pallet_session::{Pallet, Call, Storage, Event, Config}, - AuthorityDiscovery: pallet_authority_discovery::{Pallet, Config}, + System: frame_system, + Session: pallet_session, + AuthorityDiscovery: pallet_authority_discovery, } ); diff --git a/substrate/frame/authorship/src/lib.rs b/substrate/frame/authorship/src/lib.rs index 56a516894dec..8b38a58d8e73 100644 --- a/substrate/frame/authorship/src/lib.rs +++ b/substrate/frame/authorship/src/lib.rs @@ -108,8 +108,8 @@ mod tests { frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Authorship: pallet_authorship::{Pallet, Storage}, + System: frame_system, + Authorship: pallet_authorship, } ); diff --git a/substrate/frame/bags-list/src/mock.rs b/substrate/frame/bags-list/src/mock.rs index 9946a2198ac4..4282120983b1 100644 --- a/substrate/frame/bags-list/src/mock.rs +++ b/substrate/frame/bags-list/src/mock.rs @@ -68,10 +68,9 @@ impl bags_list::Config for Runtime { type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub struct Runtime - { - System: frame_system::{Pallet, Call, Storage, Event, Config}, - BagsList: bags_list::{Pallet, Call, Storage, Event}, + pub enum Runtime { + System: frame_system, + BagsList: bags_list, } ); diff --git a/substrate/frame/balances/src/tests/mod.rs b/substrate/frame/balances/src/tests/mod.rs index 8e834483cbe6..708e081fe0bf 100644 --- a/substrate/frame/balances/src/tests/mod.rs +++ b/substrate/frame/balances/src/tests/mod.rs @@ -75,11 +75,10 @@ impl VariantCount for TestId { } frame_support::construct_runtime!( - pub struct Test - { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event}, + pub enum Test { + System: frame_system, + Balances: pallet_balances, + TransactionPayment: pallet_transaction_payment, } ); diff --git a/substrate/frame/beefy-mmr/src/mock.rs b/substrate/frame/beefy-mmr/src/mock.rs index b85096813dec..94149ac67765 100644 --- a/substrate/frame/beefy-mmr/src/mock.rs +++ b/substrate/frame/beefy-mmr/src/mock.rs @@ -49,11 +49,11 @@ type Block = frame_system::mocking::MockBlock; construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Session: pallet_session::{Pallet, Call, Storage, Event, Config}, - Mmr: pallet_mmr::{Pallet, Storage}, - Beefy: pallet_beefy::{Pallet, Config, Storage}, - BeefyMmr: pallet_beefy_mmr::{Pallet, Storage}, + System: frame_system, + Session: pallet_session, + Mmr: pallet_mmr, + Beefy: pallet_beefy, + BeefyMmr: pallet_beefy_mmr, } ); diff --git a/substrate/frame/benchmarking/pov/src/benchmarking.rs b/substrate/frame/benchmarking/pov/src/benchmarking.rs index a24b772ade01..84d81890b175 100644 --- a/substrate/frame/benchmarking/pov/src/benchmarking.rs +++ b/substrate/frame/benchmarking/pov/src/benchmarking.rs @@ -350,8 +350,8 @@ mod mock { frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Baseline: crate::{Pallet, Call, Storage, Event}, + System: frame_system, + Baseline: crate, } ); diff --git a/substrate/frame/benchmarking/pov/src/tests.rs b/substrate/frame/benchmarking/pov/src/tests.rs index dda29c071dec..7fa2fb97dea1 100644 --- a/substrate/frame/benchmarking/pov/src/tests.rs +++ b/substrate/frame/benchmarking/pov/src/tests.rs @@ -170,8 +170,8 @@ mod mock { frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Baseline: crate::{Pallet, Call, Storage, Event}, + System: frame_system, + Baseline: crate, } ); diff --git a/substrate/frame/benchmarking/src/baseline.rs b/substrate/frame/benchmarking/src/baseline.rs index 6451284e012b..2fd3b634ae72 100644 --- a/substrate/frame/benchmarking/src/baseline.rs +++ b/substrate/frame/benchmarking/src/baseline.rs @@ -121,7 +121,7 @@ pub mod mock { frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, + System: frame_system, } ); diff --git a/substrate/frame/benchmarking/src/tests.rs b/substrate/frame/benchmarking/src/tests.rs index 7d6cfaad609c..f47a3d9f96a9 100644 --- a/substrate/frame/benchmarking/src/tests.rs +++ b/substrate/frame/benchmarking/src/tests.rs @@ -70,8 +70,8 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - TestPallet: pallet_test::{Pallet, Call, Storage}, + System: frame_system, + TestPallet: pallet_test, } ); diff --git a/substrate/frame/benchmarking/src/tests_instance.rs b/substrate/frame/benchmarking/src/tests_instance.rs index 550108408968..c28aa694a130 100644 --- a/substrate/frame/benchmarking/src/tests_instance.rs +++ b/substrate/frame/benchmarking/src/tests_instance.rs @@ -80,8 +80,8 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - TestPallet: pallet_test::{Pallet, Call, Storage, Event}, + System: frame_system, + TestPallet: pallet_test, } ); diff --git a/substrate/frame/bounties/src/tests.rs b/substrate/frame/bounties/src/tests.rs index 22e608cce637..a7177393a44f 100644 --- a/substrate/frame/bounties/src/tests.rs +++ b/substrate/frame/bounties/src/tests.rs @@ -44,12 +44,12 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Bounties: pallet_bounties::{Pallet, Call, Storage, Event}, - Bounties1: pallet_bounties::::{Pallet, Call, Storage, Event}, - Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event}, - Treasury1: pallet_treasury::::{Pallet, Call, Storage, Config, Event}, + System: frame_system, + Balances: pallet_balances, + Bounties: pallet_bounties, + Bounties1: pallet_bounties::, + Treasury: pallet_treasury, + Treasury1: pallet_treasury::, } ); diff --git a/substrate/frame/child-bounties/src/tests.rs b/substrate/frame/child-bounties/src/tests.rs index 7de45c731274..e57721adad0c 100644 --- a/substrate/frame/child-bounties/src/tests.rs +++ b/substrate/frame/child-bounties/src/tests.rs @@ -46,11 +46,11 @@ type BountiesError = pallet_bounties::Error; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Bounties: pallet_bounties::{Pallet, Call, Storage, Event}, - Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event}, - ChildBounties: pallet_child_bounties::{Pallet, Call, Storage, Event}, + System: frame_system, + Balances: pallet_balances, + Bounties: pallet_bounties, + Treasury: pallet_treasury, + ChildBounties: pallet_child_bounties, } ); diff --git a/substrate/frame/collective/src/tests.rs b/substrate/frame/collective/src/tests.rs index 06a91cf6fe9c..dbc3fbe69b3b 100644 --- a/substrate/frame/collective/src/tests.rs +++ b/substrate/frame/collective/src/tests.rs @@ -38,11 +38,11 @@ pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic}, - Collective: pallet_collective::::{Pallet, Call, Event, Origin, Config}, - CollectiveMajority: pallet_collective::::{Pallet, Call, Event, Origin, Config}, - DefaultCollective: pallet_collective::{Pallet, Call, Event, Origin, Config}, - Democracy: mock_democracy::{Pallet, Call, Event}, + System: frame_system, + Collective: pallet_collective::, + CollectiveMajority: pallet_collective::, + 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(), diff --git a/substrate/frame/contracts/mock-network/src/relay_chain.rs b/substrate/frame/contracts/mock-network/src/relay_chain.rs index abe907839d9b..9671857fb788 100644 --- a/substrate/frame/contracts/mock-network/src/relay_chain.rs +++ b/substrate/frame/contracts/mock-network/src/relay_chain.rs @@ -233,10 +233,10 @@ impl pallet_message_queue::Config for Runtime { construct_runtime!( pub enum Runtime { - System: frame_system::{Pallet, Call, Storage, Config, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - ParasOrigin: origin::{Pallet, Origin}, - XcmPallet: pallet_xcm::{Pallet, Call, Storage, Event, Origin}, - MessageQueue: pallet_message_queue::{Pallet, Event}, + System: frame_system, + Balances: pallet_balances, + ParasOrigin: origin, + XcmPallet: pallet_xcm, + MessageQueue: pallet_message_queue, } ); diff --git a/substrate/frame/contracts/src/tests.rs b/substrate/frame/contracts/src/tests.rs index 28fe3c2af49c..815395910190 100644 --- a/substrate/frame/contracts/src/tests.rs +++ b/substrate/frame/contracts/src/tests.rs @@ -71,13 +71,13 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - 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, HoldReason}, - Proxy: pallet_proxy::{Pallet, Call, Storage, Event}, + 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 } ); diff --git a/substrate/frame/conviction-voting/src/tests.rs b/substrate/frame/conviction-voting/src/tests.rs index 371d03643843..d7bac505a542 100644 --- a/substrate/frame/conviction-voting/src/tests.rs +++ b/substrate/frame/conviction-voting/src/tests.rs @@ -37,9 +37,9 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Voting: pallet_conviction_voting::{Pallet, Call, Storage, Event}, + System: frame_system, + Balances: pallet_balances, + Voting: pallet_conviction_voting, } ); diff --git a/substrate/frame/core-fellowship/src/tests.rs b/substrate/frame/core-fellowship/src/tests.rs index c9098f2171f4..838bd9bbdc80 100644 --- a/substrate/frame/core-fellowship/src/tests.rs +++ b/substrate/frame/core-fellowship/src/tests.rs @@ -41,8 +41,8 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - CoreFellowship: pallet_core_fellowship::{Pallet, Call, Storage, Event}, + System: frame_system, + CoreFellowship: pallet_core_fellowship, } ); diff --git a/substrate/frame/democracy/src/tests.rs b/substrate/frame/democracy/src/tests.rs index 00d8fedca0cf..888d7e596146 100644 --- a/substrate/frame/democracy/src/tests.rs +++ b/substrate/frame/democracy/src/tests.rs @@ -55,11 +55,11 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, + System: frame_system, + Balances: pallet_balances, Preimage: pallet_preimage, - Scheduler: pallet_scheduler::{Pallet, Call, Storage, Event}, - Democracy: pallet_democracy::{Pallet, Call, Storage, Config, Event}, + Scheduler: pallet_scheduler, + Democracy: pallet_democracy, } ); diff --git a/substrate/frame/election-provider-multi-phase/src/mock.rs b/substrate/frame/election-provider-multi-phase/src/mock.rs index e7dd8acf36b1..507e8f2c39bd 100644 --- a/substrate/frame/election-provider-multi-phase/src/mock.rs +++ b/substrate/frame/election-provider-multi-phase/src/mock.rs @@ -54,11 +54,10 @@ pub type UncheckedExtrinsic = sp_runtime::generic::UncheckedExtrinsic; frame_support::construct_runtime!( - pub struct Runtime - { - System: frame_system::{Pallet, Call, Event, Config}, - Balances: pallet_balances::{Pallet, Call, Event, Config}, - MultiPhase: multi_phase::{Pallet, Call, Event}, + pub enum Runtime { + System: frame_system, + Balances: pallet_balances, + MultiPhase: multi_phase, } ); diff --git a/substrate/frame/election-provider-support/src/onchain.rs b/substrate/frame/election-provider-support/src/onchain.rs index 412aac454753..d937f42cb405 100644 --- a/substrate/frame/election-provider-support/src/onchain.rs +++ b/substrate/frame/election-provider-support/src/onchain.rs @@ -194,9 +194,8 @@ mod tests { pub type Block = sp_runtime::generic::Block; frame_support::construct_runtime!( - pub struct Runtime - { - System: frame_system::{Pallet, Call, Event}, + pub enum Runtime { + System: frame_system, } ); diff --git a/substrate/frame/elections-phragmen/src/lib.rs b/substrate/frame/elections-phragmen/src/lib.rs index 5e50027e3442..2b599ab5292b 100644 --- a/substrate/frame/elections-phragmen/src/lib.rs +++ b/substrate/frame/elections-phragmen/src/lib.rs @@ -1454,9 +1454,9 @@ mod tests { frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Event}, - Balances: pallet_balances::{Pallet, Call, Event, Config}, - Elections: elections_phragmen::{Pallet, Call, Event, Config}, + 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::>() }); let mut ext: sp_io::TestExternalities = RuntimeGenesisConfig { + system: frame_system::GenesisConfig::default(), balances: pallet_balances::GenesisConfig:: { balances: vec![ (1, 10 * self.balance_factor), diff --git a/substrate/frame/examples/basic/src/tests.rs b/substrate/frame/examples/basic/src/tests.rs index e00b1ac01b39..2a6fbf0f054c 100644 --- a/substrate/frame/examples/basic/src/tests.rs +++ b/substrate/frame/examples/basic/src/tests.rs @@ -39,9 +39,9 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Example: pallet_example_basic::{Pallet, Call, Storage, Config, Event}, + System: frame_system, + Balances: pallet_balances, + Example: pallet_example_basic, } ); diff --git a/substrate/frame/examples/default-config/src/lib.rs b/substrate/frame/examples/default-config/src/lib.rs index f1611bca2ce3..cd1653e6c764 100644 --- a/substrate/frame/examples/default-config/src/lib.rs +++ b/substrate/frame/examples/default-config/src/lib.rs @@ -143,7 +143,7 @@ pub mod tests { type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub struct Runtime { + pub enum Runtime { System: frame_system, DefaultPallet: pallet_default_config_example, } diff --git a/substrate/frame/examples/dev-mode/src/tests.rs b/substrate/frame/examples/dev-mode/src/tests.rs index 3acedcd0fd1d..c1501a5b4cf7 100644 --- a/substrate/frame/examples/dev-mode/src/tests.rs +++ b/substrate/frame/examples/dev-mode/src/tests.rs @@ -33,9 +33,9 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Example: pallet_dev_mode::{Pallet, Call, Storage, Event}, + System: frame_system, + Balances: pallet_balances, + Example: pallet_dev_mode, } ); diff --git a/substrate/frame/examples/frame-crate/src/lib.rs b/substrate/frame/examples/frame-crate/src/lib.rs index 0fea2c22cf54..7e286df1e32c 100644 --- a/substrate/frame/examples/frame-crate/src/lib.rs +++ b/substrate/frame/examples/frame-crate/src/lib.rs @@ -49,7 +49,7 @@ mod tests { use frame::testing_prelude::*; construct_runtime!( - pub struct Runtime { + pub enum Runtime { System: frame_system, MyPallet: my_pallet, } diff --git a/substrate/frame/examples/offchain-worker/src/tests.rs b/substrate/frame/examples/offchain-worker/src/tests.rs index 48a8d86588c2..ea37a2da493d 100644 --- a/substrate/frame/examples/offchain-worker/src/tests.rs +++ b/substrate/frame/examples/offchain-worker/src/tests.rs @@ -41,8 +41,8 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Example: example_offchain_worker::{Pallet, Call, Storage, Event, ValidateUnsigned}, + System: frame_system, + Example: example_offchain_worker, } ); diff --git a/substrate/frame/examples/tasks/src/mock.rs b/substrate/frame/examples/tasks/src/mock.rs index e0fbec3eb765..5ad104b0dfae 100644 --- a/substrate/frame/examples/tasks/src/mock.rs +++ b/substrate/frame/examples/tasks/src/mock.rs @@ -26,7 +26,7 @@ pub type Balance = u32; type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub struct Runtime { + pub enum Runtime { System: frame_system, TasksExample: tasks_example, } diff --git a/substrate/frame/executive/src/lib.rs b/substrate/frame/executive/src/lib.rs index f2cc3b631688..cfeb585b0fdc 100644 --- a/substrate/frame/executive/src/lib.rs +++ b/substrate/frame/executive/src/lib.rs @@ -897,12 +897,11 @@ mod tests { } frame_support::construct_runtime!( - pub struct Runtime - { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event}, - Custom: custom::{Pallet, Call, ValidateUnsigned, Inherent}, + pub enum Runtime { + System: frame_system, + Balances: pallet_balances, + TransactionPayment: pallet_transaction_payment, + Custom: custom, } ); diff --git a/substrate/frame/fast-unstake/src/mock.rs b/substrate/frame/fast-unstake/src/mock.rs index f9326919fd3e..de1772264f16 100644 --- a/substrate/frame/fast-unstake/src/mock.rs +++ b/substrate/frame/fast-unstake/src/mock.rs @@ -181,7 +181,7 @@ impl fast_unstake::Config for Runtime { type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub struct Runtime { + pub enum Runtime { System: frame_system, Timestamp: pallet_timestamp, Balances: pallet_balances, diff --git a/substrate/frame/glutton/src/mock.rs b/substrate/frame/glutton/src/mock.rs index 31b78efc5748..26863811e29a 100644 --- a/substrate/frame/glutton/src/mock.rs +++ b/substrate/frame/glutton/src/mock.rs @@ -33,8 +33,8 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Glutton: pallet_glutton::{Pallet, Event}, + System: frame_system, + Glutton: pallet_glutton, } ); diff --git a/substrate/frame/identity/src/tests.rs b/substrate/frame/identity/src/tests.rs index e6107cda0f00..a2b26120254a 100644 --- a/substrate/frame/identity/src/tests.rs +++ b/substrate/frame/identity/src/tests.rs @@ -47,9 +47,9 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Identity: pallet_identity::{Pallet, Call, Storage, Event}, + System: frame_system, + Balances: pallet_balances, + Identity: pallet_identity, } ); diff --git a/substrate/frame/im-online/src/mock.rs b/substrate/frame/im-online/src/mock.rs index 2f4e39220260..9dad148b10fa 100644 --- a/substrate/frame/im-online/src/mock.rs +++ b/substrate/frame/im-online/src/mock.rs @@ -42,12 +42,11 @@ use crate::Config; type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub struct Runtime - { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Session: pallet_session::{Pallet, Call, Storage, Event, Config}, - ImOnline: imonline::{Pallet, Call, Storage, Config, Event}, - Historical: pallet_session_historical::{Pallet}, + pub enum Runtime { + System: frame_system, + Session: pallet_session, + ImOnline: imonline, + Historical: pallet_session_historical, } ); diff --git a/substrate/frame/indices/src/mock.rs b/substrate/frame/indices/src/mock.rs index 913a37fe55ba..7ea524a31670 100644 --- a/substrate/frame/indices/src/mock.rs +++ b/substrate/frame/indices/src/mock.rs @@ -32,9 +32,9 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Indices: pallet_indices::{Pallet, Call, Storage, Config, Event}, + System: frame_system, + Balances: pallet_balances, + Indices: pallet_indices, } ); diff --git a/substrate/frame/insecure-randomness-collective-flip/src/lib.rs b/substrate/frame/insecure-randomness-collective-flip/src/lib.rs index c7ed22d1dd51..00f1055f6f27 100644 --- a/substrate/frame/insecure-randomness-collective-flip/src/lib.rs +++ b/substrate/frame/insecure-randomness-collective-flip/src/lib.rs @@ -179,8 +179,8 @@ mod tests { frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - CollectiveFlip: pallet_insecure_randomness_collective_flip::{Pallet, Storage}, + System: frame_system, + CollectiveFlip: pallet_insecure_randomness_collective_flip, } ); diff --git a/substrate/frame/lottery/src/mock.rs b/substrate/frame/lottery/src/mock.rs index 6e50529619bf..884f003aadaf 100644 --- a/substrate/frame/lottery/src/mock.rs +++ b/substrate/frame/lottery/src/mock.rs @@ -37,9 +37,9 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Lottery: pallet_lottery::{Pallet, Call, Storage, Event}, + System: frame_system, + Balances: pallet_balances, + Lottery: pallet_lottery, } ); diff --git a/substrate/frame/membership/src/lib.rs b/substrate/frame/membership/src/lib.rs index 2f4bf4bc4ffa..0e03c097d123 100644 --- a/substrate/frame/membership/src/lib.rs +++ b/substrate/frame/membership/src/lib.rs @@ -541,8 +541,8 @@ mod tests { frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Membership: pallet_membership::{Pallet, Call, Storage, Config, Event}, + System: frame_system, + Membership: pallet_membership, } ); diff --git a/substrate/frame/merkle-mountain-range/src/mock.rs b/substrate/frame/merkle-mountain-range/src/mock.rs index d3cb4e570297..b3b5127db024 100644 --- a/substrate/frame/merkle-mountain-range/src/mock.rs +++ b/substrate/frame/merkle-mountain-range/src/mock.rs @@ -28,8 +28,8 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - MMR: pallet_mmr::{Pallet, Storage}, + System: frame_system, + MMR: pallet_mmr, } ); diff --git a/substrate/frame/message-queue/src/integration_test.rs b/substrate/frame/message-queue/src/integration_test.rs index fee5d2421353..aa6f019d650d 100644 --- a/substrate/frame/message-queue/src/integration_test.rs +++ b/substrate/frame/message-queue/src/integration_test.rs @@ -52,8 +52,8 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event}, + System: frame_system, + MessageQueue: pallet_message_queue, } ); diff --git a/substrate/frame/message-queue/src/mock.rs b/substrate/frame/message-queue/src/mock.rs index 89c6e8625109..f1067ed961e8 100644 --- a/substrate/frame/message-queue/src/mock.rs +++ b/substrate/frame/message-queue/src/mock.rs @@ -39,8 +39,8 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - MessageQueue: pallet_message_queue::{Pallet, Call, Storage, Event}, + System: frame_system, + MessageQueue: pallet_message_queue, } ); diff --git a/substrate/frame/multisig/src/tests.rs b/substrate/frame/multisig/src/tests.rs index 179827255291..887c7f8bebc4 100644 --- a/substrate/frame/multisig/src/tests.rs +++ b/substrate/frame/multisig/src/tests.rs @@ -32,9 +32,9 @@ type Block = frame_system::mocking::MockBlockU32; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Multisig: pallet_multisig::{Pallet, Call, Storage, Event}, + System: frame_system, + Balances: pallet_balances, + Multisig: pallet_multisig, } ); diff --git a/substrate/frame/nfts/src/mock.rs b/substrate/frame/nfts/src/mock.rs index 4363eccc7ff5..95443cf41c4e 100644 --- a/substrate/frame/nfts/src/mock.rs +++ b/substrate/frame/nfts/src/mock.rs @@ -36,9 +36,9 @@ type Block = frame_system::mocking::MockBlock; construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Nfts: pallet_nfts::{Pallet, Call, Storage, Event}, + System: frame_system, + Balances: pallet_balances, + Nfts: pallet_nfts, } ); diff --git a/substrate/frame/node-authorization/src/mock.rs b/substrate/frame/node-authorization/src/mock.rs index 3c99d41b89ef..bd648de2b243 100644 --- a/substrate/frame/node-authorization/src/mock.rs +++ b/substrate/frame/node-authorization/src/mock.rs @@ -36,10 +36,8 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - NodeAuthorization: pallet_node_authorization::{ - Pallet, Call, Storage, Config, Event, - }, + System: frame_system, + NodeAuthorization: pallet_node_authorization, } ); diff --git a/substrate/frame/nomination-pools/benchmarking/src/mock.rs b/substrate/frame/nomination-pools/benchmarking/src/mock.rs index c58a66f6163a..77124ae38881 100644 --- a/substrate/frame/nomination-pools/benchmarking/src/mock.rs +++ b/substrate/frame/nomination-pools/benchmarking/src/mock.rs @@ -180,14 +180,13 @@ impl crate::Config for Runtime {} type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub struct Runtime - { - System: frame_system::{Pallet, Call, Event}, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Staking: pallet_staking::{Pallet, Call, Config, Storage, Event}, - VoterList: pallet_bags_list::::{Pallet, Call, Storage, Event}, - Pools: pallet_nomination_pools::{Pallet, Call, Storage, Event, FreezeReason}, + pub enum Runtime { + System: frame_system, + Timestamp: pallet_timestamp, + Balances: pallet_balances, + Staking: pallet_staking, + VoterList: pallet_bags_list::, + Pools: pallet_nomination_pools, } ); diff --git a/substrate/frame/nomination-pools/src/mock.rs b/substrate/frame/nomination-pools/src/mock.rs index 1bd969230da9..cd91fbb33c1d 100644 --- a/substrate/frame/nomination-pools/src/mock.rs +++ b/substrate/frame/nomination-pools/src/mock.rs @@ -295,11 +295,10 @@ impl pools::Config for Runtime { type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub struct Runtime - { - System: frame_system::{Pallet, Call, Storage, Event, Config}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Pools: pools::{Pallet, Call, Storage, Event, FreezeReason}, + pub enum Runtime { + System: frame_system, + Balances: pallet_balances, + Pools: pools, } ); diff --git a/substrate/frame/nomination-pools/test-staking/src/mock.rs b/substrate/frame/nomination-pools/test-staking/src/mock.rs index 491cd6191619..cbd7a4d07589 100644 --- a/substrate/frame/nomination-pools/test-staking/src/mock.rs +++ b/substrate/frame/nomination-pools/test-staking/src/mock.rs @@ -192,14 +192,13 @@ impl pallet_nomination_pools::Config for Runtime { type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub struct Runtime - { - System: frame_system::{Pallet, Call, Event}, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Staking: pallet_staking::{Pallet, Call, Config, Storage, Event}, - VoterList: pallet_bags_list::::{Pallet, Call, Storage, Event}, - Pools: pallet_nomination_pools::{Pallet, Call, Storage, Event, FreezeReason}, + pub enum Runtime { + System: frame_system, + Timestamp: pallet_timestamp, + Balances: pallet_balances, + Staking: pallet_staking, + VoterList: pallet_bags_list::, + Pools: pallet_nomination_pools, } ); diff --git a/substrate/frame/offences/benchmarking/src/mock.rs b/substrate/frame/offences/benchmarking/src/mock.rs index 1d642b9b4982..38c6fb6ea5f6 100644 --- a/substrate/frame/offences/benchmarking/src/mock.rs +++ b/substrate/frame/offences/benchmarking/src/mock.rs @@ -227,9 +227,9 @@ frame_support::construct_runtime!( pub enum Test { System: system::{Pallet, Call, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Staking: pallet_staking::{Pallet, Call, Config, Storage, Event}, - Session: pallet_session::{Pallet, Call, Storage, Event, Config}, + Balances: pallet_balances, + Staking: pallet_staking, + Session: pallet_session, ImOnline: pallet_im_online::{Pallet, Call, Storage, Event, ValidateUnsigned, Config}, Offences: pallet_offences::{Pallet, Storage, Event}, Historical: pallet_session_historical::{Pallet}, diff --git a/substrate/frame/offences/src/mock.rs b/substrate/frame/offences/src/mock.rs index 61f680f6db92..d97be99def1c 100644 --- a/substrate/frame/offences/src/mock.rs +++ b/substrate/frame/offences/src/mock.rs @@ -68,10 +68,9 @@ pub fn with_on_offence_fractions) -> R>(f: F) -> type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub struct Runtime - { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Offences: offences::{Pallet, Storage, Event}, + pub enum Runtime { + System: frame_system, + Offences: offences, } ); diff --git a/substrate/frame/proxy/src/tests.rs b/substrate/frame/proxy/src/tests.rs index 89bd8b68f091..67a662e01b2b 100644 --- a/substrate/frame/proxy/src/tests.rs +++ b/substrate/frame/proxy/src/tests.rs @@ -35,10 +35,10 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Proxy: proxy::{Pallet, Call, Storage, Event}, - Utility: pallet_utility::{Pallet, Call, Event}, + System: frame_system, + Balances: pallet_balances, + Proxy: proxy, + Utility: pallet_utility, } ); diff --git a/substrate/frame/ranked-collective/src/tests.rs b/substrate/frame/ranked-collective/src/tests.rs index 60c0da3d7ac2..b3605169339a 100644 --- a/substrate/frame/ranked-collective/src/tests.rs +++ b/substrate/frame/ranked-collective/src/tests.rs @@ -37,8 +37,8 @@ type Class = Rank; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Club: pallet_ranked_collective::{Pallet, Call, Storage, Event}, + System: frame_system, + Club: pallet_ranked_collective, } ); diff --git a/substrate/frame/recovery/src/mock.rs b/substrate/frame/recovery/src/mock.rs index 44cbeec09862..9adb2b80931a 100644 --- a/substrate/frame/recovery/src/mock.rs +++ b/substrate/frame/recovery/src/mock.rs @@ -35,9 +35,9 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Recovery: recovery::{Pallet, Call, Storage, Event}, + System: frame_system, + Balances: pallet_balances, + Recovery: recovery, } ); diff --git a/substrate/frame/remark/src/mock.rs b/substrate/frame/remark/src/mock.rs index 0a385c30eac3..5a5e6a3ccdff 100644 --- a/substrate/frame/remark/src/mock.rs +++ b/substrate/frame/remark/src/mock.rs @@ -34,8 +34,8 @@ pub type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Remark: pallet_remark::{ Pallet, Call, Event }, + System: frame_system, + Remark: pallet_remark, } ); diff --git a/substrate/frame/root-offences/src/mock.rs b/substrate/frame/root-offences/src/mock.rs index c0c83dd08d24..583ba5b92fb0 100644 --- a/substrate/frame/root-offences/src/mock.rs +++ b/substrate/frame/root-offences/src/mock.rs @@ -48,13 +48,13 @@ pub const BLOCK_TIME: u64 = 1000; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Staking: pallet_staking::{Pallet, Call, Config, Storage, Event}, - Session: pallet_session::{Pallet, Call, Storage, Event, Config}, - RootOffences: root_offences::{Pallet, Call, Storage, Event}, - 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, } ); diff --git a/substrate/frame/salary/src/tests.rs b/substrate/frame/salary/src/tests.rs index fbca1be11883..f25acd934528 100644 --- a/substrate/frame/salary/src/tests.rs +++ b/substrate/frame/salary/src/tests.rs @@ -40,8 +40,8 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Salary: pallet_salary::{Pallet, Call, Storage, Event}, + System: frame_system, + Salary: pallet_salary, } ); diff --git a/substrate/frame/scheduler/src/mock.rs b/substrate/frame/scheduler/src/mock.rs index 4edcfa0a7bfd..d22b9fcf8d99 100644 --- a/substrate/frame/scheduler/src/mock.rs +++ b/substrate/frame/scheduler/src/mock.rs @@ -97,10 +97,10 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Logger: logger::{Pallet, Call, Event}, - Scheduler: scheduler::{Pallet, Call, Storage, Event}, - Preimage: pallet_preimage::{Pallet, Call, Storage, Event, HoldReason}, + System: frame_system, + Logger: logger, + Scheduler: scheduler, + Preimage: pallet_preimage, } ); diff --git a/substrate/frame/scored-pool/src/mock.rs b/substrate/frame/scored-pool/src/mock.rs index 6c032ab808cc..00818f4aad06 100644 --- a/substrate/frame/scored-pool/src/mock.rs +++ b/substrate/frame/scored-pool/src/mock.rs @@ -37,9 +37,9 @@ type Block = frame_system::mocking::MockBlock; construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - ScoredPool: pallet_scored_pool::{Pallet, Call, Storage, Config, Event}, + System: frame_system, + Balances: pallet_balances, + ScoredPool: pallet_scored_pool, } ); diff --git a/substrate/frame/session/benchmarking/src/mock.rs b/substrate/frame/session/benchmarking/src/mock.rs index e1744fa43abb..c305641e185c 100644 --- a/substrate/frame/session/benchmarking/src/mock.rs +++ b/substrate/frame/session/benchmarking/src/mock.rs @@ -38,10 +38,10 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Staking: pallet_staking::{Pallet, Call, Config, Storage, Event}, - Session: pallet_session::{Pallet, Call, Storage, Event, Config}, + System: frame_system, + Balances: pallet_balances, + Staking: pallet_staking, + Session: pallet_session, } ); diff --git a/substrate/frame/session/src/mock.rs b/substrate/frame/session/src/mock.rs index f3f18fde168c..eb9eddfd847e 100644 --- a/substrate/frame/session/src/mock.rs +++ b/substrate/frame/session/src/mock.rs @@ -82,9 +82,9 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Session: pallet_session::{Pallet, Call, Storage, Event, Config}, - 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, Storage, Event}, - Session: pallet_session::{Pallet, Call, Storage, Event, Config}, + System: frame_system, + Session: pallet_session, } ); diff --git a/substrate/frame/society/src/mock.rs b/substrate/frame/society/src/mock.rs index 3e29d01ca8e3..749d196b6e1b 100644 --- a/substrate/frame/society/src/mock.rs +++ b/substrate/frame/society/src/mock.rs @@ -39,9 +39,9 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Society: pallet_society::{Pallet, Call, Storage, Event, Config}, + System: frame_system, + Balances: pallet_balances, + Society: pallet_society, } ); diff --git a/substrate/frame/state-trie-migration/src/lib.rs b/substrate/frame/state-trie-migration/src/lib.rs index ea28d7126057..c71002f420ce 100644 --- a/substrate/frame/state-trie-migration/src/lib.rs +++ b/substrate/frame/state-trie-migration/src/lib.rs @@ -1071,9 +1071,9 @@ mod mock { frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Config, Storage, Event}, - StateTrieMigration: pallet_state_trie_migration::{Pallet, Call, Storage, Event}, + System: frame_system, + Balances: pallet_balances, + StateTrieMigration: pallet_state_trie_migration, } ); diff --git a/substrate/frame/sudo/src/mock.rs b/substrate/frame/sudo/src/mock.rs index 878e92390809..9ad14804524a 100644 --- a/substrate/frame/sudo/src/mock.rs +++ b/substrate/frame/sudo/src/mock.rs @@ -98,9 +98,9 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Sudo: sudo::{Pallet, Call, Config, Storage, Event}, - Logger: logger::{Pallet, Call, Storage, Event}, + System: frame_system, + Sudo: sudo, + Logger: logger, } ); diff --git a/substrate/frame/support/procedural/src/construct_runtime/mod.rs b/substrate/frame/support/procedural/src/construct_runtime/mod.rs index 7a9c4d89a749..54ed15f7b1d3 100644 --- a/substrate/frame/support/procedural/src/construct_runtime/mod.rs +++ b/substrate/frame/support/procedural/src/construct_runtime/mod.rs @@ -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, Event},`", + Please add this line: `System: frame_system,`", ) })?; if !system_pallet.cfg_pattern.is_empty() { diff --git a/substrate/frame/support/src/lib.rs b/substrate/frame/support/src/lib.rs index af1f99be1031..95478d1a8cca 100644 --- a/substrate/frame/support/src/lib.rs +++ b/substrate/frame/support/src/lib.rs @@ -2291,7 +2291,7 @@ pub mod pallet_macros { /// # type Block = frame_system::mocking::MockBlock; /// # } /// construct_runtime! { - /// pub struct Runtime { + /// pub enum Runtime { /// System: frame_system, /// Custom: custom_pallet /// } diff --git a/substrate/frame/support/src/migrations.rs b/substrate/frame/support/src/migrations.rs index bfd62c8611c6..d059a992a866 100644 --- a/substrate/frame/support/src/migrations.rs +++ b/substrate/frame/support/src/migrations.rs @@ -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, Event} = 0, +/// System: frame_system = 0, /// -/// SomePalletToRemove: pallet_something::{Pallet, Call, Storage, Event} = 1, -/// AnotherPalletToRemove: pallet_something_else::{Pallet, Call, Storage, Event} = 2, +/// SomePalletToRemove: pallet_something = 1, +/// AnotherPalletToRemove: pallet_something_else = 2, /// /// YourOtherPallets... /// } diff --git a/substrate/frame/support/test/compile_pass/src/lib.rs b/substrate/frame/support/test/compile_pass/src/lib.rs index b304dfcb2823..575322df7604 100644 --- a/substrate/frame/support/test/compile_pass/src/lib.rs +++ b/substrate/frame/support/test/compile_pass/src/lib.rs @@ -83,7 +83,7 @@ pub type Block = generic::Block; pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; construct_runtime!( - pub struct Runtime { + pub enum Runtime { System: renamed_frame_system, } ); diff --git a/substrate/frame/support/test/stg_frame_crate/src/lib.rs b/substrate/frame/support/test/stg_frame_crate/src/lib.rs index 501fcf6a70d7..59a66851f237 100644 --- a/substrate/frame/support/test/stg_frame_crate/src/lib.rs +++ b/substrate/frame/support/test/stg_frame_crate/src/lib.rs @@ -68,8 +68,8 @@ mod tests { construct_runtime! { pub struct Runtime { - System: frame_system::{Pallet, Call, Storage, Config, Event}, - Pallet: pallet::{Pallet, Config}, + System: frame_system, + Pallet: pallet, } } } diff --git a/substrate/frame/support/test/tests/construct_runtime_ui/missing_system_module.stderr b/substrate/frame/support/test/tests/construct_runtime_ui/missing_system_module.stderr index 11ec6f33d204..0f74553f7ecc 100644 --- a/substrate/frame/support/test/tests/construct_runtime_ui/missing_system_module.stderr +++ b/substrate/frame/support/test/tests/construct_runtime_ui/missing_system_module.stderr @@ -1,4 +1,4 @@ -error: `System` pallet declaration is missing. Please add this line: `System: frame_system::{Pallet, Call, Storage, Config, Event},` +error: `System` pallet declaration is missing. Please add this line: `System: frame_system,` --> tests/construct_runtime_ui/missing_system_module.rs:22:2 | 22 | / { diff --git a/substrate/frame/support/test/tests/construct_runtime_ui/pass/composite_enum_instance.rs b/substrate/frame/support/test/tests/construct_runtime_ui/pass/composite_enum_instance.rs index ad6370874769..5cde4a9bebab 100644 --- a/substrate/frame/support/test/tests/construct_runtime_ui/pass/composite_enum_instance.rs +++ b/substrate/frame/support/test/tests/construct_runtime_ui/pass/composite_enum_instance.rs @@ -64,7 +64,7 @@ pub type UncheckedExtrinsic = sp_runtime::generic::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, diff --git a/substrate/frame/support/test/tests/final_keys.rs b/substrate/frame/support/test/tests/final_keys.rs index 765afaf1e660..38240830daa2 100644 --- a/substrate/frame/support/test/tests/final_keys.rs +++ b/substrate/frame/support/test/tests/final_keys.rs @@ -201,7 +201,6 @@ pub type Block = generic::Block; frame_support::construct_runtime!( pub enum Runtime - { System: frame_system, FinalKeysNone: no_instance, diff --git a/substrate/frame/support/test/tests/instance.rs b/substrate/frame/support/test/tests/instance.rs index 43a93df9dea4..7a888e5685d1 100644 --- a/substrate/frame/support/test/tests/instance.rs +++ b/substrate/frame/support/test/tests/instance.rs @@ -278,24 +278,14 @@ pub type Block = generic::Block; frame_support::construct_runtime!( pub enum Runtime { - System: frame_system::{Pallet, Call, Event}, - Module1_1: module1::::{ - Pallet, Call, Storage, Event, Config, Origin, Inherent - }, - Module1_2: module1::::{ - Pallet, Call, Storage, Event, Config, Origin, Inherent - }, - Module2: module2::{Pallet, Call, Storage, Event, Config, Origin, Inherent}, - Module2_1: module2::::{ - Pallet, Call, Storage, Event, Config, Origin, Inherent - }, - Module2_2: module2::::{ - Pallet, Call, Storage, Event, Config, Origin, Inherent - }, - Module2_3: module2::::{ - Pallet, Call, Storage, Event, Config, Origin, Inherent - }, - Module3: module3::{Pallet, Call}, + System: frame_system, + Module1_1: module1::, + Module1_2: module1::, + Module2: module2, + Module2_1: module2::, + Module2_2: module2::, + Module2_3: module2::, + 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 { diff --git a/substrate/frame/support/test/tests/issue2219.rs b/substrate/frame/support/test/tests/issue2219.rs index 4016707b51a8..4c384f432762 100644 --- a/substrate/frame/support/test/tests/issue2219.rs +++ b/substrate/frame/support/test/tests/issue2219.rs @@ -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, } diff --git a/substrate/frame/support/test/tests/pallet_ui/pass/no_std_genesis_config.rs b/substrate/frame/support/test/tests/pallet_ui/pass/no_std_genesis_config.rs index de856ddcd3e9..7e67193cc76c 100644 --- a/substrate/frame/support/test/tests/pallet_ui/pass/no_std_genesis_config.rs +++ b/substrate/frame/support/test/tests/pallet_ui/pass/no_std_genesis_config.rs @@ -57,8 +57,8 @@ impl frame_system::Config for Runtime { construct_runtime! { pub struct Runtime { - System: frame_system::{Pallet, Call, Storage, Config, Event}, - Pallet: test_pallet::{Pallet, Config}, + System: frame_system, + Pallet: test_pallet, } } diff --git a/substrate/frame/support/test/tests/storage_layers.rs b/substrate/frame/support/test/tests/storage_layers.rs index a6d16e0d66d9..88edd7de6ca2 100644 --- a/substrate/frame/support/test/tests/storage_layers.rs +++ b/substrate/frame/support/test/tests/storage_layers.rs @@ -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, } diff --git a/substrate/frame/support/test/tests/versioned_migration.rs b/substrate/frame/support/test/tests/versioned_migration.rs index 03dbd948df92..dab5e06dc858 100644 --- a/substrate/frame/support/test/tests/versioned_migration.rs +++ b/substrate/frame/support/test/tests/versioned_migration.rs @@ -66,8 +66,8 @@ impl dummy_pallet::Config for Test {} construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event} = 0, - DummyPallet: dummy_pallet::{Pallet, Config, Storage} = 1, + System: frame_system = 0, + DummyPallet: dummy_pallet = 1, } ); diff --git a/substrate/frame/system/benches/bench.rs b/substrate/frame/system/benches/bench.rs index 79d5a2d86890..a0c567bf8527 100644 --- a/substrate/frame/system/benches/bench.rs +++ b/substrate/frame/system/benches/bench.rs @@ -47,10 +47,9 @@ mod module { type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( - pub struct Runtime - { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Module: module::{Pallet, Event}, + pub enum Runtime { + System: frame_system, + Module: module, } ); diff --git a/substrate/frame/system/benchmarking/src/mock.rs b/substrate/frame/system/benchmarking/src/mock.rs index 9a81cddca142..edbf74a9a51a 100644 --- a/substrate/frame/system/benchmarking/src/mock.rs +++ b/substrate/frame/system/benchmarking/src/mock.rs @@ -31,7 +31,7 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, + System: frame_system, } ); diff --git a/substrate/frame/system/src/mock.rs b/substrate/frame/system/src/mock.rs index e33ac2f56c87..06527a9bb291 100644 --- a/substrate/frame/system/src/mock.rs +++ b/substrate/frame/system/src/mock.rs @@ -31,7 +31,7 @@ type Block = mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, + System: frame_system, } ); diff --git a/substrate/frame/timestamp/src/mock.rs b/substrate/frame/timestamp/src/mock.rs index b75bcaeb0e03..5cbc5211368d 100644 --- a/substrate/frame/timestamp/src/mock.rs +++ b/substrate/frame/timestamp/src/mock.rs @@ -37,8 +37,8 @@ type Moment = u64; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent}, + System: frame_system, + Timestamp: pallet_timestamp, } ); diff --git a/substrate/frame/tips/src/tests.rs b/substrate/frame/tips/src/tests.rs index 63ac8e37cddd..b8e528bbe7ab 100644 --- a/substrate/frame/tips/src/tests.rs +++ b/substrate/frame/tips/src/tests.rs @@ -44,12 +44,12 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event}, - Treasury1: pallet_treasury::::{Pallet, Call, Storage, Config, Event}, - Tips: pallet_tips::{Pallet, Call, Storage, Event}, - Tips1: pallet_tips::::{Pallet, Call, Storage, Event}, + System: frame_system, + Balances: pallet_balances, + Treasury: pallet_treasury, + Treasury1: pallet_treasury::, + Tips: pallet_tips, + Tips1: pallet_tips::, } ); diff --git a/substrate/frame/transaction-payment/asset-tx-payment/src/mock.rs b/substrate/frame/transaction-payment/asset-tx-payment/src/mock.rs index c9b00be8e2ce..03142d6ae376 100644 --- a/substrate/frame/transaction-payment/asset-tx-payment/src/mock.rs +++ b/substrate/frame/transaction-payment/asset-tx-payment/src/mock.rs @@ -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, diff --git a/substrate/frame/transaction-payment/skip-feeless-payment/src/mock.rs b/substrate/frame/transaction-payment/skip-feeless-payment/src/mock.rs index 5c540c3e4595..17c4c773997e 100644 --- a/substrate/frame/transaction-payment/skip-feeless-payment/src/mock.rs +++ b/substrate/frame/transaction-payment/skip-feeless-payment/src/mock.rs @@ -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, diff --git a/substrate/frame/transaction-payment/src/mock.rs b/substrate/frame/transaction-payment/src/mock.rs index d6686d44c801..2f025ae81d25 100644 --- a/substrate/frame/transaction-payment/src/mock.rs +++ b/substrate/frame/transaction-payment/src/mock.rs @@ -36,8 +36,8 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub struct Runtime { - System: system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, + System: system, + Balances: pallet_balances, TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event}, } ); diff --git a/substrate/frame/transaction-storage/src/mock.rs b/substrate/frame/transaction-storage/src/mock.rs index a8da19a382df..4b2fe5a2a8ca 100644 --- a/substrate/frame/transaction-storage/src/mock.rs +++ b/substrate/frame/transaction-storage/src/mock.rs @@ -33,11 +33,9 @@ pub type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Config, Storage, Event}, - TransactionStorage: pallet_transaction_storage::{ - Pallet, Call, Storage, Config, Inherent, Event, HoldReason - }, + System: frame_system, + Balances: pallet_balances, + TransactionStorage: pallet_transaction_storage, } ); diff --git a/substrate/frame/treasury/src/tests.rs b/substrate/frame/treasury/src/tests.rs index 093757b27701..602159262e46 100644 --- a/substrate/frame/treasury/src/tests.rs +++ b/substrate/frame/treasury/src/tests.rs @@ -47,9 +47,9 @@ type TreasuryCall = crate::Call; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Treasury: treasury::{Pallet, Call, Storage, Config, Event}, + System: frame_system, + Balances: pallet_balances, + Treasury: treasury, Utility: pallet_utility, } ); diff --git a/substrate/frame/uniques/src/mock.rs b/substrate/frame/uniques/src/mock.rs index 056c19ec5593..9120108e0d43 100644 --- a/substrate/frame/uniques/src/mock.rs +++ b/substrate/frame/uniques/src/mock.rs @@ -35,9 +35,9 @@ type Block = frame_system::mocking::MockBlock; construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Uniques: pallet_uniques::{Pallet, Call, Storage, Event}, + System: frame_system, + Balances: pallet_balances, + Uniques: pallet_uniques, } ); diff --git a/substrate/frame/utility/src/tests.rs b/substrate/frame/utility/src/tests.rs index 7b42fa511d10..cfdbd6faf0dc 100644 --- a/substrate/frame/utility/src/tests.rs +++ b/substrate/frame/utility/src/tests.rs @@ -129,14 +129,14 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Timestamp: pallet_timestamp::{Call, Inherent}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - RootTesting: pallet_root_testing::{Pallet, Call, Storage, Event}, + System: frame_system, + Timestamp: pallet_timestamp, + Balances: pallet_balances, + RootTesting: pallet_root_testing, Council: pallet_collective::, - Utility: utility::{Pallet, Call, Event}, - Example: example::{Pallet, Call}, - Democracy: mock_democracy::{Pallet, Call, Event}, + Utility: utility, + Example: example, + Democracy: mock_democracy, } ); diff --git a/substrate/frame/vesting/src/mock.rs b/substrate/frame/vesting/src/mock.rs index 3af4a9c962d1..420edd5e17a2 100644 --- a/substrate/frame/vesting/src/mock.rs +++ b/substrate/frame/vesting/src/mock.rs @@ -33,9 +33,9 @@ type Block = frame_system::mocking::MockBlock; frame_support::construct_runtime!( pub enum Test { - System: frame_system::{Pallet, Call, Config, Storage, Event}, - Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, - Vesting: pallet_vesting::{Pallet, Call, Storage, Event, Config}, + System: frame_system, + Balances: pallet_balances, + Vesting: pallet_vesting, } ); diff --git a/substrate/primitives/api/src/lib.rs b/substrate/primitives/api/src/lib.rs index 1b8b7c40ae07..0a9b334a96f8 100644 --- a/substrate/primitives/api/src/lib.rs +++ b/substrate/primitives/api/src/lib.rs @@ -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); diff --git a/substrate/primitives/api/test/tests/decl_and_impl.rs b/substrate/primitives/api/test/tests/decl_and_impl.rs index 6e895680e41c..d68470551d20 100644 --- a/substrate/primitives/api/test/tests/decl_and_impl.rs +++ b/substrate/primitives/api/test/tests/decl_and_impl.rs @@ -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 { diff --git a/substrate/utils/frame/rpc/support/src/lib.rs b/substrate/utils/frame/rpc/support/src/lib.rs index bb5098293c28..e3ccbd696589 100644 --- a/substrate/utils/frame/rpc/support/src/lib.rs +++ b/substrate/utils/frame/rpc/support/src/lib.rs @@ -42,8 +42,8 @@ use sp_storage::{StorageData, StorageKey}; /// # construct_runtime!( /// # pub enum TestRuntime /// # { -/// # System: frame_system::{Pallet, Call, Config, Storage, Event}, -/// # Test: pallet_test::{Pallet, Storage}, +/// # System: frame_system, +/// # Test: pallet_test, /// # } /// # ); /// #