difftreelog
feat(rmrk) benchmark burn_nft
in: master
3 files changed
pallets/proxy-rmrk-core/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/proxy-rmrk-core/src/benchmarking.rs
+++ b/pallets/proxy-rmrk-core/src/benchmarking.rs
@@ -148,6 +148,35 @@
Ok((root_nft_id, deepest_nft_id))
}
+
+ fn build_wide_tree<T: Config>(
+ &mut self,
+ owner: &T::AccountId,
+ width: u32,
+ ) -> Result<RmrkNftId, DispatchError> {
+ self.build::<T>(owner)?;
+
+ let root_nft_id = self.current_nft_id;
+
+ let root_owner =
+ <RmrkAccountIdOrCollectionNftTuple<T::AccountId>>::CollectionAndNftTuple(
+ self.collection_id,
+ root_nft_id,
+ );
+
+ for _ in 0..width {
+ self.build::<T>(owner)?;
+
+ <Pallet<T>>::send(
+ RawOrigin::Signed(owner.clone()).into(),
+ self.collection_id,
+ self.current_nft_id,
+ root_owner.clone(),
+ )?;
+ }
+
+ Ok(root_nft_id)
+ }
}
benchmarks! {
@@ -205,6 +234,23 @@
transferable
)
+ burn_nft {
+ let b in 0..200;
+
+ let caller: T::AccountId = account("caller", 0, SEED);
+ create_max_collection::<T>(&caller)?;
+ let collection_id = 0;
+
+ let mut nft_builder = NftBuilder::new(collection_id);
+ let root_nft_id = nft_builder.build_wide_tree::<T>(&caller, b)?;
+ let max_burns = b + 1;
+ }: _(
+ RawOrigin::Signed(caller),
+ collection_id,
+ root_nft_id,
+ max_burns
+ )
+
send {
let caller: T::AccountId = account("caller", 0, SEED);
create_max_collection::<T>(&caller)?;
pallets/proxy-rmrk-core/src/lib.rsdiffbeforeafterboth--- a/pallets/proxy-rmrk-core/src/lib.rs
+++ b/pallets/proxy-rmrk-core/src/lib.rs
@@ -400,8 +400,8 @@
}
/// burn nft
- #[pallet::weight(10_000 + T::DbWeight::get().reads_writes(1,1))]
#[transactional]
+ #[pallet::weight(<SelfWeightOf<T>>::burn_nft(*max_burns))]
pub fn burn_nft(
origin: OriginFor<T>,
collection_id: RmrkCollectionId,
pallets/proxy-rmrk-core/src/weights.rsdiffbeforeafterboth1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs23//! Autogenerated weights for pallet_proxy_rmrk_core4//!5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev6//! DATE: 2022-06-10, STEPS: `50`, REPEAT: 200, LOW RANGE: `[]`, HIGH RANGE: `[]`7//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 102489// Executed Command:10// target/release/unique-collator11// benchmark12// pallet13// --pallet14// pallet-proxy-rmrk-core15// --wasm-execution16// compiled17// --extrinsic18// *19// --template20// .maintain/frame-weight-template.hbs21// --steps=5022// --repeat=20023// --heap-pages=409624// --output=./pallets/proxy-rmrk-core/src/weights.rs2526#![cfg_attr(rustfmt, rustfmt_skip)]27#![allow(unused_parens)]28#![allow(unused_imports)]29#![allow(clippy::unnecessary_cast)]3031use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};32use sp_std::marker::PhantomData;3334/// Weight functions needed for pallet_proxy_rmrk_core.35pub trait WeightInfo {36 fn create_collection() -> Weight;37 fn destroy_collection() -> Weight;38 fn change_collection_issuer() -> Weight;39 fn lock_collection() -> Weight;40 fn mint_nft() -> Weight;41 fn send() -> Weight;42 fn accept_nft() -> Weight;43 fn reject_nft() -> Weight;44 fn set_property() -> Weight;45 fn set_priority() -> Weight;46 fn add_basic_resource() -> Weight;47 fn add_composable_resource() -> Weight;48 fn add_slot_resource() -> Weight;49 fn remove_resource() -> Weight;50 fn accept_resource() -> Weight;51 fn accept_resource_removal() -> Weight;52}5354/// Weights for pallet_proxy_rmrk_core using the Substrate node and recommended hardware.55pub struct SubstrateWeight<T>(PhantomData<T>);56impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {57 // Storage: Common CreatedCollectionCount (r:1 w:1)58 // Storage: Common DestroyedCollectionCount (r:1 w:0)59 // Storage: System Account (r:2 w:2)60 // Storage: RmrkCore CollectionIndex (r:1 w:1)61 // Storage: Common CollectionPropertyPermissions (r:0 w:1)62 // Storage: Common CollectionProperties (r:0 w:1)63 // Storage: Common CollectionById (r:0 w:1)64 // Storage: RmrkCore UniqueCollectionId (r:0 w:1)65 fn create_collection() -> Weight {66 (40_456_000 as Weight)67 .saturating_add(T::DbWeight::get().reads(5 as Weight))68 .saturating_add(T::DbWeight::get().writes(8 as Weight))69 }70 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)71 // Storage: Common CollectionProperties (r:1 w:1)72 // Storage: Common CollectionById (r:1 w:1)73 // Storage: Nonfungible TokenData (r:1 w:0)74 // Storage: Common DestroyedCollectionCount (r:1 w:1)75 // Storage: Nonfungible TokensMinted (r:0 w:1)76 // Storage: Nonfungible TokensBurnt (r:0 w:1)77 // Storage: Common AdminAmount (r:0 w:1)78 fn destroy_collection() -> Weight {79 (43_812_000 as Weight)80 .saturating_add(T::DbWeight::get().reads(5 as Weight))81 .saturating_add(T::DbWeight::get().writes(6 as Weight))82 }83 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)84 // Storage: Common CollectionById (r:1 w:1)85 // Storage: Common CollectionProperties (r:1 w:0)86 fn change_collection_issuer() -> Weight {87 (22_032_000 as Weight)88 .saturating_add(T::DbWeight::get().reads(3 as Weight))89 .saturating_add(T::DbWeight::get().writes(1 as Weight))90 }91 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)92 // Storage: Common CollectionProperties (r:1 w:0)93 // Storage: Common CollectionById (r:1 w:1)94 // Storage: Nonfungible TokensMinted (r:1 w:0)95 // Storage: Nonfungible TokensBurnt (r:1 w:0)96 fn lock_collection() -> Weight {97 (23_314_000 as Weight)98 .saturating_add(T::DbWeight::get().reads(5 as Weight))99 .saturating_add(T::DbWeight::get().writes(1 as Weight))100 }101 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)102 // Storage: Common CollectionProperties (r:1 w:0)103 // Storage: Common CollectionById (r:1 w:0)104 // Storage: Nonfungible TokensMinted (r:1 w:1)105 // Storage: Nonfungible AccountBalance (r:1 w:1)106 // Storage: Nonfungible TokenProperties (r:1 w:1)107 // Storage: Nonfungible TokenData (r:0 w:1)108 // Storage: Nonfungible Owned (r:0 w:1)109 fn mint_nft() -> Weight {110 (40_075_000 as Weight)111 .saturating_add(T::DbWeight::get().reads(6 as Weight))112 .saturating_add(T::DbWeight::get().writes(5 as Weight))113 }114 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)115 // Storage: Common CollectionProperties (r:1 w:0)116 // Storage: Common CollectionById (r:1 w:0)117 // Storage: Nonfungible TokenData (r:5 w:1)118 // Storage: Nonfungible TokenProperties (r:1 w:0)119 // Storage: Nonfungible AccountBalance (r:2 w:2)120 // Storage: Nonfungible Allowance (r:1 w:0)121 // Storage: Nonfungible TokenChildren (r:0 w:1)122 // Storage: Nonfungible Owned (r:0 w:2)123 fn send() -> Weight {124 (71_474_000 as Weight)125 .saturating_add(T::DbWeight::get().reads(12 as Weight))126 .saturating_add(T::DbWeight::get().writes(6 as Weight))127 }128 // Storage: RmrkCore UniqueCollectionId (r:2 w:0)129 // Storage: Common CollectionProperties (r:1 w:0)130 // Storage: Common CollectionById (r:2 w:0)131 // Storage: Nonfungible TokenData (r:6 w:1)132 // Storage: Nonfungible AccountBalance (r:2 w:2)133 // Storage: Nonfungible Allowance (r:1 w:0)134 // Storage: Nonfungible TokenProperties (r:1 w:1)135 // Storage: Nonfungible TokenChildren (r:0 w:1)136 // Storage: Nonfungible Owned (r:0 w:2)137 fn accept_nft() -> Weight {138 (79_890_000 as Weight)139 .saturating_add(T::DbWeight::get().reads(15 as Weight))140 .saturating_add(T::DbWeight::get().writes(7 as Weight))141 }142 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)143 // Storage: Common CollectionProperties (r:1 w:0)144 // Storage: Common CollectionById (r:1 w:0)145 // Storage: Nonfungible TokenProperties (r:1 w:5)146 // Storage: Nonfungible TokenData (r:5 w:5)147 // Storage: Nonfungible TokenChildren (r:9 w:4)148 // Storage: Nonfungible TokensBurnt (r:1 w:1)149 // Storage: Nonfungible AccountBalance (r:5 w:5)150 // Storage: Nonfungible Allowance (r:5 w:0)151 // Storage: Nonfungible Owned (r:0 w:5)152 fn reject_nft() -> Weight {153 (236_754_000 as Weight)154 .saturating_add(T::DbWeight::get().reads(29 as Weight))155 .saturating_add(T::DbWeight::get().writes(25 as Weight))156 }157 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)158 // Storage: Common CollectionProperties (r:1 w:0)159 // Storage: Common CollectionById (r:1 w:0)160 // Storage: Nonfungible TokenProperties (r:1 w:1)161 // Storage: Nonfungible TokenData (r:5 w:0)162 fn set_property() -> Weight {163 (48_370_000 as Weight)164 .saturating_add(T::DbWeight::get().reads(9 as Weight))165 .saturating_add(T::DbWeight::get().writes(1 as Weight))166 }167 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)168 // Storage: Common CollectionProperties (r:1 w:0)169 // Storage: Common CollectionById (r:1 w:0)170 // Storage: Nonfungible TokenProperties (r:1 w:1)171 // Storage: Nonfungible TokenData (r:5 w:0)172 fn set_priority() -> Weight {173 (47_128_000 as Weight)174 .saturating_add(T::DbWeight::get().reads(9 as Weight))175 .saturating_add(T::DbWeight::get().writes(1 as Weight))176 }177 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)178 // Storage: Common CollectionProperties (r:1 w:1)179 // Storage: Common CollectionById (r:1 w:1)180 // Storage: Nonfungible TokenData (r:5 w:1)181 // Storage: Nonfungible TokenProperties (r:2 w:2)182 // Storage: Common CreatedCollectionCount (r:1 w:1)183 // Storage: Common DestroyedCollectionCount (r:1 w:0)184 // Storage: System Account (r:2 w:2)185 // Storage: Nonfungible TokensMinted (r:1 w:1)186 // Storage: Nonfungible AccountBalance (r:1 w:1)187 // Storage: Nonfungible Owned (r:0 w:1)188 // Storage: Common CollectionPropertyPermissions (r:0 w:1)189 fn add_basic_resource() -> Weight {190 (101_501_000 as Weight)191 .saturating_add(T::DbWeight::get().reads(16 as Weight))192 .saturating_add(T::DbWeight::get().writes(12 as Weight))193 }194 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)195 // Storage: Common CollectionProperties (r:1 w:1)196 // Storage: Common CollectionById (r:1 w:1)197 // Storage: Nonfungible TokenData (r:5 w:1)198 // Storage: Nonfungible TokenProperties (r:2 w:2)199 // Storage: Common CreatedCollectionCount (r:1 w:1)200 // Storage: Common DestroyedCollectionCount (r:1 w:0)201 // Storage: System Account (r:2 w:2)202 // Storage: Nonfungible TokensMinted (r:1 w:1)203 // Storage: Nonfungible AccountBalance (r:1 w:1)204 // Storage: Nonfungible Owned (r:0 w:1)205 // Storage: Common CollectionPropertyPermissions (r:0 w:1)206 fn add_composable_resource() -> Weight {207 (103_004_000 as Weight)208 .saturating_add(T::DbWeight::get().reads(16 as Weight))209 .saturating_add(T::DbWeight::get().writes(12 as Weight))210 }211 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)212 // Storage: Common CollectionProperties (r:1 w:1)213 // Storage: Common CollectionById (r:1 w:1)214 // Storage: Nonfungible TokenData (r:5 w:1)215 // Storage: Nonfungible TokenProperties (r:2 w:2)216 // Storage: Common CreatedCollectionCount (r:1 w:1)217 // Storage: Common DestroyedCollectionCount (r:1 w:0)218 // Storage: System Account (r:2 w:2)219 // Storage: Nonfungible TokensMinted (r:1 w:1)220 // Storage: Nonfungible AccountBalance (r:1 w:1)221 // Storage: Nonfungible Owned (r:0 w:1)222 // Storage: Common CollectionPropertyPermissions (r:0 w:1)223 fn add_slot_resource() -> Weight {224 (102_613_000 as Weight)225 .saturating_add(T::DbWeight::get().reads(16 as Weight))226 .saturating_add(T::DbWeight::get().writes(12 as Weight))227 }228 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)229 // Storage: Common CollectionProperties (r:2 w:0)230 // Storage: Common CollectionById (r:2 w:0)231 // Storage: Nonfungible TokenProperties (r:1 w:1)232 // Storage: Nonfungible TokenData (r:6 w:1)233 // Storage: Nonfungible TokenChildren (r:1 w:0)234 // Storage: Nonfungible TokensBurnt (r:1 w:1)235 // Storage: Nonfungible AccountBalance (r:1 w:1)236 // Storage: Nonfungible Allowance (r:1 w:0)237 // Storage: Nonfungible Owned (r:0 w:1)238 fn remove_resource() -> Weight {239 (82_084_000 as Weight)240 .saturating_add(T::DbWeight::get().reads(16 as Weight))241 .saturating_add(T::DbWeight::get().writes(5 as Weight))242 }243 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)244 // Storage: Common CollectionProperties (r:1 w:0)245 // Storage: Common CollectionById (r:1 w:0)246 // Storage: Nonfungible TokenData (r:5 w:0)247 // Storage: Nonfungible TokenProperties (r:2 w:1)248 fn accept_resource() -> Weight {249 (56_426_000 as Weight)250 .saturating_add(T::DbWeight::get().reads(10 as Weight))251 .saturating_add(T::DbWeight::get().writes(1 as Weight))252 }253 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)254 // Storage: Common CollectionProperties (r:2 w:0)255 // Storage: Common CollectionById (r:2 w:0)256 // Storage: Nonfungible TokenData (r:6 w:1)257 // Storage: Nonfungible TokenProperties (r:2 w:1)258 // Storage: Nonfungible TokenChildren (r:1 w:0)259 // Storage: Nonfungible TokensBurnt (r:1 w:1)260 // Storage: Nonfungible AccountBalance (r:1 w:1)261 // Storage: Nonfungible Allowance (r:1 w:0)262 // Storage: Nonfungible Owned (r:0 w:1)263 fn accept_resource_removal() -> Weight {264 (85_631_000 as Weight)265 .saturating_add(T::DbWeight::get().reads(17 as Weight))266 .saturating_add(T::DbWeight::get().writes(5 as Weight))267 }268}269270// For backwards compatibility and tests271impl WeightInfo for () {272 // Storage: Common CreatedCollectionCount (r:1 w:1)273 // Storage: Common DestroyedCollectionCount (r:1 w:0)274 // Storage: System Account (r:2 w:2)275 // Storage: RmrkCore CollectionIndex (r:1 w:1)276 // Storage: Common CollectionPropertyPermissions (r:0 w:1)277 // Storage: Common CollectionProperties (r:0 w:1)278 // Storage: Common CollectionById (r:0 w:1)279 // Storage: RmrkCore UniqueCollectionId (r:0 w:1)280 fn create_collection() -> Weight {281 (40_456_000 as Weight)282 .saturating_add(RocksDbWeight::get().reads(5 as Weight))283 .saturating_add(RocksDbWeight::get().writes(8 as Weight))284 }285 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)286 // Storage: Common CollectionProperties (r:1 w:1)287 // Storage: Common CollectionById (r:1 w:1)288 // Storage: Nonfungible TokenData (r:1 w:0)289 // Storage: Common DestroyedCollectionCount (r:1 w:1)290 // Storage: Nonfungible TokensMinted (r:0 w:1)291 // Storage: Nonfungible TokensBurnt (r:0 w:1)292 // Storage: Common AdminAmount (r:0 w:1)293 fn destroy_collection() -> Weight {294 (43_812_000 as Weight)295 .saturating_add(RocksDbWeight::get().reads(5 as Weight))296 .saturating_add(RocksDbWeight::get().writes(6 as Weight))297 }298 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)299 // Storage: Common CollectionById (r:1 w:1)300 // Storage: Common CollectionProperties (r:1 w:0)301 fn change_collection_issuer() -> Weight {302 (22_032_000 as Weight)303 .saturating_add(RocksDbWeight::get().reads(3 as Weight))304 .saturating_add(RocksDbWeight::get().writes(1 as Weight))305 }306 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)307 // Storage: Common CollectionProperties (r:1 w:0)308 // Storage: Common CollectionById (r:1 w:1)309 // Storage: Nonfungible TokensMinted (r:1 w:0)310 // Storage: Nonfungible TokensBurnt (r:1 w:0)311 fn lock_collection() -> Weight {312 (23_314_000 as Weight)313 .saturating_add(RocksDbWeight::get().reads(5 as Weight))314 .saturating_add(RocksDbWeight::get().writes(1 as Weight))315 }316 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)317 // Storage: Common CollectionProperties (r:1 w:0)318 // Storage: Common CollectionById (r:1 w:0)319 // Storage: Nonfungible TokensMinted (r:1 w:1)320 // Storage: Nonfungible AccountBalance (r:1 w:1)321 // Storage: Nonfungible TokenProperties (r:1 w:1)322 // Storage: Nonfungible TokenData (r:0 w:1)323 // Storage: Nonfungible Owned (r:0 w:1)324 fn mint_nft() -> Weight {325 (40_075_000 as Weight)326 .saturating_add(RocksDbWeight::get().reads(6 as Weight))327 .saturating_add(RocksDbWeight::get().writes(5 as Weight))328 }329 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)330 // Storage: Common CollectionProperties (r:1 w:0)331 // Storage: Common CollectionById (r:1 w:0)332 // Storage: Nonfungible TokenData (r:5 w:1)333 // Storage: Nonfungible TokenProperties (r:1 w:0)334 // Storage: Nonfungible AccountBalance (r:2 w:2)335 // Storage: Nonfungible Allowance (r:1 w:0)336 // Storage: Nonfungible TokenChildren (r:0 w:1)337 // Storage: Nonfungible Owned (r:0 w:2)338 fn send() -> Weight {339 (71_474_000 as Weight)340 .saturating_add(RocksDbWeight::get().reads(12 as Weight))341 .saturating_add(RocksDbWeight::get().writes(6 as Weight))342 }343 // Storage: RmrkCore UniqueCollectionId (r:2 w:0)344 // Storage: Common CollectionProperties (r:1 w:0)345 // Storage: Common CollectionById (r:2 w:0)346 // Storage: Nonfungible TokenData (r:6 w:1)347 // Storage: Nonfungible AccountBalance (r:2 w:2)348 // Storage: Nonfungible Allowance (r:1 w:0)349 // Storage: Nonfungible TokenProperties (r:1 w:1)350 // Storage: Nonfungible TokenChildren (r:0 w:1)351 // Storage: Nonfungible Owned (r:0 w:2)352 fn accept_nft() -> Weight {353 (79_890_000 as Weight)354 .saturating_add(RocksDbWeight::get().reads(15 as Weight))355 .saturating_add(RocksDbWeight::get().writes(7 as Weight))356 }357 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)358 // Storage: Common CollectionProperties (r:1 w:0)359 // Storage: Common CollectionById (r:1 w:0)360 // Storage: Nonfungible TokenProperties (r:1 w:5)361 // Storage: Nonfungible TokenData (r:5 w:5)362 // Storage: Nonfungible TokenChildren (r:9 w:4)363 // Storage: Nonfungible TokensBurnt (r:1 w:1)364 // Storage: Nonfungible AccountBalance (r:5 w:5)365 // Storage: Nonfungible Allowance (r:5 w:0)366 // Storage: Nonfungible Owned (r:0 w:5)367 fn reject_nft() -> Weight {368 (236_754_000 as Weight)369 .saturating_add(RocksDbWeight::get().reads(29 as Weight))370 .saturating_add(RocksDbWeight::get().writes(25 as Weight))371 }372 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)373 // Storage: Common CollectionProperties (r:1 w:0)374 // Storage: Common CollectionById (r:1 w:0)375 // Storage: Nonfungible TokenProperties (r:1 w:1)376 // Storage: Nonfungible TokenData (r:5 w:0)377 fn set_property() -> Weight {378 (48_370_000 as Weight)379 .saturating_add(RocksDbWeight::get().reads(9 as Weight))380 .saturating_add(RocksDbWeight::get().writes(1 as Weight))381 }382 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)383 // Storage: Common CollectionProperties (r:1 w:0)384 // Storage: Common CollectionById (r:1 w:0)385 // Storage: Nonfungible TokenProperties (r:1 w:1)386 // Storage: Nonfungible TokenData (r:5 w:0)387 fn set_priority() -> Weight {388 (47_128_000 as Weight)389 .saturating_add(RocksDbWeight::get().reads(9 as Weight))390 .saturating_add(RocksDbWeight::get().writes(1 as Weight))391 }392 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)393 // Storage: Common CollectionProperties (r:1 w:1)394 // Storage: Common CollectionById (r:1 w:1)395 // Storage: Nonfungible TokenData (r:5 w:1)396 // Storage: Nonfungible TokenProperties (r:2 w:2)397 // Storage: Common CreatedCollectionCount (r:1 w:1)398 // Storage: Common DestroyedCollectionCount (r:1 w:0)399 // Storage: System Account (r:2 w:2)400 // Storage: Nonfungible TokensMinted (r:1 w:1)401 // Storage: Nonfungible AccountBalance (r:1 w:1)402 // Storage: Nonfungible Owned (r:0 w:1)403 // Storage: Common CollectionPropertyPermissions (r:0 w:1)404 fn add_basic_resource() -> Weight {405 (101_501_000 as Weight)406 .saturating_add(RocksDbWeight::get().reads(16 as Weight))407 .saturating_add(RocksDbWeight::get().writes(12 as Weight))408 }409 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)410 // Storage: Common CollectionProperties (r:1 w:1)411 // Storage: Common CollectionById (r:1 w:1)412 // Storage: Nonfungible TokenData (r:5 w:1)413 // Storage: Nonfungible TokenProperties (r:2 w:2)414 // Storage: Common CreatedCollectionCount (r:1 w:1)415 // Storage: Common DestroyedCollectionCount (r:1 w:0)416 // Storage: System Account (r:2 w:2)417 // Storage: Nonfungible TokensMinted (r:1 w:1)418 // Storage: Nonfungible AccountBalance (r:1 w:1)419 // Storage: Nonfungible Owned (r:0 w:1)420 // Storage: Common CollectionPropertyPermissions (r:0 w:1)421 fn add_composable_resource() -> Weight {422 (103_004_000 as Weight)423 .saturating_add(RocksDbWeight::get().reads(16 as Weight))424 .saturating_add(RocksDbWeight::get().writes(12 as Weight))425 }426 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)427 // Storage: Common CollectionProperties (r:1 w:1)428 // Storage: Common CollectionById (r:1 w:1)429 // Storage: Nonfungible TokenData (r:5 w:1)430 // Storage: Nonfungible TokenProperties (r:2 w:2)431 // Storage: Common CreatedCollectionCount (r:1 w:1)432 // Storage: Common DestroyedCollectionCount (r:1 w:0)433 // Storage: System Account (r:2 w:2)434 // Storage: Nonfungible TokensMinted (r:1 w:1)435 // Storage: Nonfungible AccountBalance (r:1 w:1)436 // Storage: Nonfungible Owned (r:0 w:1)437 // Storage: Common CollectionPropertyPermissions (r:0 w:1)438 fn add_slot_resource() -> Weight {439 (102_613_000 as Weight)440 .saturating_add(RocksDbWeight::get().reads(16 as Weight))441 .saturating_add(RocksDbWeight::get().writes(12 as Weight))442 }443 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)444 // Storage: Common CollectionProperties (r:2 w:0)445 // Storage: Common CollectionById (r:2 w:0)446 // Storage: Nonfungible TokenProperties (r:1 w:1)447 // Storage: Nonfungible TokenData (r:6 w:1)448 // Storage: Nonfungible TokenChildren (r:1 w:0)449 // Storage: Nonfungible TokensBurnt (r:1 w:1)450 // Storage: Nonfungible AccountBalance (r:1 w:1)451 // Storage: Nonfungible Allowance (r:1 w:0)452 // Storage: Nonfungible Owned (r:0 w:1)453 fn remove_resource() -> Weight {454 (82_084_000 as Weight)455 .saturating_add(RocksDbWeight::get().reads(16 as Weight))456 .saturating_add(RocksDbWeight::get().writes(5 as Weight))457 }458 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)459 // Storage: Common CollectionProperties (r:1 w:0)460 // Storage: Common CollectionById (r:1 w:0)461 // Storage: Nonfungible TokenData (r:5 w:0)462 // Storage: Nonfungible TokenProperties (r:2 w:1)463 fn accept_resource() -> Weight {464 (56_426_000 as Weight)465 .saturating_add(RocksDbWeight::get().reads(10 as Weight))466 .saturating_add(RocksDbWeight::get().writes(1 as Weight))467 }468 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)469 // Storage: Common CollectionProperties (r:2 w:0)470 // Storage: Common CollectionById (r:2 w:0)471 // Storage: Nonfungible TokenData (r:6 w:1)472 // Storage: Nonfungible TokenProperties (r:2 w:1)473 // Storage: Nonfungible TokenChildren (r:1 w:0)474 // Storage: Nonfungible TokensBurnt (r:1 w:1)475 // Storage: Nonfungible AccountBalance (r:1 w:1)476 // Storage: Nonfungible Allowance (r:1 w:0)477 // Storage: Nonfungible Owned (r:0 w:1)478 fn accept_resource_removal() -> Weight {479 (85_631_000 as Weight)480 .saturating_add(RocksDbWeight::get().reads(17 as Weight))481 .saturating_add(RocksDbWeight::get().writes(5 as Weight))482 }483}1// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs23//! Autogenerated weights for pallet_proxy_rmrk_core4//!5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev6//! DATE: 2022-06-10, STEPS: `50`, REPEAT: 200, LOW RANGE: `[]`, HIGH RANGE: `[]`7//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 102489// Executed Command:10// target/release/unique-collator11// benchmark12// pallet13// --pallet14// pallet-proxy-rmrk-core15// --wasm-execution16// compiled17// --extrinsic18// *19// --template20// .maintain/frame-weight-template.hbs21// --steps=5022// --repeat=20023// --heap-pages=409624// --output=./pallets/proxy-rmrk-core/src/weights.rs2526#![cfg_attr(rustfmt, rustfmt_skip)]27#![allow(unused_parens)]28#![allow(unused_imports)]29#![allow(clippy::unnecessary_cast)]3031use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};32use sp_std::marker::PhantomData;3334/// Weight functions needed for pallet_proxy_rmrk_core.35pub trait WeightInfo {36 fn create_collection() -> Weight;37 fn destroy_collection() -> Weight;38 fn change_collection_issuer() -> Weight;39 fn lock_collection() -> Weight;40 fn mint_nft() -> Weight;41 fn burn_nft(b: u32, ) -> Weight;42 fn send() -> Weight;43 fn accept_nft() -> Weight;44 fn reject_nft() -> Weight;45 fn set_property() -> Weight;46 fn set_priority() -> Weight;47 fn add_basic_resource() -> Weight;48 fn add_composable_resource() -> Weight;49 fn add_slot_resource() -> Weight;50 fn remove_resource() -> Weight;51 fn accept_resource() -> Weight;52 fn accept_resource_removal() -> Weight;53}5455/// Weights for pallet_proxy_rmrk_core using the Substrate node and recommended hardware.56pub struct SubstrateWeight<T>(PhantomData<T>);57impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {58 // Storage: Common CreatedCollectionCount (r:1 w:1)59 // Storage: Common DestroyedCollectionCount (r:1 w:0)60 // Storage: System Account (r:2 w:2)61 // Storage: RmrkCore CollectionIndex (r:1 w:1)62 // Storage: Common CollectionPropertyPermissions (r:0 w:1)63 // Storage: Common CollectionProperties (r:0 w:1)64 // Storage: Common CollectionById (r:0 w:1)65 // Storage: RmrkCore UniqueCollectionId (r:0 w:1)66 fn create_collection() -> Weight {67 (40_837_000 as Weight)68 .saturating_add(T::DbWeight::get().reads(5 as Weight))69 .saturating_add(T::DbWeight::get().writes(8 as Weight))70 }71 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)72 // Storage: Common CollectionProperties (r:1 w:1)73 // Storage: Common CollectionById (r:1 w:1)74 // Storage: Nonfungible TokenData (r:1 w:0)75 // Storage: Common DestroyedCollectionCount (r:1 w:1)76 // Storage: Nonfungible TokensMinted (r:0 w:1)77 // Storage: Nonfungible TokensBurnt (r:0 w:1)78 // Storage: Common AdminAmount (r:0 w:1)79 fn destroy_collection() -> Weight {80 (44_544_000 as Weight)81 .saturating_add(T::DbWeight::get().reads(5 as Weight))82 .saturating_add(T::DbWeight::get().writes(6 as Weight))83 }84 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)85 // Storage: Common CollectionById (r:1 w:1)86 // Storage: Common CollectionProperties (r:1 w:0)87 fn change_collection_issuer() -> Weight {88 (22_151_000 as Weight)89 .saturating_add(T::DbWeight::get().reads(3 as Weight))90 .saturating_add(T::DbWeight::get().writes(1 as Weight))91 }92 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)93 // Storage: Common CollectionProperties (r:1 w:0)94 // Storage: Common CollectionById (r:1 w:1)95 // Storage: Nonfungible TokensMinted (r:1 w:0)96 // Storage: Nonfungible TokensBurnt (r:1 w:0)97 fn lock_collection() -> Weight {98 (23_766_000 as Weight)99 .saturating_add(T::DbWeight::get().reads(5 as Weight))100 .saturating_add(T::DbWeight::get().writes(1 as Weight))101 }102 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)103 // Storage: Common CollectionProperties (r:1 w:0)104 // Storage: Common CollectionById (r:1 w:0)105 // Storage: Nonfungible TokensMinted (r:1 w:1)106 // Storage: Nonfungible AccountBalance (r:1 w:1)107 // Storage: Nonfungible TokenProperties (r:1 w:1)108 // Storage: Nonfungible TokenData (r:0 w:1)109 // Storage: Nonfungible Owned (r:0 w:1)110 fn mint_nft() -> Weight {111 (40_237_000 as Weight)112 .saturating_add(T::DbWeight::get().reads(6 as Weight))113 .saturating_add(T::DbWeight::get().writes(5 as Weight))114 }115 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)116 // Storage: Common CollectionProperties (r:1 w:0)117 // Storage: Common CollectionById (r:1 w:0)118 // Storage: Nonfungible TokenData (r:1 w:1)119 // Storage: Nonfungible TokenChildren (r:1 w:0)120 // Storage: Nonfungible TokensBurnt (r:1 w:1)121 // Storage: Nonfungible AccountBalance (r:1 w:1)122 // Storage: Nonfungible Allowance (r:1 w:0)123 // Storage: Nonfungible Owned (r:0 w:1)124 // Storage: Nonfungible TokenProperties (r:0 w:1)125 fn burn_nft(b: u32, ) -> Weight {126 (0 as Weight)127 // Standard Error: 1_023_000128 .saturating_add((318_424_000 as Weight).saturating_mul(b as Weight))129 .saturating_add(T::DbWeight::get().reads(9 as Weight))130 .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(b as Weight)))131 .saturating_add(T::DbWeight::get().writes(6 as Weight))132 .saturating_add(T::DbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))133 }134 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)135 // Storage: Common CollectionProperties (r:1 w:0)136 // Storage: Common CollectionById (r:1 w:0)137 // Storage: Nonfungible TokenData (r:5 w:1)138 // Storage: Nonfungible TokenProperties (r:1 w:0)139 // Storage: Nonfungible AccountBalance (r:2 w:2)140 // Storage: Nonfungible Allowance (r:1 w:0)141 // Storage: Nonfungible TokenChildren (r:0 w:1)142 // Storage: Nonfungible Owned (r:0 w:2)143 fn send() -> Weight {144 (71_055_000 as Weight)145 .saturating_add(T::DbWeight::get().reads(12 as Weight))146 .saturating_add(T::DbWeight::get().writes(6 as Weight))147 }148 // Storage: RmrkCore UniqueCollectionId (r:2 w:0)149 // Storage: Common CollectionProperties (r:1 w:0)150 // Storage: Common CollectionById (r:2 w:0)151 // Storage: Nonfungible TokenData (r:6 w:1)152 // Storage: Nonfungible AccountBalance (r:2 w:2)153 // Storage: Nonfungible Allowance (r:1 w:0)154 // Storage: Nonfungible TokenProperties (r:1 w:1)155 // Storage: Nonfungible TokenChildren (r:0 w:1)156 // Storage: Nonfungible Owned (r:0 w:2)157 fn accept_nft() -> Weight {158 (79_098_000 as Weight)159 .saturating_add(T::DbWeight::get().reads(15 as Weight))160 .saturating_add(T::DbWeight::get().writes(7 as Weight))161 }162 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)163 // Storage: Common CollectionProperties (r:1 w:0)164 // Storage: Common CollectionById (r:1 w:0)165 // Storage: Nonfungible TokenProperties (r:1 w:5)166 // Storage: Nonfungible TokenData (r:5 w:5)167 // Storage: Nonfungible TokenChildren (r:9 w:4)168 // Storage: Nonfungible TokensBurnt (r:1 w:1)169 // Storage: Nonfungible AccountBalance (r:5 w:5)170 // Storage: Nonfungible Allowance (r:5 w:0)171 // Storage: Nonfungible Owned (r:0 w:5)172 fn reject_nft() -> Weight {173 (237_777_000 as Weight)174 .saturating_add(T::DbWeight::get().reads(29 as Weight))175 .saturating_add(T::DbWeight::get().writes(25 as Weight))176 }177 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)178 // Storage: Common CollectionProperties (r:1 w:0)179 // Storage: Common CollectionById (r:1 w:0)180 // Storage: Nonfungible TokenProperties (r:1 w:1)181 // Storage: Nonfungible TokenData (r:5 w:0)182 fn set_property() -> Weight {183 (47_359_000 as Weight)184 .saturating_add(T::DbWeight::get().reads(9 as Weight))185 .saturating_add(T::DbWeight::get().writes(1 as Weight))186 }187 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)188 // Storage: Common CollectionProperties (r:1 w:0)189 // Storage: Common CollectionById (r:1 w:0)190 // Storage: Nonfungible TokenProperties (r:1 w:1)191 // Storage: Nonfungible TokenData (r:5 w:0)192 fn set_priority() -> Weight {193 (46_537_000 as Weight)194 .saturating_add(T::DbWeight::get().reads(9 as Weight))195 .saturating_add(T::DbWeight::get().writes(1 as Weight))196 }197 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)198 // Storage: Common CollectionProperties (r:1 w:1)199 // Storage: Common CollectionById (r:1 w:1)200 // Storage: Nonfungible TokenData (r:5 w:1)201 // Storage: Nonfungible TokenProperties (r:2 w:2)202 // Storage: Common CreatedCollectionCount (r:1 w:1)203 // Storage: Common DestroyedCollectionCount (r:1 w:0)204 // Storage: System Account (r:2 w:2)205 // Storage: Nonfungible TokensMinted (r:1 w:1)206 // Storage: Nonfungible AccountBalance (r:1 w:1)207 // Storage: Nonfungible Owned (r:0 w:1)208 // Storage: Common CollectionPropertyPermissions (r:0 w:1)209 fn add_basic_resource() -> Weight {210 (100_939_000 as Weight)211 .saturating_add(T::DbWeight::get().reads(16 as Weight))212 .saturating_add(T::DbWeight::get().writes(12 as Weight))213 }214 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)215 // Storage: Common CollectionProperties (r:1 w:1)216 // Storage: Common CollectionById (r:1 w:1)217 // Storage: Nonfungible TokenData (r:5 w:1)218 // Storage: Nonfungible TokenProperties (r:2 w:2)219 // Storage: Common CreatedCollectionCount (r:1 w:1)220 // Storage: Common DestroyedCollectionCount (r:1 w:0)221 // Storage: System Account (r:2 w:2)222 // Storage: Nonfungible TokensMinted (r:1 w:1)223 // Storage: Nonfungible AccountBalance (r:1 w:1)224 // Storage: Nonfungible Owned (r:0 w:1)225 // Storage: Common CollectionPropertyPermissions (r:0 w:1)226 fn add_composable_resource() -> Weight {227 (101_821_000 as Weight)228 .saturating_add(T::DbWeight::get().reads(16 as Weight))229 .saturating_add(T::DbWeight::get().writes(12 as Weight))230 }231 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)232 // Storage: Common CollectionProperties (r:1 w:1)233 // Storage: Common CollectionById (r:1 w:1)234 // Storage: Nonfungible TokenData (r:5 w:1)235 // Storage: Nonfungible TokenProperties (r:2 w:2)236 // Storage: Common CreatedCollectionCount (r:1 w:1)237 // Storage: Common DestroyedCollectionCount (r:1 w:0)238 // Storage: System Account (r:2 w:2)239 // Storage: Nonfungible TokensMinted (r:1 w:1)240 // Storage: Nonfungible AccountBalance (r:1 w:1)241 // Storage: Nonfungible Owned (r:0 w:1)242 // Storage: Common CollectionPropertyPermissions (r:0 w:1)243 fn add_slot_resource() -> Weight {244 (100_880_000 as Weight)245 .saturating_add(T::DbWeight::get().reads(16 as Weight))246 .saturating_add(T::DbWeight::get().writes(12 as Weight))247 }248 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)249 // Storage: Common CollectionProperties (r:2 w:0)250 // Storage: Common CollectionById (r:2 w:0)251 // Storage: Nonfungible TokenProperties (r:1 w:1)252 // Storage: Nonfungible TokenData (r:6 w:1)253 // Storage: Nonfungible TokenChildren (r:1 w:0)254 // Storage: Nonfungible TokensBurnt (r:1 w:1)255 // Storage: Nonfungible AccountBalance (r:1 w:1)256 // Storage: Nonfungible Allowance (r:1 w:0)257 // Storage: Nonfungible Owned (r:0 w:1)258 fn remove_resource() -> Weight {259 (79_831_000 as Weight)260 .saturating_add(T::DbWeight::get().reads(16 as Weight))261 .saturating_add(T::DbWeight::get().writes(5 as Weight))262 }263 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)264 // Storage: Common CollectionProperties (r:1 w:0)265 // Storage: Common CollectionById (r:1 w:0)266 // Storage: Nonfungible TokenData (r:5 w:0)267 // Storage: Nonfungible TokenProperties (r:2 w:1)268 fn accept_resource() -> Weight {269 (54_573_000 as Weight)270 .saturating_add(T::DbWeight::get().reads(10 as Weight))271 .saturating_add(T::DbWeight::get().writes(1 as Weight))272 }273 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)274 // Storage: Common CollectionProperties (r:2 w:0)275 // Storage: Common CollectionById (r:2 w:0)276 // Storage: Nonfungible TokenData (r:6 w:1)277 // Storage: Nonfungible TokenProperties (r:2 w:1)278 // Storage: Nonfungible TokenChildren (r:1 w:0)279 // Storage: Nonfungible TokensBurnt (r:1 w:1)280 // Storage: Nonfungible AccountBalance (r:1 w:1)281 // Storage: Nonfungible Allowance (r:1 w:0)282 // Storage: Nonfungible Owned (r:0 w:1)283 fn accept_resource_removal() -> Weight {284 (83_426_000 as Weight)285 .saturating_add(T::DbWeight::get().reads(17 as Weight))286 .saturating_add(T::DbWeight::get().writes(5 as Weight))287 }288}289290// For backwards compatibility and tests291impl WeightInfo for () {292 // Storage: Common CreatedCollectionCount (r:1 w:1)293 // Storage: Common DestroyedCollectionCount (r:1 w:0)294 // Storage: System Account (r:2 w:2)295 // Storage: RmrkCore CollectionIndex (r:1 w:1)296 // Storage: Common CollectionPropertyPermissions (r:0 w:1)297 // Storage: Common CollectionProperties (r:0 w:1)298 // Storage: Common CollectionById (r:0 w:1)299 // Storage: RmrkCore UniqueCollectionId (r:0 w:1)300 fn create_collection() -> Weight {301 (40_837_000 as Weight)302 .saturating_add(RocksDbWeight::get().reads(5 as Weight))303 .saturating_add(RocksDbWeight::get().writes(8 as Weight))304 }305 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)306 // Storage: Common CollectionProperties (r:1 w:1)307 // Storage: Common CollectionById (r:1 w:1)308 // Storage: Nonfungible TokenData (r:1 w:0)309 // Storage: Common DestroyedCollectionCount (r:1 w:1)310 // Storage: Nonfungible TokensMinted (r:0 w:1)311 // Storage: Nonfungible TokensBurnt (r:0 w:1)312 // Storage: Common AdminAmount (r:0 w:1)313 fn destroy_collection() -> Weight {314 (44_544_000 as Weight)315 .saturating_add(RocksDbWeight::get().reads(5 as Weight))316 .saturating_add(RocksDbWeight::get().writes(6 as Weight))317 }318 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)319 // Storage: Common CollectionById (r:1 w:1)320 // Storage: Common CollectionProperties (r:1 w:0)321 fn change_collection_issuer() -> Weight {322 (22_151_000 as Weight)323 .saturating_add(RocksDbWeight::get().reads(3 as Weight))324 .saturating_add(RocksDbWeight::get().writes(1 as Weight))325 }326 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)327 // Storage: Common CollectionProperties (r:1 w:0)328 // Storage: Common CollectionById (r:1 w:1)329 // Storage: Nonfungible TokensMinted (r:1 w:0)330 // Storage: Nonfungible TokensBurnt (r:1 w:0)331 fn lock_collection() -> Weight {332 (23_766_000 as Weight)333 .saturating_add(RocksDbWeight::get().reads(5 as Weight))334 .saturating_add(RocksDbWeight::get().writes(1 as Weight))335 }336 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)337 // Storage: Common CollectionProperties (r:1 w:0)338 // Storage: Common CollectionById (r:1 w:0)339 // Storage: Nonfungible TokensMinted (r:1 w:1)340 // Storage: Nonfungible AccountBalance (r:1 w:1)341 // Storage: Nonfungible TokenProperties (r:1 w:1)342 // Storage: Nonfungible TokenData (r:0 w:1)343 // Storage: Nonfungible Owned (r:0 w:1)344 fn mint_nft() -> Weight {345 (40_237_000 as Weight)346 .saturating_add(RocksDbWeight::get().reads(6 as Weight))347 .saturating_add(RocksDbWeight::get().writes(5 as Weight))348 }349 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)350 // Storage: Common CollectionProperties (r:1 w:0)351 // Storage: Common CollectionById (r:1 w:0)352 // Storage: Nonfungible TokenData (r:1 w:1)353 // Storage: Nonfungible TokenChildren (r:1 w:0)354 // Storage: Nonfungible TokensBurnt (r:1 w:1)355 // Storage: Nonfungible AccountBalance (r:1 w:1)356 // Storage: Nonfungible Allowance (r:1 w:0)357 // Storage: Nonfungible Owned (r:0 w:1)358 // Storage: Nonfungible TokenProperties (r:0 w:1)359 fn burn_nft(b: u32, ) -> Weight {360 (0 as Weight)361 // Standard Error: 1_023_000362 .saturating_add((318_424_000 as Weight).saturating_mul(b as Weight))363 .saturating_add(RocksDbWeight::get().reads(9 as Weight))364 .saturating_add(RocksDbWeight::get().reads((4 as Weight).saturating_mul(b as Weight)))365 .saturating_add(RocksDbWeight::get().writes(6 as Weight))366 .saturating_add(RocksDbWeight::get().writes((4 as Weight).saturating_mul(b as Weight)))367 }368 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)369 // Storage: Common CollectionProperties (r:1 w:0)370 // Storage: Common CollectionById (r:1 w:0)371 // Storage: Nonfungible TokenData (r:5 w:1)372 // Storage: Nonfungible TokenProperties (r:1 w:0)373 // Storage: Nonfungible AccountBalance (r:2 w:2)374 // Storage: Nonfungible Allowance (r:1 w:0)375 // Storage: Nonfungible TokenChildren (r:0 w:1)376 // Storage: Nonfungible Owned (r:0 w:2)377 fn send() -> Weight {378 (71_055_000 as Weight)379 .saturating_add(RocksDbWeight::get().reads(12 as Weight))380 .saturating_add(RocksDbWeight::get().writes(6 as Weight))381 }382 // Storage: RmrkCore UniqueCollectionId (r:2 w:0)383 // Storage: Common CollectionProperties (r:1 w:0)384 // Storage: Common CollectionById (r:2 w:0)385 // Storage: Nonfungible TokenData (r:6 w:1)386 // Storage: Nonfungible AccountBalance (r:2 w:2)387 // Storage: Nonfungible Allowance (r:1 w:0)388 // Storage: Nonfungible TokenProperties (r:1 w:1)389 // Storage: Nonfungible TokenChildren (r:0 w:1)390 // Storage: Nonfungible Owned (r:0 w:2)391 fn accept_nft() -> Weight {392 (79_098_000 as Weight)393 .saturating_add(RocksDbWeight::get().reads(15 as Weight))394 .saturating_add(RocksDbWeight::get().writes(7 as Weight))395 }396 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)397 // Storage: Common CollectionProperties (r:1 w:0)398 // Storage: Common CollectionById (r:1 w:0)399 // Storage: Nonfungible TokenProperties (r:1 w:5)400 // Storage: Nonfungible TokenData (r:5 w:5)401 // Storage: Nonfungible TokenChildren (r:9 w:4)402 // Storage: Nonfungible TokensBurnt (r:1 w:1)403 // Storage: Nonfungible AccountBalance (r:5 w:5)404 // Storage: Nonfungible Allowance (r:5 w:0)405 // Storage: Nonfungible Owned (r:0 w:5)406 fn reject_nft() -> Weight {407 (237_777_000 as Weight)408 .saturating_add(RocksDbWeight::get().reads(29 as Weight))409 .saturating_add(RocksDbWeight::get().writes(25 as Weight))410 }411 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)412 // Storage: Common CollectionProperties (r:1 w:0)413 // Storage: Common CollectionById (r:1 w:0)414 // Storage: Nonfungible TokenProperties (r:1 w:1)415 // Storage: Nonfungible TokenData (r:5 w:0)416 fn set_property() -> Weight {417 (47_359_000 as Weight)418 .saturating_add(RocksDbWeight::get().reads(9 as Weight))419 .saturating_add(RocksDbWeight::get().writes(1 as Weight))420 }421 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)422 // Storage: Common CollectionProperties (r:1 w:0)423 // Storage: Common CollectionById (r:1 w:0)424 // Storage: Nonfungible TokenProperties (r:1 w:1)425 // Storage: Nonfungible TokenData (r:5 w:0)426 fn set_priority() -> Weight {427 (46_537_000 as Weight)428 .saturating_add(RocksDbWeight::get().reads(9 as Weight))429 .saturating_add(RocksDbWeight::get().writes(1 as Weight))430 }431 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)432 // Storage: Common CollectionProperties (r:1 w:1)433 // Storage: Common CollectionById (r:1 w:1)434 // Storage: Nonfungible TokenData (r:5 w:1)435 // Storage: Nonfungible TokenProperties (r:2 w:2)436 // Storage: Common CreatedCollectionCount (r:1 w:1)437 // Storage: Common DestroyedCollectionCount (r:1 w:0)438 // Storage: System Account (r:2 w:2)439 // Storage: Nonfungible TokensMinted (r:1 w:1)440 // Storage: Nonfungible AccountBalance (r:1 w:1)441 // Storage: Nonfungible Owned (r:0 w:1)442 // Storage: Common CollectionPropertyPermissions (r:0 w:1)443 fn add_basic_resource() -> Weight {444 (100_939_000 as Weight)445 .saturating_add(RocksDbWeight::get().reads(16 as Weight))446 .saturating_add(RocksDbWeight::get().writes(12 as Weight))447 }448 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)449 // Storage: Common CollectionProperties (r:1 w:1)450 // Storage: Common CollectionById (r:1 w:1)451 // Storage: Nonfungible TokenData (r:5 w:1)452 // Storage: Nonfungible TokenProperties (r:2 w:2)453 // Storage: Common CreatedCollectionCount (r:1 w:1)454 // Storage: Common DestroyedCollectionCount (r:1 w:0)455 // Storage: System Account (r:2 w:2)456 // Storage: Nonfungible TokensMinted (r:1 w:1)457 // Storage: Nonfungible AccountBalance (r:1 w:1)458 // Storage: Nonfungible Owned (r:0 w:1)459 // Storage: Common CollectionPropertyPermissions (r:0 w:1)460 fn add_composable_resource() -> Weight {461 (101_821_000 as Weight)462 .saturating_add(RocksDbWeight::get().reads(16 as Weight))463 .saturating_add(RocksDbWeight::get().writes(12 as Weight))464 }465 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)466 // Storage: Common CollectionProperties (r:1 w:1)467 // Storage: Common CollectionById (r:1 w:1)468 // Storage: Nonfungible TokenData (r:5 w:1)469 // Storage: Nonfungible TokenProperties (r:2 w:2)470 // Storage: Common CreatedCollectionCount (r:1 w:1)471 // Storage: Common DestroyedCollectionCount (r:1 w:0)472 // Storage: System Account (r:2 w:2)473 // Storage: Nonfungible TokensMinted (r:1 w:1)474 // Storage: Nonfungible AccountBalance (r:1 w:1)475 // Storage: Nonfungible Owned (r:0 w:1)476 // Storage: Common CollectionPropertyPermissions (r:0 w:1)477 fn add_slot_resource() -> Weight {478 (100_880_000 as Weight)479 .saturating_add(RocksDbWeight::get().reads(16 as Weight))480 .saturating_add(RocksDbWeight::get().writes(12 as Weight))481 }482 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)483 // Storage: Common CollectionProperties (r:2 w:0)484 // Storage: Common CollectionById (r:2 w:0)485 // Storage: Nonfungible TokenProperties (r:1 w:1)486 // Storage: Nonfungible TokenData (r:6 w:1)487 // Storage: Nonfungible TokenChildren (r:1 w:0)488 // Storage: Nonfungible TokensBurnt (r:1 w:1)489 // Storage: Nonfungible AccountBalance (r:1 w:1)490 // Storage: Nonfungible Allowance (r:1 w:0)491 // Storage: Nonfungible Owned (r:0 w:1)492 fn remove_resource() -> Weight {493 (79_831_000 as Weight)494 .saturating_add(RocksDbWeight::get().reads(16 as Weight))495 .saturating_add(RocksDbWeight::get().writes(5 as Weight))496 }497 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)498 // Storage: Common CollectionProperties (r:1 w:0)499 // Storage: Common CollectionById (r:1 w:0)500 // Storage: Nonfungible TokenData (r:5 w:0)501 // Storage: Nonfungible TokenProperties (r:2 w:1)502 fn accept_resource() -> Weight {503 (54_573_000 as Weight)504 .saturating_add(RocksDbWeight::get().reads(10 as Weight))505 .saturating_add(RocksDbWeight::get().writes(1 as Weight))506 }507 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)508 // Storage: Common CollectionProperties (r:2 w:0)509 // Storage: Common CollectionById (r:2 w:0)510 // Storage: Nonfungible TokenData (r:6 w:1)511 // Storage: Nonfungible TokenProperties (r:2 w:1)512 // Storage: Nonfungible TokenChildren (r:1 w:0)513 // Storage: Nonfungible TokensBurnt (r:1 w:1)514 // Storage: Nonfungible AccountBalance (r:1 w:1)515 // Storage: Nonfungible Allowance (r:1 w:0)516 // Storage: Nonfungible Owned (r:0 w:1)517 fn accept_resource_removal() -> Weight {518 (83_426_000 as Weight)519 .saturating_add(RocksDbWeight::get().reads(17 as Weight))520 .saturating_add(RocksDbWeight::get().writes(5 as Weight))521 }522}