From efb2ccca292ae3ffbd86c5fd9c6ce59eec8f031b Mon Sep 17 00:00:00 2001 From: metricaez Date: Fri, 15 Dec 2023 19:36:24 -0300 Subject: [PATCH] fix: change asset to currency for benchmark to avoid AssetNotFound --- runtime/trappist/src/lib.rs | 6 ++---- runtime/trappist/src/xcm_config.rs | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/runtime/trappist/src/lib.rs b/runtime/trappist/src/lib.rs index a30ead6c..ed75be30 100644 --- a/runtime/trappist/src/lib.rs +++ b/runtime/trappist/src/lib.rs @@ -848,7 +848,7 @@ mod benches { [pallet_withdraw_teleport, WithdrawTeleport] // XCM // NOTE: Make sure you point to the individual modules below. - [pallet_xcm_benchmarks::fungible, XcmBalances] + [pallet_xcm_benchmarks::fungible, Balances] [pallet_xcm_benchmarks::generic, XcmGeneric] ); } @@ -1111,7 +1111,6 @@ impl_runtime_apis! { // This is defined once again in dispatch_benchmark, because list_benchmarks! // and add_benchmarks! are macros exported by define_benchmarks! macros and those types // are referenced in that call. - type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::; let mut list = Vec::::new(); @@ -1212,7 +1211,7 @@ impl_runtime_apis! { fn get_multi_asset() -> MultiAsset { MultiAsset { id: Concrete(SelfReserve::get()), - fun: Fungible(1 * UNITS), + fun: Fungible(UNITS), } } } @@ -1263,7 +1262,6 @@ impl_runtime_apis! { } - type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::; type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::; use xcm_primitives::TrappistDropAssets; diff --git a/runtime/trappist/src/xcm_config.rs b/runtime/trappist/src/xcm_config.rs index 285bed1a..b417355b 100644 --- a/runtime/trappist/src/xcm_config.rs +++ b/runtime/trappist/src/xcm_config.rs @@ -61,7 +61,7 @@ parameter_types! { pub const RelayNetwork: NetworkId = NetworkId::Rococo; pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into(); pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into(); - pub SelfReserve: MultiLocation = MultiLocation { parents:0, interior: Here }; + pub SelfReserve: MultiLocation = MultiLocation::here(); pub AssetsPalletLocation: MultiLocation = PalletInstance(::index() as u8).into(); // Be mindful with incoming teleports if you implement this