Nits found during the bumping fellows repo (#3410)

This commit is contained in:
Branislav Kontur
2024-02-20 22:00:44 +01:00
committed by GitHub
parent fee810a5ea
commit b77b3a2de5
11 changed files with 19 additions and 10 deletions
@@ -383,8 +383,8 @@ pub type ForeignAssetsInstance = pallet_assets::Instance2;
impl pallet_assets::Config<ForeignAssetsInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type Balance = Balance;
type AssetId = xcm::v3::MultiLocation;
type AssetIdParameter = xcm::v3::MultiLocation;
type AssetId = xcm::v3::Location;
type AssetIdParameter = xcm::v3::Location;
type Currency = Balances;
type CreateOrigin = ForeignCreators<
(
@@ -1043,6 +1043,7 @@ mod benches {
[pallet_assets, Pool]
[pallet_asset_conversion, AssetConversion]
[pallet_balances, Balances]
[pallet_message_queue, MessageQueue]
[pallet_multisig, Multisig]
[pallet_nft_fractionalization, NftFractionalization]
[pallet_nfts, Nfts]
@@ -1052,6 +1053,7 @@ mod benches {
[pallet_utility, Utility]
[pallet_timestamp, Timestamp]
[pallet_collator_selection, CollatorSelection]
[cumulus_pallet_parachain_system, ParachainSystem]
[cumulus_pallet_xcmp_queue, XcmpQueue]
[pallet_xcm_bridge_hub_router, ToWestend]
// XCM
@@ -1084,6 +1084,7 @@ mod benches {
[pallet_utility, Utility]
[pallet_timestamp, Timestamp]
[pallet_collator_selection, CollatorSelection]
[cumulus_pallet_parachain_system, ParachainSystem]
[cumulus_pallet_xcmp_queue, XcmpQueue]
[pallet_xcm_bridge_hub_router, ToRococo]
// XCM
@@ -371,7 +371,7 @@ mod tests {
for (asset, expected_result) in test_data {
assert_eq!(
<Convert as MatchesFungibles<xcm::v3::MultiLocation, u128>>::matches_fungibles(
<Convert as MatchesFungibles<xcm::v3::Location, u128>>::matches_fungibles(
&asset.clone().try_into().unwrap()
),
expected_result,
@@ -522,6 +522,7 @@ mod benches {
[pallet_utility, Utility]
[pallet_timestamp, Timestamp]
[pallet_collator_selection, CollatorSelection]
[cumulus_pallet_parachain_system, ParachainSystem]
[cumulus_pallet_xcmp_queue, XcmpQueue]
// XCM
[pallet_xcm, PalletXcmExtrinsicsBenchmark::<Runtime>]
@@ -427,6 +427,7 @@ mod benches {
[pallet_sudo, Sudo]
[pallet_timestamp, Timestamp]
[pallet_collator_selection, CollatorSelection]
[cumulus_pallet_parachain_system, ParachainSystem]
[pallet_contracts, Contracts]
[pallet_xcm, PalletXcmExtrinsicsBenchmark::<Runtime>]
);
@@ -448,6 +448,7 @@ mod benches {
[frame_system, SystemBench::<Runtime>]
[pallet_balances, Balances]
[pallet_identity, Identity]
[pallet_message_queue, MessageQueue]
[pallet_multisig, Multisig]
[pallet_session, SessionBench::<Runtime>]
[pallet_utility, Utility]
@@ -455,6 +456,7 @@ mod benches {
// Polkadot
[polkadot_runtime_common::identity_migrator, IdentityMigrator]
// Cumulus
[cumulus_pallet_parachain_system, ParachainSystem]
[cumulus_pallet_xcmp_queue, XcmpQueue]
[pallet_collator_selection, CollatorSelection]
// XCM
@@ -448,6 +448,7 @@ mod benches {
[frame_system, SystemBench::<Runtime>]
[pallet_balances, Balances]
[pallet_identity, Identity]
[pallet_message_queue, MessageQueue]
[pallet_multisig, Multisig]
[pallet_session, SessionBench::<Runtime>]
[pallet_utility, Utility]
@@ -455,6 +456,7 @@ mod benches {
// Polkadot
[polkadot_runtime_common::identity_migrator, IdentityMigrator]
// Cumulus
[cumulus_pallet_parachain_system, ParachainSystem]
[cumulus_pallet_xcmp_queue, XcmpQueue]
[pallet_collator_selection, CollatorSelection]
// XCM
@@ -134,7 +134,7 @@ pub type ForeignFungiblesTransactor = FungiblesAdapter<
ForeignAssets,
// Use this currency when it is a fungible asset matching the given location or name:
ForeignAssetsConvertedConcreteId,
// Convert an XCM MultiLocation into a local account id:
// Convert an XCM Location into a local account id:
LocationToAccountId,
// Our chain's account ID type (we can't get away without mentioning it explicitly):
AccountId,
+4 -4
View File
@@ -107,7 +107,7 @@ pub fn era_payout(
)]
pub enum VersionedLocatableAsset {
#[codec(index = 3)]
V3 { location: xcm::v3::MultiLocation, asset_id: xcm::v3::AssetId },
V3 { location: xcm::v3::Location, asset_id: xcm::v3::AssetId },
#[codec(index = 4)]
V4 { location: xcm::v4::Location, asset_id: xcm::v4::AssetId },
}
@@ -140,7 +140,7 @@ impl TryConvert<&VersionedLocation, xcm::latest::Location> for VersionedLocation
) -> Result<xcm::latest::Location, &VersionedLocation> {
let latest = match location.clone() {
VersionedLocation::V2(l) => {
let v3: xcm::v3::MultiLocation = l.try_into().map_err(|_| location)?;
let v3: xcm::v3::Location = l.try_into().map_err(|_| location)?;
v3.try_into().map_err(|_| location)?
},
VersionedLocation::V3(l) => l.try_into().map_err(|_| location)?,
@@ -191,11 +191,11 @@ pub mod benchmarks {
{
fn create_asset_kind(seed: u32) -> VersionedLocatableAsset {
VersionedLocatableAsset::V3 {
location: xcm::v3::MultiLocation::new(
location: xcm::v3::Location::new(
Parents::get(),
[xcm::v3::Junction::Parachain(ParaId::get())],
),
asset_id: xcm::v3::MultiLocation::new(
asset_id: xcm::v3::Location::new(
0,
[
xcm::v3::Junction::PalletInstance(seed.try_into().unwrap()),
+1 -1
View File
@@ -494,7 +494,7 @@ pub trait WrapVersion {
}
/// Check and return the `Version` that should be used for the `Xcm` datum for the destination
/// `MultiLocation`, which will interpret it.
/// `Location`, which will interpret it.
pub trait GetVersion {
fn get_version_for(dest: &latest::Location) -> Option<Version>;
}
+1 -1
View File
@@ -40,7 +40,7 @@
//! non-native asset 1, you would pass in a path of `[DOT, 1]` or `[1, DOT]`. If you want to swap
//! from non-native asset 1 to non-native asset 2, you would pass in a path of `[1, DOT, 2]`.
//!
//! (For an example of configuring this pallet to use `MultiLocation` as an asset id, see the
//! (For an example of configuring this pallet to use `Location` as an asset id, see the
//! cumulus repo).
//!
//! Here is an example `state_call` that asks for a quote of a pool of native versus asset 1: