Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 13 additions & 8 deletions xcm-support/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,26 @@ sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8", default-features = false }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.8" }
xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.8", default-features = false }
xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "release-v0.9.8" }
xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.8", default-features = false }
cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.8", default-features = false }
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.8", default-features = false }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.8", default-features = false }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.8", default-features = false }
orml-traits = { version = "0.4.1-dev", default-features = false }
node-primitives = { default-features = false, path = "../node/primitives" }

[dev-dependencies]
sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8"}
sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8"}
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.8"}
cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.8"}
cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.8" }
cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.8" }
cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.8" }
parachain-info = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.8" }
pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.8" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.8" }
polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.8" }

[features]
default = ["std"]
std = [
Expand All @@ -31,14 +40,10 @@ std = [
"sp-runtime/std",
"frame-system/std",
"frame-support/std",
"polkadot-parachain/std",
"xcm/std",
"xcm-builder/std",
"xcm-executor/std",
"orml-traits/std",
"node-primitives/std",
"cumulus-primitives-core/std",
"cumulus-pallet-xcmp-queue/std",
"cumulus-pallet-dmp-queue/std",
"polkadot-runtime-parachains/std",
]
16 changes: 12 additions & 4 deletions xcm-support/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,18 @@

#![cfg_attr(not(feature = "std"), no_std)]

#[cfg(test)]
mod mock;

use codec::FullCodec;
pub use cumulus_primitives_core::{self, ParaId};
pub use frame_support::{traits::Get, weights::Weight};
pub use paste;
use sp_runtime::traits::{Convert, MaybeSerializeDeserialize, SaturatedConversion};
pub use sp_std::{cell::RefCell, marker::PhantomData};
use sp_std::{
cmp::{Eq, PartialEq},
fmt::Debug,
marker::PhantomData,
prelude::*,
};
pub use xcm::{v0::prelude::*, VersionedXcm};
use xcm::{
v0::{
Error as XcmError, Junction, MultiAsset, MultiLocation, OriginKind, Result as XcmResult,
Expand All @@ -45,9 +46,16 @@ use xcm::{
DoubleEncoded,
};
use xcm_executor::traits::{Convert as xcmConvert, MatchesFungible, TransactAsset};
pub use xcm_executor::XcmExecutor;
mod traits;
pub use traits::{BifrostXcmExecutor, HandleDmpMessage, HandleUmpMessage, HandleXcmpMessage};

#[cfg(test)]
mod mock;

#[cfg(test)]
mod tests;

/// Asset transaction errors.
enum Error {
/// Failed to match fungible.
Expand Down
Loading