Skip to content

Commit 79d59a2

Browse files
authored
Feat/update staking filter (#142)
* Add new staking calls to BaseCallFilter * Remove released migrations * Bump the spec_version * Remove cancel_leave_candidates from BaseCallFilter
1 parent 300bd20 commit 79d59a2

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

runtimes/base/src/lib.rs

+17-7
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,11 @@ pub type Migrations = migrations::Unreleased;
122122
/// The runtime migrations per release.
123123
#[allow(missing_docs)]
124124
pub mod migrations {
125+
// Not warn for unused imports in this module.
126+
#![allow(unused_imports)]
125127
use super::*;
126128
/// Unreleased migrations. Add new ones here:
127-
pub type Unreleased = (
128-
cumulus_pallet_xcmp_queue::migration::Migration<Runtime>,
129-
cumulus_pallet_dmp_queue::migration::Migration<Runtime>,
130-
custom_migrations::CustomOnRuntimeUpgrade,
131-
pallet_parachain_staking::migrations::CustomOnRuntimeUpgrade<Runtime, Balances>,
132-
);
129+
pub type Unreleased = ();
133130
}
134131

135132
/// Executive: handles dispatch to the various modules.
@@ -175,7 +172,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
175172
spec_name: create_runtime_str!("polimec-mainnet"),
176173
impl_name: create_runtime_str!("polimec-mainnet"),
177174
authoring_version: 1,
178-
spec_version: 3,
175+
spec_version: 0_003_001,
179176
impl_version: 0,
180177
apis: RUNTIME_API_VERSIONS,
181178
transaction_version: 1,
@@ -197,6 +194,8 @@ pub struct BaseCallFilter;
197194
impl Contains<RuntimeCall> for BaseCallFilter {
198195
fn contains(c: &RuntimeCall) -> bool {
199196
use pallet_balances::Call::*;
197+
use pallet_parachain_staking::Call::*;
198+
200199
match c {
201200
// Transferability lock.
202201
RuntimeCall::Balances(inner_call) => match inner_call {
@@ -208,6 +207,17 @@ impl Contains<RuntimeCall> for BaseCallFilter {
208207
},
209208
// Staking "disabled" @ TGE.
210209
RuntimeCall::ParachainStaking(inner_call) => match inner_call {
210+
cancel_candidate_bond_less { .. } => true,
211+
execute_candidate_bond_less { .. } => true,
212+
schedule_candidate_bond_less { .. } => true,
213+
set_auto_compound { .. } => true,
214+
set_blocks_per_round { .. } => true,
215+
set_collator_commission { .. } => true,
216+
set_inflation { .. } => true,
217+
set_parachain_bond_account { .. } => true,
218+
set_parachain_bond_reserve_percent { .. } => true,
219+
set_staking_expectations { .. } => true,
220+
set_total_selected { .. } => true,
211221
_ => false,
212222
},
213223
_ => true,

0 commit comments

Comments
 (0)