difftreelog
feat(rmrk) benchmark reject_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
@@ -104,6 +104,10 @@
}
}
+ fn current_nft_id(&self) -> RmrkNftId {
+ self.current_nft_id
+ }
+
fn build<T: Config>(&mut self, owner: &T::AccountId) -> Result<RmrkNftId, DispatchError> {
create_max_nft::<T>(owner, self.collection_id)?;
self.current_nft_id += 1;
@@ -115,10 +119,11 @@
&mut self,
owner: &T::AccountId,
height: u32,
- ) -> Result<RmrkNftId, DispatchError> {
+ ) -> Result<(RmrkNftId, RmrkNftId), DispatchError> {
self.build::<T>(owner)?;
- let mut prev_nft_id = self.current_nft_id;
+ let root_nft_id = self.current_nft_id;
+ let mut prev_nft_id = root_nft_id;
for _ in 0..height {
self.build::<T>(owner)?;
@@ -141,7 +146,7 @@
let deepest_nft_id = self.current_nft_id;
- Ok(deepest_nft_id)
+ Ok((root_nft_id, deepest_nft_id))
}
}
@@ -207,7 +212,7 @@
let mut nft_builder = NftBuilder::new(collection_id);
let src_nft_id = nft_builder.build::<T>(&caller)?;
- let target_nft_id = nft_builder.build_tower::<T>(&caller, NESTING_BUDGET - 2)?;
+ let (_, target_nft_id) = nft_builder.build_tower::<T>(&caller, NESTING_BUDGET - 2)?;
}: _(
RawOrigin::Signed(caller),
collection_id,
@@ -230,7 +235,7 @@
let mut target_nft_builder = NftBuilder::new(target_collection_id);
let fake_target_nft_id = target_nft_builder.build::<T>(&caller)?;
- let target_nft_id = target_nft_builder.build_tower::<T>(&caller, NESTING_BUDGET - 1)?;
+ let (_, target_nft_id) = target_nft_builder.build_tower::<T>(&caller, NESTING_BUDGET - 1)?;
let new_owner = <RmrkAccountIdOrCollectionNftTuple<T::AccountId>>::CollectionAndNftTuple(
target_collection_id,
@@ -255,13 +260,46 @@
actual_new_owner
)
+ reject_nft {
+ let caller: T::AccountId = account("caller", 0, SEED);
+ let sender: T::AccountId = account("sender", 0, SEED);
+
+ create_max_collection::<T>(&sender)?;
+ let src_collection_id = 0;
+
+ create_max_collection::<T>(&caller)?;
+ let target_collection_id = 1;
+
+ let mut src_nft_builder = NftBuilder::new(src_collection_id);
+ let (src_root_nft_id, _) = src_nft_builder.build_tower::<T>(&sender, NESTING_BUDGET - 1)?;
+
+ let mut target_nft_builder = NftBuilder::new(target_collection_id);
+ let target_nft_id = target_nft_builder.build::<T>(&caller)?;
+
+ let new_owner = <RmrkAccountIdOrCollectionNftTuple<T::AccountId>>::CollectionAndNftTuple(
+ target_collection_id,
+ target_nft_id
+ );
+
+ <Pallet<T>>::send(
+ RawOrigin::Signed(sender.clone()).into(),
+ src_collection_id,
+ src_root_nft_id,
+ new_owner,
+ )?;
+ }: _(
+ RawOrigin::Signed(caller),
+ src_collection_id,
+ src_root_nft_id
+ )
+
set_property {
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 nft_id = nft_builder.build_tower::<T>(&caller, NESTING_BUDGET - 1)?;
+ let (_, nft_id) = nft_builder.build_tower::<T>(&caller, NESTING_BUDGET - 1)?;
let key = create_data();
let value = create_data();
@@ -279,7 +317,7 @@
let collection_id = 0;
let mut nft_builder = NftBuilder::new(collection_id);
- let nft_id = nft_builder.build_tower::<T>(&caller, NESTING_BUDGET - 1)?;
+ let (_, nft_id) = nft_builder.build_tower::<T>(&caller, NESTING_BUDGET - 1)?;
let priorities = create_u32_array();
}: _(
RawOrigin::Signed(caller),
@@ -296,7 +334,7 @@
let collection_id = 0;
let mut nft_builder = NftBuilder::new(collection_id);
- let nft_id = nft_builder.build_tower::<T>(&caller, NESTING_BUDGET - 1)?;
+ let (_, nft_id) = nft_builder.build_tower::<T>(&caller, NESTING_BUDGET - 1)?;
let resource = create_basic_resource();
}: _(
RawOrigin::Signed(caller),
@@ -313,7 +351,7 @@
let collection_id = 0;
let mut nft_builder = NftBuilder::new(collection_id);
- let nft_id = nft_builder.build_tower::<T>(&caller, NESTING_BUDGET - 1)?;
+ let (_, nft_id) = nft_builder.build_tower::<T>(&caller, NESTING_BUDGET - 1)?;
let resource = create_composable_resource();
}: _(
RawOrigin::Signed(caller),
@@ -330,7 +368,7 @@
let collection_id = 0;
let mut nft_builder = NftBuilder::new(collection_id);
- let nft_id = nft_builder.build_tower::<T>(&caller, NESTING_BUDGET - 1)?;
+ let (_, nft_id) = nft_builder.build_tower::<T>(&caller, NESTING_BUDGET - 1)?;
let resource = create_slot_resource();
}: _(
RawOrigin::Signed(caller),
@@ -347,7 +385,7 @@
let collection_id = 0;
let mut nft_builder = NftBuilder::new(collection_id);
- let nft_id = nft_builder.build_tower::<T>(&caller, NESTING_BUDGET - 1)?;
+ let (_, nft_id) = nft_builder.build_tower::<T>(&caller, NESTING_BUDGET - 1)?;
let resource = create_basic_resource();
<Pallet<T>>::add_basic_resource(
@@ -376,7 +414,7 @@
let mut nft_builder = NftBuilder::new(collection_id);
let root_nft_id = 1;
- let nested_nft_id = nft_builder.build_tower::<T>(&admin, NESTING_BUDGET - 1)?;
+ let (_, nested_nft_id) = nft_builder.build_tower::<T>(&admin, NESTING_BUDGET - 1)?;
let resource = create_basic_resource();
let new_owner = <RmrkAccountIdOrCollectionNftTuple<T::AccountId>>::AccountId(caller.clone());
@@ -414,7 +452,7 @@
let mut nft_builder = NftBuilder::new(collection_id);
let root_nft_id = 1;
- let nested_nft_id = nft_builder.build_tower::<T>(&admin, NESTING_BUDGET - 1)?;
+ let (_, nested_nft_id) = nft_builder.build_tower::<T>(&admin, NESTING_BUDGET - 1)?;
let resource = create_basic_resource();
<Pallet<T>>::add_basic_resource(
pallets/proxy-rmrk-core/src/lib.rsdiffbeforeafterboth--- a/pallets/proxy-rmrk-core/src/lib.rs
+++ b/pallets/proxy-rmrk-core/src/lib.rs
@@ -628,8 +628,8 @@
/// - `origin`: sender of the transaction
/// - `rmrk_collection_id`: collection id of the nft to be accepted
/// - `rmrk_nft_id`: nft id of the nft to be accepted
- #[pallet::weight(10_000 + T::DbWeight::get().reads_writes(1,1))]
#[transactional]
+ #[pallet::weight(<SelfWeightOf<T>>::reject_nft())]
pub fn reject_nft(
origin: OriginFor<T>,
rmrk_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 set_property() -> Weight;44 fn set_priority() -> Weight;45 fn add_basic_resource() -> Weight;46 fn add_composable_resource() -> Weight;47 fn add_slot_resource() -> Weight;48 fn remove_resource() -> Weight;49 fn accept_resource() -> Weight;50 fn accept_resource_removal() -> Weight;51}5253/// Weights for pallet_proxy_rmrk_core using the Substrate node and recommended hardware.54pub struct SubstrateWeight<T>(PhantomData<T>);55impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {56 // Storage: Common CreatedCollectionCount (r:1 w:1)57 // Storage: Common DestroyedCollectionCount (r:1 w:0)58 // Storage: System Account (r:2 w:2)59 // Storage: RmrkCore CollectionIndex (r:1 w:1)60 // Storage: Common CollectionPropertyPermissions (r:0 w:1)61 // Storage: Common CollectionProperties (r:0 w:1)62 // Storage: Common CollectionById (r:0 w:1)63 // Storage: RmrkCore UniqueCollectionId (r:0 w:1)64 // Storage: RmrkCore RmrkInernalCollectionId (r:0 w:1)65 fn create_collection() -> Weight {66 (40_146_000 as Weight)67 .saturating_add(T::DbWeight::get().reads(5 as Weight))68 .saturating_add(T::DbWeight::get().writes(9 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 (44_905_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_502_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_705_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_727_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 (73_288_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 (81_985_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:1)146 // Storage: Nonfungible TokenData (r:5 w:0)147 fn set_property() -> Weight {148 (50_535_000 as Weight)149 .saturating_add(T::DbWeight::get().reads(9 as Weight))150 .saturating_add(T::DbWeight::get().writes(1 as Weight))151 }152 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)153 // Storage: Common CollectionProperties (r:1 w:0)154 // Storage: Common CollectionById (r:1 w:0)155 // Storage: Nonfungible TokenProperties (r:1 w:1)156 // Storage: Nonfungible TokenData (r:5 w:0)157 fn set_priority() -> Weight {158 (49_443_000 as Weight)159 .saturating_add(T::DbWeight::get().reads(9 as Weight))160 .saturating_add(T::DbWeight::get().writes(1 as Weight))161 }162 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)163 // Storage: Common CollectionProperties (r:1 w:1)164 // Storage: Common CollectionById (r:1 w:1)165 // Storage: Nonfungible TokenData (r:5 w:1)166 // Storage: Nonfungible TokenProperties (r:2 w:2)167 // Storage: Common CreatedCollectionCount (r:1 w:1)168 // Storage: Common DestroyedCollectionCount (r:1 w:0)169 // Storage: System Account (r:2 w:2)170 // Storage: Nonfungible TokensMinted (r:1 w:1)171 // Storage: Nonfungible AccountBalance (r:1 w:1)172 // Storage: Nonfungible Owned (r:0 w:1)173 // Storage: Common CollectionPropertyPermissions (r:0 w:1)174 fn add_basic_resource() -> Weight {175 (104_226_000 as Weight)176 .saturating_add(T::DbWeight::get().reads(16 as Weight))177 .saturating_add(T::DbWeight::get().writes(12 as Weight))178 }179 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)180 // Storage: Common CollectionProperties (r:1 w:1)181 // Storage: Common CollectionById (r:1 w:1)182 // Storage: Nonfungible TokenData (r:5 w:1)183 // Storage: Nonfungible TokenProperties (r:2 w:2)184 // Storage: Common CreatedCollectionCount (r:1 w:1)185 // Storage: Common DestroyedCollectionCount (r:1 w:0)186 // Storage: System Account (r:2 w:2)187 // Storage: Nonfungible TokensMinted (r:1 w:1)188 // Storage: Nonfungible AccountBalance (r:1 w:1)189 // Storage: Nonfungible Owned (r:0 w:1)190 // Storage: Common CollectionPropertyPermissions (r:0 w:1)191 fn add_composable_resource() -> Weight {192 (105_197_000 as Weight)193 .saturating_add(T::DbWeight::get().reads(16 as Weight))194 .saturating_add(T::DbWeight::get().writes(12 as Weight))195 }196 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)197 // Storage: Common CollectionProperties (r:1 w:1)198 // Storage: Common CollectionById (r:1 w:1)199 // Storage: Nonfungible TokenData (r:5 w:1)200 // Storage: Nonfungible TokenProperties (r:2 w:2)201 // Storage: Common CreatedCollectionCount (r:1 w:1)202 // Storage: Common DestroyedCollectionCount (r:1 w:0)203 // Storage: System Account (r:2 w:2)204 // Storage: Nonfungible TokensMinted (r:1 w:1)205 // Storage: Nonfungible AccountBalance (r:1 w:1)206 // Storage: Nonfungible Owned (r:0 w:1)207 // Storage: Common CollectionPropertyPermissions (r:0 w:1)208 fn add_slot_resource() -> Weight {209 (105_899_000 as Weight)210 .saturating_add(T::DbWeight::get().reads(16 as Weight))211 .saturating_add(T::DbWeight::get().writes(12 as Weight))212 }213 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)214 // Storage: Common CollectionProperties (r:2 w:0)215 // Storage: Common CollectionById (r:2 w:0)216 // Storage: Nonfungible TokenProperties (r:1 w:1)217 // Storage: Nonfungible TokenData (r:6 w:1)218 // Storage: Nonfungible TokenChildren (r:1 w:0)219 // Storage: Nonfungible TokensBurnt (r:1 w:1)220 // Storage: Nonfungible AccountBalance (r:1 w:1)221 // Storage: Nonfungible Allowance (r:1 w:0)222 // Storage: Nonfungible Owned (r:0 w:1)223 fn remove_resource() -> Weight {224 (82_997_000 as Weight)225 .saturating_add(T::DbWeight::get().reads(16 as Weight))226 .saturating_add(T::DbWeight::get().writes(5 as Weight))227 }228 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)229 // Storage: Common CollectionProperties (r:1 w:0)230 // Storage: Common CollectionById (r:1 w:0)231 // Storage: Nonfungible TokenData (r:5 w:0)232 // Storage: Nonfungible TokenProperties (r:2 w:1)233 fn accept_resource() -> Weight {234 (56_848_000 as Weight)235 .saturating_add(T::DbWeight::get().reads(10 as Weight))236 .saturating_add(T::DbWeight::get().writes(1 as Weight))237 }238 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)239 // Storage: Common CollectionProperties (r:2 w:0)240 // Storage: Common CollectionById (r:2 w:0)241 // Storage: Nonfungible TokenData (r:6 w:1)242 // Storage: Nonfungible TokenProperties (r:2 w:1)243 // Storage: Nonfungible TokenChildren (r:1 w:0)244 // Storage: Nonfungible TokensBurnt (r:1 w:1)245 // Storage: Nonfungible AccountBalance (r:1 w:1)246 // Storage: Nonfungible Allowance (r:1 w:0)247 // Storage: Nonfungible Owned (r:0 w:1)248 fn accept_resource_removal() -> Weight {249 (86_303_000 as Weight)250 .saturating_add(T::DbWeight::get().reads(17 as Weight))251 .saturating_add(T::DbWeight::get().writes(5 as Weight))252 }253}254255// For backwards compatibility and tests256impl WeightInfo for () {257 // Storage: Common CreatedCollectionCount (r:1 w:1)258 // Storage: Common DestroyedCollectionCount (r:1 w:0)259 // Storage: System Account (r:2 w:2)260 // Storage: RmrkCore CollectionIndex (r:1 w:1)261 // Storage: Common CollectionPropertyPermissions (r:0 w:1)262 // Storage: Common CollectionProperties (r:0 w:1)263 // Storage: Common CollectionById (r:0 w:1)264 // Storage: RmrkCore UniqueCollectionId (r:0 w:1)265 // Storage: RmrkCore RmrkInernalCollectionId (r:0 w:1)266 fn create_collection() -> Weight {267 (40_146_000 as Weight)268 .saturating_add(RocksDbWeight::get().reads(5 as Weight))269 .saturating_add(RocksDbWeight::get().writes(9 as Weight))270 }271 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)272 // Storage: Common CollectionProperties (r:1 w:1)273 // Storage: Common CollectionById (r:1 w:1)274 // Storage: Nonfungible TokenData (r:1 w:0)275 // Storage: Common DestroyedCollectionCount (r:1 w:1)276 // Storage: Nonfungible TokensMinted (r:0 w:1)277 // Storage: Nonfungible TokensBurnt (r:0 w:1)278 // Storage: Common AdminAmount (r:0 w:1)279 fn destroy_collection() -> Weight {280 (44_905_000 as Weight)281 .saturating_add(RocksDbWeight::get().reads(5 as Weight))282 .saturating_add(RocksDbWeight::get().writes(6 as Weight))283 }284 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)285 // Storage: Common CollectionById (r:1 w:1)286 // Storage: Common CollectionProperties (r:1 w:0)287 fn change_collection_issuer() -> Weight {288 (22_502_000 as Weight)289 .saturating_add(RocksDbWeight::get().reads(3 as Weight))290 .saturating_add(RocksDbWeight::get().writes(1 as Weight))291 }292 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)293 // Storage: Common CollectionProperties (r:1 w:0)294 // Storage: Common CollectionById (r:1 w:1)295 // Storage: Nonfungible TokensMinted (r:1 w:0)296 // Storage: Nonfungible TokensBurnt (r:1 w:0)297 fn lock_collection() -> Weight {298 (23_705_000 as Weight)299 .saturating_add(RocksDbWeight::get().reads(5 as Weight))300 .saturating_add(RocksDbWeight::get().writes(1 as Weight))301 }302 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)303 // Storage: Common CollectionProperties (r:1 w:0)304 // Storage: Common CollectionById (r:1 w:0)305 // Storage: Nonfungible TokensMinted (r:1 w:1)306 // Storage: Nonfungible AccountBalance (r:1 w:1)307 // Storage: Nonfungible TokenProperties (r:1 w:1)308 // Storage: Nonfungible TokenData (r:0 w:1)309 // Storage: Nonfungible Owned (r:0 w:1)310 fn mint_nft() -> Weight {311 (40_727_000 as Weight)312 .saturating_add(RocksDbWeight::get().reads(6 as Weight))313 .saturating_add(RocksDbWeight::get().writes(5 as Weight))314 }315 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)316 // Storage: Common CollectionProperties (r:1 w:0)317 // Storage: Common CollectionById (r:1 w:0)318 // Storage: Nonfungible TokenData (r:5 w:1)319 // Storage: Nonfungible TokenProperties (r:1 w:0)320 // Storage: Nonfungible AccountBalance (r:2 w:2)321 // Storage: Nonfungible Allowance (r:1 w:0)322 // Storage: Nonfungible TokenChildren (r:0 w:1)323 // Storage: Nonfungible Owned (r:0 w:2)324 fn send() -> Weight {325 (73_288_000 as Weight)326 .saturating_add(RocksDbWeight::get().reads(12 as Weight))327 .saturating_add(RocksDbWeight::get().writes(6 as Weight))328 }329 // Storage: RmrkCore UniqueCollectionId (r:2 w:0)330 // Storage: Common CollectionProperties (r:1 w:0)331 // Storage: Common CollectionById (r:2 w:0)332 // Storage: Nonfungible TokenData (r:6 w:1)333 // Storage: Nonfungible AccountBalance (r:2 w:2)334 // Storage: Nonfungible Allowance (r:1 w:0)335 // Storage: Nonfungible TokenProperties (r:1 w:1)336 // Storage: Nonfungible TokenChildren (r:0 w:1)337 // Storage: Nonfungible Owned (r:0 w:2)338 fn accept_nft() -> Weight {339 (81_985_000 as Weight)340 .saturating_add(RocksDbWeight::get().reads(15 as Weight))341 .saturating_add(RocksDbWeight::get().writes(7 as Weight))342 }343 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)344 // Storage: Common CollectionProperties (r:1 w:0)345 // Storage: Common CollectionById (r:1 w:0)346 // Storage: Nonfungible TokenProperties (r:1 w:1)347 // Storage: Nonfungible TokenData (r:5 w:0)348 fn set_property() -> Weight {349 (50_535_000 as Weight)350 .saturating_add(RocksDbWeight::get().reads(9 as Weight))351 .saturating_add(RocksDbWeight::get().writes(1 as Weight))352 }353 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)354 // Storage: Common CollectionProperties (r:1 w:0)355 // Storage: Common CollectionById (r:1 w:0)356 // Storage: Nonfungible TokenProperties (r:1 w:1)357 // Storage: Nonfungible TokenData (r:5 w:0)358 fn set_priority() -> Weight {359 (49_443_000 as Weight)360 .saturating_add(RocksDbWeight::get().reads(9 as Weight))361 .saturating_add(RocksDbWeight::get().writes(1 as Weight))362 }363 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)364 // Storage: Common CollectionProperties (r:1 w:1)365 // Storage: Common CollectionById (r:1 w:1)366 // Storage: Nonfungible TokenData (r:5 w:1)367 // Storage: Nonfungible TokenProperties (r:2 w:2)368 // Storage: Common CreatedCollectionCount (r:1 w:1)369 // Storage: Common DestroyedCollectionCount (r:1 w:0)370 // Storage: System Account (r:2 w:2)371 // Storage: Nonfungible TokensMinted (r:1 w:1)372 // Storage: Nonfungible AccountBalance (r:1 w:1)373 // Storage: Nonfungible Owned (r:0 w:1)374 // Storage: Common CollectionPropertyPermissions (r:0 w:1)375 fn add_basic_resource() -> Weight {376 (104_226_000 as Weight)377 .saturating_add(RocksDbWeight::get().reads(16 as Weight))378 .saturating_add(RocksDbWeight::get().writes(12 as Weight))379 }380 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)381 // Storage: Common CollectionProperties (r:1 w:1)382 // Storage: Common CollectionById (r:1 w:1)383 // Storage: Nonfungible TokenData (r:5 w:1)384 // Storage: Nonfungible TokenProperties (r:2 w:2)385 // Storage: Common CreatedCollectionCount (r:1 w:1)386 // Storage: Common DestroyedCollectionCount (r:1 w:0)387 // Storage: System Account (r:2 w:2)388 // Storage: Nonfungible TokensMinted (r:1 w:1)389 // Storage: Nonfungible AccountBalance (r:1 w:1)390 // Storage: Nonfungible Owned (r:0 w:1)391 // Storage: Common CollectionPropertyPermissions (r:0 w:1)392 fn add_composable_resource() -> Weight {393 (105_197_000 as Weight)394 .saturating_add(RocksDbWeight::get().reads(16 as Weight))395 .saturating_add(RocksDbWeight::get().writes(12 as Weight))396 }397 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)398 // Storage: Common CollectionProperties (r:1 w:1)399 // Storage: Common CollectionById (r:1 w:1)400 // Storage: Nonfungible TokenData (r:5 w:1)401 // Storage: Nonfungible TokenProperties (r:2 w:2)402 // Storage: Common CreatedCollectionCount (r:1 w:1)403 // Storage: Common DestroyedCollectionCount (r:1 w:0)404 // Storage: System Account (r:2 w:2)405 // Storage: Nonfungible TokensMinted (r:1 w:1)406 // Storage: Nonfungible AccountBalance (r:1 w:1)407 // Storage: Nonfungible Owned (r:0 w:1)408 // Storage: Common CollectionPropertyPermissions (r:0 w:1)409 fn add_slot_resource() -> Weight {410 (105_899_000 as Weight)411 .saturating_add(RocksDbWeight::get().reads(16 as Weight))412 .saturating_add(RocksDbWeight::get().writes(12 as Weight))413 }414 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)415 // Storage: Common CollectionProperties (r:2 w:0)416 // Storage: Common CollectionById (r:2 w:0)417 // Storage: Nonfungible TokenProperties (r:1 w:1)418 // Storage: Nonfungible TokenData (r:6 w:1)419 // Storage: Nonfungible TokenChildren (r:1 w:0)420 // Storage: Nonfungible TokensBurnt (r:1 w:1)421 // Storage: Nonfungible AccountBalance (r:1 w:1)422 // Storage: Nonfungible Allowance (r:1 w:0)423 // Storage: Nonfungible Owned (r:0 w:1)424 fn remove_resource() -> Weight {425 (82_997_000 as Weight)426 .saturating_add(RocksDbWeight::get().reads(16 as Weight))427 .saturating_add(RocksDbWeight::get().writes(5 as Weight))428 }429 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)430 // Storage: Common CollectionProperties (r:1 w:0)431 // Storage: Common CollectionById (r:1 w:0)432 // Storage: Nonfungible TokenData (r:5 w:0)433 // Storage: Nonfungible TokenProperties (r:2 w:1)434 fn accept_resource() -> Weight {435 (56_848_000 as Weight)436 .saturating_add(RocksDbWeight::get().reads(10 as Weight))437 .saturating_add(RocksDbWeight::get().writes(1 as Weight))438 }439 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)440 // Storage: Common CollectionProperties (r:2 w:0)441 // Storage: Common CollectionById (r:2 w:0)442 // Storage: Nonfungible TokenData (r:6 w:1)443 // Storage: Nonfungible TokenProperties (r:2 w:1)444 // Storage: Nonfungible TokenChildren (r:1 w:0)445 // Storage: Nonfungible TokensBurnt (r:1 w:1)446 // Storage: Nonfungible AccountBalance (r:1 w:1)447 // Storage: Nonfungible Allowance (r:1 w:0)448 // Storage: Nonfungible Owned (r:0 w:1)449 fn accept_resource_removal() -> Weight {450 (86_303_000 as Weight)451 .saturating_add(RocksDbWeight::get().reads(17 as Weight))452 .saturating_add(RocksDbWeight::get().writes(5 as Weight))453 }454}