difftreelog
feat(rmrk) benchmark accept_resource
in: master
1 file changed
pallets/proxy-rmrk-core/src/benchmarking.rsdiffbeforeafterboth349 resource_id349 resource_id350 )350 )351352 accept_resource {353 let caller: T::AccountId = account("caller", 0, SEED);354 let admin: T::AccountId = account("admin", 0, SEED);355356 <T as pallet_common::Config>::Currency::deposit_creating(&admin, T::CollectionCreationPrice::get());357358 create_max_collection::<T>(&admin)?;359 let collection_id = 0;360361 let mut nft_builder = NftBuilder::new(collection_id);362 let root_nft_id = 1;363 let nested_nft_id = nft_builder.build_tower::<T>(&admin, NESTING_BUDGET - 1)?;364 let resource = create_basic_resource();365366 let new_owner = <RmrkAccountIdOrCollectionNftTuple<T::AccountId>>::AccountId(caller.clone());367368 <Pallet<T>>::send(369 RawOrigin::Signed(admin.clone()).into(),370 collection_id,371 root_nft_id,372 new_owner,373 )?;374375 <Pallet<T>>::add_basic_resource(376 RawOrigin::Signed(admin.clone()).into(),377 collection_id,378 nested_nft_id,379 resource380 )?;381382 let resource_id = 1;383 }: _(384 RawOrigin::Signed(caller),385 collection_id,386 nested_nft_id,387 resource_id388 )351389352 accept_resource_removal {390 accept_resource_removal {353 let caller: T::AccountId = account("caller", 0, SEED);391 let caller: T::AccountId = account("caller", 0, SEED);