When building the polkadot runtime in https://github.com/polkadot-fellows/runtimes
using
cargo build --profile production --features runtime-benchmarks
i encounter this error every time.
error[E0046]: not all trait items implemented, missing: `BenchmarkHelper`
--> /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/penpal-runtime-0.15.1/src/lib.rs:437:1
|
437 | impl pallet_assets::Config<pallet_assets::Instance1> for Runtime {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `BenchmarkHelper` in implementation
|
= help: implement the missing item: `type BenchmarkHelper = /* Type */;`
error[E0046]: not all trait items implemented, missing: `BenchmarkHelper`
--> /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/penpal-runtime-0.15.1/src/lib.rs:472:1
|
472 | impl pallet_assets::Config<ForeignAssetsInstance> for Runtime {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `BenchmarkHelper` in implementation
I have tried downgrading my toolchain several times and using cargo clean
, nothing works.
and the thing is when I check the file location for the missing Config, it is there.
pub type ForeignAssetsInstance = pallet_assets::Instance2;
impl pallet_assets::Config<ForeignAssetsInstance> for Runtime {
type RuntimeEvent = RuntimeEvent;
type Balance = Balance;
type AssetId = xcm::v3::Location;
type AssetIdParameter = xcm::v3::Location;
type Currency = Balances;
type CreateOrigin = AsEnsureOriginWithArg<EnsureSigned<AccountId>>;
type ForceOrigin = EnsureRoot<AccountId>;
type AssetDeposit = ForeignAssetsAssetDeposit;
type MetadataDepositBase = ForeignAssetsMetadataDepositBase;
type MetadataDepositPerByte = ForeignAssetsMetadataDepositPerByte;
type ApprovalDeposit = ForeignAssetsApprovalDeposit;
type StringLimit = ForeignAssetsAssetsStringLimit;
type Freezer = ();
type Extra = ();
type WeightInfo = pallet_assets::weights::SubstrateWeight<Runtime>;
type CallbackHandle = ();
type AssetAccountDeposit = ForeignAssetsAssetAccountDeposit;
type RemoveItemsLimit = frame_support::traits::ConstU32<1000>;
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkHelper = xcm_config::XcmBenchmarkHelper;
}
I am trying to build weights for pallet instances in the collective-polkadot-runtime
.