@@ -34,9 +34,7 @@ use frame_support::{
34
34
dispatch:: DispatchClass ,
35
35
genesis_builder_helper:: { build_config, create_default_config} ,
36
36
parameter_types,
37
- traits:: {
38
- ConstBool , ConstU32 , ConstU64 , ConstU8 , EitherOfDiverse , Everything , TransformOrigin ,
39
- } ,
37
+ traits:: { ConstBool , ConstU32 , ConstU64 , ConstU8 , EitherOfDiverse , TransformOrigin } ,
40
38
weights:: { ConstantMultiplier , Weight } ,
41
39
PalletId ,
42
40
} ;
@@ -166,6 +164,20 @@ parameter_types! {
166
164
pub const SS58Prefix : u16 = 2 ; // Kusama
167
165
}
168
166
167
+ /// Call filter that allows all kinds of transactions except for balance transfers.
168
+ pub struct NoBalanceTransfers ;
169
+
170
+ impl frame_support:: traits:: Contains < RuntimeCall > for NoBalanceTransfers {
171
+ fn contains ( x : & RuntimeCall ) -> bool {
172
+ match * x {
173
+ RuntimeCall :: Balances ( pallet_balances:: Call :: transfer_allow_death { .. } )
174
+ | RuntimeCall :: Balances ( pallet_balances:: Call :: transfer_keep_alive { .. } )
175
+ | RuntimeCall :: Balances ( pallet_balances:: Call :: transfer_all { .. } ) => false ,
176
+ _ => true ,
177
+ }
178
+ }
179
+ }
180
+
169
181
// Configure FRAME pallets to include in runtime.
170
182
171
183
impl frame_system:: Config for Runtime {
@@ -202,7 +214,7 @@ impl frame_system::Config for Runtime {
202
214
/// The weight of database operations that the runtime can invoke.
203
215
type DbWeight = RocksDbWeight ;
204
216
/// The basic call filter to use in dispatchable.
205
- type BaseCallFilter = Everything ;
217
+ type BaseCallFilter = NoBalanceTransfers ;
206
218
/// Weight information for the extrinsics of this pallet.
207
219
type SystemWeightInfo = ( ) ;
208
220
/// Block & extrinsics weights: base values and limits.
@@ -386,7 +398,7 @@ impl pallet_collator_selection::Config for Runtime {
386
398
type Currency = Balances ;
387
399
type UpdateOrigin = CollatorSelectionUpdateOrigin ;
388
400
type PotId = PotId ;
389
- type MaxCandidates = ConstU32 < 100 > ;
401
+ type MaxCandidates = ConstU32 < 0 > ;
390
402
type MinEligibleCollators = ConstU32 < 4 > ;
391
403
type MaxInvulnerables = ConstU32 < 20 > ;
392
404
// should be a multiple of session or things will get inconsistent
0 commit comments