Update docs and enable DOT-over-XCM (#4809)

* Update docs and enable DOT-over-XCM

* Formatting

* Fixes

* Fixes

* Formatting

* Spelling

* add UmpSink config (#5032)

* Update runtime/polkadot/src/xcm_config.rs

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
This commit is contained in:
Gavin Wood
2022-03-23 17:42:20 +00:00
committed by GitHub
parent 7a1a3886ee
commit 46f39cf6d8
4 changed files with 48 additions and 31 deletions
+11 -9
View File
@@ -20,11 +20,7 @@ use super::{
parachains_origin, AccountId, Balances, Call, CouncilCollective, Event, Origin, ParaId,
Runtime, WeightToFee, XcmPallet,
};
use frame_support::{
match_types, parameter_types,
traits::{Everything, Nothing},
weights::Weight,
};
use frame_support::{match_types, parameter_types, traits::Everything, weights::Weight};
use runtime_common::{xcm_sender, ToAuthor};
use xcm::latest::prelude::*;
use xcm_builder::{
@@ -169,14 +165,20 @@ pub type LocalOriginToLocation = (
);
impl pallet_xcm::Config for Runtime {
type Event = Event;
type SendXcmOrigin = xcm_builder::EnsureXcmOrigin<Origin, LocalOriginToLocation>;
// We don't allow any messages to be sent via the transaction yet. This is basically safe to
// enable, (safe the possibility of someone spamming the parachain if they're willing to pay
// the DOT to send from the Relay-chain). But it's useless until we bring in XCM v3 which will
// make `DescendOrigin` a bit more useful.
type SendXcmOrigin = xcm_builder::EnsureXcmOrigin<Origin, ()>;
type XcmRouter = XcmRouter;
// Anyone can execute XCM messages locally...
// Anyone can execute XCM messages locally.
type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin<Origin, LocalOriginToLocation>;
// ...but they must match our filter, which rejects all.
type XcmExecuteFilter = Nothing;
type XcmExecuteFilter = Everything;
type XcmExecutor = xcm_executor::XcmExecutor<XcmConfig>;
// Anyone is able to use teleportation regardless of who they are and what they want to teleport.
type XcmTeleportFilter = Everything;
// Anyone is able to use reserve transfers regardless of who they are and what they want to
// transfer.
type XcmReserveTransferFilter = Everything;
type Weigher = FixedWeightBounds<BaseXcmWeight, Call, MaxInstructions>;
type LocationInverter = LocationInverter<Ancestry>;