Skip to content

Commit

Permalink
Unify IsTeleporter
Browse files Browse the repository at this point in the history
  • Loading branch information
bkontur committed Feb 26, 2024
1 parent 804bfc1 commit 3a88996
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions system-parachains/encointer/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,17 +148,21 @@ impl frame_support::traits::Contains<RuntimeCall> for SafeCallFilter {

parameter_types! {
pub const MaxAssetsIntoHolding: u32 = 64;
pub const RelayLocation: MultiLocation = MultiLocation::parent();
pub const KsmRelayLocation: MultiLocation = MultiLocation::parent();
}

/// Cases where a remote origin is accepted as trusted Teleporter for a given asset:
/// - KSM with the parent Relay Chain and sibling parachains.
pub type TrustedTeleporters = ConcreteAssetFromSystem<KsmRelayLocation>;

pub struct XcmConfig;
impl xcm_executor::Config for XcmConfig {
type RuntimeCall = RuntimeCall;
type XcmSender = XcmRouter;
type AssetTransactor = FungibleTransactor;
type OriginConverter = XcmOriginToTransactDispatchOrigin;
type IsReserve = NativeAsset;
/// Only allow teleportation of KSM with other system locations.
type IsTeleporter = ConcreteAssetFromSystem<RelayLocation>;
type IsTeleporter = TrustedTeleporters;
type UniversalLocation = UniversalLocation;
type Barrier = Barrier;
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
Expand Down

0 comments on commit 3a88996

Please sign in to comment.