mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 16:21:02 +00:00
Statemint can teleport into Kusama (#3042)
* Statemint can teleport into Kusama * Bump * Fixes * Fixes
This commit is contained in:
@@ -53,7 +53,8 @@ use runtime_parachains::scheduler as parachains_scheduler;
|
|||||||
use runtime_parachains::reward_points as parachains_reward_points;
|
use runtime_parachains::reward_points as parachains_reward_points;
|
||||||
use runtime_parachains::runtime_api_impl::v1 as parachains_runtime_api_impl;
|
use runtime_parachains::runtime_api_impl::v1 as parachains_runtime_api_impl;
|
||||||
|
|
||||||
use xcm::v0::{MultiLocation, NetworkId, BodyId, Xcm, MultiAsset};
|
use xcm::v0::{MultiLocation::{self, Null, X1}, NetworkId, BodyId, Xcm, Junction::Parachain};
|
||||||
|
use xcm::v0::MultiAsset::{self, AllConcreteFungible};
|
||||||
use xcm_builder::{
|
use xcm_builder::{
|
||||||
AccountId32Aliases, ChildParachainConvertsVia, SovereignSignedViaLocation, CurrencyAdapter as XcmCurrencyAdapter,
|
AccountId32Aliases, ChildParachainConvertsVia, SovereignSignedViaLocation, CurrencyAdapter as XcmCurrencyAdapter,
|
||||||
ChildParachainAsNative, SignedAccountId32AsNative, ChildSystemParachainAsSuperuser, LocationInverter,
|
ChildParachainAsNative, SignedAccountId32AsNative, ChildSystemParachainAsSuperuser, LocationInverter,
|
||||||
@@ -119,7 +120,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
|||||||
spec_name: create_runtime_str!("kusama"),
|
spec_name: create_runtime_str!("kusama"),
|
||||||
impl_name: create_runtime_str!("parity-kusama"),
|
impl_name: create_runtime_str!("parity-kusama"),
|
||||||
authoring_version: 2,
|
authoring_version: 2,
|
||||||
spec_version: 9011,
|
spec_version: 9020,
|
||||||
impl_version: 0,
|
impl_version: 0,
|
||||||
#[cfg(not(feature = "disable-runtime-api"))]
|
#[cfg(not(feature = "disable-runtime-api"))]
|
||||||
apis: RUNTIME_API_VERSIONS,
|
apis: RUNTIME_API_VERSIONS,
|
||||||
@@ -1218,6 +1219,14 @@ pub type XcmRouter = (
|
|||||||
xcm_sender::ChildParachainRouter<Runtime>,
|
xcm_sender::ChildParachainRouter<Runtime>,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
parameter_types! {
|
||||||
|
pub const KusamaForStatemint: (MultiAsset, MultiLocation) =
|
||||||
|
(AllConcreteFungible { id: Null }, X1(Parachain(1000)));
|
||||||
|
}
|
||||||
|
pub type TrustedTeleporters = (
|
||||||
|
xcm_builder::Case<KusamaForStatemint>,
|
||||||
|
);
|
||||||
|
|
||||||
/// The barriers one of which must be passed for an XCM message to be executed.
|
/// The barriers one of which must be passed for an XCM message to be executed.
|
||||||
pub type Barrier = (
|
pub type Barrier = (
|
||||||
// Weight that is paid for may be consumed.
|
// Weight that is paid for may be consumed.
|
||||||
@@ -1235,7 +1244,7 @@ impl xcm_executor::Config for XcmConfig {
|
|||||||
type AssetTransactor = LocalAssetTransactor;
|
type AssetTransactor = LocalAssetTransactor;
|
||||||
type OriginConverter = LocalOriginConverter;
|
type OriginConverter = LocalOriginConverter;
|
||||||
type IsReserve = ();
|
type IsReserve = ();
|
||||||
type IsTeleporter = ();
|
type IsTeleporter = TrustedTeleporters;
|
||||||
type LocationInverter = LocationInverter<Ancestry>;
|
type LocationInverter = LocationInverter<Ancestry>;
|
||||||
type Barrier = Barrier;
|
type Barrier = Barrier;
|
||||||
type Weigher = FixedWeightBounds<BaseXcmWeight, Call>;
|
type Weigher = FixedWeightBounds<BaseXcmWeight, Call>;
|
||||||
@@ -1263,8 +1272,7 @@ impl frame_support::traits::Contains<(MultiLocation, Xcm<Call>)> for OnlyWithdra
|
|||||||
fn contains((ref origin, ref msg): &(MultiLocation, Xcm<Call>)) -> bool {
|
fn contains((ref origin, ref msg): &(MultiLocation, Xcm<Call>)) -> bool {
|
||||||
use xcm::v0::{
|
use xcm::v0::{
|
||||||
Xcm::WithdrawAsset, Order::{BuyExecution, InitiateTeleport, DepositAsset},
|
Xcm::WithdrawAsset, Order::{BuyExecution, InitiateTeleport, DepositAsset},
|
||||||
MultiAsset::{All, ConcreteFungible}, Junction::{AccountId32, Plurality, Parachain},
|
MultiAsset::{All, ConcreteFungible}, Junction::{AccountId32, Plurality},
|
||||||
MultiLocation::{Null, X1},
|
|
||||||
};
|
};
|
||||||
match origin {
|
match origin {
|
||||||
// Root and council are are allowed to execute anything.
|
// Root and council are are allowed to execute anything.
|
||||||
|
|||||||
Reference in New Issue
Block a user