Skip to content

Commit

Permalink
fix a few more compilation errors by adding imports
Browse files Browse the repository at this point in the history
  • Loading branch information
4meta5 committed Jan 3, 2025
1 parent 12799f9 commit f2b6c93
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
2 changes: 1 addition & 1 deletion evm-template/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub mod configs;
pub mod constants;
mod precompiles;
pub use precompiles::OpenZeppelinPrecompiles;
mod types;
pub mod types;
mod weights;

use frame_support::{
Expand Down
22 changes: 20 additions & 2 deletions evm-template/runtime/tests/xcm_mock/parachain/mod.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
mod xcm_config;
use core::marker::PhantomData;

use evm_runtime_template::configs::xcm_config::SignedToAccountId20;
use cumulus_primitives_core::{AggregateMessageOrigin, ParaId};
use evm_runtime_template::{
configs::{
asset_config::AssetType,
xcm_config::{
AssetFeesFilter, AssetTransactors, BaseXcmWeight, CurrencyId, CurrencyIdToLocation,
FeeManager, LocalOriginToLocation, LocationToAccountId, MaxAssetsForTransfer,
MaxHrmpRelayFee, ParachainMinFee, RelayLocation, ReserveProviders, Reserves,
SelfLocation, SelfLocationAbsolute, SelfReserve, SignedToAccountId20, Transactors,
TreasuryAccount, XcmOriginToTransactDispatchOrigin, XcmWeigher,
},
},
constants::currency::CENTS,
types::PriceForSiblingParachainDelivery,
AssetManager, ParachainSystem, WeightToFee,
};
use frame_support::{
construct_runtime, derive_impl, parameter_types,
traits::{ConstU128, Contains, ContainsPair, Everything, Nothing},
traits::{ConstU128, Contains, ContainsPair, Everything, Nothing, TransformOrigin},
weights::{constants::WEIGHT_REF_TIME_PER_SECOND, Weight},
};
use frame_system::EnsureRoot;
use openzeppelin_pallet_abstractions::{impl_openzeppelin_xcm, XcmConfig, XcmWeight};
use parachains_common::message_queue::{NarrowOriginToSibling, ParaIdToSibling};
use sp_core::ConstU32;
use sp_runtime::traits::{Get, IdentityLookup};
use xcm::latest::{prelude::*, InteriorLocation};
Expand All @@ -25,6 +41,8 @@ use xcm_executor::XcmExecutor;
use xcm_primitives::{AbsoluteAndRelativeReserve, AccountIdToLocation, AsAssetType};
use xcm_simulator::mock_message_queue;

use crate::relay_chain::MessageQueueServiceWeight;

pub type AccountId = fp_account::AccountId20;
pub type Balance = u128;

Expand Down
12 changes: 11 additions & 1 deletion evm-template/runtime/tests/xcm_mock/parachain/xcm_config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,23 @@ pub mod location_converter;
pub mod origin_converter;
pub mod weigher;

use evm_runtime_template::{
configs::{
asset_config::AssetType,
xcm_config::{
AssetFeesFilter, AssetTransactors, BaseXcmWeight, CurrencyId, CurrencyIdToLocation,
FeeManager, LocalOriginToLocation, LocationToAccountId, MaxAssetsForTransfer,
},
},
AssetManager,
};
use frame_support::traits::{Everything, Nothing};
use xcm_builder::{EnsureDecodableXcm, FixedRateOfFungible, FrameTransactionalProcessor};

use crate::xcm_mock::parachain::{MessageQueue, PolkadotXcm, RuntimeCall};

// Generated from `decl_test_network!`
pub type XcmRouter = EnsureDecodableXcm<crate::xcm_mock::ParachainXcmRouter<MsgQueue>>;
pub type XcmRouter = EnsureDecodableXcm<crate::xcm_mock::ParachainXcmRouter<MessageQueue>>;

pub struct XcmConfig;
impl xcm_executor::Config for XcmConfig {
Expand Down

0 comments on commit f2b6c93

Please sign in to comment.