Skip to content

Commit

Permalink
re-introduce sudo to setup polkadot shell
Browse files Browse the repository at this point in the history
  • Loading branch information
brenzi committed Jan 29, 2024
1 parent 4f6d486 commit 850ffbc
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions polkadot-parachains/integritee-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ pallet-multisig = { default-features = false, git = "https://github.com/parityte
pallet-preimage = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }
pallet-proxy = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }
pallet-scheduler = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }
pallet-sudo = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v1.0.0" }
pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0" }
Expand Down Expand Up @@ -139,6 +140,7 @@ std = [
"pallet-proxy/std",
"pallet-scheduler/std",
"pallet-sidechain/std",
"pallet-sudo/std",
"pallet-teeracle/std",
"pallet-teerex/std",
"pallet-timestamp/std",
Expand Down Expand Up @@ -194,6 +196,7 @@ runtime-benchmarks = [
"pallet-preimage/runtime-benchmarks",
"pallet-scheduler/runtime-benchmarks",
"pallet-sidechain/runtime-benchmarks",
"pallet-sudo/runtime-benchmarks",
"pallet-teeracle/runtime-benchmarks",
"pallet-teerex/runtime-benchmarks",
"pallet-timestamp/runtime-benchmarks",
Expand Down Expand Up @@ -228,6 +231,7 @@ try-runtime = [
"pallet-preimage/try-runtime",
"pallet-scheduler/try-runtime",
"pallet-sidechain/try-runtime",
"pallet-sudo/try-runtime",
"pallet-teeracle/try-runtime",
"pallet-teerex/try-runtime",
"pallet-timestamp/try-runtime",
Expand Down
14 changes: 13 additions & 1 deletion polkadot-parachains/integritee-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,12 @@ impl orml_xcm::Config for Runtime {
type SovereignOrigin = EnsureRoot<AccountId>;
}

impl pallet_sudo::Config for Runtime {
type RuntimeCall = RuntimeCall;
type RuntimeEvent = RuntimeEvent;
type WeightInfo = ();
}

construct_runtime!(
pub enum Runtime
{
Expand Down Expand Up @@ -768,6 +774,8 @@ construct_runtime!(
Council: pallet_collective::<Instance1>::{Pallet, Call, Storage, Origin<T>, Event<T>, Config<T>} = 15,
TechnicalCommittee:
pallet_collective::<Instance2>::{Pallet, Call, Storage, Event<T>, Origin<T>, Config<T>} = 16,
// was at index 5 before, but storage prefix goes by name only
Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>} = 17,
Bounties: pallet_bounties::{Pallet, Call, Storage, Event<T>} = 18,
ChildBounties: pallet_child_bounties = 19,

Expand Down Expand Up @@ -819,7 +827,11 @@ pub type UncheckedExtrinsic =
pub type CheckedExtrinsic = generic::CheckedExtrinsic<AccountId, RuntimeCall, SignedExtra>;

/// Migrations to apply on runtime upgrade.
pub type Migrations = ();
pub type Migrations = (
// Balances: mainnet at V0. this here brings us to V1
// future: v1.6.0 is still at V1
pallet_balances::migration::MigrateToTrackInactive<Runtime, xcm_config::CheckingAccount>,
);

/// Executive: handles dispatch to the various modules.
pub type Executive = frame_executive::Executive<
Expand Down
1 change: 1 addition & 0 deletions polkadot-parachains/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ fn integritee_genesis_config(
.to_vec(),
_config: Default::default(),
},
sudo: parachain_runtime::SudoConfig { key: Some(root_key.clone()) },
balances: parachain_runtime::BalancesConfig {
balances: endowed_accounts.iter().cloned().map(|k| (k, 1_000 * TEER)).collect(),
},
Expand Down

0 comments on commit 850ffbc

Please sign in to comment.