Use ConstantPrice from polkadot-runtime-common

This commit is contained in:
Keith Yeung
2022-03-14 09:09:02 -07:00
parent d42833b4b9
commit 780475dc70
5 changed files with 88 additions and 75 deletions
+2
View File
@@ -16,6 +16,7 @@ sp-trie = { git = "https://github.com/paritytech/substrate", default-features =
# Polkadot
polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" }
polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" }
polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" }
polkadot-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" }
xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" }
@@ -32,6 +33,7 @@ std = [
"sp-std/std",
"sp-trie/std",
"polkadot-core-primitives/std",
"polkadot-runtime-common/std",
"polkadot-parachain/std",
"polkadot-primitives/std",
"cumulus-primitives-core/std",
+1 -1
View File
@@ -22,6 +22,7 @@
use codec::Encode;
use cumulus_primitives_core::{MessageSendError, UpwardMessageSender};
use frame_support::traits::Get;
use polkadot_runtime_common::xcm_sender::ConstantPrice;
use sp_std::{marker::PhantomData, prelude::*};
use xcm::{latest::prelude::*, WrapVersion};
@@ -35,7 +36,6 @@ impl PriceForParentDelivery for () {
}
}
pub struct ConstantPrice<T>(PhantomData<T>);
impl<T: Get<MultiAssets>> PriceForParentDelivery for ConstantPrice<T> {
fn price_for_parent_delivery(_: &Xcm<()>) -> MultiAssets {
T::get()