Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
fixes related to pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
claravanstaden authored and claravanstaden committed Nov 29, 2023
1 parent 42537e8 commit e0012b9
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ impl pallet_xcm_bridge_hub_router::Config<ToWestendXcmRouterInstance> for Runtim

/// XCM router instance to BridgeHub with bridging capabilities for `Ethereum` global
/// consensus with dynamic fees and back-pressure.
pub type ToEthereumXcmRouterInstance = pallet_assets::Instance4;
pub type ToEthereumXcmRouterInstance = pallet_xcm_bridge_hub_router::Instance4;
impl pallet_xcm_bridge_hub_router::Config<ToEthereumXcmRouterInstance> for Runtime {
type WeightInfo = weights::pallet_xcm_bridge_hub_router::WeightInfo<Runtime>;

Expand Down
8 changes: 4 additions & 4 deletions cumulus/parachains/runtimes/assets/common/src/matching.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ impl<SelfParaId: Get<ParaId>> ContainsPair<MultiLocation, MultiLocation>
}
}

pub struct FromNetwork<SelfNetworkId>(sp_std::marker::PhantomData<SelfNetworkId>);
impl<SelfNetworkId: Get<NetworkId>> ContainsPair<MultiLocation, MultiLocation>
for FromNetwork<SelfNetworkId>
pub struct FromNetwork<ExpectedNetworkId>(sp_std::marker::PhantomData<ExpectedNetworkId>);
impl<ExpectedNetworkId: Get<NetworkId>> ContainsPair<MultiLocation, MultiLocation>
for FromNetwork<ExpectedNetworkId>
{
fn contains(&a: &MultiLocation, b: &MultiLocation) -> bool {
// `a` needs to be from `b` at least
Expand All @@ -71,7 +71,7 @@ impl<SelfNetworkId: Get<NetworkId>> ContainsPair<MultiLocation, MultiLocation>

match a {
MultiLocation { parents: 2, interior } => {
matches!(interior.first(), Some(GlobalConsensus(network)) if *network == SelfNetworkId::get())
matches!(interior.first(), Some(GlobalConsensus(network)) if *network == ExpectedNetworkId::get())
},
_ => false,
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
use snowbridge_router_primitives::outbound::EthereumBlobExporter;
use xcm_config::{AgentIdOf, EthereumNetwork, UniversalLocation};

pub type SnowbridgeExporter = EthereumBlobExporter<
UniversalLocation,
EthereumNetwork,
snowbridge_outbound_queue::Pallet<Runtime>,
AgentIdOf,
>;
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use crate::{
bridge_common_config::{BridgeParachainWestendInstance, DeliveryRewardInBalance},
weights,
xcm_config::{AgentIdOf, EthereumNetwork, UniversalLocation},
AccountId, BridgeWestendMessages, ParachainInfo, Runtime, RuntimeEvent, RuntimeOrigin,
XcmRouter,
};
Expand All @@ -40,7 +39,6 @@ use bridge_runtime_common::{
RefundableMessagesLane, RefundableParachain,
},
};
use snowbridge_router_primitives::outbound::EthereumBlobExporter;

use codec::Encode;
use frame_support::{parameter_types, traits::PalletInfoAccess};
Expand Down Expand Up @@ -119,13 +117,6 @@ pub type ToBridgeHubWestendHaulBlobExporter = HaulBlobExporter<
(),
>;

pub type SnowbridgeExporter = EthereumBlobExporter<
UniversalLocation,
EthereumNetwork,
snowbridge_outbound_queue::Pallet<Runtime>,
AgentIdOf,
>;

pub struct ToBridgeHubWestendXcmBlobHauler;
impl XcmBlobHauler for ToBridgeHubWestendXcmBlobHauler {
type Runtime = Runtime;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
include!(concat!(env!("OUT_DIR"), "/wasm_binary.rs"));

pub mod bridge_common_config;
pub mod bridge_to_ethereum_config;
pub mod bridge_to_westend_config;
mod weights;
pub mod xcm_config;
Expand Down

0 comments on commit e0012b9

Please sign in to comment.