diff --git a/Cargo.lock b/Cargo.lock index e6cad50cd8..5b558ae185 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3496,6 +3496,7 @@ dependencies = [ "orml-traits", "orml-unknown-tokens", "orml-vesting", + "orml-xcm", "orml-xcm-support", "orml-xtokens", "pallet-aura", @@ -3944,6 +3945,7 @@ dependencies = [ "orml-traits", "orml-unknown-tokens", "orml-vesting", + "orml-xcm", "orml-xcm-support", "orml-xtokens", "pallet-aura", @@ -5706,6 +5708,20 @@ dependencies = [ "sp-std", ] +[[package]] +name = "orml-xcm" +version = "0.4.1-dev" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?rev=1f520348f31b5e94b8a5dd7f8e6b8ec359df4177#1f520348f31b5e94b8a5dd7f8e6b8ec359df4177" +dependencies = [ + "frame-support", + "frame-system", + "pallet-xcm", + "parity-scale-codec", + "scale-info", + "sp-std", + "xcm", +] + [[package]] name = "orml-xcm-support" version = "0.4.1-dev" @@ -11458,6 +11474,7 @@ dependencies = [ "orml-traits", "orml-unknown-tokens", "orml-vesting", + "orml-xcm", "orml-xcm-support", "orml-xtokens", "pallet-aura", @@ -11779,7 +11796,7 @@ dependencies = [ "chrono", "lazy_static", "matchers", - "parking_lot 0.11.2", + "parking_lot 0.10.2", "regex", "serde", "serde_json", @@ -11899,8 +11916,8 @@ version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ee73e6e4924fe940354b8d4d98cad5231175d615cd855b758adc658c0aac6a0" dependencies = [ - "cfg-if 1.0.0", - "rand 0.8.4", + "cfg-if 0.1.10", + "rand 0.6.5", "static_assertions", ] diff --git a/parachain/runtime/interlay/Cargo.toml b/parachain/runtime/interlay/Cargo.toml index a83062eed5..bed00684df 100644 --- a/parachain/runtime/interlay/Cargo.toml +++ b/parachain/runtime/interlay/Cargo.toml @@ -112,6 +112,7 @@ orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-li orml-vesting = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "1f520348f31b5e94b8a5dd7f8e6b8ec359df4177", default-features = false } orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "1f520348f31b5e94b8a5dd7f8e6b8ec359df4177", default-features = false } +orml-xcm = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "1f520348f31b5e94b8a5dd7f8e6b8ec359df4177", default-features = false } orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "1f520348f31b5e94b8a5dd7f8e6b8ec359df4177", default-features = false } orml-unknown-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "1f520348f31b5e94b8a5dd7f8e6b8ec359df4177", default-features = false } diff --git a/parachain/runtime/interlay/src/lib.rs b/parachain/runtime/interlay/src/lib.rs index 070cfe0a2b..f01c6befbd 100644 --- a/parachain/runtime/interlay/src/lib.rs +++ b/parachain/runtime/interlay/src/lib.rs @@ -66,10 +66,8 @@ use orml_xcm_support::{IsNativeConcrete, MultiCurrencyAdapter, MultiNativeAsset} use pallet_xcm::{EnsureXcm, IsMajorityOfBody, XcmPassthrough}; use polkadot_parachain::primitives::Sibling; use sp_runtime::traits::Convert; -use xcm::{ - v1::{prelude::*, MultiAsset, MultiLocation, NetworkId}, - AlwaysV1, -}; +use xcm::latest::prelude::*; + use xcm_builder::{ AccountId32Aliases, AllowTopLevelPaidExecutionFrom, EnsureXcmOrigin, FixedWeightBounds, LocationInverter, NativeAsset, ParentAsSuperuser, ParentIsDefault, RelayChainAsNative, SiblingParachainAsNative, @@ -671,7 +669,7 @@ pub type LocalOriginToLocation = (SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); @@ -702,7 +700,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type Event = Event; type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; - type VersionWrapper = AlwaysV1; + type VersionWrapper = PolkadotXcm; } impl cumulus_pallet_dmp_queue::Config for Runtime { @@ -1161,6 +1159,11 @@ impl nomination::Config for Runtime { type WeightInfo = (); } +impl orml_xcm::Config for Runtime { + type Event = Event; + type SovereignOrigin = EnsureRoot; +} + construct_runtime! { pub enum Runtime where Block = Block, @@ -1224,6 +1227,7 @@ construct_runtime! { XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event}, PolkadotXcm: pallet_xcm::{Pallet, Call, Event, Origin}, CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event, Origin}, + OrmlXcm: orml_xcm::{Pallet, Call, Event}, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event}, XTokens: orml_xtokens::{Pallet, Storage, Call, Event}, diff --git a/parachain/runtime/kintsugi/Cargo.toml b/parachain/runtime/kintsugi/Cargo.toml index 5541742ab9..855ae7e933 100644 --- a/parachain/runtime/kintsugi/Cargo.toml +++ b/parachain/runtime/kintsugi/Cargo.toml @@ -109,6 +109,7 @@ orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-li orml-vesting = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "1f520348f31b5e94b8a5dd7f8e6b8ec359df4177", default-features = false } orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "1f520348f31b5e94b8a5dd7f8e6b8ec359df4177", default-features = false } +orml-xcm = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "1f520348f31b5e94b8a5dd7f8e6b8ec359df4177", default-features = false } orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "1f520348f31b5e94b8a5dd7f8e6b8ec359df4177", default-features = false } orml-unknown-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "1f520348f31b5e94b8a5dd7f8e6b8ec359df4177", default-features = false } diff --git a/parachain/runtime/kintsugi/src/lib.rs b/parachain/runtime/kintsugi/src/lib.rs index 0389b0428a..5908ffb1f0 100644 --- a/parachain/runtime/kintsugi/src/lib.rs +++ b/parachain/runtime/kintsugi/src/lib.rs @@ -67,10 +67,8 @@ use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment}; use pallet_xcm::XcmPassthrough; use polkadot_parachain::primitives::Sibling; use sp_runtime::{traits::Convert, FixedPointNumber, Perquintill}; -use xcm::{ - v1::{prelude::*, MultiAsset, MultiLocation, NetworkId}, - AlwaysV1, -}; +use xcm::latest::prelude::*; + use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, LocationInverter, NativeAsset, ParentAsSuperuser, @@ -693,7 +691,7 @@ pub type LocalOriginToLocation = (SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); @@ -724,7 +722,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type Event = Event; type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; - type VersionWrapper = AlwaysV1; + type VersionWrapper = PolkadotXcm; } impl cumulus_pallet_dmp_queue::Config for Runtime { @@ -745,6 +743,11 @@ pub type LocalAssetTransactor = MultiCurrencyAdapter< pub use currency_id_convert::CurrencyIdConvert; +impl orml_xcm::Config for Runtime { + type Event = Event; + type SovereignOrigin = EnsureRoot; +} + mod currency_id_convert { use super::*; use codec::{Decode, Encode}; @@ -1246,6 +1249,7 @@ construct_runtime! { XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event}, PolkadotXcm: pallet_xcm::{Pallet, Call, Event, Origin}, CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event, Origin}, + OrmlXcm: orml_xcm::{Pallet, Call, Event}, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event}, XTokens: orml_xtokens::{Pallet, Storage, Call, Event}, diff --git a/parachain/runtime/testnet/Cargo.toml b/parachain/runtime/testnet/Cargo.toml index 1a052ff488..fc5392576e 100644 --- a/parachain/runtime/testnet/Cargo.toml +++ b/parachain/runtime/testnet/Cargo.toml @@ -112,6 +112,7 @@ orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-li orml-vesting = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "1f520348f31b5e94b8a5dd7f8e6b8ec359df4177", default-features = false } orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "1f520348f31b5e94b8a5dd7f8e6b8ec359df4177", default-features = false } +orml-xcm = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "1f520348f31b5e94b8a5dd7f8e6b8ec359df4177", default-features = false } orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "1f520348f31b5e94b8a5dd7f8e6b8ec359df4177", default-features = false } orml-unknown-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", rev = "1f520348f31b5e94b8a5dd7f8e6b8ec359df4177", default-features = false } diff --git a/parachain/runtime/testnet/src/lib.rs b/parachain/runtime/testnet/src/lib.rs index 6abb9ed572..1955b87845 100644 --- a/parachain/runtime/testnet/src/lib.rs +++ b/parachain/runtime/testnet/src/lib.rs @@ -67,10 +67,8 @@ use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment}; use pallet_xcm::{EnsureXcm, IsMajorityOfBody, XcmPassthrough}; use polkadot_parachain::primitives::Sibling; use sp_runtime::{traits::Convert, FixedPointNumber, Perquintill}; -use xcm::{ - v1::{prelude::*, MultiAsset, MultiLocation, NetworkId}, - AlwaysV1, -}; +use xcm::latest::prelude::*; + use xcm_builder::{ AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, LocationInverter, NativeAsset, ParentAsSuperuser, @@ -732,7 +730,7 @@ pub type LocalOriginToLocation = (SignedToAccountId32, + cumulus_primitives_utility::ParentAsUmp, // ..and XCMP to communicate with the sibling chains. XcmpQueue, ); @@ -763,7 +761,7 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime { type Event = Event; type XcmExecutor = XcmExecutor; type ChannelInfo = ParachainSystem; - type VersionWrapper = AlwaysV1; + type VersionWrapper = PolkadotXcm; } impl cumulus_pallet_dmp_queue::Config for Runtime { @@ -1222,6 +1220,11 @@ impl nomination::Config for Runtime { type WeightInfo = (); } +impl orml_xcm::Config for Runtime { + type Event = Event; + type SovereignOrigin = EnsureRoot; +} + construct_runtime! { pub enum Runtime where Block = Block, @@ -1285,6 +1288,7 @@ construct_runtime! { XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event}, PolkadotXcm: pallet_xcm::{Pallet, Call, Event, Origin}, CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event, Origin}, + OrmlXcm: orml_xcm::{Pallet, Call, Event}, DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event}, XTokens: orml_xtokens::{Pallet, Storage, Call, Event},