File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed
Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ impl frame_support::traits::OnRuntimeUpgrade for CustomOnRuntimeUpgrade {
4646
4747fn migrate ( ) -> frame_support:: weights:: Weight {
4848 if let Ok ( k) = array_bytes:: hex2bytes ( "0x1da53b775b270400e7e61ed5cbc5a146ab1160471b1418779239ba8e2b847e42d53de13b56da115d3342f0588bc3614108837de0ae21c270383d9f2de4db03c7b1314632314d8c74970d627c9b4f4c42e06688a9f7a2866905a810c4b1a49b8cb0dca3f1bc953905609869b6e9d4fb794cd36c5f" ) {
49- System :: kill_storage ( RuntimeOrigin :: root ( ) , vec ! [ k] ) ;
49+ let _ = System :: kill_storage ( RuntimeOrigin :: root ( ) , vec ! [ k] ) ;
5050 }
5151
5252 <Runtime as frame_system:: Config >:: DbWeight :: get ( ) . reads_writes ( 0 , 1 )
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ fn migrate() -> frame_support::weights::Weight {
101101 }
102102
103103 if let Ok ( k) = array_bytes:: hex2bytes ( "0x1da53b775b270400e7e61ed5cbc5a146ab1160471b1418779239ba8e2b847e42d53de13b56da115d3342f0588bc3614108837de0ae21c270383d9f2de4db03c7b1314632314d8c74970d627c9b4f4c42e06688a9f7a2866905a810c4b1a49b8cb0dca3f1bc953905609869b6e9d4fb794cd36c5f" ) {
104- System :: kill_storage ( RuntimeOrigin :: root ( ) , vec ! [ k] ) ;
104+ let _ = System :: kill_storage ( RuntimeOrigin :: root ( ) , vec ! [ k] ) ;
105105 }
106106
107107 <Runtime as frame_system:: Config >:: DbWeight :: get ( ) . reads_writes ( 7 , 10 )
Original file line number Diff line number Diff line change @@ -25,11 +25,22 @@ frame_support::parameter_types! {
2525 pub const Version : sp_version:: RuntimeVersion = VERSION ;
2626}
2727
28+ pub enum LockAndStake { }
29+ impl frame_support:: traits:: Contains < RuntimeCall > for LockAndStake {
30+ fn contains ( c : & RuntimeCall ) -> bool {
31+ matches ! (
32+ c,
33+ RuntimeCall :: DarwiniaStaking ( darwinia_staking:: Call :: stake { .. } )
34+ | RuntimeCall :: Deposit ( darwinia_deposit:: Call :: lock { .. } )
35+ )
36+ }
37+ }
38+
2839#[ derive_impl( frame_system:: config_preludes:: ParaChainDefaultConfig as frame_system:: DefaultConfig ) ]
2940impl frame_system:: Config for Runtime {
3041 type AccountData = pallet_balances:: AccountData < Balance > ;
3142 type AccountId = AccountId ;
32- type BaseCallFilter = frame_support:: traits:: Everything ;
43+ type BaseCallFilter = frame_support:: traits:: EverythingBut < LockAndStake > ;
3344 type Block = Block ;
3445 type BlockLength = pallet_config:: RuntimeBlockLength ;
3546 type BlockWeights = pallet_config:: RuntimeBlockWeights ;
You can’t perform that action at this time.
0 commit comments