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

Commit

Permalink
ethereum router
Browse files Browse the repository at this point in the history
  • Loading branch information
claravanstaden authored and claravanstaden committed Nov 2, 2023
1 parent 221ca22 commit 3b3e0e7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ use xcm::latest::prelude::*;
use xcm_executor::XcmExecutor;

use crate::xcm_config::{
bridging::to_rococo::EthereumGatewayLocation, ForeignCreatorsSovereignAccountOf,
bridging::to_ethereum::EthereumGatewayLocation, ForeignCreatorsSovereignAccountOf,
LocalAndForeignAssetsMultiLocationMatcher, TrustBackedAssetsPalletLocation,
};
use weights::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ use super::{
AccountId, AllPalletsWithSystem, Assets, Authorship, Balance, Balances, BaseDeliveryFee,
FeeAssetId, ForeignAssets, ForeignAssetsInstance, ParachainInfo, ParachainSystem, PolkadotXcm,
PoolAssets, Runtime, RuntimeCall, RuntimeEvent, RuntimeFlavor, RuntimeOrigin,
ToRococoXcmRouter, ToWococoXcmRouter, TransactionByteFee, TrustBackedAssetsInstance,
WeightToFee, XcmpQueue,
ToEthereumXcmRouter, ToRococoXcmRouter, ToWococoXcmRouter, TransactionByteFee,
TrustBackedAssetsInstance, WeightToFee, XcmpQueue,
};
use assets_common::{
local_and_foreign_assets::MatchesLocalAndForeignAssetsMultiLocation,
Expand Down Expand Up @@ -564,7 +564,7 @@ impl xcm_executor::Config for XcmConfig {
type IsReserve = (
bridging::to_wococo::IsTrustedBridgedReserveLocationForConcreteAsset,
bridging::to_rococo::IsTrustedBridgedReserveLocationForConcreteAsset,
bridging::to_rococo::IsTrustedBridgedReserveLocationForForeignAsset,
bridging::to_ethereum::IsTrustedBridgedReserveLocationForForeignAsset,
);
type IsTeleporter = TrustedTeleporters;
type UniversalLocation = UniversalLocation;
Expand Down Expand Up @@ -648,6 +648,9 @@ pub type XcmRouter = WithUniqueTopic<(
// Router which wraps and sends xcm to BridgeHub to be delivered to the Rococo
// GlobalConsensus
ToRococoXcmRouter,
// Router which wraps and sends xcm to BridgeHub to be delivered to the Ethereum
// GlobalConsensus
ToEthereumXcmRouter,
)>;

impl pallet_xcm::Config for Runtime {
Expand Down Expand Up @@ -859,7 +862,6 @@ pub mod bridging {

pub mod to_rococo {
use super::*;
use assets_common::matching::FromNetwork;

parameter_types! {
pub SiblingBridgeHubWithBridgeHubRococoInstance: MultiLocation = MultiLocation::new(
Expand Down Expand Up @@ -1003,7 +1005,7 @@ pub mod bridging {
pub type IsTrustedBridgedReserveLocationForForeignAsset =
IsForeignConcreteAsset<FromNetwork<EthereumNetwork>>;

impl Contains<RuntimeCall> for ToRococoXcmRouter {
impl Contains<RuntimeCall> for ToEthereumXcmRouter {
fn contains(call: &RuntimeCall) -> bool {
matches!(
call,
Expand Down

0 comments on commit 3b3e0e7

Please sign in to comment.