Skip to content

Commit

Permalink
fix: becnhmark helper
Browse files Browse the repository at this point in the history
  • Loading branch information
chungquantin committed Nov 12, 2024
1 parent 6a1324e commit d4c29fe
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
19 changes: 19 additions & 0 deletions pallets/api/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,25 @@ impl Verify for Noop {
}
}

#[cfg(feature = "runtime-benchmarks")]
impl pallet_nfts::pallet::BenchmarkHelper<u32, u32, Noop, u64, Noop> for () {
fn collection(i: u16) -> u32 {
i.into()
}

fn item(i: u16) -> u32 {
i.into()
}

fn signer() -> (Noop, u64) {
unimplemented!()
}

fn sign(signer: &Noop, message: &[u8]) -> Noop {
unimplemented!()
}
}

impl pallet_nfts::Config for Test {
type ApprovalsLimit = ConstU32<10>;
type AttributeDepositBase = ConstU128<1>;
Expand Down
7 changes: 3 additions & 4 deletions runtime/devnet/src/config/api/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use core::marker::PhantomData;

use codec::Decode;
use cumulus_primitives_core::Weight;
use frame_support::traits::{ConstU32, Contains};
use frame_support::traits::Contains;
pub(crate) use pallet_api::Extension;
use pallet_api::{extension::*, Read};
use sp_core::ConstU8;
Expand All @@ -11,9 +11,8 @@ use sp_std::vec::Vec;
use versioning::*;

use crate::{
config::{assets::TrustBackedAssetsInstance, xcm::LocalOriginToLocation},
fungibles, nonfungibles, Balances, Ismp, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent,
RuntimeHoldReason, TransactionByteFee,
config::assets::TrustBackedAssetsInstance, fungibles, nonfungibles, Runtime, RuntimeCall,
RuntimeEvent,
};

mod versioning;
Expand Down

0 comments on commit d4c29fe

Please sign in to comment.