diff --git a/runtime/local/src/lib.rs b/runtime/local/src/lib.rs index a7ae583953..715d1dd505 100644 --- a/runtime/local/src/lib.rs +++ b/runtime/local/src/lib.rs @@ -29,8 +29,7 @@ use frame_support::{ construct_runtime, parameter_types, traits::{ AsEnsureOriginWithArg, ConstU128, ConstU32, ConstU64, Currency, EitherOfDiverse, - EqualPrivilegeOnly, FindAuthor, Get, InstanceFilter, KeyOwnerProofSystem, Nothing, - WithdrawReasons, + EqualPrivilegeOnly, FindAuthor, Get, InstanceFilter, WithdrawReasons, }, weights::{ constants::{RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND}, diff --git a/runtime/shibuya/src/lib.rs b/runtime/shibuya/src/lib.rs index 02edb7692c..b54ab0277a 100644 --- a/runtime/shibuya/src/lib.rs +++ b/runtime/shibuya/src/lib.rs @@ -29,7 +29,7 @@ use frame_support::{ parameter_types, traits::{ AsEnsureOriginWithArg, ConstU32, Contains, Currency, EitherOfDiverse, EqualPrivilegeOnly, - FindAuthor, Get, Imbalance, InstanceFilter, Nothing, OnUnbalanced, WithdrawReasons, + FindAuthor, Get, Imbalance, InstanceFilter, OnUnbalanced, WithdrawReasons, }, weights::{ constants::{ @@ -647,6 +647,17 @@ impl pallet_vesting::Config for Runtime { const MAX_VESTING_SCHEDULES: u32 = 28; } +pub struct CallRuntimeFilter; +impl Contains for CallRuntimeFilter { + fn contains(c: &RuntimeCall) -> bool { + match *c { + RuntimeCall::Assets(pallet_assets::Call::transfer { .. }) => true, + RuntimeCall::Assets(pallet_assets::Call::transfer_approved { .. }) => true, + _ => false, + } + } +} + // TODO: changing depost per item and per byte to `deposit` function will require storage migration it seems parameter_types! { pub const DepositPerItem: Balance = MILLISBY / 1_000_000; @@ -669,7 +680,7 @@ impl pallet_contracts::Config for Runtime { /// and make sure they are stable. Dispatchables exposed to contracts are not allowed to /// change because that would break already deployed contracts. The `Call` structure itself /// is not allowed to change the indices of existing pallets, too. - type CallFilter = Nothing; + type CallFilter = CallRuntimeFilter; type DepositPerItem = DepositPerItem; type DepositPerByte = DepositPerByte; type CallStack = [pallet_contracts::Frame; 5];