diff --git a/evm-template/Cargo.lock b/evm-template/Cargo.lock index 569ff11f..b22a67f2 100644 --- a/evm-template/Cargo.lock +++ b/evm-template/Cargo.lock @@ -3044,8 +3044,10 @@ dependencies = [ "pallet-xcm-weight-trader", "parachains-common", "parity-scale-codec", + "polkadot-core-primitives", "polkadot-parachain-primitives", "polkadot-runtime-common", + "polkadot-runtime-parachains", "scale-info", "smallvec", "sp-api", diff --git a/evm-template/Cargo.toml b/evm-template/Cargo.toml index 170e15e8..5defa4af 100644 --- a/evm-template/Cargo.toml +++ b/evm-template/Cargo.toml @@ -103,7 +103,9 @@ polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", features = ], tag = "polkadot-stable2407-1" } polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2407-1" } polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2407-1" } +polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2407-1" } polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2407-1" } +polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2407-1" } xcm = { package = "staging-xcm", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2407-1" } xcm-builder = { package = "staging-xcm-builder", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2407-1" } xcm-executor = { package = "staging-xcm-executor", git = "https://github.com/paritytech/polkadot-sdk", default-features = false, tag = "polkadot-stable2407-1" } diff --git a/evm-template/runtime/Cargo.toml b/evm-template/runtime/Cargo.toml index 9baf2982..d7d640db 100644 --- a/evm-template/runtime/Cargo.toml +++ b/evm-template/runtime/Cargo.toml @@ -107,6 +107,8 @@ pallet-xcm-weight-trader = { workspace = true } xcm-primitives = { workspace = true } [dev-dependencies] +polkadot-runtime-parachains = { workspace = true } +polkadot-core-primitives = { workspace = true } sp-io = { workspace = true } xcm-simulator = { workspace = true } diff --git a/evm-template/runtime/tests/xcm_mock/parachain.rs b/evm-template/runtime/tests/xcm_mock/parachain.rs index 6816de15..4b2f13a9 100644 --- a/evm-template/runtime/tests/xcm_mock/parachain.rs +++ b/evm-template/runtime/tests/xcm_mock/parachain.rs @@ -1,6 +1,7 @@ //! Parachain runtime mock. use cumulus_primitives_core::relay_chain::HrmpChannelId; +pub use evm_runtime_template::configs::asset_config::AssetType; use frame_support::{ construct_runtime, dispatch::GetDispatchInfo, @@ -12,15 +13,14 @@ use frame_support::{ PalletId, }; use frame_system::{pallet_prelude::BlockNumberFor, EnsureNever, EnsureRoot}; -pub use moonbase_runtime::xcm_config::AssetType; -#[cfg(feature = "runtime-benchmarks")] -use moonbeam_runtime_common::benchmarking::BenchmarkHelper as ArgumentsBenchmarkHelper; +// #[cfg(feature = "runtime-benchmarks")] +// use benchmarking::BenchmarkHelper as ArgumentsBenchmarkHelper; use orml_traits::parameter_type_with_key; use pallet_ethereum::PostLogContent; use pallet_xcm::migration::v1::VersionUncheckedMigrateToV1; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use polkadot_core_primitives::BlockNumber as RelayBlockNumber; -use polkadot_parachain::primitives::{Id as ParaId, Sibling}; +use polkadot_parachain_primitives::primitives::{Id as ParaId, Sibling}; use scale_info::TypeInfo; use sp_core::H256; use sp_runtime::{ @@ -51,7 +51,7 @@ use xcm_simulator::{ XcmpMessageHandlerT as XcmpMessageHandler, }; -pub type AccountId = moonbeam_core_primitives::AccountId; +pub type AccountId = AccountId; pub type Balance = u128; pub type AssetId = u128; pub type BlockNumber = BlockNumberFor; @@ -315,7 +315,6 @@ parameter_types! { use frame_system::RawOrigin; use sp_runtime::{traits::PostDispatchInfoOf, DispatchErrorWithPostInfo}; use xcm_executor::traits::CallDispatcher; -moonbeam_runtime_common::impl_moonbeam_xcm_call!(); pub struct XcmConfig; impl Config for XcmConfig { @@ -326,7 +325,8 @@ impl Config for XcmConfig { type AssetTransactor = AssetTransactors; type AssetTrap = PolkadotXcm; type Barrier = XcmBarrier; - type CallDispatcher = MoonbeamCall; + type CallDispatcher = (); + //TODO type FeeManager = (); type IsReserve = orml_xcm_support::MultiNativeAsset< xcm_primitives::AbsoluteAndRelativeReserve, @@ -958,8 +958,6 @@ pub enum ProxyType { Any = 1, } -impl pallet_evm_precompile_proxy::EvmProxyCallFilter for ProxyType {} - impl InstanceFilter for ProxyType { fn filter(&self, _c: &RuntimeCall) -> bool { match self { @@ -1015,15 +1013,6 @@ impl xcm_primitives::EnsureProxy for EthereumXcmEnsureProxy { } } -impl pallet_ethereum_xcm::Config for Runtime { - type ControllerOrigin = EnsureRoot; - type EnsureProxy = EthereumXcmEnsureProxy; - type InvalidEvmTransactionError = pallet_ethereum::InvalidTransactionWrapper; - type ReservedXcmpWeight = ReservedXcmpWeight; - type ValidatedTransaction = pallet_ethereum::ValidatedTransaction; - type XcmEthereumOrigin = pallet_ethereum_xcm::EnsureXcmEthereumTransaction; -} - type Block = frame_system::mocking::MockBlockU32; construct_runtime!( @@ -1045,7 +1034,6 @@ construct_runtime!( Timestamp: pallet_timestamp, EVM: pallet_evm, Ethereum: pallet_ethereum, - EthereumXcm: pallet_ethereum_xcm, } ); diff --git a/evm-template/runtime/tests/xcm_mock/relay_chain.rs b/evm-template/runtime/tests/xcm_mock/relay_chain.rs index fa3265a5..96421113 100644 --- a/evm-template/runtime/tests/xcm_mock/relay_chain.rs +++ b/evm-template/runtime/tests/xcm_mock/relay_chain.rs @@ -6,7 +6,7 @@ use frame_support::{ weights::{Weight, WeightMeter}, }; use frame_system::pallet_prelude::BlockNumberFor; -use polkadot_parachain::primitives::Id as ParaId; +use polkadot_parachain_primitives::primitives::Id as ParaId; use polkadot_runtime_parachains::{ configuration, dmp, hrmp, inclusion::{AggregateMessageOrigin, UmpQueueId}, diff --git a/evm-template/runtime/tests/xcm_mock/statemint_like.rs b/evm-template/runtime/tests/xcm_mock/statemint_like.rs index b7cd482a..c4c3de4e 100644 --- a/evm-template/runtime/tests/xcm_mock/statemint_like.rs +++ b/evm-template/runtime/tests/xcm_mock/statemint_like.rs @@ -7,7 +7,7 @@ use frame_support::{ }; use frame_system::{EnsureRoot, EnsureSigned}; use polkadot_core_primitives::BlockNumber as RelayBlockNumber; -use polkadot_parachain::primitives::{Id as ParaId, Sibling}; +use polkadot_parachain_primitives::primitives::{Id as ParaId, Sibling}; use sp_core::H256; use sp_runtime::{ traits::{ConstU32, Hash, IdentityLookup},