git.delta.rocks / unique-network / refs/commits / d0b6ad7ebb12

difftreelog

refactor rename xcm executor config

Daniel Shiposha2023-03-22parent: #aee14e9.patch.diff
in: master

2 files changed

modifiedruntime/common/config/orml.rsdiffbeforeafterboth
29 Runtime, RuntimeEvent, RelayChainBlockNumberProvider,29 Runtime, RuntimeEvent, RelayChainBlockNumberProvider,
30 runtime_common::config::{30 runtime_common::config::{
31 xcm::{31 xcm::{
32 SelfLocation, Weigher, XcmConfig, UniversalLocation,32 SelfLocation, Weigher, XcmExecutorConfig, UniversalLocation,
33 xcm_assets::{CurrencyIdConvert},33 xcm_assets::{CurrencyIdConvert},
34 },34 },
35 pallets::TreasuryAccountId,35 pallets::TreasuryAccountId,
138 type CurrencyIdConvert = CurrencyIdConvert;138 type CurrencyIdConvert = CurrencyIdConvert;
139 type AccountIdToMultiLocation = AccountIdToMultiLocation;139 type AccountIdToMultiLocation = AccountIdToMultiLocation;
140 type SelfLocation = SelfLocation;140 type SelfLocation = SelfLocation;
141 type XcmExecutor = XcmExecutor<XcmConfig<Self>>;141 type XcmExecutor = XcmExecutor<XcmExecutorConfig<Self>>;
142 type Weigher = Weigher;142 type Weigher = Weigher;
143 type BaseXcmWeight = BaseXcmWeight;143 type BaseXcmWeight = BaseXcmWeight;
144 type MaxAssetsForTransfer = MaxAssetsForTransfer;144 type MaxAssetsForTransfer = MaxAssetsForTransfer;
modifiedruntime/common/config/xcm/mod.rsdiffbeforeafterboth
28 SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,28 SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
29 SignedToAccountId32, SovereignSignedViaLocation, ParentIsPreset,29 SignedToAccountId32, SovereignSignedViaLocation, ParentIsPreset,
30};30};
31use xcm_executor::{Config, XcmExecutor, traits::ShouldExecute};31use xcm_executor::{XcmExecutor, traits::ShouldExecute};
32use sp_std::{marker::PhantomData, vec::Vec};32use sp_std::{marker::PhantomData, vec::Vec};
33use crate::{33use crate::{
34 Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, ParachainInfo, ParachainSystem, PolkadotXcm,34 Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, ParachainInfo, ParachainSystem, PolkadotXcm,
182182
183pub type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;183pub type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
184184
185pub struct XcmConfig<T>(PhantomData<T>);185pub struct XcmExecutorConfig<T>(PhantomData<T>);
186impl<T> Config for XcmConfig<T>186impl<T> xcm_executor::Config for XcmExecutorConfig<T>
187where187where
188 T: pallet_configuration::Config,188 T: pallet_configuration::Config,
189{189{
227 type XcmRouter = XcmRouter;227 type XcmRouter = XcmRouter;
228 type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;228 type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
229 type XcmExecuteFilter = Everything;229 type XcmExecuteFilter = Everything;
230 type XcmExecutor = XcmExecutor<XcmConfig<Self>>;230 type XcmExecutor = XcmExecutor<XcmExecutorConfig<Self>>;
231 type XcmTeleportFilter = Everything;231 type XcmTeleportFilter = Everything;
232 type XcmReserveTransferFilter = Everything;232 type XcmReserveTransferFilter = Everything;
233 type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;233 type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
248248
249impl cumulus_pallet_xcm::Config for Runtime {249impl cumulus_pallet_xcm::Config for Runtime {
250 type RuntimeEvent = RuntimeEvent;250 type RuntimeEvent = RuntimeEvent;
251 type XcmExecutor = XcmExecutor<XcmConfig<Self>>;251 type XcmExecutor = XcmExecutor<XcmExecutorConfig<Self>>;
252}252}
253253
254impl cumulus_pallet_xcmp_queue::Config for Runtime {254impl cumulus_pallet_xcmp_queue::Config for Runtime {
255 type WeightInfo = ();255 type WeightInfo = ();
256 type RuntimeEvent = RuntimeEvent;256 type RuntimeEvent = RuntimeEvent;
257 type XcmExecutor = XcmExecutor<XcmConfig<Self>>;257 type XcmExecutor = XcmExecutor<XcmExecutorConfig<Self>>;
258 type ChannelInfo = ParachainSystem;258 type ChannelInfo = ParachainSystem;
259 type VersionWrapper = ();259 type VersionWrapper = ();
260 type ExecuteOverweightOrigin = frame_system::EnsureRoot<AccountId>;260 type ExecuteOverweightOrigin = frame_system::EnsureRoot<AccountId>;
265265
266impl cumulus_pallet_dmp_queue::Config for Runtime {266impl cumulus_pallet_dmp_queue::Config for Runtime {
267 type RuntimeEvent = RuntimeEvent;267 type RuntimeEvent = RuntimeEvent;
268 type XcmExecutor = XcmExecutor<XcmConfig<Self>>;268 type XcmExecutor = XcmExecutor<XcmExecutorConfig<Self>>;
269 type ExecuteOverweightOrigin = frame_system::EnsureRoot<AccountId>;269 type ExecuteOverweightOrigin = frame_system::EnsureRoot<AccountId>;
270}270}
271271