diff --git a/parachain-template/node/src/chain_spec.rs b/parachain-template/node/src/chain_spec.rs index b37468f184e..98de60dba55 100644 --- a/parachain-template/node/src/chain_spec.rs +++ b/parachain-template/node/src/chain_spec.rs @@ -101,6 +101,7 @@ pub fn development_config() -> ChainSpec { get_account_id_from_seed::("Eve//stash"), get_account_id_from_seed::("Ferdie//stash"), ], + get_account_id_from_seed::("Alice"), 1000.into(), ) }, @@ -156,6 +157,7 @@ pub fn local_testnet_config() -> ChainSpec { get_account_id_from_seed::("Eve//stash"), get_account_id_from_seed::("Ferdie//stash"), ], + get_account_id_from_seed::("Alice"), 1000.into(), ) }, @@ -180,6 +182,7 @@ pub fn local_testnet_config() -> ChainSpec { fn testnet_genesis( invulnerables: Vec<(AccountId, AuraId)>, endowed_accounts: Vec, + root: AccountId, id: ParaId, ) -> parachain_template_runtime::GenesisConfig { parachain_template_runtime::GenesisConfig { @@ -218,5 +221,6 @@ fn testnet_genesis( safe_xcm_version: Some(SAFE_XCM_VERSION), }, transaction_payment: Default::default(), + sudo: parachain_template_runtime::SudoConfig { key: Some(root) }, } } diff --git a/parachain-template/runtime/Cargo.toml b/parachain-template/runtime/Cargo.toml index 6177e435472..d00c2340532 100644 --- a/parachain-template/runtime/Cargo.toml +++ b/parachain-template/runtime/Cargo.toml @@ -134,6 +134,7 @@ runtime-benchmarks = [ "pallet-collator-selection/runtime-benchmarks", "pallet-parachain-template/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", + "pallet-sudo/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", diff --git a/parachain-template/runtime/src/lib.rs b/parachain-template/runtime/src/lib.rs index b2d4ea9f7dd..ef581cbb6be 100644 --- a/parachain-template/runtime/src/lib.rs +++ b/parachain-template/runtime/src/lib.rs @@ -360,6 +360,12 @@ impl pallet_transaction_payment::Config for Runtime { type OperationalFeeMultiplier = ConstU8<5>; } +impl pallet_sudo::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; + type WeightInfo = (); +} + parameter_types! { pub const ReservedXcmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); pub const ReservedDmpWeight: Weight = MAXIMUM_BLOCK_WEIGHT.saturating_div(4); @@ -479,6 +485,9 @@ construct_runtime!( Balances: pallet_balances = 10, TransactionPayment: pallet_transaction_payment = 11, + // Governance + Sudo: pallet_sudo = 15, + // Collator support. The order of these 4 are important and shall not change. Authorship: pallet_authorship = 20, CollatorSelection: pallet_collator_selection = 21, @@ -493,7 +502,7 @@ construct_runtime!( DmpQueue: cumulus_pallet_dmp_queue = 33, // Template - TemplatePallet: pallet_parachain_template = 40, + TemplatePallet: pallet_parachain_template = 50, } ); @@ -504,6 +513,7 @@ mod benches { [pallet_balances, Balances] [pallet_session, SessionBench::] [pallet_timestamp, Timestamp] + [pallet_sudo, Sudo] [pallet_collator_selection, CollatorSelection] [cumulus_pallet_xcmp_queue, XcmpQueue] );