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
4 changes: 2 additions & 2 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions node/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ mod bridge;
mod currency;
mod tests;
pub mod traits;
mod xcm;

pub use crate::{
bridge::*,
currency::{CurrencyId, TokenSymbol},
traits::*,
xcm::*,
};

/// An index to a block.
Expand Down
42 changes: 42 additions & 0 deletions node/primitives/src/xcm.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// This file is part of Bifrost.

// Copyright (C) 2019-2021 Liebi Technologies (UK) Ltd.
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

use codec::{Decode, Encode};
use sp_std::prelude::*;

/// The type used to represent the xcmp transfer direction
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode)]
pub enum TransferOriginType {
FromSelf = 0,
FromRelayChain = 1,
FromSiblingParaChain = 2,
}

pub struct XcmBaseWeight(u64);

impl From<u64> for XcmBaseWeight {
fn from(u: u64) -> Self {
XcmBaseWeight(u)
}
}

impl From<XcmBaseWeight> for u64 {
fn from(x: XcmBaseWeight) -> Self {
x.0.into()
}
}
Loading