Skip to content

Commit

Permalink
parachain id use parachain info
Browse files Browse the repository at this point in the history
Signed-off-by: zqhxuyuan <zqhxuyuan@gmail.com>
  • Loading branch information
zqhxuyuan committed Apr 6, 2023
1 parent 09938af commit c9b119f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion runtime/calamari/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@ impl_runtime_apis! {
));
pub const CheckedAccount: Option<AccountId> = None;
pub const KsmLocation: MultiLocation = MultiLocation::parent();
pub KmaLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(2084)));
pub KmaLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into())));
}

impl pallet_xcm_benchmarks::Config for Runtime {
Expand Down
1 change: 0 additions & 1 deletion runtime/manta/src/assets_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ use manta_primitives::{
};

use frame_support::{pallet_prelude::DispatchResult, parameter_types, traits::ConstU32, PalletId};

use frame_system::EnsureRoot;

use xcm::VersionedMultiLocation;
Expand Down
2 changes: 1 addition & 1 deletion runtime/manta/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ impl_runtime_apis! {
));
pub const CheckedAccount: Option<AccountId> = None;
pub const DotLocation: MultiLocation = MultiLocation::parent();
pub MantaLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(2104)));
pub MantaLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into())));
}

impl pallet_xcm_benchmarks::Config for Runtime {
Expand Down
3 changes: 3 additions & 0 deletions runtime/manta/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ parameter_types! {
pub SelfReserve: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::parachain_id().into())));
pub CheckingAccount: AccountId = PolkadotXcm::check_account();
}

/// Type for specifying how a `MultiLocation` can be converted into an `AccountId`. This is used
/// when determining ownership of accounts for asset transacting and when attempting to use XCM
/// `Transact` in order to determine the dispatch Origin.
Expand Down Expand Up @@ -265,6 +266,7 @@ impl cumulus_pallet_xcm::Config for Runtime {
type Event = Event;
type XcmExecutor = XcmExecutor<XcmExecutorConfig>;
}

impl cumulus_pallet_xcmp_queue::Config for Runtime {
type Event = Event;
type XcmExecutor = XcmExecutor<XcmExecutorConfig>;
Expand Down Expand Up @@ -305,6 +307,7 @@ parameter_types! {
pub const BaseXcmWeight: Weight = 100_000_000;
pub const MaxAssetsForTransfer: usize = 2;
}

// The XCM message wrapper wrapper
impl orml_xtokens::Config for Runtime {
type Event = Event;
Expand Down

0 comments on commit c9b119f

Please sign in to comment.