Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
fix: change asset to currency for benchmark to avoid AssetNotFound
Browse files Browse the repository at this point in the history
  • Loading branch information
metricaez committed Dec 15, 2023
1 parent 8f098de commit efb2ccc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions runtime/trappist/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]
);
}
Expand Down Expand Up @@ -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::<Runtime>;
type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::<Runtime>;

let mut list = Vec::<BenchmarkList>::new();
Expand Down Expand Up @@ -1212,7 +1211,7 @@ impl_runtime_apis! {
fn get_multi_asset() -> MultiAsset {
MultiAsset {
id: Concrete(SelfReserve::get()),
fun: Fungible(1 * UNITS),
fun: Fungible(UNITS),
}
}
}
Expand Down Expand Up @@ -1263,7 +1262,6 @@ impl_runtime_apis! {
}


type XcmBalances = pallet_xcm_benchmarks::fungible::Pallet::<Runtime>;
type XcmGeneric = pallet_xcm_benchmarks::generic::Pallet::<Runtime>;

use xcm_primitives::TrappistDropAssets;
Expand Down
2 changes: 1 addition & 1 deletion runtime/trappist/src/xcm_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(<Assets as PalletInfoAccess>::index() as u8).into();
// Be mindful with incoming teleports if you implement this
Expand Down

0 comments on commit efb2ccc

Please sign in to comment.