Skip to content

Commit

Permalink
Fix compile
Browse files Browse the repository at this point in the history
Signed-off-by: Xavier Lau <[email protected]>
  • Loading branch information
AurevoirXavier committed Oct 24, 2023
1 parent 80cce01 commit d564674
Show file tree
Hide file tree
Showing 27 changed files with 3,517 additions and 3,349 deletions.
6,722 changes: 3,449 additions & 3,273 deletions Cargo.lock

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pallet-xcm-transactor = { path = "pallets/xcm-transactor", default-features = fa
precompile-utils = { path = "precompiles/utils", default-features = false }
xcm-primitives = { path = "primitives/xcm", default-features = false }

pallet-crowdloan-rewards = { git = "https://github.com/moonbeam-foundation/crowdloan-rewards", branch = "moonbeam-polkadot-v1.0.0", default-features = false }
pallet-crowdloan-rewards = { git = "https://github.com/moonbeam-foundation/crowdloan-rewards", branch = "moonbeam-polkadot-v0.9.43", default-features = false }

# Moonbeam (client)
moonbeam-cli = { path = "node/cli", default-features = false }
Expand Down Expand Up @@ -297,18 +297,18 @@ westend-runtime = { git = "https://github.com/paritytech/polkadot", branch = "re
xcm-simulator = { git = "https://github.com/paritytech/polkadot", branch = "release-v1.0.0" }

# Moonkit (wasm)
moonkit-xcm-primitives = { package = "xcm-primitives", git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.0.0", default-features = false }
nimbus-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.0.0", default-features = false }
pallet-author-inherent = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.0.0", default-features = false }
pallet-author-mapping = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.0.0", default-features = false }
pallet-author-slot-filter = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.0.0", default-features = false }
pallet-maintenance-mode = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.0.0", default-features = false }
pallet-migrations = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.0.0", default-features = false }
pallet-randomness = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.0.0", default-features = false }
session-keys-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.0.0", default-features = false }
moonkit-xcm-primitives = { package = "xcm-primitives", git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v0.9.43", default-features = false }
nimbus-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v0.9.43", default-features = false }
pallet-author-inherent = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v0.9.43", default-features = false }
pallet-author-mapping = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v0.9.43", default-features = false }
pallet-author-slot-filter = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v0.9.43", default-features = false }
pallet-maintenance-mode = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v0.9.43", default-features = false }
pallet-migrations = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v0.9.43", default-features = false }
pallet-randomness = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v0.9.43", default-features = false }
session-keys-primitives = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v0.9.43", default-features = false }

# Moonkit (client)
nimbus-consensus = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v1.0.0" }
nimbus-consensus = { git = "https://github.com/Moonsong-Labs/moonkit", branch = "moonbeam-polkadot-v0.9.43" }

# Other (wasm)
affix = "0.1.2"
Expand Down
2 changes: 1 addition & 1 deletion pallets/moonbeam-orbiters/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ pub mod pallet {

#[pallet::hooks]
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
fn on_initialize(_: T::BlockNumber) -> Weight {
fn on_initialize(_: BlockNumberFor<T>) -> Weight {
// Prune old OrbiterPerRound entries
if let Some(round_to_prune) =
CurrentRound::<T>::get().checked_sub(&T::MaxRoundArchive::get())
Expand Down
2 changes: 1 addition & 1 deletion pallets/moonbeam-xcm-benchmarks/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl xcm_executor::traits::OnResponse for DevNull {
}

pub struct AccountIdConverter;
impl xcm_executor::traits::Convert<MultiLocation, u64> for AccountIdConverter {
impl xcm_executor::traits::ConvertLocation<MultiLocation, u64> for AccountIdConverter {
fn convert(ml: MultiLocation) -> Result<u64, MultiLocation> {
match ml {
MultiLocation {
Expand Down
2 changes: 1 addition & 1 deletion pallets/parachain-staking/src/benchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ fn parachain_staking_on_finalize<T: Config>(author: T::AccountId) {
/// Run to end block and author
fn roll_to_and_author<T: Config>(round_delay: u32, author: T::AccountId) {
let total_rounds = round_delay + 1u32;
let round_length: T::BlockNumber = Pallet::<T>::round().length.into();
let round_length: BlockNumberFor<T> = Pallet::<T>::round().length.into();
let mut now = <frame_system::Pallet<T>>::block_number() + 1u32.into();
let end = Pallet::<T>::round().first + (round_length * total_rounds.into());
while now < end {
Expand Down
18 changes: 9 additions & 9 deletions pallets/parachain-staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ pub mod pallet {
pub enum Event<T: Config> {
/// Started new round.
NewRound {
starting_block: T::BlockNumber,
starting_block: BlockNumberFor<T>,
round: RoundIndex,
selected_collators_number: u32,
total_balance: BalanceOf<T>,
Expand Down Expand Up @@ -410,7 +410,7 @@ pub mod pallet {
/// Set blocks per round
BlocksPerRoundSet {
current_round: RoundIndex,
first_block: T::BlockNumber,
first_block: BlockNumberFor<T>,
old: u32,
new: u32,
new_per_round_inflation_min: Perbill,
Expand All @@ -433,7 +433,7 @@ pub mod pallet {

#[pallet::hooks]
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
fn on_initialize(n: T::BlockNumber) -> Weight {
fn on_initialize(n: BlockNumberFor<T>) -> Weight {
let mut weight = T::WeightInfo::base_on_initialize();

let mut round = <Round<T>>::get();
Expand Down Expand Up @@ -470,7 +470,7 @@ pub mod pallet {
weight = weight.saturating_add(T::DbWeight::get().reads_writes(3, 2));
weight
}
fn on_finalize(_n: T::BlockNumber) {
fn on_finalize(_n: BlockNumberFor<T>) {
Self::award_points_to_block_author();
}
}
Expand All @@ -494,7 +494,7 @@ pub mod pallet {
#[pallet::storage]
#[pallet::getter(fn round)]
/// Current round index and next round scheduled transition
pub(crate) type Round<T: Config> = StorageValue<_, RoundInfo<T::BlockNumber>, ValueQuery>;
pub(crate) type Round<T: Config> = StorageValue<_, RoundInfo<BlockNumberFor<T>>, ValueQuery>;

#[pallet::storage]
#[pallet::getter(fn delegator_state)]
Expand Down Expand Up @@ -777,13 +777,13 @@ pub mod pallet {
// Choose top TotalSelected collator candidates
let (_, v_count, _, total_staked) = <Pallet<T>>::select_top_candidates(1u32);
// Start Round 1 at Block 0
let round: RoundInfo<T::BlockNumber> =
let round: RoundInfo<BlockNumberFor<T>> =
RoundInfo::new(1u32, 0u32.into(), self.blocks_per_round);
<Round<T>>::put(round);
// Snapshot total stake
<Staked<T>>::insert(1u32, <Total<T>>::get());
<Pallet<T>>::deposit_event(Event::NewRound {
starting_block: T::BlockNumber::zero(),
starting_block: BlockNumberFor<T>::zero(),
round: 1u32,
selected_collators_number: v_count,
total_balance: total_staked,
Expand Down Expand Up @@ -1546,8 +1546,8 @@ pub mod pallet {
let return_stake = |bond: Bond<T::AccountId, BalanceOf<T>>| {
// remove delegation from delegator state
let mut delegator = DelegatorState::<T>::get(&bond.owner).expect(
"Collator state and delegator state are consistent.
Collator state has a record of this delegation. Therefore,
"Collator state and delegator state are consistent.
Collator state has a record of this delegation. Therefore,
Delegator state also has a record. qed.",
);

Expand Down
2 changes: 1 addition & 1 deletion pallets/proxy-genesis-companion/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub mod pallet {
T::AccountId,
T::AccountId,
<T as Config>::ProxyType,
T::BlockNumber,
BlockNumberFor<T>,
)>,
}

Expand Down
3 changes: 2 additions & 1 deletion precompiles/conviction-voting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use fp_evm::PrecompileHandle;
use frame_support::dispatch::{Dispatchable, GetDispatchInfo, PostDispatchInfo};
use frame_support::traits::{Currency, Polling};
use frame_system::pallet_prelude::BlockNumberFor;
use pallet_conviction_voting::Call as ConvictionVotingCall;
use pallet_conviction_voting::{
AccountVote, Casting, ClassLocksFor, Conviction, Delegating, Tally, TallyOf, Vote, Voting,
Expand Down Expand Up @@ -58,7 +59,7 @@ type ClassOf<Runtime> = <<Runtime as pallet_conviction_voting::Config>::Polls as
type VotingOf<Runtime> = Voting<
BalanceOf<Runtime>,
<Runtime as frame_system::Config>::AccountId,
<Runtime as frame_system::Config>::BlockNumber,
BlockNumberFor<Runtime>,
<<Runtime as pallet_conviction_voting::Config>::Polls as Polling<TallyOf<Runtime>>>::Index,
<Runtime as pallet_conviction_voting::Config>::MaxVotes,
>;
Expand Down
2 changes: 1 addition & 1 deletion precompiles/referenda/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type BalanceOf<Runtime> = <<Runtime as pallet_referenda::Config>::Currency as Cu
>>::Balance;
type TrackIdOf<Runtime> = <<Runtime as pallet_referenda::Config>::Tracks as TracksInfo<
BalanceOf<Runtime>,
<Runtime as frame_system::Config>::BlockNumber,
BlockNumberFor<Runtime>,
>>::Id;
type BoundedCallOf<Runtime> = Bounded<<Runtime as pallet_referenda::Config>::RuntimeCall>;

Expand Down
14 changes: 7 additions & 7 deletions precompiles/xcm-utils/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ use xcm_builder::AllowUnpaidExecutionFrom;
use xcm_builder::FixedWeightBounds;
use xcm_builder::IsConcrete;
use xcm_builder::SovereignSignedViaLocation;
use xcm_executor::traits::Convert;
use xcm_executor::traits::ConvertLocation;
use xcm_executor::{
traits::{TransactAsset, WeightTrader},
Assets,
Expand Down Expand Up @@ -100,8 +100,8 @@ where
}

pub struct MockParentMultilocationToAccountConverter;
impl Convert<MultiLocation, AccountId> for MockParentMultilocationToAccountConverter {
fn convert_ref(location: impl Borrow<MultiLocation>) -> Result<AccountId, ()> {
impl MaybeEquivalence<MultiLocation, AccountId> for MockParentMultilocationToAccountConverter {
fn convert(location: impl Borrow<MultiLocation>) -> Result<AccountId, ()> {
match location.borrow() {
MultiLocation {
parents: 1,
Expand All @@ -111,7 +111,7 @@ impl Convert<MultiLocation, AccountId> for MockParentMultilocationToAccountConve
}
}

fn reverse_ref(who: impl Borrow<AccountId>) -> Result<MultiLocation, ()> {
fn convert_back(who: impl Borrow<AccountId>) -> Result<MultiLocation, ()> {
match who.borrow() {
a if a == &AccountId::from(ParentAccount) => Ok(MultiLocation::parent()),
_ => Err(()),
Expand All @@ -120,8 +120,8 @@ impl Convert<MultiLocation, AccountId> for MockParentMultilocationToAccountConve
}

pub struct MockParachainMultilocationToAccountConverter;
impl Convert<MultiLocation, AccountId> for MockParachainMultilocationToAccountConverter {
fn convert_ref(location: impl Borrow<MultiLocation>) -> Result<AccountId, ()> {
impl MaybeEquivalence<MultiLocation, AccountId> for MockParachainMultilocationToAccountConverter {
fn convert(location: impl Borrow<MultiLocation>) -> Result<AccountId, ()> {
match location.borrow() {
MultiLocation {
parents: 1,
Expand All @@ -131,7 +131,7 @@ impl Convert<MultiLocation, AccountId> for MockParachainMultilocationToAccountCo
}
}

fn reverse_ref(who: impl Borrow<AccountId>) -> Result<MultiLocation, ()> {
fn convert_back(who: impl Borrow<AccountId>) -> Result<MultiLocation, ()> {
match who.borrow() {
a if a.has_prefix_u32(0xffffffff) => Ok(MultiLocation {
parents: 1,
Expand Down
25 changes: 8 additions & 17 deletions primitives/xcm/src/asset_id_conversions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,21 @@ use xcm::latest::MultiLocation;
pub struct AsAssetType<AssetId, AssetType, AssetIdInfoGetter>(
PhantomData<(AssetId, AssetType, AssetIdInfoGetter)>,
);
impl<AssetId, AssetType, AssetIdInfoGetter> xcm_executor::traits::Convert<MultiLocation, AssetId>
impl<AssetId, AssetType, AssetIdInfoGetter>
sp_runtime::traits::MaybeEquivalence<MultiLocation, AssetId>
for AsAssetType<AssetId, AssetType, AssetIdInfoGetter>
where
AssetId: Clone,
AssetType: From<MultiLocation> + Into<Option<MultiLocation>> + Clone,
AssetIdInfoGetter: AssetTypeGetter<AssetId, AssetType>,
{
fn convert_ref(id: impl Borrow<MultiLocation>) -> Result<AssetId, ()> {
if let Some(asset_id) = AssetIdInfoGetter::get_asset_id(id.borrow().clone().into()) {
Ok(asset_id)
} else {
Err(())
}
fn convert(id: &MultiLocation) -> Option<AssetId> {
AssetIdInfoGetter::get_asset_id(id.borrow().clone().into())
}
fn reverse_ref(what: impl Borrow<AssetId>) -> Result<MultiLocation, ()> {
if let Some(asset_type) = AssetIdInfoGetter::get_asset_type(what.borrow().clone()) {
if let Some(location) = asset_type.into() {
Ok(location)
} else {
Err(())
}
} else {
Err(())
}
fn convert_back(what: &AssetId) -> Option<MultiLocation> {
let asset_type = AssetIdInfoGetter::get_asset_type(what.borrow().clone())?;

asset_type.into()
}
}

Expand Down
4 changes: 2 additions & 2 deletions primitives/xcm/src/origin_conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ pub struct SignedToAccountId20<Origin, AccountId, Network>(
sp_std::marker::PhantomData<(Origin, AccountId, Network)>,
);
impl<Origin: OriginTrait + Clone, AccountId: Into<[u8; 20]>, Network: Get<NetworkId>>
xcm_executor::traits::Convert<Origin, MultiLocation>
sp_runtime::traits::TryConvert<Origin, MultiLocation>
for SignedToAccountId20<Origin, AccountId, Network>
where
Origin::PalletsOrigin: From<frame_system::RawOrigin<AccountId>>
+ TryInto<frame_system::RawOrigin<AccountId>, Error = Origin::PalletsOrigin>,
{
fn convert(o: Origin) -> Result<MultiLocation, Origin> {
fn try_convert(o: Origin) -> Result<MultiLocation, Origin> {
o.try_with_caller(|caller| match caller.try_into() {
Ok(frame_system::RawOrigin::Signed(who)) => Ok(AccountKey20 {
key: who.into(),
Expand Down
8 changes: 4 additions & 4 deletions runtime/moonbase/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ pub type LocationToAccountId = (

/// Wrapper type around `LocationToAccountId` to convert an `AccountId` to type `H160`.
pub struct LocationToH160;
impl xcm_executor::traits::Convert<MultiLocation, H160> for LocationToH160 {
impl xcm_executor::traits::ConvertLocation<MultiLocation, H160> for LocationToH160 {
fn convert(location: MultiLocation) -> Result<H160, MultiLocation> {
<LocationToAccountId as xcm_executor::traits::Convert<MultiLocation, AccountId>>::convert(
<LocationToAccountId as xcm_executor::traits::ConvertLocation<MultiLocation, AccountId>>::convert(
location,
)
.map(Into::into)
Expand Down Expand Up @@ -503,7 +503,7 @@ pub struct CurrencyIdtoMultiLocation<AssetXConverter>(sp_std::marker::PhantomDat
impl<AssetXConverter> sp_runtime::traits::Convert<CurrencyId, Option<MultiLocation>>
for CurrencyIdtoMultiLocation<AssetXConverter>
where
AssetXConverter: xcm_executor::traits::Convert<MultiLocation, AssetId>,
AssetXConverter: xcm_executor::traits::ConvertLocation<MultiLocation, AssetId>,
{
fn convert(currency: CurrencyId) -> Option<MultiLocation> {
match currency {
Expand Down Expand Up @@ -679,7 +679,7 @@ mod testing {
/// AssetManager::set_asset_type_asset_id() and should NOT be used in any production code.
impl From<MultiLocation> for CurrencyId {
fn from(location: MultiLocation) -> CurrencyId {
use xcm_executor::traits::Convert as XConvert;
use xcm_executor::traits::ConvertLocation as XConvert;
use xcm_primitives::AssetTypeGetter;

// If it does not exist, for benchmarking purposes, we create the association
Expand Down
2 changes: 1 addition & 1 deletion runtime/moonbase/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ use polkadot_parachain::primitives::Sibling;
use precompile_utils::testing::MockHandle;
use std::str::from_utf8;
use xcm_builder::{ParentIsPreset, SiblingParachainConvertsVia};
use xcm_executor::traits::Convert as XcmConvert;
use xcm_executor::traits::ConvertLocation as XcmConvert;

use moonbeam_xcm_benchmarks::weights::XcmWeight;
use nimbus_primitives::NimbusId;
Expand Down
2 changes: 1 addition & 1 deletion runtime/moonbase/tests/xcm_mock/parachain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ pub struct CurrencyIdtoMultiLocation<AssetXConverter>(sp_std::marker::PhantomDat
impl<AssetXConverter> sp_runtime::traits::Convert<CurrencyId, Option<MultiLocation>>
for CurrencyIdtoMultiLocation<AssetXConverter>
where
AssetXConverter: xcm_executor::traits::Convert<MultiLocation, AssetId>,
AssetXConverter: xcm_executor::traits::ConvertLocation<MultiLocation, AssetId>,
{
fn convert(currency: CurrencyId) -> Option<MultiLocation> {
match currency {
Expand Down
2 changes: 1 addition & 1 deletion runtime/moonbase/tests/xcm_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use sp_std::boxed::Box;
use xcm::latest::prelude::*;
use xcm::{VersionedMultiLocation, WrapVersion};
use xcm_builder::HashedDescriptionDescribeFamilyAllTerminal;
use xcm_executor::traits::Convert;
use xcm_executor::traits::ConvertLocation;
use xcm_mock::*;
use xcm_primitives::{UtilityEncodeCall, DEFAULT_PROOF_SIZE};
use xcm_simulator::TestExt;
Expand Down
8 changes: 4 additions & 4 deletions runtime/moonbeam/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ pub type LocationToAccountId = (

/// Wrapper type around `LocationToAccountId` to convert an `AccountId` to type `H160`.
pub struct LocationToH160;
impl xcm_executor::traits::Convert<MultiLocation, H160> for LocationToH160 {
impl xcm_executor::traits::ConvertLocation<MultiLocation, H160> for LocationToH160 {
fn convert(location: MultiLocation) -> Result<H160, MultiLocation> {
<LocationToAccountId as xcm_executor::traits::Convert<MultiLocation, AccountId>>::convert(
<LocationToAccountId as xcm_executor::traits::ConvertLocation<MultiLocation, AccountId>>::convert(
location,
)
.map(Into::into)
Expand Down Expand Up @@ -492,7 +492,7 @@ pub struct CurrencyIdtoMultiLocation<AssetXConverter>(sp_std::marker::PhantomDat
impl<AssetXConverter> sp_runtime::traits::Convert<CurrencyId, Option<MultiLocation>>
for CurrencyIdtoMultiLocation<AssetXConverter>
where
AssetXConverter: xcm_executor::traits::Convert<MultiLocation, AssetId>,
AssetXConverter: xcm_executor::traits::ConvertLocation<MultiLocation, AssetId>,
{
fn convert(currency: CurrencyId) -> Option<MultiLocation> {
match currency {
Expand Down Expand Up @@ -669,7 +669,7 @@ mod testing {
/// AssetManager::set_asset_type_asset_id() and should NOT be used in any production code.
impl From<MultiLocation> for CurrencyId {
fn from(location: MultiLocation) -> CurrencyId {
use xcm_executor::traits::Convert as XConvert;
use xcm_executor::traits::ConvertLocation as XConvert;
use xcm_primitives::AssetTypeGetter;

// If it does not exist, for benchmarking purposes, we create the association
Expand Down
2 changes: 1 addition & 1 deletion runtime/moonbeam/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ use std::str::from_utf8;
use xcm::latest::prelude::*;
use xcm::{VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation};
use xcm_builder::{ParentIsPreset, SiblingParachainConvertsVia};
use xcm_executor::traits::Convert as XcmConvert;
use xcm_executor::traits::ConvertLocation as XcmConvert;

type BatchPCall = pallet_evm_precompile_batch::BatchPrecompileCall<Runtime>;
type CrowdloanRewardsPCall =
Expand Down
2 changes: 1 addition & 1 deletion runtime/moonbeam/tests/xcm_mock/parachain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ pub struct CurrencyIdtoMultiLocation<AssetXConverter>(sp_std::marker::PhantomDat
impl<AssetXConverter> sp_runtime::traits::Convert<CurrencyId, Option<MultiLocation>>
for CurrencyIdtoMultiLocation<AssetXConverter>
where
AssetXConverter: xcm_executor::traits::Convert<MultiLocation, AssetId>,
AssetXConverter: xcm_executor::traits::ConvertLocation<MultiLocation, AssetId>,
{
fn convert(currency: CurrencyId) -> Option<MultiLocation> {
match currency {
Expand Down
2 changes: 1 addition & 1 deletion runtime/moonbeam/tests/xcm_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use sp_core::ConstU32;
use xcm::latest::prelude::*;
use xcm::{VersionedMultiLocation, WrapVersion};
use xcm_builder::HashedDescriptionDescribeFamilyAllTerminal;
use xcm_executor::traits::Convert;
use xcm_executor::traits::ConvertLocation;
use xcm_mock::parachain;
use xcm_mock::relay_chain;
use xcm_mock::*;
Expand Down
Loading

0 comments on commit d564674

Please sign in to comment.