diff --git a/pallets/moonbeam-lazy-migrations/src/mock.rs b/pallets/moonbeam-lazy-migrations/src/mock.rs index 750b50dcc6..a8f03e6c55 100644 --- a/pallets/moonbeam-lazy-migrations/src/mock.rs +++ b/pallets/moonbeam-lazy-migrations/src/mock.rs @@ -173,6 +173,19 @@ parameter_types! { pub const AssetAccountDeposit: u128 = 1; } +// Required for runtime benchmarks +pallet_assets::runtime_benchmarks_enabled! { + pub struct BenchmarkHelper; + impl pallet_assets::BenchmarkHelper for BenchmarkHelper + where + AssetIdParameter: From, + { + fn create_asset_id_parameter(id: u32) -> AssetIdParameter { + (id as u128).into() + } + } +} + impl pallet_assets::Config<()> for Test { type RuntimeEvent = RuntimeEvent; type Balance = Balance; @@ -192,6 +205,9 @@ impl pallet_assets::Config<()> for Test { type AssetIdParameter = AssetId; type CreateOrigin = AsEnsureOriginWithArg>; type CallbackHandle = (); + pallet_assets::runtime_benchmarks_enabled! { + type BenchmarkHelper = BenchmarkHelper; + } } #[derive(Clone, Eq, PartialEq, Ord, PartialOrd, Encode, Decode, RuntimeDebug, TypeInfo)]