diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_ethereum_config.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_ethereum_config.rs index 02c85c06922d0..d0f8f6d5c3eac 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_ethereum_config.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/bridge_to_ethereum_config.rs @@ -18,12 +18,29 @@ use crate::{ xcm_config::{AgentIdOf, UniversalLocation}, Runtime, }; +use cumulus_primitives_core::{InteriorMultiLocation, Parachain, X1}; +use frame_support::traits::{ContainsPair, EverythingBut}; +use rococo_runtime_constants::system_parachain::ASSET_HUB_ID; +use snowbridge_core::outbound::{AgentExecuteCommand, Command, Message}; use snowbridge_rococo_common::EthereumNetwork; use snowbridge_router_primitives::outbound::EthereumBlobExporter; +pub struct NonAssetHubTokenTransfers; +impl ContainsPair for NonAssetHubTokenTransfers { + fn contains(origin: &InteriorMultiLocation, message: &Message) -> bool { + matches!( + message.command, + Command::AgentExecute { command: AgentExecuteCommand::TransferToken { .. }, .. } + ) && origin != &X1(Parachain(ASSET_HUB_ID)) + } +} + +type SnowbridgeExportFilter = EverythingBut; + pub type SnowbridgeExporter = EthereumBlobExporter< UniversalLocation, EthereumNetwork, snowbridge_outbound_queue::Pallet, AgentIdOf, + SnowbridgeExportFilter, >;