Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

XCM v2: Scripting, Query responses, Exception handling and Error reporting #3629

Merged
merged 91 commits into from
Aug 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
719efe0
Intoduce XCM v2
gavofyork Aug 10, 2021
b2dae98
Minor version cleanup
gavofyork Aug 10, 2021
5ab1b8b
Minor version cleanup
gavofyork Aug 10, 2021
c854e94
Introduce SendError for XcmSend trait to avoid cycles with having Out…
gavofyork Aug 10, 2021
1e287f3
comment
gavofyork Aug 10, 2021
c279e44
Corrent type
gavofyork Aug 10, 2021
632a992
Docs
gavofyork Aug 10, 2021
18ef569
Fix build
gavofyork Aug 10, 2021
ef3bc2e
Fixes
gavofyork Aug 10, 2021
eaea484
Build
gavofyork Aug 10, 2021
9820197
Introduce the basic impl
gavofyork Aug 10, 2021
82a67f7
Docs
gavofyork Aug 12, 2021
ace53dc
Add function
gavofyork Aug 12, 2021
49f1895
Merge remote-tracking branch 'origin/master' into gav-xcm-v2
gavofyork Aug 12, 2021
c6835ae
Basic implementation
gavofyork Aug 12, 2021
19617eb
Weighed responses and on_report
gavofyork Aug 12, 2021
0831192
Make XCM more script-like
gavofyork Aug 14, 2021
62d76b4
Remove BuyExecution::orders
gavofyork Aug 14, 2021
2bf963c
Fixes
gavofyork Aug 15, 2021
d58848f
Fixes
gavofyork Aug 15, 2021
e97f993
Fixes
gavofyork Aug 15, 2021
1a0e0ce
Formatting
gavofyork Aug 15, 2021
89debf5
Merge branch 'gav-rm-buy-orders' into gav-xcm-v2
gavofyork Aug 15, 2021
4516074
Initial draft and make pallet-xcm build
gavofyork Aug 16, 2021
329360f
fix XCM tests
gavofyork Aug 16, 2021
0ca87bd
Formatting
gavofyork Aug 16, 2021
15b9371
Merge remote-tracking branch 'origin/master' into gav-xcm-v2
gavofyork Aug 16, 2021
40efb2e
Fixes
gavofyork Aug 16, 2021
36f7a4e
Formatting
gavofyork Aug 16, 2021
33594b3
spelling
gavofyork Aug 16, 2021
8fd21f2
Fixes
gavofyork Aug 16, 2021
30c225d
Fixes
gavofyork Aug 17, 2021
b0f884e
spelling
gavofyork Aug 17, 2021
732ec50
tests for translation
gavofyork Aug 17, 2021
fbd84e4
extra fields to XCM pallet
gavofyork Aug 17, 2021
236f275
Formatting
gavofyork Aug 17, 2021
0188a9d
Fixes
gavofyork Aug 17, 2021
dcdf01d
spelling
gavofyork Aug 17, 2021
3d20770
first integration test
gavofyork Aug 17, 2021
0b27f43
Another integration test
gavofyork Aug 18, 2021
11b8a80
Formatting
gavofyork Aug 20, 2021
df76b24
Merge remote-tracking branch 'origin/master' into gav-xcm-v2
gavofyork Aug 20, 2021
170a20d
fix tests
gavofyork Aug 20, 2021
26330fa
all tests
gavofyork Aug 21, 2021
5d03978
Fixes
gavofyork Aug 21, 2021
7e7528d
Fixes
gavofyork Aug 22, 2021
b462eae
Formatting
gavofyork Aug 22, 2021
e1f36c4
Fixes
gavofyork Aug 22, 2021
a0db17a
Fixes
gavofyork Aug 22, 2021
653a2a2
Formatting
gavofyork Aug 22, 2021
f1ce4eb
Bump
gavofyork Aug 22, 2021
07ba2d0
Remove unneeded structuring
gavofyork Aug 22, 2021
48baab6
add instruction
gavofyork Aug 22, 2021
f317a64
Fixes
gavofyork Aug 22, 2021
dd80ebc
spelling
gavofyork Aug 22, 2021
de5e76c
Fixes
gavofyork Aug 22, 2021
e798658
Fixes
gavofyork Aug 22, 2021
df8f941
Formatting
gavofyork Aug 22, 2021
e39b1e6
Fixes
gavofyork Aug 22, 2021
bea12fb
Fixes
gavofyork Aug 23, 2021
2b47c3c
Formatting
gavofyork Aug 23, 2021
ca21160
Introduce and use VersionedResponse
gavofyork Aug 23, 2021
a062919
Introduce versioning to dispatchables' params
gavofyork Aug 23, 2021
26ca165
Fixes
gavofyork Aug 23, 2021
aeba4a8
Formatting
gavofyork Aug 23, 2021
1862f69
Merge branch 'gav-versioned-params' into gav-xcm-v2
gavofyork Aug 23, 2021
d92b7a7
Rest of merge
gavofyork Aug 23, 2021
c4c45d5
Merge branch 'gav-xcm-v2' into gav-xcm-trycatch
gavofyork Aug 23, 2021
7d7f2ac
more work
gavofyork Aug 23, 2021
604414c
Formatting
gavofyork Aug 23, 2021
8130a36
Basic logic
gavofyork Aug 23, 2021
fc58298
Fixes
gavofyork Aug 24, 2021
93dc645
Fixes
gavofyork Aug 24, 2021
6b5045f
Merge branch 'gav-xcm-v2' into gav-xcm-trycatch
gavofyork Aug 24, 2021
22fcbf2
Fixes
gavofyork Aug 24, 2021
7f5add7
Add test
gavofyork Aug 24, 2021
8c231a0
Fixes
gavofyork Aug 24, 2021
745835f
Formatting
gavofyork Aug 24, 2021
bb046cc
Fixes
gavofyork Aug 24, 2021
34dae85
Fixes
gavofyork Aug 24, 2021
ffe8513
Fixes
gavofyork Aug 24, 2021
c0f1875
Nits
gavofyork Aug 25, 2021
7b243cc
Simplify
gavofyork Aug 25, 2021
9f7e88c
Spelling
gavofyork Aug 25, 2021
8f07df6
Formatting
gavofyork Aug 25, 2021
41d8435
Return weight of unexecuted instructions in case of error as surplus
gavofyork Aug 25, 2021
53fc8dd
Formatting
gavofyork Aug 25, 2021
944b597
Fixes
gavofyork Aug 25, 2021
bcbacce
Test for instruction count limiting
gavofyork Aug 25, 2021
8c8d434
Formatting
gavofyork Aug 25, 2021
feb79ce
Docs
gavofyork Aug 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions node/test/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ impl PolkadotTestNode {
function: impl Into<polkadot_test_runtime::Call>,
caller: Sr25519Keyring,
) -> Result<RpcTransactionOutput, RpcTransactionError> {
let extrinsic = construct_extrinsic(&*self.client, function, caller);
let extrinsic = construct_extrinsic(&*self.client, function, caller, 0);

self.rpc_handlers.send_transaction(extrinsic.into()).await
}
Expand Down Expand Up @@ -332,12 +332,12 @@ pub fn construct_extrinsic(
client: &Client,
function: impl Into<polkadot_test_runtime::Call>,
caller: Sr25519Keyring,
nonce: u32,
) -> UncheckedExtrinsic {
let function = function.into();
let current_block_hash = client.info().best_hash;
let current_block = client.info().best_number.saturated_into();
let genesis_block = client.hash(0).unwrap().unwrap();
let nonce = 0;
let period =
BlockHashCount::get().checked_next_power_of_two().map(|c| c / 2).unwrap_or(2) as u64;
let tip = 0;
Expand Down Expand Up @@ -384,5 +384,5 @@ pub fn construct_transfer_extrinsic(
value,
));

construct_extrinsic(client, function, origin)
construct_extrinsic(client, function, origin, 0)
}
12 changes: 6 additions & 6 deletions runtime/common/src/xcm_sender.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,30 @@
use parity_scale_codec::Encode;
use runtime_parachains::{configuration, dmp};
use sp_std::marker::PhantomData;
use xcm::opaque::latest::*;
use xcm::latest::prelude::*;

/// XCM sender for relay chain. It only sends downward message.
pub struct ChildParachainRouter<T, W>(PhantomData<(T, W)>);

impl<T: configuration::Config + dmp::Config, W: xcm::WrapVersion> SendXcm
for ChildParachainRouter<T, W>
{
fn send_xcm(dest: MultiLocation, msg: Xcm) -> Result {
fn send_xcm(dest: MultiLocation, msg: Xcm<()>) -> SendResult {
match dest {
MultiLocation { parents: 0, interior: Junctions::X1(Junction::Parachain(id)) } => {
MultiLocation { parents: 0, interior: X1(Parachain(id)) } => {
// Downward message passing.
let versioned_xcm =
W::wrap_version(&dest, msg).map_err(|()| Error::DestinationUnsupported)?;
W::wrap_version(&dest, msg).map_err(|()| SendError::DestinationUnsupported)?;
let config = <configuration::Pallet<T>>::config();
<dmp::Pallet<T>>::queue_downward_message(
&config,
id.into(),
versioned_xcm.encode(),
)
.map_err(Into::<Error>::into)?;
.map_err(Into::<SendError>::into)?;
Ok(())
},
dest => Err(Error::CannotReachDestination(dest, msg)),
dest => Err(SendError::CannotReachDestination(dest, msg)),
}
}
}
9 changes: 7 additions & 2 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1254,6 +1254,9 @@ type LocalOriginConverter = (
parameter_types! {
/// The amount of weight an XCM operation takes. This is a safe overestimate.
pub const BaseXcmWeight: Weight = 1_000_000_000;
/// Maximum number of instructions in a single XCM fragment. A sanity check against weight
/// calculations getting too crazy.
pub const MaxInstructions: u32 = 100;
}

/// The XCM router. When we want to send an XCM message, we use this type. It amalgamates all of our
Expand Down Expand Up @@ -1289,7 +1292,7 @@ impl xcm_executor::Config for XcmConfig {
type IsTeleporter = TrustedTeleporters;
type LocationInverter = LocationInverter<Ancestry>;
type Barrier = Barrier;
type Weigher = FixedWeightBounds<BaseXcmWeight, Call>;
type Weigher = FixedWeightBounds<BaseXcmWeight, Call, MaxInstructions>;
// The weight trader piggybacks on the existing transaction-fee conversion logic.
type Trader = UsingComponents<WeightToFee, KsmLocation, AccountId, Balances, ToAuthor<Runtime>>;
type ResponseHandler = ();
Expand Down Expand Up @@ -1324,8 +1327,10 @@ impl pallet_xcm::Config for Runtime {
type XcmExecutor = XcmExecutor<XcmConfig>;
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Everything;
type Weigher = FixedWeightBounds<BaseXcmWeight, Call>;
type Weigher = FixedWeightBounds<BaseXcmWeight, Call, MaxInstructions>;
type LocationInverter = LocationInverter<Ancestry>;
type Origin = Origin;
type Call = Call;
}

parameter_types! {
Expand Down
6 changes: 3 additions & 3 deletions runtime/parachains/src/dmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use frame_support::pallet_prelude::*;
use primitives::v1::{DownwardMessage, Hash, Id as ParaId, InboundDownwardMessage};
use sp_runtime::traits::{BlakeTwo256, Hash as HashT, SaturatedConversion};
use sp_std::{fmt, prelude::*};
use xcm::latest::Error as XcmError;
use xcm::latest::SendError;

pub use pallet::*;

Expand All @@ -33,10 +33,10 @@ pub enum QueueDownwardMessageError {
ExceedsMaxMessageSize,
}

impl From<QueueDownwardMessageError> for XcmError {
impl From<QueueDownwardMessageError> for SendError {
fn from(err: QueueDownwardMessageError) -> Self {
match err {
QueueDownwardMessageError::ExceedsMaxMessageSize => XcmError::ExceedsMaxMessageSize,
QueueDownwardMessageError::ExceedsMaxMessageSize => SendError::ExceedsMaxMessageSize,
}
}
}
Expand Down
18 changes: 9 additions & 9 deletions runtime/parachains/src/hrmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1007,13 +1007,13 @@ impl<T: Config> Pallet<T> {

let notification_bytes = {
use parity_scale_codec::Encode as _;
use xcm::opaque::{v1::Xcm, VersionedXcm};
use xcm::opaque::{latest::prelude::*, VersionedXcm};

VersionedXcm::from(Xcm::HrmpNewChannelOpenRequest {
VersionedXcm::from(Xcm(vec![HrmpNewChannelOpenRequest {
sender: u32::from(origin),
max_capacity: proposed_max_capacity,
max_message_size: proposed_max_message_size,
})
}]))
.encode()
};
if let Err(dmp::QueueDownwardMessageError::ExceedsMaxMessageSize) =
Expand Down Expand Up @@ -1066,9 +1066,9 @@ impl<T: Config> Pallet<T> {

let notification_bytes = {
use parity_scale_codec::Encode as _;
use xcm::opaque::{v1::Xcm, VersionedXcm};

VersionedXcm::from(Xcm::HrmpChannelAccepted { recipient: u32::from(origin) }).encode()
use xcm::opaque::{latest::prelude::*, VersionedXcm};
let xcm = Xcm(vec![HrmpChannelAccepted { recipient: u32::from(origin) }]);
VersionedXcm::from(xcm).encode()
};
if let Err(dmp::QueueDownwardMessageError::ExceedsMaxMessageSize) =
<dmp::Pallet<T>>::queue_downward_message(&config, sender, notification_bytes)
Expand Down Expand Up @@ -1106,13 +1106,13 @@ impl<T: Config> Pallet<T> {
let config = <configuration::Pallet<T>>::config();
let notification_bytes = {
use parity_scale_codec::Encode as _;
use xcm::opaque::{v1::Xcm, VersionedXcm};
use xcm::opaque::{latest::prelude::*, VersionedXcm};

VersionedXcm::from(Xcm::HrmpChannelClosing {
VersionedXcm::from(Xcm(vec![HrmpChannelClosing {
initiator: u32::from(origin),
sender: u32::from(channel_id.sender),
recipient: u32::from(channel_id.recipient),
})
}]))
.encode()
};
let opposite_party =
Expand Down
7 changes: 5 additions & 2 deletions runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -631,6 +631,7 @@ parameter_types! {
pub const RococoForTrick: (MultiAssetFilter, MultiLocation) = (Rococo::get(), Parachain(110).into());
pub const RococoForTrack: (MultiAssetFilter, MultiLocation) = (Rococo::get(), Parachain(120).into());
pub const RococoForStatemint: (MultiAssetFilter, MultiLocation) = (Rococo::get(), Parachain(1001).into());
pub const MaxInstructions: u32 = 100;
}
pub type TrustedTeleporters = (
xcm_builder::Case<RococoForTick>,
Expand Down Expand Up @@ -666,7 +667,7 @@ impl xcm_executor::Config for XcmConfig {
type IsTeleporter = TrustedTeleporters;
type LocationInverter = LocationInverter<Ancestry>;
type Barrier = Barrier;
type Weigher = FixedWeightBounds<BaseXcmWeight, Call>;
type Weigher = FixedWeightBounds<BaseXcmWeight, Call, MaxInstructions>;
type Trader = UsingComponents<WeightToFee, RocLocation, AccountId, Balances, ToAuthor<Runtime>>;
type ResponseHandler = ();
}
Expand Down Expand Up @@ -696,8 +697,10 @@ impl pallet_xcm::Config for Runtime {
type XcmExecutor = XcmExecutor<XcmConfig>;
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Everything;
type Weigher = FixedWeightBounds<BaseXcmWeight, Call>;
type Weigher = FixedWeightBounds<BaseXcmWeight, Call, MaxInstructions>;
type LocationInverter = LocationInverter<Ancestry>;
type Origin = Origin;
type Call = Call;
}

impl parachains_session_info::Config for Runtime {}
Expand Down
92 changes: 91 additions & 1 deletion runtime/test-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,7 @@ impl parachains_ump::Config for Runtime {
parameter_types! {
pub const BaseXcmWeight: frame_support::weights::Weight = 1_000;
pub const AnyNetwork: xcm::latest::NetworkId = xcm::latest::NetworkId::Any;
pub const MaxInstructions: u32 = 100;
}

pub type LocalOriginToLocation = xcm_builder::SignedToAccountId32<Origin, AccountId, AnyNetwork>;
Expand All @@ -505,12 +506,14 @@ impl pallet_xcm::Config for Runtime {
type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin<Origin, LocalOriginToLocation>;
type LocationInverter = xcm_config::InvertNothing;
type SendXcmOrigin = xcm_builder::EnsureXcmOrigin<Origin, LocalOriginToLocation>;
type Weigher = xcm_builder::FixedWeightBounds<BaseXcmWeight, Call>;
type Weigher = xcm_builder::FixedWeightBounds<BaseXcmWeight, Call, MaxInstructions>;
type XcmRouter = xcm_config::DoNothingRouter;
type XcmExecuteFilter = Everything;
type XcmExecutor = xcm_executor::XcmExecutor<xcm_config::XcmConfig>;
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Everything;
type Origin = Origin;
type Call = Call;
}

impl parachains_hrmp::Config for Runtime {
Expand All @@ -523,6 +526,91 @@ impl parachains_scheduler::Config for Runtime {}

impl paras_sudo_wrapper::Config for Runtime {}

impl pallet_test_notifier::Config for Runtime {
type Event = Event;
type Origin = Origin;
type Call = Call;
}

#[frame_support::pallet]
pub mod pallet_test_notifier {
use frame_support::pallet_prelude::*;
use frame_system::pallet_prelude::*;
use pallet_xcm::{ensure_response, QueryId};
use sp_runtime::DispatchResult;
use xcm::latest::prelude::*;

#[pallet::pallet]
#[pallet::generate_store(pub(super) trait Store)]
pub struct Pallet<T>(_);

#[pallet::config]
pub trait Config: frame_system::Config + pallet_xcm::Config {
type Event: IsType<<Self as frame_system::Config>::Event> + From<Event<Self>>;
type Origin: IsType<<Self as frame_system::Config>::Origin>
+ Into<Result<pallet_xcm::Origin, <Self as Config>::Origin>>;
type Call: IsType<<Self as pallet_xcm::Config>::Call> + From<Call<Self>>;
}

#[pallet::event]
#[pallet::generate_deposit(pub(super) fn deposit_event)]
pub enum Event<T: Config> {
QueryPrepared(QueryId),
NotifyQueryPrepared(QueryId),
ResponseReceived(MultiLocation, QueryId, Response),
}

#[pallet::error]
pub enum Error<T> {
UnexpectedId,
BadAccountFormat,
}

#[pallet::call]
impl<T: Config> Pallet<T> {
#[pallet::weight(1_000_000)]
pub fn prepare_new_query(origin: OriginFor<T>) -> DispatchResult {
let who = ensure_signed(origin)?;
let id = who
.using_encoded(|mut d| <[u8; 32]>::decode(&mut d))
.map_err(|_| Error::<T>::BadAccountFormat)?;
let qid = pallet_xcm::Pallet::<T>::new_query(
Junction::AccountId32 { network: Any, id }.into(),
100u32.into(),
);
Self::deposit_event(Event::<T>::QueryPrepared(qid));
Ok(())
}

#[pallet::weight(1_000_000)]
pub fn prepare_new_notify_query(origin: OriginFor<T>) -> DispatchResult {
let who = ensure_signed(origin)?;
let id = who
.using_encoded(|mut d| <[u8; 32]>::decode(&mut d))
.map_err(|_| Error::<T>::BadAccountFormat)?;
let call = Call::<T>::notification_received(0, Default::default());
let qid = pallet_xcm::Pallet::<T>::new_notify_query(
Junction::AccountId32 { network: Any, id }.into(),
<T as Config>::Call::from(call),
100u32.into(),
);
Self::deposit_event(Event::<T>::NotifyQueryPrepared(qid));
Ok(())
}

#[pallet::weight(1_000_000)]
pub fn notification_received(
origin: OriginFor<T>,
query_id: QueryId,
response: Response,
) -> DispatchResult {
let responder = ensure_response(<T as Config>::Origin::from(origin))?;
Self::deposit_event(Event::<T>::ResponseReceived(responder, query_id, response));
Ok(())
}
}
}

construct_runtime! {
pub enum Runtime where
Block = Block,
Expand Down Expand Up @@ -572,6 +660,8 @@ construct_runtime! {
ParasDisputes: parachains_disputes::{Pallet, Storage, Event<T>},

Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>},

TestNotifier: pallet_test_notifier::{Pallet, Call, Event<T>},
}
}

Expand Down
12 changes: 5 additions & 7 deletions runtime/test-runtime/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.

use frame_support::{parameter_types, traits::Everything, weights::Weight};
use xcm::latest::{
Error as XcmError, Junctions::Here, MultiAsset, MultiLocation, NetworkId, Parent,
Result as XcmResult, SendXcm, Xcm,
};
use xcm::latest::prelude::*;
use xcm_builder::{AllowUnpaidExecutionFrom, FixedWeightBounds, SignedToAccountId32};
use xcm_executor::{
traits::{InvertLocation, TransactAsset, WeightTrader},
Expand All @@ -27,6 +24,7 @@ use xcm_executor::{

parameter_types! {
pub const OurNetwork: NetworkId = NetworkId::Polkadot;
pub const MaxInstructions: u32 = 100;
}

/// Type to convert an `Origin` type value into a `MultiLocation` value which represents an interior location
Expand All @@ -38,7 +36,7 @@ pub type LocalOriginToLocation = (

pub struct DoNothingRouter;
impl SendXcm for DoNothingRouter {
fn send_xcm(_dest: MultiLocation, _msg: Xcm<()>) -> XcmResult {
fn send_xcm(_dest: MultiLocation, _msg: Xcm<()>) -> SendResult {
Ok(())
}
}
Expand Down Expand Up @@ -85,7 +83,7 @@ impl xcm_executor::Config for XcmConfig {
type IsTeleporter = ();
type LocationInverter = InvertNothing;
type Barrier = Barrier;
type Weigher = FixedWeightBounds<super::BaseXcmWeight, super::Call>;
type Weigher = FixedWeightBounds<super::BaseXcmWeight, super::Call, MaxInstructions>;
type Trader = DummyWeightTrader;
type ResponseHandler = ();
type ResponseHandler = super::Xcm;
}
7 changes: 5 additions & 2 deletions runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,7 @@ pub type XcmRouter = (
parameter_types! {
pub const WestendForWestmint: (MultiAssetFilter, MultiLocation) =
(Wild(AllOf { fun: WildFungible, id: Concrete(WndLocation::get()) }), Parachain(1000).into());
pub const MaxInstructions: u32 = 100;
}
pub type TrustedTeleporters = (xcm_builder::Case<WestendForWestmint>,);

Expand All @@ -934,7 +935,7 @@ impl xcm_executor::Config for XcmConfig {
type IsTeleporter = TrustedTeleporters;
type LocationInverter = LocationInverter<Ancestry>;
type Barrier = Barrier;
type Weigher = FixedWeightBounds<BaseXcmWeight, Call>;
type Weigher = FixedWeightBounds<BaseXcmWeight, Call, MaxInstructions>;
type Trader = UsingComponents<WeightToFee, WndLocation, AccountId, Balances, ToAuthor<Runtime>>;
type ResponseHandler = ();
}
Expand All @@ -957,8 +958,10 @@ impl pallet_xcm::Config for Runtime {
type XcmExecutor = XcmExecutor<XcmConfig>;
type XcmTeleportFilter = Everything;
type XcmReserveTransferFilter = Everything;
type Weigher = FixedWeightBounds<BaseXcmWeight, Call>;
type Weigher = FixedWeightBounds<BaseXcmWeight, Call, MaxInstructions>;
type LocationInverter = LocationInverter<Ancestry>;
type Origin = Origin;
type Call = Call;
}

construct_runtime! {
Expand Down
Loading