Skip to content

Commit

Permalink
Update xcmPallet send origin and mocks
Browse files Browse the repository at this point in the history
Signed-off-by: Georgi Zlatarev <[email protected]>
  • Loading branch information
ghzlatarev committed Jul 14, 2023
1 parent 3d560d3 commit 771d02d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
8 changes: 4 additions & 4 deletions runtime/calamari/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ use xcm_builder::{
AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, ConvertedConcreteAssetId,
EnsureXcmOrigin, FixedRateOfFungible, LocationInverter, ParentAsSuperuser, ParentIsPreset,
RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
SignedAccountId32AsNative, SovereignSignedViaLocation, TakeRevenue, TakeWeightCredit,
WeightInfoBounds,
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeRevenue,
TakeWeightCredit, WeightInfoBounds,
};
use xcm_executor::{traits::JustTry, Config, XcmExecutor};

Expand Down Expand Up @@ -251,8 +251,8 @@ impl Config for XcmExecutorConfig {
type SubscriptionService = PolkadotXcm;
}

/// No one is allowed to dispatch XCM sends/executions.
pub type LocalOriginToLocation = ();
/// Converts a Signed Local Origin into a MultiLocation
pub type LocalOriginToLocation = SignedToAccountId32<RuntimeOrigin, AccountId, RelayNetwork>;

/// The means for routing XCM messages which are not for local execution into the right message
/// queues.
Expand Down
5 changes: 3 additions & 2 deletions runtime/integration-tests/src/xcm_mock/parachain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ use xcm_builder::{
AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, ConvertedConcreteAssetId,
EnsureXcmOrigin, FixedRateOfFungible, LocationInverter, ParentIsPreset,
SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
SovereignSignedViaLocation, TakeRevenue, TakeWeightCredit, WeightInfoBounds,
SignedToAccountId32, SovereignSignedViaLocation, TakeRevenue, TakeWeightCredit,
WeightInfoBounds,
};
use xcm_executor::{traits::JustTry, Config, XcmExecutor};
use xcm_simulator::{DmpMessageHandlerT, Get, TestExt, XcmpMessageHandlerT};
Expand Down Expand Up @@ -507,7 +508,7 @@ impl cumulus_pallet_parachain_system::Config for Runtime {
type CheckAssociatedRelayNumber = RelayNumberStrictlyIncreases;
}

pub type LocalOriginToLocation = ();
pub type LocalOriginToLocation = SignedToAccountId32<RuntimeOrigin, AccountId, RelayNetwork>;

impl pallet_xcm::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
Expand Down
8 changes: 4 additions & 4 deletions runtime/manta/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ use xcm_builder::{
AllowTopLevelPaidExecutionFrom, AllowUnpaidExecutionFrom, ConvertedConcreteAssetId,
EnsureXcmOrigin, FixedRateOfFungible, LocationInverter, ParentAsSuperuser, ParentIsPreset,
RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
SignedAccountId32AsNative, SovereignSignedViaLocation, TakeRevenue, TakeWeightCredit,
WeightInfoBounds,
SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeRevenue,
TakeWeightCredit, WeightInfoBounds,
};
use xcm_executor::{traits::JustTry, Config, XcmExecutor};

Expand Down Expand Up @@ -234,8 +234,8 @@ impl Config for XcmExecutorConfig {
type SubscriptionService = PolkadotXcm;
}

/// No one is allowed to dispatch XCM sends/executions.
pub type LocalOriginToLocation = ();
/// Converts a Signed Local Origin into a MultiLocation
pub type LocalOriginToLocation = SignedToAccountId32<RuntimeOrigin, AccountId, RelayNetwork>;

/// The means for routing XCM messages which are not for local execution into the right message
/// queues.
Expand Down

0 comments on commit 771d02d

Please sign in to comment.