diff --git a/runtime/bifrost/src/lib.rs b/runtime/bifrost/src/lib.rs index 72ec07bc2..e6a4859df 100644 --- a/runtime/bifrost/src/lib.rs +++ b/runtime/bifrost/src/lib.rs @@ -184,43 +184,56 @@ pub struct CallFilter; impl Contains for CallFilter { fn contains(c: &Call) -> bool { match *c { - // calls allowed - // vstoken transfer + // call banned + + // BNC transfer + Call::Currencies(orml_currencies::Call::transfer_native_currency(..)) => false, Call::Currencies(orml_currencies::Call::transfer( _, - CurrencyId::VSToken(TokenSymbol::KSM), + CurrencyId::Native(TokenSymbol::BNC), _, - )) => true, + )) => false, Call::Tokens(orml_tokens::Call::transfer( _, - CurrencyId::VSToken(TokenSymbol::KSM), + CurrencyId::Native(TokenSymbol::BNC), _, - )) => true, + )) => false, Call::Tokens(orml_tokens::Call::transfer_all( _, - CurrencyId::VSToken(TokenSymbol::KSM), + CurrencyId::Native(TokenSymbol::BNC), _, - )) => true, + )) => false, Call::Tokens(orml_tokens::Call::transfer_keep_alive( _, - CurrencyId::VSToken(TokenSymbol::KSM), + CurrencyId::Native(TokenSymbol::BNC), _, - )) => true, + )) => false, - // vsbond transfer - Call::Currencies(orml_currencies::Call::transfer(_, CurrencyId::VSBond(..), _)) => true, - Call::Tokens(orml_tokens::Call::transfer(_, CurrencyId::VSBond(..), _)) => true, - Call::Tokens(orml_tokens::Call::transfer_all(_, CurrencyId::VSBond(..), _)) => true, - Call::Tokens(orml_tokens::Call::transfer_keep_alive(_, CurrencyId::VSBond(..), _)) => - true, + // ZLK transfer + Call::Currencies(orml_currencies::Call::transfer( + _, + CurrencyId::Token(TokenSymbol::ZLK), + _, + )) => false, + Call::Tokens(orml_tokens::Call::transfer( + _, + CurrencyId::Token(TokenSymbol::ZLK), + _, + )) => false, + Call::Tokens(orml_tokens::Call::transfer_all( + _, + CurrencyId::Token(TokenSymbol::ZLK), + _, + )) => false, + Call::Tokens(orml_tokens::Call::transfer_keep_alive( + _, + CurrencyId::Token(TokenSymbol::ZLK), + _, + )) => false, - // call banned Call::Balances(_) => false, Call::Vesting(_) => false, - Call::Tokens(_) => false, Call::PhragmenElection(_) => false, - Call::Currencies(_) => false, - // Call::Currencies(orml_currencies::Call::transfer_native_currency(..)) => false, _ => true, } } diff --git a/runtime/common/src/xcm_impl.rs b/runtime/common/src/xcm_impl.rs index 2c0c5cf89..e665ec4a9 100644 --- a/runtime/common/src/xcm_impl.rs +++ b/runtime/common/src/xcm_impl.rs @@ -19,7 +19,7 @@ use codec::{Decode, Encode}; pub use cumulus_primitives_core::ParaId; use frame_support::{ - sp_runtime::traits::{CheckedConversion, Convert, Zero}, + sp_runtime::traits::{CheckedConversion, Convert}, traits::{Contains, Get}, weights::Weight, }; @@ -29,10 +29,7 @@ use polkadot_parachain::primitives::Sibling; use sp_std::{convert::TryFrom, marker::PhantomData}; use xcm::latest::prelude::*; use xcm_builder::{AccountId32Aliases, NativeAsset, ParentIsDefault, SiblingParachainConvertsVia}; -use xcm_executor::{ - traits::{FilterAssetLocation, MatchesFungible, ShouldExecute, WeightTrader}, - Assets, -}; +use xcm_executor::traits::{FilterAssetLocation, MatchesFungible, ShouldExecute}; use crate::constants::parachains;