difftreelog
feat(rmrk) benchmark set_property
in: master
1 file changed
pallets/proxy-rmrk-core/src/benchmarking.rsdiffbeforeafterboth15const SEED: u32 = 1;15const SEED: u32 = 1;161617fn create_data<S: Get<u32>>() -> BoundedVec<u8, S> {17fn create_data<S: Get<u32>>() -> BoundedVec<u8, S> {18 vec![0; S::get() as usize].try_into().expect("size == S")18 vec![b'A'; S::get() as usize].try_into().expect("size == S")19}19}202021fn create_max_collection<T: Config>(owner: &T::AccountId) -> DispatchResult {21fn create_max_collection<T: Config>(owner: &T::AccountId) -> DispatchResult {204 actual_new_owner204 actual_new_owner205 )205 )206207 set_property {208 let caller: T::AccountId = account("caller", 0, SEED);209 create_max_collection::<T>(&caller)?;210 let collection_id = 0;211212 let mut nft_builder = NftBuilder::new(collection_id);213 let nft_id = nft_builder.build_tower::<T>(&caller, NESTING_BUDGET - 1)?;214215 let key = create_data();216 let value = create_data();217 }: _(218 RawOrigin::Signed(caller),219 collection_id,220 Some(nft_id),221 key,222 value223 )206}224}207225