mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 11:41:02 +00:00
* Companion for #11981 * rename * Event to RuntimeEvent in imports * missed rename * undo * revert * rename type Call & Event * commit * ... * fix * fix errors * fixes * fmt * fix imports * final fix? * fmt * fix? * fixes after merge * small fix * cargo update -p polkadot-runtime-common * cargo +nightly fmt * update lockfile for {"polkadot", "substrate"} * fix Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use super::{
|
||||
AccountId, Balances, Call, Event, Origin, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime,
|
||||
WeightToFee, XcmpQueue,
|
||||
AccountId, Balances, Origin, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall,
|
||||
RuntimeEvent, WeightToFee, XcmpQueue,
|
||||
};
|
||||
use core::marker::PhantomData;
|
||||
use frame_support::{
|
||||
@@ -100,9 +100,9 @@ where
|
||||
Deny: ShouldExecute,
|
||||
Allow: ShouldExecute,
|
||||
{
|
||||
fn should_execute<Call>(
|
||||
fn should_execute<RuntimeCall>(
|
||||
origin: &MultiLocation,
|
||||
message: &mut Xcm<Call>,
|
||||
message: &mut Xcm<RuntimeCall>,
|
||||
max_weight: XCMWeight,
|
||||
weight_credit: &mut XCMWeight,
|
||||
) -> Result<(), ()> {
|
||||
@@ -114,9 +114,10 @@ where
|
||||
// See issue #5233
|
||||
pub struct DenyReserveTransferToRelayChain;
|
||||
impl ShouldExecute for DenyReserveTransferToRelayChain {
|
||||
fn should_execute<Call>(
|
||||
fn should_execute<RuntimeCall>(
|
||||
origin: &MultiLocation,
|
||||
message: &mut Xcm<Call>,
|
||||
|
||||
message: &mut Xcm<RuntimeCall>,
|
||||
_max_weight: XCMWeight,
|
||||
_weight_credit: &mut XCMWeight,
|
||||
) -> Result<(), ()> {
|
||||
@@ -163,7 +164,7 @@ pub type Barrier = DenyThenTry<
|
||||
|
||||
pub struct XcmConfig;
|
||||
impl xcm_executor::Config for XcmConfig {
|
||||
type Call = Call;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
type XcmSender = XcmRouter;
|
||||
// How to withdraw and deposit an asset.
|
||||
type AssetTransactor = LocalAssetTransactor;
|
||||
@@ -172,7 +173,7 @@ impl xcm_executor::Config for XcmConfig {
|
||||
type IsTeleporter = (); // Teleporting is disabled.
|
||||
type LocationInverter = LocationInverter<Ancestry>;
|
||||
type Barrier = Barrier;
|
||||
type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
|
||||
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
|
||||
type Trader =
|
||||
UsingComponents<WeightToFee, RelayLocation, AccountId, Balances, ToAuthor<Runtime>>;
|
||||
type ResponseHandler = PolkadotXcm;
|
||||
@@ -194,7 +195,7 @@ pub type XcmRouter = (
|
||||
);
|
||||
|
||||
impl pallet_xcm::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type SendXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;
|
||||
type XcmRouter = XcmRouter;
|
||||
type ExecuteXcmOrigin = EnsureXcmOrigin<Origin, LocalOriginToLocation>;
|
||||
@@ -204,10 +205,10 @@ impl pallet_xcm::Config for Runtime {
|
||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||
type XcmTeleportFilter = Everything;
|
||||
type XcmReserveTransferFilter = Nothing;
|
||||
type Weigher = FixedWeightBounds<UnitWeightCost, Call, MaxInstructions>;
|
||||
type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
|
||||
type LocationInverter = LocationInverter<Ancestry>;
|
||||
type Origin = Origin;
|
||||
type Call = Call;
|
||||
type RuntimeCall = RuntimeCall;
|
||||
|
||||
const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
|
||||
// ^ Override for AdvertisedXcmVersion default
|
||||
@@ -215,6 +216,6 @@ impl pallet_xcm::Config for Runtime {
|
||||
}
|
||||
|
||||
impl cumulus_pallet_xcm::Config for Runtime {
|
||||
type Event = Event;
|
||||
type RuntimeEvent = RuntimeEvent;
|
||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user