git.delta.rocks / unique-network / refs/commits / 00a765656f26

difftreelog

feat(rmrk) benchmark reject_nft

Daniel Shiposha2022-06-10parent: #66e7432.patch.diff
in: master

3 files changed

modifiedpallets/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(
modifiedpallets/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,
modifiedpallets/proxy-rmrk-core/src/weights.rsdiffbeforeafterboth
40 fn mint_nft() -> Weight;40 fn mint_nft() -> Weight;
41 fn send() -> Weight;41 fn send() -> Weight;
42 fn accept_nft() -> Weight;42 fn accept_nft() -> Weight;
43 fn reject_nft() -> Weight;
43 fn set_property() -> Weight;44 fn set_property() -> Weight;
44 fn set_priority() -> Weight;45 fn set_priority() -> Weight;
45 fn add_basic_resource() -> Weight;46 fn add_basic_resource() -> Weight;
61 // Storage: Common CollectionProperties (r:0 w:1)62 // Storage: Common CollectionProperties (r:0 w:1)
62 // Storage: Common CollectionById (r:0 w:1)63 // Storage: Common CollectionById (r:0 w:1)
63 // Storage: RmrkCore UniqueCollectionId (r:0 w:1)64 // Storage: RmrkCore UniqueCollectionId (r:0 w:1)
64 // Storage: RmrkCore RmrkInernalCollectionId (r:0 w:1)
65 fn create_collection() -> Weight {65 fn create_collection() -> Weight {
66 (40_146_000 as Weight)66 (40_456_000 as Weight)
67 .saturating_add(T::DbWeight::get().reads(5 as Weight))67 .saturating_add(T::DbWeight::get().reads(5 as Weight))
68 .saturating_add(T::DbWeight::get().writes(9 as Weight))68 .saturating_add(T::DbWeight::get().writes(8 as Weight))
69 }69 }
70 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)70 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)
71 // Storage: Common CollectionProperties (r:1 w:1)71 // Storage: Common CollectionProperties (r:1 w:1)
76 // Storage: Nonfungible TokensBurnt (r:0 w:1)76 // Storage: Nonfungible TokensBurnt (r:0 w:1)
77 // Storage: Common AdminAmount (r:0 w:1)77 // Storage: Common AdminAmount (r:0 w:1)
78 fn destroy_collection() -> Weight {78 fn destroy_collection() -> Weight {
79 (44_905_000 as Weight)79 (43_812_000 as Weight)
80 .saturating_add(T::DbWeight::get().reads(5 as Weight))80 .saturating_add(T::DbWeight::get().reads(5 as Weight))
81 .saturating_add(T::DbWeight::get().writes(6 as Weight))81 .saturating_add(T::DbWeight::get().writes(6 as Weight))
82 }82 }
83 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)83 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)
84 // Storage: Common CollectionById (r:1 w:1)84 // Storage: Common CollectionById (r:1 w:1)
85 // Storage: Common CollectionProperties (r:1 w:0)85 // Storage: Common CollectionProperties (r:1 w:0)
86 fn change_collection_issuer() -> Weight {86 fn change_collection_issuer() -> Weight {
87 (22_502_000 as Weight)87 (22_032_000 as Weight)
88 .saturating_add(T::DbWeight::get().reads(3 as Weight))88 .saturating_add(T::DbWeight::get().reads(3 as Weight))
89 .saturating_add(T::DbWeight::get().writes(1 as Weight))89 .saturating_add(T::DbWeight::get().writes(1 as Weight))
90 }90 }
94 // Storage: Nonfungible TokensMinted (r:1 w:0)94 // Storage: Nonfungible TokensMinted (r:1 w:0)
95 // Storage: Nonfungible TokensBurnt (r:1 w:0)95 // Storage: Nonfungible TokensBurnt (r:1 w:0)
96 fn lock_collection() -> Weight {96 fn lock_collection() -> Weight {
97 (23_705_000 as Weight)97 (23_314_000 as Weight)
98 .saturating_add(T::DbWeight::get().reads(5 as Weight))98 .saturating_add(T::DbWeight::get().reads(5 as Weight))
99 .saturating_add(T::DbWeight::get().writes(1 as Weight))99 .saturating_add(T::DbWeight::get().writes(1 as Weight))
100 }100 }
107 // Storage: Nonfungible TokenData (r:0 w:1)107 // Storage: Nonfungible TokenData (r:0 w:1)
108 // Storage: Nonfungible Owned (r:0 w:1)108 // Storage: Nonfungible Owned (r:0 w:1)
109 fn mint_nft() -> Weight {109 fn mint_nft() -> Weight {
110 (40_727_000 as Weight)110 (40_075_000 as Weight)
111 .saturating_add(T::DbWeight::get().reads(6 as Weight))111 .saturating_add(T::DbWeight::get().reads(6 as Weight))
112 .saturating_add(T::DbWeight::get().writes(5 as Weight))112 .saturating_add(T::DbWeight::get().writes(5 as Weight))
113 }113 }
121 // Storage: Nonfungible TokenChildren (r:0 w:1)121 // Storage: Nonfungible TokenChildren (r:0 w:1)
122 // Storage: Nonfungible Owned (r:0 w:2)122 // Storage: Nonfungible Owned (r:0 w:2)
123 fn send() -> Weight {123 fn send() -> Weight {
124 (73_288_000 as Weight)124 (71_474_000 as Weight)
125 .saturating_add(T::DbWeight::get().reads(12 as Weight))125 .saturating_add(T::DbWeight::get().reads(12 as Weight))
126 .saturating_add(T::DbWeight::get().writes(6 as Weight))126 .saturating_add(T::DbWeight::get().writes(6 as Weight))
127 }127 }
135 // Storage: Nonfungible TokenChildren (r:0 w:1)135 // Storage: Nonfungible TokenChildren (r:0 w:1)
136 // Storage: Nonfungible Owned (r:0 w:2)136 // Storage: Nonfungible Owned (r:0 w:2)
137 fn accept_nft() -> Weight {137 fn accept_nft() -> Weight {
138 (81_985_000 as Weight)138 (79_890_000 as Weight)
139 .saturating_add(T::DbWeight::get().reads(15 as Weight))139 .saturating_add(T::DbWeight::get().reads(15 as Weight))
140 .saturating_add(T::DbWeight::get().writes(7 as Weight))140 .saturating_add(T::DbWeight::get().writes(7 as Weight))
141 }141 }
142 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)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)
143 // Storage: Common CollectionProperties (r:1 w:0)158 // Storage: Common CollectionProperties (r:1 w:0)
144 // Storage: Common CollectionById (r:1 w:0)159 // Storage: Common CollectionById (r:1 w:0)
145 // Storage: Nonfungible TokenProperties (r:1 w:1)160 // Storage: Nonfungible TokenProperties (r:1 w:1)
146 // Storage: Nonfungible TokenData (r:5 w:0)161 // Storage: Nonfungible TokenData (r:5 w:0)
147 fn set_property() -> Weight {162 fn set_property() -> Weight {
148 (50_535_000 as Weight)163 (48_370_000 as Weight)
149 .saturating_add(T::DbWeight::get().reads(9 as Weight))164 .saturating_add(T::DbWeight::get().reads(9 as Weight))
150 .saturating_add(T::DbWeight::get().writes(1 as Weight))165 .saturating_add(T::DbWeight::get().writes(1 as Weight))
151 }166 }
155 // Storage: Nonfungible TokenProperties (r:1 w:1)170 // Storage: Nonfungible TokenProperties (r:1 w:1)
156 // Storage: Nonfungible TokenData (r:5 w:0)171 // Storage: Nonfungible TokenData (r:5 w:0)
157 fn set_priority() -> Weight {172 fn set_priority() -> Weight {
158 (49_443_000 as Weight)173 (47_128_000 as Weight)
159 .saturating_add(T::DbWeight::get().reads(9 as Weight))174 .saturating_add(T::DbWeight::get().reads(9 as Weight))
160 .saturating_add(T::DbWeight::get().writes(1 as Weight))175 .saturating_add(T::DbWeight::get().writes(1 as Weight))
161 }176 }
172 // Storage: Nonfungible Owned (r:0 w:1)187 // Storage: Nonfungible Owned (r:0 w:1)
173 // Storage: Common CollectionPropertyPermissions (r:0 w:1)188 // Storage: Common CollectionPropertyPermissions (r:0 w:1)
174 fn add_basic_resource() -> Weight {189 fn add_basic_resource() -> Weight {
175 (104_226_000 as Weight)190 (101_501_000 as Weight)
176 .saturating_add(T::DbWeight::get().reads(16 as Weight))191 .saturating_add(T::DbWeight::get().reads(16 as Weight))
177 .saturating_add(T::DbWeight::get().writes(12 as Weight))192 .saturating_add(T::DbWeight::get().writes(12 as Weight))
178 }193 }
189 // Storage: Nonfungible Owned (r:0 w:1)204 // Storage: Nonfungible Owned (r:0 w:1)
190 // Storage: Common CollectionPropertyPermissions (r:0 w:1)205 // Storage: Common CollectionPropertyPermissions (r:0 w:1)
191 fn add_composable_resource() -> Weight {206 fn add_composable_resource() -> Weight {
192 (105_197_000 as Weight)207 (103_004_000 as Weight)
193 .saturating_add(T::DbWeight::get().reads(16 as Weight))208 .saturating_add(T::DbWeight::get().reads(16 as Weight))
194 .saturating_add(T::DbWeight::get().writes(12 as Weight))209 .saturating_add(T::DbWeight::get().writes(12 as Weight))
195 }210 }
206 // Storage: Nonfungible Owned (r:0 w:1)221 // Storage: Nonfungible Owned (r:0 w:1)
207 // Storage: Common CollectionPropertyPermissions (r:0 w:1)222 // Storage: Common CollectionPropertyPermissions (r:0 w:1)
208 fn add_slot_resource() -> Weight {223 fn add_slot_resource() -> Weight {
209 (105_899_000 as Weight)224 (102_613_000 as Weight)
210 .saturating_add(T::DbWeight::get().reads(16 as Weight))225 .saturating_add(T::DbWeight::get().reads(16 as Weight))
211 .saturating_add(T::DbWeight::get().writes(12 as Weight))226 .saturating_add(T::DbWeight::get().writes(12 as Weight))
212 }227 }
221 // Storage: Nonfungible Allowance (r:1 w:0)236 // Storage: Nonfungible Allowance (r:1 w:0)
222 // Storage: Nonfungible Owned (r:0 w:1)237 // Storage: Nonfungible Owned (r:0 w:1)
223 fn remove_resource() -> Weight {238 fn remove_resource() -> Weight {
224 (82_997_000 as Weight)239 (82_084_000 as Weight)
225 .saturating_add(T::DbWeight::get().reads(16 as Weight))240 .saturating_add(T::DbWeight::get().reads(16 as Weight))
226 .saturating_add(T::DbWeight::get().writes(5 as Weight))241 .saturating_add(T::DbWeight::get().writes(5 as Weight))
227 }242 }
231 // Storage: Nonfungible TokenData (r:5 w:0)246 // Storage: Nonfungible TokenData (r:5 w:0)
232 // Storage: Nonfungible TokenProperties (r:2 w:1)247 // Storage: Nonfungible TokenProperties (r:2 w:1)
233 fn accept_resource() -> Weight {248 fn accept_resource() -> Weight {
234 (56_848_000 as Weight)249 (56_426_000 as Weight)
235 .saturating_add(T::DbWeight::get().reads(10 as Weight))250 .saturating_add(T::DbWeight::get().reads(10 as Weight))
236 .saturating_add(T::DbWeight::get().writes(1 as Weight))251 .saturating_add(T::DbWeight::get().writes(1 as Weight))
237 }252 }
246 // Storage: Nonfungible Allowance (r:1 w:0)261 // Storage: Nonfungible Allowance (r:1 w:0)
247 // Storage: Nonfungible Owned (r:0 w:1)262 // Storage: Nonfungible Owned (r:0 w:1)
248 fn accept_resource_removal() -> Weight {263 fn accept_resource_removal() -> Weight {
249 (86_303_000 as Weight)264 (85_631_000 as Weight)
250 .saturating_add(T::DbWeight::get().reads(17 as Weight))265 .saturating_add(T::DbWeight::get().reads(17 as Weight))
251 .saturating_add(T::DbWeight::get().writes(5 as Weight))266 .saturating_add(T::DbWeight::get().writes(5 as Weight))
252 }267 }
262 // Storage: Common CollectionProperties (r:0 w:1)277 // Storage: Common CollectionProperties (r:0 w:1)
263 // Storage: Common CollectionById (r:0 w:1)278 // Storage: Common CollectionById (r:0 w:1)
264 // Storage: RmrkCore UniqueCollectionId (r:0 w:1)279 // Storage: RmrkCore UniqueCollectionId (r:0 w:1)
265 // Storage: RmrkCore RmrkInernalCollectionId (r:0 w:1)
266 fn create_collection() -> Weight {280 fn create_collection() -> Weight {
267 (40_146_000 as Weight)281 (40_456_000 as Weight)
268 .saturating_add(RocksDbWeight::get().reads(5 as Weight))282 .saturating_add(RocksDbWeight::get().reads(5 as Weight))
269 .saturating_add(RocksDbWeight::get().writes(9 as Weight))283 .saturating_add(RocksDbWeight::get().writes(8 as Weight))
270 }284 }
271 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)285 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)
272 // Storage: Common CollectionProperties (r:1 w:1)286 // Storage: Common CollectionProperties (r:1 w:1)
277 // Storage: Nonfungible TokensBurnt (r:0 w:1)291 // Storage: Nonfungible TokensBurnt (r:0 w:1)
278 // Storage: Common AdminAmount (r:0 w:1)292 // Storage: Common AdminAmount (r:0 w:1)
279 fn destroy_collection() -> Weight {293 fn destroy_collection() -> Weight {
280 (44_905_000 as Weight)294 (43_812_000 as Weight)
281 .saturating_add(RocksDbWeight::get().reads(5 as Weight))295 .saturating_add(RocksDbWeight::get().reads(5 as Weight))
282 .saturating_add(RocksDbWeight::get().writes(6 as Weight))296 .saturating_add(RocksDbWeight::get().writes(6 as Weight))
283 }297 }
284 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)298 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)
285 // Storage: Common CollectionById (r:1 w:1)299 // Storage: Common CollectionById (r:1 w:1)
286 // Storage: Common CollectionProperties (r:1 w:0)300 // Storage: Common CollectionProperties (r:1 w:0)
287 fn change_collection_issuer() -> Weight {301 fn change_collection_issuer() -> Weight {
288 (22_502_000 as Weight)302 (22_032_000 as Weight)
289 .saturating_add(RocksDbWeight::get().reads(3 as Weight))303 .saturating_add(RocksDbWeight::get().reads(3 as Weight))
290 .saturating_add(RocksDbWeight::get().writes(1 as Weight))304 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
291 }305 }
295 // Storage: Nonfungible TokensMinted (r:1 w:0)309 // Storage: Nonfungible TokensMinted (r:1 w:0)
296 // Storage: Nonfungible TokensBurnt (r:1 w:0)310 // Storage: Nonfungible TokensBurnt (r:1 w:0)
297 fn lock_collection() -> Weight {311 fn lock_collection() -> Weight {
298 (23_705_000 as Weight)312 (23_314_000 as Weight)
299 .saturating_add(RocksDbWeight::get().reads(5 as Weight))313 .saturating_add(RocksDbWeight::get().reads(5 as Weight))
300 .saturating_add(RocksDbWeight::get().writes(1 as Weight))314 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
301 }315 }
308 // Storage: Nonfungible TokenData (r:0 w:1)322 // Storage: Nonfungible TokenData (r:0 w:1)
309 // Storage: Nonfungible Owned (r:0 w:1)323 // Storage: Nonfungible Owned (r:0 w:1)
310 fn mint_nft() -> Weight {324 fn mint_nft() -> Weight {
311 (40_727_000 as Weight)325 (40_075_000 as Weight)
312 .saturating_add(RocksDbWeight::get().reads(6 as Weight))326 .saturating_add(RocksDbWeight::get().reads(6 as Weight))
313 .saturating_add(RocksDbWeight::get().writes(5 as Weight))327 .saturating_add(RocksDbWeight::get().writes(5 as Weight))
314 }328 }
322 // Storage: Nonfungible TokenChildren (r:0 w:1)336 // Storage: Nonfungible TokenChildren (r:0 w:1)
323 // Storage: Nonfungible Owned (r:0 w:2)337 // Storage: Nonfungible Owned (r:0 w:2)
324 fn send() -> Weight {338 fn send() -> Weight {
325 (73_288_000 as Weight)339 (71_474_000 as Weight)
326 .saturating_add(RocksDbWeight::get().reads(12 as Weight))340 .saturating_add(RocksDbWeight::get().reads(12 as Weight))
327 .saturating_add(RocksDbWeight::get().writes(6 as Weight))341 .saturating_add(RocksDbWeight::get().writes(6 as Weight))
328 }342 }
336 // Storage: Nonfungible TokenChildren (r:0 w:1)350 // Storage: Nonfungible TokenChildren (r:0 w:1)
337 // Storage: Nonfungible Owned (r:0 w:2)351 // Storage: Nonfungible Owned (r:0 w:2)
338 fn accept_nft() -> Weight {352 fn accept_nft() -> Weight {
339 (81_985_000 as Weight)353 (79_890_000 as Weight)
340 .saturating_add(RocksDbWeight::get().reads(15 as Weight))354 .saturating_add(RocksDbWeight::get().reads(15 as Weight))
341 .saturating_add(RocksDbWeight::get().writes(7 as Weight))355 .saturating_add(RocksDbWeight::get().writes(7 as Weight))
342 }356 }
343 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)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)
344 // Storage: Common CollectionProperties (r:1 w:0)373 // Storage: Common CollectionProperties (r:1 w:0)
345 // Storage: Common CollectionById (r:1 w:0)374 // Storage: Common CollectionById (r:1 w:0)
346 // Storage: Nonfungible TokenProperties (r:1 w:1)375 // Storage: Nonfungible TokenProperties (r:1 w:1)
347 // Storage: Nonfungible TokenData (r:5 w:0)376 // Storage: Nonfungible TokenData (r:5 w:0)
348 fn set_property() -> Weight {377 fn set_property() -> Weight {
349 (50_535_000 as Weight)378 (48_370_000 as Weight)
350 .saturating_add(RocksDbWeight::get().reads(9 as Weight))379 .saturating_add(RocksDbWeight::get().reads(9 as Weight))
351 .saturating_add(RocksDbWeight::get().writes(1 as Weight))380 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
352 }381 }
356 // Storage: Nonfungible TokenProperties (r:1 w:1)385 // Storage: Nonfungible TokenProperties (r:1 w:1)
357 // Storage: Nonfungible TokenData (r:5 w:0)386 // Storage: Nonfungible TokenData (r:5 w:0)
358 fn set_priority() -> Weight {387 fn set_priority() -> Weight {
359 (49_443_000 as Weight)388 (47_128_000 as Weight)
360 .saturating_add(RocksDbWeight::get().reads(9 as Weight))389 .saturating_add(RocksDbWeight::get().reads(9 as Weight))
361 .saturating_add(RocksDbWeight::get().writes(1 as Weight))390 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
362 }391 }
373 // Storage: Nonfungible Owned (r:0 w:1)402 // Storage: Nonfungible Owned (r:0 w:1)
374 // Storage: Common CollectionPropertyPermissions (r:0 w:1)403 // Storage: Common CollectionPropertyPermissions (r:0 w:1)
375 fn add_basic_resource() -> Weight {404 fn add_basic_resource() -> Weight {
376 (104_226_000 as Weight)405 (101_501_000 as Weight)
377 .saturating_add(RocksDbWeight::get().reads(16 as Weight))406 .saturating_add(RocksDbWeight::get().reads(16 as Weight))
378 .saturating_add(RocksDbWeight::get().writes(12 as Weight))407 .saturating_add(RocksDbWeight::get().writes(12 as Weight))
379 }408 }
390 // Storage: Nonfungible Owned (r:0 w:1)419 // Storage: Nonfungible Owned (r:0 w:1)
391 // Storage: Common CollectionPropertyPermissions (r:0 w:1)420 // Storage: Common CollectionPropertyPermissions (r:0 w:1)
392 fn add_composable_resource() -> Weight {421 fn add_composable_resource() -> Weight {
393 (105_197_000 as Weight)422 (103_004_000 as Weight)
394 .saturating_add(RocksDbWeight::get().reads(16 as Weight))423 .saturating_add(RocksDbWeight::get().reads(16 as Weight))
395 .saturating_add(RocksDbWeight::get().writes(12 as Weight))424 .saturating_add(RocksDbWeight::get().writes(12 as Weight))
396 }425 }
407 // Storage: Nonfungible Owned (r:0 w:1)436 // Storage: Nonfungible Owned (r:0 w:1)
408 // Storage: Common CollectionPropertyPermissions (r:0 w:1)437 // Storage: Common CollectionPropertyPermissions (r:0 w:1)
409 fn add_slot_resource() -> Weight {438 fn add_slot_resource() -> Weight {
410 (105_899_000 as Weight)439 (102_613_000 as Weight)
411 .saturating_add(RocksDbWeight::get().reads(16 as Weight))440 .saturating_add(RocksDbWeight::get().reads(16 as Weight))
412 .saturating_add(RocksDbWeight::get().writes(12 as Weight))441 .saturating_add(RocksDbWeight::get().writes(12 as Weight))
413 }442 }
422 // Storage: Nonfungible Allowance (r:1 w:0)451 // Storage: Nonfungible Allowance (r:1 w:0)
423 // Storage: Nonfungible Owned (r:0 w:1)452 // Storage: Nonfungible Owned (r:0 w:1)
424 fn remove_resource() -> Weight {453 fn remove_resource() -> Weight {
425 (82_997_000 as Weight)454 (82_084_000 as Weight)
426 .saturating_add(RocksDbWeight::get().reads(16 as Weight))455 .saturating_add(RocksDbWeight::get().reads(16 as Weight))
427 .saturating_add(RocksDbWeight::get().writes(5 as Weight))456 .saturating_add(RocksDbWeight::get().writes(5 as Weight))
428 }457 }
432 // Storage: Nonfungible TokenData (r:5 w:0)461 // Storage: Nonfungible TokenData (r:5 w:0)
433 // Storage: Nonfungible TokenProperties (r:2 w:1)462 // Storage: Nonfungible TokenProperties (r:2 w:1)
434 fn accept_resource() -> Weight {463 fn accept_resource() -> Weight {
435 (56_848_000 as Weight)464 (56_426_000 as Weight)
436 .saturating_add(RocksDbWeight::get().reads(10 as Weight))465 .saturating_add(RocksDbWeight::get().reads(10 as Weight))
437 .saturating_add(RocksDbWeight::get().writes(1 as Weight))466 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
438 }467 }
447 // Storage: Nonfungible Allowance (r:1 w:0)476 // Storage: Nonfungible Allowance (r:1 w:0)
448 // Storage: Nonfungible Owned (r:0 w:1)477 // Storage: Nonfungible Owned (r:0 w:1)
449 fn accept_resource_removal() -> Weight {478 fn accept_resource_removal() -> Weight {
450 (86_303_000 as Weight)479 (85_631_000 as Weight)
451 .saturating_add(RocksDbWeight::get().reads(17 as Weight))480 .saturating_add(RocksDbWeight::get().reads(17 as Weight))
452 .saturating_add(RocksDbWeight::get().writes(5 as Weight))481 .saturating_add(RocksDbWeight::get().writes(5 as Weight))
453 }482 }