I need to mint an NFT and create metaverse for our auction pallet benchmarking. Both of these are handled by external pallet functionality and wondered if there is a FRAME-base benchmarking solution for using external calls from this pallet. Here is a code example from the benchmarking of the auction pallet:
fn mint_NFT<T: Config>(caller: T::AccountId) {
//T::NFTHandler::mint_land_nft(caller.clone().into(), vec![1], test_attributes(1));
T::NFTHandler::create_token_class(
&caller.clone(),
vec![1],
test_attributes(1),
0u32.into(),
TokenType::Transferable,
CollectionType::Collectable,
Perbill::from_percent(0u32),
);
T::NFTHandler::mint_token(&caller.clone(), 0u32.into(), vec![1], test_attributes(1));
/*
pallet_nft::Pallet::<T>::create_group(RawOrigin::Root.into(), vec![1], vec![1]);
pallet_nft::Pallet::<T>::create_class(
RawOrigin::Signed(caller.clone()).into(),
vec![1],
test_attributes(1),
0u32.into(),
TokenType::Transferable,
CollectionType::Collectable,
Perbill::from_percent(0u32),
);
pallet_nft::Pallet::<T>::mint(
RawOrigin::Signed(caller.clone()).into(),
0u32.into(),
vec![1],
test_attributes(1),
3,
);
*/
}
fn create_metaverse_for_account<T: Config>(caller: T::AccountId) {
//pallet_metaverse::Pallet::<T>::create_metaverse(
// RawOrigin::Signed(caller.clone()).into(),
// vec![1u8],
//);
}
The benchmarking builds successfully when using the code that is not commented but it does not seem to work when running it on the pallet. If I use the commented code instead, I get the following error
[E0599]: the function or associated item mint exists for struct pallet_nft::Pallet<T>, but its trait bounds were not satisfied
We found a possible solution using the orml benchmarking pallet but wondered if there is a way to fix the issue using FRAME?