Skip to content

Commit

Permalink
fixes for runtime build
Browse files Browse the repository at this point in the history
  • Loading branch information
KitHat committed Feb 20, 2025
1 parent 9ffb08a commit 5ae7d7a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion procedural/src/apis/benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ fn construct_xcm_dispatch_benchmarking(
let asset_type = #asset_type::Xcm(location_v4);
#asset_manager::set_asset_type_asset_id(asset_type.clone(), local_asset_id);

let destination: xcm::v4::Location = Parent.into();
let destination: Location = Parent.into();

// set up fee asset
let fee_amount: u128 = <#existential_deposit as sp_core::Get<u128>>::get();
Expand Down
19 changes: 19 additions & 0 deletions src/assets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,30 @@ macro_rules! impl_openzeppelin_assets {
<$t as AssetsConfig>::AssetsToBlockAuthor
>;

#[cfg(feature = "runtime-benchmarks")]
pub struct AssetTxPaymentBenchmarkHelper;

#[cfg(feature = "runtime-benchmarks")]
// TODO: implement the functions next time we run the benchmarks
impl pallet_asset_tx_payment::BenchmarkHelperTrait<AccountId, <$t as AssetsConfig>::AssetId, xcm::v3::MultiLocation> for AssetTxPaymentBenchmarkHelper {
/// Returns the `AssetId` to be used in the liquidity pool by the benchmarking code.
fn create_asset_id_parameter(id: u32) -> ( <$t as AssetsConfig>::AssetId, xcm::v3::MultiLocation) {
unimplemented!();
}
/// Create a liquidity pool for a given asset and sufficiently endow accounts to benchmark
/// the extension.
fn setup_balances_and_pool(asset_id: <$t as AssetsConfig>::AssetId, account: AccountId) {
unimplemented!();
}
}

impl pallet_asset_tx_payment::Config for Runtime {
type Fungibles = crate::Assets;
type OnChargeAssetTransaction = OnCharge;
type RuntimeEvent = RuntimeEvent;
type WeightInfo = <$t as AssetsWeight>::AssetTxPayment;
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkHelper = AssetTxPaymentBenchmarkHelper;
}

parameter_types! {
Expand Down

0 comments on commit 5ae7d7a

Please sign in to comment.