Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/remove sudo #185

Merged
merged 8 commits into from
Mar 11, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: remove released migrations
  • Loading branch information
lrazovic committed Mar 11, 2024
commit a3389f467af7d7fcd2acb884655e59e6c096c0c2
3 changes: 3 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -6,6 +6,9 @@ default:
build-base-srtool:
srtool build --root -p polimec-base-runtime --runtime-dir runtimes/base --build-opts="--features=on-chain-release-build"

build-rolimec-srtool:
srtool build --root -p polimec-base-runtime --runtime-dir runtimes/base --build-opts="--features=on-chain-release-build,fast-mode"

# Build the "Testnet" Runtime using srtool

# Test the runtimes features
36 changes: 8 additions & 28 deletions runtimes/base/src/lib.rs
Original file line number Diff line number Diff line change
@@ -137,18 +137,15 @@ pub type Migrations = migrations::Unreleased;
pub mod migrations {
// Not warn for unused imports in this module.
#![allow(unused_imports)]
use frame_support::migrations::RemovePallet;

parameter_types! {
pub const Sudo: &'static str = "Sudo";
}

use super::*;
/// Unreleased migrations. Add new ones here:
pub type Unreleased = (
custom_migrations::InitializePallet<OracleProvidersMembership>,
custom_migrations::InitializePallet<Democracy>,
custom_migrations::InitializePallet<Council>,
custom_migrations::InitializePallet<TechnicalCommittee>,
custom_migrations::InitializePallet<Elections>,
custom_migrations::InitializePallet<Preimage>,
custom_migrations::InitializePallet<Scheduler>,
custom_migrations::InitializePallet<ForeignAssets>,
);
pub type Unreleased = ();
}

/// Executive: handles dispatch to the various modules.
@@ -198,7 +195,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("polimec-mainnet"),
impl_name: create_runtime_str!("polimec-mainnet"),
authoring_version: 1,
spec_version: 0_005_001,
spec_version: 0_005_005,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
@@ -219,23 +216,7 @@ parameter_types! {
pub struct BaseCallFilter;
impl Contains<RuntimeCall> for BaseCallFilter {
fn contains(c: &RuntimeCall) -> bool {
use pallet_balances::Call::*;
use pallet_vesting::Call::*;

match c {
// Transferability lock.
RuntimeCall::Balances(inner_call) => match inner_call {
transfer { .. } => false,
transfer_all { .. } => false,
transfer_keep_alive { .. } => false,
transfer_allow_death { .. } => false,
_ => true,
},
RuntimeCall::Vesting(inner_call) => match inner_call {
// Vested transfes are not allowed.
vested_transfer { .. } => false,
_ => true,
},
_ => true,
}
}
@@ -915,7 +896,6 @@ mod benches {
// System support stuff.
[frame_system, SystemBench::<Runtime>]
[pallet_timestamp, Timestamp]
[pallet_sudo, Sudo]
[pallet_utility, Utility]
[pallet_multisig, Multisig]
[pallet_proxy, Proxy]