Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
polkadot
Commits
03e01475
Unverified
Commit
03e01475
authored
May 31, 2021
by
Alexander Popiak
Committed by
GitHub
May 31, 2021
Browse files
add westmint as a trusted teleport to westend (#3142)
parent
d8d8e926
Pipeline
#140126
passed with stages
in 34 minutes and 8 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
runtime/westend/src/lib.rs
View file @
03e01475
...
...
@@ -53,7 +53,8 @@ use runtime_parachains::scheduler as parachains_scheduler;
use
runtime_parachains
::
reward_points
as
parachains_reward_points
;
use
runtime_parachains
::
runtime_api_impl
::
v1
as
parachains_runtime_api_impl
;
use
xcm
::
v0
::{
MultiLocation
,
NetworkId
,
Xcm
,
MultiAsset
};
use
xcm
::
v0
::{
MultiLocation
::{
self
,
Null
,
X1
},
NetworkId
,
Xcm
,
Junction
::
Parachain
};
use
xcm
::
v0
::
MultiAsset
::{
self
,
AllConcreteFungible
};
use
xcm_executor
::
XcmExecutor
;
use
xcm_builder
::{
AccountId32Aliases
,
ChildParachainConvertsVia
,
SovereignSignedViaLocation
,
CurrencyAdapter
as
XcmCurrencyAdapter
,
...
...
@@ -885,6 +886,14 @@ pub type XcmRouter = (
xcm_sender
::
ChildParachainRouter
<
Runtime
>
,
);
parameter_types!
{
pub
const
WestendForWestmint
:
(
MultiAsset
,
MultiLocation
)
=
(
AllConcreteFungible
{
id
:
Null
},
X1
(
Parachain
(
1000
)));
}
pub
type
TrustedTeleporters
=
(
xcm_builder
::
Case
<
WestendForWestmint
>
,
);
/// The barriers one of which must be passed for an XCM message to be executed.
pub
type
Barrier
=
(
// Weight that is paid for may be consumed.
...
...
@@ -902,7 +911,7 @@ impl xcm_executor::Config for XcmConfig {
type
AssetTransactor
=
LocalAssetTransactor
;
type
OriginConverter
=
LocalOriginConverter
;
type
IsReserve
=
();
type
IsTeleporter
=
()
;
type
IsTeleporter
=
TrustedTeleporters
;
type
LocationInverter
=
LocationInverter
<
Ancestry
>
;
type
Barrier
=
();
type
Weigher
=
FixedWeightBounds
<
BaseXcmWeight
,
Call
>
;
...
...
@@ -922,8 +931,7 @@ impl frame_support::traits::Contains<(MultiLocation, Xcm<Call>)> for OnlyWithdra
fn
contains
((
ref
origin
,
ref
msg
):
&
(
MultiLocation
,
Xcm
<
Call
>
))
->
bool
{
use
xcm
::
v0
::{
Xcm
::
WithdrawAsset
,
Order
::{
BuyExecution
,
InitiateTeleport
,
DepositAsset
},
MultiAsset
::{
All
,
ConcreteFungible
},
Junction
::{
AccountId32
,
Parachain
},
MultiLocation
::{
Null
,
X1
},
MultiAsset
::{
All
,
ConcreteFungible
},
Junction
::
AccountId32
,
};
match
origin
{
// Root is allowed to execute anything.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment