git.delta.rocks / unique-network / refs/commits / a8df50da8af4

difftreelog

fix rename sys property to aux property

Daniel Shiposha2022-06-17parent: #9fdcfd8.patch.diff
in: master

7 files changed

modifiedCargo.lockdiffbeforeafterboth
13001300
1301[[package]]1301[[package]]
1302name = "crossbeam-channel"1302name = "crossbeam-channel"
1303version = "0.5.4"1303version = "0.5.5"
1304source = "registry+https://github.com/rust-lang/crates.io-index"1304source = "registry+https://github.com/rust-lang/crates.io-index"
1305checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53"1305checksum = "4c02a4d71819009c192cf4872265391563fd6a84c81ff2c0f2a7026ca4c1d85c"
1306dependencies = [1306dependencies = [
1307 "cfg-if 1.0.0",1307 "cfg-if 1.0.0",
1308 "crossbeam-utils",1308 "crossbeam-utils",
13211321
1322[[package]]1322[[package]]
1323name = "crossbeam-epoch"1323name = "crossbeam-epoch"
1324version = "0.9.8"1324version = "0.9.9"
1325source = "registry+https://github.com/rust-lang/crates.io-index"1325source = "registry+https://github.com/rust-lang/crates.io-index"
1326checksum = "1145cf131a2c6ba0615079ab6a638f7e1973ac9c2634fcbeaaad6114246efe8c"1326checksum = "07db9d94cbd326813772c968ccd25999e5f8ae22f4f8d1b11effa37ef6ce281d"
1327dependencies = [1327dependencies = [
1328 "autocfg",1328 "autocfg",
1329 "cfg-if 1.0.0",1329 "cfg-if 1.0.0",
1330 "crossbeam-utils",1330 "crossbeam-utils",
1331 "lazy_static",
1332 "memoffset",1331 "memoffset",
1332 "once_cell",
1333 "scopeguard",1333 "scopeguard",
1334]1334]
13351335
13451345
1346[[package]]1346[[package]]
1347name = "crossbeam-utils"1347name = "crossbeam-utils"
1348version = "0.8.8"1348version = "0.8.9"
1349source = "registry+https://github.com/rust-lang/crates.io-index"1349source = "registry+https://github.com/rust-lang/crates.io-index"
1350checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38"1350checksum = "8ff1f980957787286a554052d03c7aee98d99cc32e09f6d45f0a814133c87978"
1351dependencies = [1351dependencies = [
1352 "cfg-if 1.0.0",1352 "cfg-if 1.0.0",
1353 "lazy_static",1353 "once_cell",
1354]1354]
13551355
1356[[package]]1356[[package]]
36623662
3663[[package]]3663[[package]]
3664name = "indexmap"3664name = "indexmap"
3665version = "1.8.2"3665version = "1.9.0"
3666source = "registry+https://github.com/rust-lang/crates.io-index"3666source = "registry+https://github.com/rust-lang/crates.io-index"
3667checksum = "e6012d540c5baa3589337a98ce73408de9b5a25ec9fc2c6fd6be8f0d39e0ca5a"3667checksum = "6c6392766afd7964e2531940894cffe4bd8d7d17dbc3c1c4857040fd4b33bdb3"
3668dependencies = [3668dependencies = [
3669 "autocfg",3669 "autocfg",
3670 "hashbrown 0.11.2",3670 "hashbrown 0.12.1",
3671 "serde",3671 "serde",
3672]3672]
36733673
11591source = "registry+https://github.com/rust-lang/crates.io-index"11591source = "registry+https://github.com/rust-lang/crates.io-index"
11592checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f"11592checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f"
11593dependencies = [11593dependencies = [
11594 "strum_macros 0.24.1",11594 "strum_macros 0.24.0",
11595]11595]
1159611596
11597[[package]]11597[[package]]
1160911609
11610[[package]]11610[[package]]
11611name = "strum_macros"11611name = "strum_macros"
11612version = "0.24.1"11612version = "0.24.0"
11613source = "registry+https://github.com/rust-lang/crates.io-index"11613source = "registry+https://github.com/rust-lang/crates.io-index"
11614checksum = "9550962e7cf70d9980392878dfaf1dcc3ece024f4cf3bf3c46b978d0bad61d6c"11614checksum = "6878079b17446e4d3eba6192bb0a2950d5b14f0ed8424b852310e5a94345d0ef"
11615dependencies = [11615dependencies = [
11616 "heck 0.4.0",11616 "heck 0.4.0",
11617 "proc-macro2",11617 "proc-macro2",
modifiedpallets/nonfungible/src/lib.rsdiffbeforeafterboth
28use up_data_structs::{28use up_data_structs::{
29 AccessMode, CollectionId, CustomDataLimit, TokenId, CreateCollectionData, CreateNftExData,29 AccessMode, CollectionId, CustomDataLimit, TokenId, CreateCollectionData, CreateNftExData,
30 mapping::TokenAddressMapping, budget::Budget, Property, PropertyPermission, PropertyKey,30 mapping::TokenAddressMapping, budget::Budget, Property, PropertyPermission, PropertyKey,
31 PropertyKeyPermission, Properties, PropertyScope, TrySetProperty, TokenChild, SysPropertyValue,31 PropertyKeyPermission, Properties, PropertyScope, TrySetProperty, TokenChild, AuxPropertyValue,
32};32};
33use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm};33use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm};
34use pallet_common::{34use pallet_common::{
125 >;125 >;
126126
127 #[pallet::storage]127 #[pallet::storage]
128 #[pallet::getter(fn token_sys_property)]128 #[pallet::getter(fn token_aux_property)]
129 pub type TokenSysProperties<T: Config> = StorageNMap<129 pub type TokenAuxProperties<T: Config> = StorageNMap<
130 Key = (130 Key = (
131 Key<Twox64Concat, CollectionId>,131 Key<Twox64Concat, CollectionId>,
132 Key<Twox64Concat, TokenId>,132 Key<Twox64Concat, TokenId>,
133 Key<Twox64Concat, PropertyScope>,133 Key<Twox64Concat, PropertyScope>,
134 Key<Twox64Concat, PropertyKey>,134 Key<Twox64Concat, PropertyKey>,
135 ),135 ),
136 Value = SysPropertyValue,136 Value = AuxPropertyValue,
137 QueryKind = OptionQuery,137 QueryKind = OptionQuery,
138 >;138 >;
139139
307 Ok(())307 Ok(())
308 }308 }
309309
310 pub fn try_mutate_token_sys_property<R, E>(310 pub fn try_mutate_token_aux_property<R, E>(
311 collection_id: CollectionId,311 collection_id: CollectionId,
312 token_id: TokenId,312 token_id: TokenId,
313 scope: PropertyScope,313 scope: PropertyScope,
314 key: PropertyKey,314 key: PropertyKey,
315 f: impl FnOnce(&mut Option<SysPropertyValue>) -> Result<R, E>,315 f: impl FnOnce(&mut Option<AuxPropertyValue>) -> Result<R, E>,
316 ) -> Result<R, E> {316 ) -> Result<R, E> {
317 <TokenSysProperties<T>>::try_mutate((collection_id, token_id, scope, key), f)317 <TokenAuxProperties<T>>::try_mutate((collection_id, token_id, scope, key), f)
318 }318 }
319319
320 pub fn remove_token_sys_property(320 pub fn remove_token_aux_property(
321 collection_id: CollectionId,321 collection_id: CollectionId,
322 token_id: TokenId,322 token_id: TokenId,
323 scope: PropertyScope,323 scope: PropertyScope,
324 key: PropertyKey,324 key: PropertyKey,
325 ) {325 ) {
326 <TokenSysProperties<T>>::remove((collection_id, token_id, scope, key));326 <TokenAuxProperties<T>>::remove((collection_id, token_id, scope, key));
327 }327 }
328328
329 pub fn iterate_token_sys_properties(329 pub fn iterate_token_aux_properties(
330 collection_id: CollectionId,330 collection_id: CollectionId,
331 token_id: TokenId,331 token_id: TokenId,
332 scope: PropertyScope,332 scope: PropertyScope,
333 ) -> impl Iterator<Item = (PropertyKey, SysPropertyValue)> {333 ) -> impl Iterator<Item = (PropertyKey, AuxPropertyValue)> {
334 <TokenSysProperties<T>>::iter_prefix((collection_id, token_id, scope))334 <TokenAuxProperties<T>>::iter_prefix((collection_id, token_id, scope))
335 }335 }
336336
337 pub fn current_token_id(collection_id: CollectionId) -> TokenId {337 pub fn current_token_id(collection_id: CollectionId) -> TokenId {
415 <TokensBurnt<T>>::insert(collection.id, burnt);415 <TokensBurnt<T>>::insert(collection.id, burnt);
416 <TokenData<T>>::remove((collection.id, token));416 <TokenData<T>>::remove((collection.id, token));
417 <TokenProperties<T>>::remove((collection.id, token));417 <TokenProperties<T>>::remove((collection.id, token));
418 <TokenSysProperties<T>>::remove_prefix((collection.id, token), None);418 <TokenAuxProperties<T>>::remove_prefix((collection.id, token), None);
419 let old_spender = <Allowance<T>>::take((collection.id, token));419 let old_spender = <Allowance<T>>::take((collection.id, token));
420420
421 if let Some(old_spender) = old_spender {421 if let Some(old_spender) = old_spender {
modifiedpallets/proxy-rmrk-core/src/lib.rsdiffbeforeafterboth
762762
763 let resource_id_key = Self::rmrk_property_key(ResourceId(resource_id))?;763 let resource_id_key = Self::rmrk_property_key(ResourceId(resource_id))?;
764764
765 let resource_info = <PalletNft<T>>::token_sys_property((765 let resource_info = <PalletNft<T>>::token_aux_property((
766 collection_id,766 collection_id,
767 nft_id,767 nft_id,
768 PropertyScope::Rmrk,768 PropertyScope::Rmrk,
777 <Error<T>>::ResourceNotPending777 <Error<T>>::ResourceNotPending
778 );778 );
779779
780 <PalletNft<T>>::remove_token_sys_property(780 <PalletNft<T>>::remove_token_aux_property(
781 collection_id,781 collection_id,
782 nft_id,782 nft_id,
783 PropertyScope::Rmrk,783 PropertyScope::Rmrk,
1194 pending_removal: false,1194 pending_removal: false,
1195 };1195 };
11961196
1197 <PalletNft<T>>::try_mutate_token_sys_property(1197 <PalletNft<T>>::try_mutate_token_aux_property(
1198 collection_id,1198 collection_id,
1199 nft_id,1199 nft_id,
1200 PropertyScope::Rmrk,1200 PropertyScope::Rmrk,
1223 let scope = PropertyScope::Rmrk;1223 let scope = PropertyScope::Rmrk;
12241224
1225 ensure!(1225 ensure!(
1226 <PalletNft<T>>::token_sys_property((1226 <PalletNft<T>>::token_aux_property((
1227 collection_id,1227 collection_id,
1228 nft_id,1228 nft_id,
1229 scope,1229 scope,
12391239
1240 let sender = T::CrossAccountId::from_sub(sender);1240 let sender = T::CrossAccountId::from_sub(sender);
1241 if topmost_owner == sender {1241 if topmost_owner == sender {
1242 <PalletNft<T>>::remove_token_sys_property(1242 <PalletNft<T>>::remove_token_aux_property(
1243 collection_id,1243 collection_id,
1244 nft_id,1244 nft_id,
1245 PropertyScope::Rmrk,1245 PropertyScope::Rmrk,
1262 resource_id: RmrkResourceId,1262 resource_id: RmrkResourceId,
1263 f: impl FnOnce(&mut RmrkResourceInfo) -> DispatchResult,1263 f: impl FnOnce(&mut RmrkResourceInfo) -> DispatchResult,
1264 ) -> DispatchResult {1264 ) -> DispatchResult {
1265 <PalletNft<T>>::try_mutate_token_sys_property(1265 <PalletNft<T>>::try_mutate_token_aux_property(
1266 collection_id,1266 collection_id,
1267 nft_id,1267 nft_id,
1268 PropertyScope::Rmrk,1268 PropertyScope::Rmrk,
modifiedpallets/proxy-rmrk-core/src/weights.rsdiffbeforeafterboth
3//! Autogenerated weights for pallet_proxy_rmrk_core3//! Autogenerated weights for pallet_proxy_rmrk_core
4//!4//!
5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev5//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
6//! DATE: 2022-06-16, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`6//! DATE: 2022-06-17, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
7//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 10247//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
88
9// Executed Command:9// Executed Command:
64 // Storage: Common CollectionById (r:0 w:1)64 // Storage: Common CollectionById (r:0 w:1)
65 // Storage: RmrkCore UniqueCollectionId (r:0 w:1)65 // Storage: RmrkCore UniqueCollectionId (r:0 w:1)
66 fn create_collection() -> Weight {66 fn create_collection() -> Weight {
67 (42_239_000 as Weight)67 (42_359_000 as Weight)
68 .saturating_add(T::DbWeight::get().reads(5 as Weight))68 .saturating_add(T::DbWeight::get().reads(5 as Weight))
69 .saturating_add(T::DbWeight::get().writes(8 as Weight))69 .saturating_add(T::DbWeight::get().writes(8 as Weight))
70 }70 }
77 // Storage: Nonfungible TokensBurnt (r:0 w:1)77 // Storage: Nonfungible TokensBurnt (r:0 w:1)
78 // Storage: Common AdminAmount (r:0 w:1)78 // Storage: Common AdminAmount (r:0 w:1)
79 fn destroy_collection() -> Weight {79 fn destroy_collection() -> Weight {
80 (44_684_000 as Weight)80 (45_375_000 as Weight)
81 .saturating_add(T::DbWeight::get().reads(5 as Weight))81 .saturating_add(T::DbWeight::get().reads(5 as Weight))
82 .saturating_add(T::DbWeight::get().writes(6 as Weight))82 .saturating_add(T::DbWeight::get().writes(6 as Weight))
83 }83 }
84 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)84 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)
85 // Storage: Common CollectionById (r:1 w:1)85 // Storage: Common CollectionById (r:1 w:1)
86 // Storage: Common CollectionProperties (r:1 w:0)86 // Storage: Common CollectionProperties (r:1 w:0)
87 fn change_collection_issuer() -> Weight {87 fn change_collection_issuer() -> Weight {
88 (22_513_000 as Weight)88 (22_753_000 as Weight)
89 .saturating_add(T::DbWeight::get().reads(3 as Weight))89 .saturating_add(T::DbWeight::get().reads(3 as Weight))
90 .saturating_add(T::DbWeight::get().writes(1 as Weight))90 .saturating_add(T::DbWeight::get().writes(1 as Weight))
91 }91 }
95 // Storage: Nonfungible TokensMinted (r:1 w:0)95 // Storage: Nonfungible TokensMinted (r:1 w:0)
96 // Storage: Nonfungible TokensBurnt (r:1 w:0)96 // Storage: Nonfungible TokensBurnt (r:1 w:0)
97 fn lock_collection() -> Weight {97 fn lock_collection() -> Weight {
98 (23_735_000 as Weight)98 (24_356_000 as Weight)
99 .saturating_add(T::DbWeight::get().reads(5 as Weight))99 .saturating_add(T::DbWeight::get().reads(5 as Weight))
100 .saturating_add(T::DbWeight::get().writes(1 as Weight))100 .saturating_add(T::DbWeight::get().writes(1 as Weight))
101 }101 }
107 // Storage: Nonfungible TokenProperties (r:1 w:1)107 // Storage: Nonfungible TokenProperties (r:1 w:1)
108 // Storage: Nonfungible TokenData (r:0 w:1)108 // Storage: Nonfungible TokenData (r:0 w:1)
109 // Storage: Nonfungible Owned (r:0 w:1)109 // Storage: Nonfungible Owned (r:0 w:1)
110 // Storage: Nonfungible TokenSysProperties (r:2 w:2)110 // Storage: Nonfungible TokenAuxProperties (r:2 w:2)
111 fn mint_nft(b: u32, ) -> Weight {111 fn mint_nft(b: u32, ) -> Weight {
112 (45_152_000 as Weight)112 (44_853_000 as Weight)
113 // Standard Error: 2_000113 // Standard Error: 2_000
114 .saturating_add((11_084_000 as Weight).saturating_mul(b as Weight))114 .saturating_add((10_721_000 as Weight).saturating_mul(b as Weight))
115 .saturating_add(T::DbWeight::get().reads(6 as Weight))115 .saturating_add(T::DbWeight::get().reads(6 as Weight))
116 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))116 .saturating_add(T::DbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))
117 .saturating_add(T::DbWeight::get().writes(5 as Weight))117 .saturating_add(T::DbWeight::get().writes(5 as Weight))
129 // Storage: Nonfungible TokenProperties (r:0 w:1)129 // Storage: Nonfungible TokenProperties (r:0 w:1)
130 fn burn_nft(b: u32, ) -> Weight {130 fn burn_nft(b: u32, ) -> Weight {
131 (0 as Weight)131 (0 as Weight)
132 // Standard Error: 1_581_000132 // Standard Error: 1_590_000
133 .saturating_add((321_866_000 as Weight).saturating_mul(b as Weight))133 .saturating_add((319_825_000 as Weight).saturating_mul(b as Weight))
134 .saturating_add(T::DbWeight::get().reads(9 as Weight))134 .saturating_add(T::DbWeight::get().reads(9 as Weight))
135 .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(b as Weight)))135 .saturating_add(T::DbWeight::get().reads((4 as Weight).saturating_mul(b as Weight)))
136 .saturating_add(T::DbWeight::get().writes(6 as Weight))136 .saturating_add(T::DbWeight::get().writes(6 as Weight))
146 // Storage: Nonfungible TokenChildren (r:0 w:1)146 // Storage: Nonfungible TokenChildren (r:0 w:1)
147 // Storage: Nonfungible Owned (r:0 w:2)147 // Storage: Nonfungible Owned (r:0 w:2)
148 fn send() -> Weight {148 fn send() -> Weight {
149 (72_246_000 as Weight)149 (72_576_000 as Weight)
150 .saturating_add(T::DbWeight::get().reads(12 as Weight))150 .saturating_add(T::DbWeight::get().reads(12 as Weight))
151 .saturating_add(T::DbWeight::get().writes(6 as Weight))151 .saturating_add(T::DbWeight::get().writes(6 as Weight))
152 }152 }
160 // Storage: Nonfungible TokenChildren (r:0 w:1)160 // Storage: Nonfungible TokenChildren (r:0 w:1)
161 // Storage: Nonfungible Owned (r:0 w:2)161 // Storage: Nonfungible Owned (r:0 w:2)
162 fn accept_nft() -> Weight {162 fn accept_nft() -> Weight {
163 (81_203_000 as Weight)163 (79_670_000 as Weight)
164 .saturating_add(T::DbWeight::get().reads(15 as Weight))164 .saturating_add(T::DbWeight::get().reads(15 as Weight))
165 .saturating_add(T::DbWeight::get().writes(7 as Weight))165 .saturating_add(T::DbWeight::get().writes(7 as Weight))
166 }166 }
175 // Storage: Nonfungible Allowance (r:5 w:0)175 // Storage: Nonfungible Allowance (r:5 w:0)
176 // Storage: Nonfungible Owned (r:0 w:5)176 // Storage: Nonfungible Owned (r:0 w:5)
177 fn reject_nft() -> Weight {177 fn reject_nft() -> Weight {
178 (253_117_000 as Weight)178 (254_989_000 as Weight)
179 .saturating_add(T::DbWeight::get().reads(29 as Weight))179 .saturating_add(T::DbWeight::get().reads(29 as Weight))
180 .saturating_add(T::DbWeight::get().writes(25 as Weight))180 .saturating_add(T::DbWeight::get().writes(25 as Weight))
181 }181 }
185 // Storage: Nonfungible TokenProperties (r:1 w:1)185 // Storage: Nonfungible TokenProperties (r:1 w:1)
186 // Storage: Nonfungible TokenData (r:5 w:0)186 // Storage: Nonfungible TokenData (r:5 w:0)
187 fn set_property() -> Weight {187 fn set_property() -> Weight {
188 (49_653_000 as Weight)188 (48_651_000 as Weight)
189 .saturating_add(T::DbWeight::get().reads(9 as Weight))189 .saturating_add(T::DbWeight::get().reads(9 as Weight))
190 .saturating_add(T::DbWeight::get().writes(1 as Weight))190 .saturating_add(T::DbWeight::get().writes(1 as Weight))
191 }191 }
195 // Storage: Nonfungible TokenProperties (r:1 w:1)195 // Storage: Nonfungible TokenProperties (r:1 w:1)
196 // Storage: Nonfungible TokenData (r:5 w:0)196 // Storage: Nonfungible TokenData (r:5 w:0)
197 fn set_priority() -> Weight {197 fn set_priority() -> Weight {
198 (47_890_000 as Weight)198 (47_579_000 as Weight)
199 .saturating_add(T::DbWeight::get().reads(9 as Weight))199 .saturating_add(T::DbWeight::get().reads(9 as Weight))
200 .saturating_add(T::DbWeight::get().writes(1 as Weight))200 .saturating_add(T::DbWeight::get().writes(1 as Weight))
201 }201 }
204 // Storage: Common CollectionById (r:1 w:0)204 // Storage: Common CollectionById (r:1 w:0)
205 // Storage: Nonfungible TokenData (r:5 w:0)205 // Storage: Nonfungible TokenData (r:5 w:0)
206 // Storage: Nonfungible TokenProperties (r:1 w:1)206 // Storage: Nonfungible TokenProperties (r:1 w:1)
207 // Storage: Nonfungible TokenSysProperties (r:1 w:1)207 // Storage: Nonfungible TokenAuxProperties (r:1 w:1)
208 fn add_basic_resource() -> Weight {208 fn add_basic_resource() -> Weight {
209 (54_703_000 as Weight)209 (55_013_000 as Weight)
210 .saturating_add(T::DbWeight::get().reads(10 as Weight))210 .saturating_add(T::DbWeight::get().reads(10 as Weight))
211 .saturating_add(T::DbWeight::get().writes(2 as Weight))211 .saturating_add(T::DbWeight::get().writes(2 as Weight))
212 }212 }
215 // Storage: Common CollectionById (r:1 w:0)215 // Storage: Common CollectionById (r:1 w:0)
216 // Storage: Nonfungible TokenData (r:5 w:0)216 // Storage: Nonfungible TokenData (r:5 w:0)
217 // Storage: Nonfungible TokenProperties (r:1 w:1)217 // Storage: Nonfungible TokenProperties (r:1 w:1)
218 // Storage: Nonfungible TokenSysProperties (r:1 w:1)218 // Storage: Nonfungible TokenAuxProperties (r:1 w:1)
219 fn add_composable_resource() -> Weight {219 fn add_composable_resource() -> Weight {
220 (55_114_000 as Weight)220 (55_184_000 as Weight)
221 .saturating_add(T::DbWeight::get().reads(10 as Weight))221 .saturating_add(T::DbWeight::get().reads(10 as Weight))
222 .saturating_add(T::DbWeight::get().writes(2 as Weight))222 .saturating_add(T::DbWeight::get().writes(2 as Weight))
223 }223 }
226 // Storage: Common CollectionById (r:1 w:0)226 // Storage: Common CollectionById (r:1 w:0)
227 // Storage: Nonfungible TokenData (r:5 w:0)227 // Storage: Nonfungible TokenData (r:5 w:0)
228 // Storage: Nonfungible TokenProperties (r:1 w:1)228 // Storage: Nonfungible TokenProperties (r:1 w:1)
229 // Storage: Nonfungible TokenSysProperties (r:1 w:1)229 // Storage: Nonfungible TokenAuxProperties (r:1 w:1)
230 fn add_slot_resource() -> Weight {230 fn add_slot_resource() -> Weight {
231 (55_615_000 as Weight)231 (54_792_000 as Weight)
232 .saturating_add(T::DbWeight::get().reads(10 as Weight))232 .saturating_add(T::DbWeight::get().reads(10 as Weight))
233 .saturating_add(T::DbWeight::get().writes(2 as Weight))233 .saturating_add(T::DbWeight::get().writes(2 as Weight))
234 }234 }
235 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)235 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)
236 // Storage: Common CollectionProperties (r:1 w:0)236 // Storage: Common CollectionProperties (r:1 w:0)
237 // Storage: Common CollectionById (r:1 w:0)237 // Storage: Common CollectionById (r:1 w:0)
238 // Storage: Nonfungible TokenSysProperties (r:1 w:1)238 // Storage: Nonfungible TokenAuxProperties (r:1 w:1)
239 // Storage: Nonfungible TokenData (r:5 w:0)239 // Storage: Nonfungible TokenData (r:5 w:0)
240 fn remove_resource() -> Weight {240 fn remove_resource() -> Weight {
241 (47_139_000 as Weight)241 (46_447_000 as Weight)
242 .saturating_add(T::DbWeight::get().reads(9 as Weight))242 .saturating_add(T::DbWeight::get().reads(9 as Weight))
243 .saturating_add(T::DbWeight::get().writes(1 as Weight))243 .saturating_add(T::DbWeight::get().writes(1 as Weight))
244 }244 }
245 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)245 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)
246 // Storage: Common CollectionProperties (r:1 w:0)246 // Storage: Common CollectionProperties (r:1 w:0)
247 // Storage: Common CollectionById (r:1 w:0)247 // Storage: Common CollectionById (r:1 w:0)
248 // Storage: Nonfungible TokenData (r:5 w:0)248 // Storage: Nonfungible TokenData (r:5 w:0)
249 // Storage: Nonfungible TokenSysProperties (r:1 w:1)249 // Storage: Nonfungible TokenAuxProperties (r:1 w:1)
250 fn accept_resource() -> Weight {250 fn accept_resource() -> Weight {
251 (45_535_000 as Weight)251 (45_096_000 as Weight)
252 .saturating_add(T::DbWeight::get().reads(9 as Weight))252 .saturating_add(T::DbWeight::get().reads(9 as Weight))
253 .saturating_add(T::DbWeight::get().writes(1 as Weight))253 .saturating_add(T::DbWeight::get().writes(1 as Weight))
254 }254 }
255 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)255 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)
256 // Storage: Common CollectionProperties (r:1 w:0)256 // Storage: Common CollectionProperties (r:1 w:0)
257 // Storage: Common CollectionById (r:1 w:0)257 // Storage: Common CollectionById (r:1 w:0)
258 // Storage: Nonfungible TokenData (r:5 w:0)258 // Storage: Nonfungible TokenData (r:5 w:0)
259 // Storage: Nonfungible TokenSysProperties (r:1 w:1)259 // Storage: Nonfungible TokenAuxProperties (r:1 w:1)
260 fn accept_resource_removal() -> Weight {260 fn accept_resource_removal() -> Weight {
261 (46_327_000 as Weight)261 (45_445_000 as Weight)
262 .saturating_add(T::DbWeight::get().reads(9 as Weight))262 .saturating_add(T::DbWeight::get().reads(9 as Weight))
263 .saturating_add(T::DbWeight::get().writes(1 as Weight))263 .saturating_add(T::DbWeight::get().writes(1 as Weight))
264 }264 }
275 // Storage: Common CollectionById (r:0 w:1)275 // Storage: Common CollectionById (r:0 w:1)
276 // Storage: RmrkCore UniqueCollectionId (r:0 w:1)276 // Storage: RmrkCore UniqueCollectionId (r:0 w:1)
277 fn create_collection() -> Weight {277 fn create_collection() -> Weight {
278 (42_239_000 as Weight)278 (42_359_000 as Weight)
279 .saturating_add(RocksDbWeight::get().reads(5 as Weight))279 .saturating_add(RocksDbWeight::get().reads(5 as Weight))
280 .saturating_add(RocksDbWeight::get().writes(8 as Weight))280 .saturating_add(RocksDbWeight::get().writes(8 as Weight))
281 }281 }
288 // Storage: Nonfungible TokensBurnt (r:0 w:1)288 // Storage: Nonfungible TokensBurnt (r:0 w:1)
289 // Storage: Common AdminAmount (r:0 w:1)289 // Storage: Common AdminAmount (r:0 w:1)
290 fn destroy_collection() -> Weight {290 fn destroy_collection() -> Weight {
291 (44_684_000 as Weight)291 (45_375_000 as Weight)
292 .saturating_add(RocksDbWeight::get().reads(5 as Weight))292 .saturating_add(RocksDbWeight::get().reads(5 as Weight))
293 .saturating_add(RocksDbWeight::get().writes(6 as Weight))293 .saturating_add(RocksDbWeight::get().writes(6 as Weight))
294 }294 }
295 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)295 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)
296 // Storage: Common CollectionById (r:1 w:1)296 // Storage: Common CollectionById (r:1 w:1)
297 // Storage: Common CollectionProperties (r:1 w:0)297 // Storage: Common CollectionProperties (r:1 w:0)
298 fn change_collection_issuer() -> Weight {298 fn change_collection_issuer() -> Weight {
299 (22_513_000 as Weight)299 (22_753_000 as Weight)
300 .saturating_add(RocksDbWeight::get().reads(3 as Weight))300 .saturating_add(RocksDbWeight::get().reads(3 as Weight))
301 .saturating_add(RocksDbWeight::get().writes(1 as Weight))301 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
302 }302 }
306 // Storage: Nonfungible TokensMinted (r:1 w:0)306 // Storage: Nonfungible TokensMinted (r:1 w:0)
307 // Storage: Nonfungible TokensBurnt (r:1 w:0)307 // Storage: Nonfungible TokensBurnt (r:1 w:0)
308 fn lock_collection() -> Weight {308 fn lock_collection() -> Weight {
309 (23_735_000 as Weight)309 (24_356_000 as Weight)
310 .saturating_add(RocksDbWeight::get().reads(5 as Weight))310 .saturating_add(RocksDbWeight::get().reads(5 as Weight))
311 .saturating_add(RocksDbWeight::get().writes(1 as Weight))311 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
312 }312 }
318 // Storage: Nonfungible TokenProperties (r:1 w:1)318 // Storage: Nonfungible TokenProperties (r:1 w:1)
319 // Storage: Nonfungible TokenData (r:0 w:1)319 // Storage: Nonfungible TokenData (r:0 w:1)
320 // Storage: Nonfungible Owned (r:0 w:1)320 // Storage: Nonfungible Owned (r:0 w:1)
321 // Storage: Nonfungible TokenSysProperties (r:2 w:2)321 // Storage: Nonfungible TokenAuxProperties (r:2 w:2)
322 fn mint_nft(b: u32, ) -> Weight {322 fn mint_nft(b: u32, ) -> Weight {
323 (45_152_000 as Weight)323 (44_853_000 as Weight)
324 // Standard Error: 2_000324 // Standard Error: 2_000
325 .saturating_add((11_084_000 as Weight).saturating_mul(b as Weight))325 .saturating_add((10_721_000 as Weight).saturating_mul(b as Weight))
326 .saturating_add(RocksDbWeight::get().reads(6 as Weight))326 .saturating_add(RocksDbWeight::get().reads(6 as Weight))
327 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))327 .saturating_add(RocksDbWeight::get().reads((1 as Weight).saturating_mul(b as Weight)))
328 .saturating_add(RocksDbWeight::get().writes(5 as Weight))328 .saturating_add(RocksDbWeight::get().writes(5 as Weight))
340 // Storage: Nonfungible TokenProperties (r:0 w:1)340 // Storage: Nonfungible TokenProperties (r:0 w:1)
341 fn burn_nft(b: u32, ) -> Weight {341 fn burn_nft(b: u32, ) -> Weight {
342 (0 as Weight)342 (0 as Weight)
343 // Standard Error: 1_581_000343 // Standard Error: 1_590_000
344 .saturating_add((321_866_000 as Weight).saturating_mul(b as Weight))344 .saturating_add((319_825_000 as Weight).saturating_mul(b as Weight))
345 .saturating_add(RocksDbWeight::get().reads(9 as Weight))345 .saturating_add(RocksDbWeight::get().reads(9 as Weight))
346 .saturating_add(RocksDbWeight::get().reads((4 as Weight).saturating_mul(b as Weight)))346 .saturating_add(RocksDbWeight::get().reads((4 as Weight).saturating_mul(b as Weight)))
347 .saturating_add(RocksDbWeight::get().writes(6 as Weight))347 .saturating_add(RocksDbWeight::get().writes(6 as Weight))
357 // Storage: Nonfungible TokenChildren (r:0 w:1)357 // Storage: Nonfungible TokenChildren (r:0 w:1)
358 // Storage: Nonfungible Owned (r:0 w:2)358 // Storage: Nonfungible Owned (r:0 w:2)
359 fn send() -> Weight {359 fn send() -> Weight {
360 (72_246_000 as Weight)360 (72_576_000 as Weight)
361 .saturating_add(RocksDbWeight::get().reads(12 as Weight))361 .saturating_add(RocksDbWeight::get().reads(12 as Weight))
362 .saturating_add(RocksDbWeight::get().writes(6 as Weight))362 .saturating_add(RocksDbWeight::get().writes(6 as Weight))
363 }363 }
371 // Storage: Nonfungible TokenChildren (r:0 w:1)371 // Storage: Nonfungible TokenChildren (r:0 w:1)
372 // Storage: Nonfungible Owned (r:0 w:2)372 // Storage: Nonfungible Owned (r:0 w:2)
373 fn accept_nft() -> Weight {373 fn accept_nft() -> Weight {
374 (81_203_000 as Weight)374 (79_670_000 as Weight)
375 .saturating_add(RocksDbWeight::get().reads(15 as Weight))375 .saturating_add(RocksDbWeight::get().reads(15 as Weight))
376 .saturating_add(RocksDbWeight::get().writes(7 as Weight))376 .saturating_add(RocksDbWeight::get().writes(7 as Weight))
377 }377 }
386 // Storage: Nonfungible Allowance (r:5 w:0)386 // Storage: Nonfungible Allowance (r:5 w:0)
387 // Storage: Nonfungible Owned (r:0 w:5)387 // Storage: Nonfungible Owned (r:0 w:5)
388 fn reject_nft() -> Weight {388 fn reject_nft() -> Weight {
389 (253_117_000 as Weight)389 (254_989_000 as Weight)
390 .saturating_add(RocksDbWeight::get().reads(29 as Weight))390 .saturating_add(RocksDbWeight::get().reads(29 as Weight))
391 .saturating_add(RocksDbWeight::get().writes(25 as Weight))391 .saturating_add(RocksDbWeight::get().writes(25 as Weight))
392 }392 }
396 // Storage: Nonfungible TokenProperties (r:1 w:1)396 // Storage: Nonfungible TokenProperties (r:1 w:1)
397 // Storage: Nonfungible TokenData (r:5 w:0)397 // Storage: Nonfungible TokenData (r:5 w:0)
398 fn set_property() -> Weight {398 fn set_property() -> Weight {
399 (49_653_000 as Weight)399 (48_651_000 as Weight)
400 .saturating_add(RocksDbWeight::get().reads(9 as Weight))400 .saturating_add(RocksDbWeight::get().reads(9 as Weight))
401 .saturating_add(RocksDbWeight::get().writes(1 as Weight))401 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
402 }402 }
406 // Storage: Nonfungible TokenProperties (r:1 w:1)406 // Storage: Nonfungible TokenProperties (r:1 w:1)
407 // Storage: Nonfungible TokenData (r:5 w:0)407 // Storage: Nonfungible TokenData (r:5 w:0)
408 fn set_priority() -> Weight {408 fn set_priority() -> Weight {
409 (47_890_000 as Weight)409 (47_579_000 as Weight)
410 .saturating_add(RocksDbWeight::get().reads(9 as Weight))410 .saturating_add(RocksDbWeight::get().reads(9 as Weight))
411 .saturating_add(RocksDbWeight::get().writes(1 as Weight))411 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
412 }412 }
415 // Storage: Common CollectionById (r:1 w:0)415 // Storage: Common CollectionById (r:1 w:0)
416 // Storage: Nonfungible TokenData (r:5 w:0)416 // Storage: Nonfungible TokenData (r:5 w:0)
417 // Storage: Nonfungible TokenProperties (r:1 w:1)417 // Storage: Nonfungible TokenProperties (r:1 w:1)
418 // Storage: Nonfungible TokenSysProperties (r:1 w:1)418 // Storage: Nonfungible TokenAuxProperties (r:1 w:1)
419 fn add_basic_resource() -> Weight {419 fn add_basic_resource() -> Weight {
420 (54_703_000 as Weight)420 (55_013_000 as Weight)
421 .saturating_add(RocksDbWeight::get().reads(10 as Weight))421 .saturating_add(RocksDbWeight::get().reads(10 as Weight))
422 .saturating_add(RocksDbWeight::get().writes(2 as Weight))422 .saturating_add(RocksDbWeight::get().writes(2 as Weight))
423 }423 }
426 // Storage: Common CollectionById (r:1 w:0)426 // Storage: Common CollectionById (r:1 w:0)
427 // Storage: Nonfungible TokenData (r:5 w:0)427 // Storage: Nonfungible TokenData (r:5 w:0)
428 // Storage: Nonfungible TokenProperties (r:1 w:1)428 // Storage: Nonfungible TokenProperties (r:1 w:1)
429 // Storage: Nonfungible TokenSysProperties (r:1 w:1)429 // Storage: Nonfungible TokenAuxProperties (r:1 w:1)
430 fn add_composable_resource() -> Weight {430 fn add_composable_resource() -> Weight {
431 (55_114_000 as Weight)431 (55_184_000 as Weight)
432 .saturating_add(RocksDbWeight::get().reads(10 as Weight))432 .saturating_add(RocksDbWeight::get().reads(10 as Weight))
433 .saturating_add(RocksDbWeight::get().writes(2 as Weight))433 .saturating_add(RocksDbWeight::get().writes(2 as Weight))
434 }434 }
437 // Storage: Common CollectionById (r:1 w:0)437 // Storage: Common CollectionById (r:1 w:0)
438 // Storage: Nonfungible TokenData (r:5 w:0)438 // Storage: Nonfungible TokenData (r:5 w:0)
439 // Storage: Nonfungible TokenProperties (r:1 w:1)439 // Storage: Nonfungible TokenProperties (r:1 w:1)
440 // Storage: Nonfungible TokenSysProperties (r:1 w:1)440 // Storage: Nonfungible TokenAuxProperties (r:1 w:1)
441 fn add_slot_resource() -> Weight {441 fn add_slot_resource() -> Weight {
442 (55_615_000 as Weight)442 (54_792_000 as Weight)
443 .saturating_add(RocksDbWeight::get().reads(10 as Weight))443 .saturating_add(RocksDbWeight::get().reads(10 as Weight))
444 .saturating_add(RocksDbWeight::get().writes(2 as Weight))444 .saturating_add(RocksDbWeight::get().writes(2 as Weight))
445 }445 }
446 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)446 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)
447 // Storage: Common CollectionProperties (r:1 w:0)447 // Storage: Common CollectionProperties (r:1 w:0)
448 // Storage: Common CollectionById (r:1 w:0)448 // Storage: Common CollectionById (r:1 w:0)
449 // Storage: Nonfungible TokenSysProperties (r:1 w:1)449 // Storage: Nonfungible TokenAuxProperties (r:1 w:1)
450 // Storage: Nonfungible TokenData (r:5 w:0)450 // Storage: Nonfungible TokenData (r:5 w:0)
451 fn remove_resource() -> Weight {451 fn remove_resource() -> Weight {
452 (47_139_000 as Weight)452 (46_447_000 as Weight)
453 .saturating_add(RocksDbWeight::get().reads(9 as Weight))453 .saturating_add(RocksDbWeight::get().reads(9 as Weight))
454 .saturating_add(RocksDbWeight::get().writes(1 as Weight))454 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
455 }455 }
456 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)456 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)
457 // Storage: Common CollectionProperties (r:1 w:0)457 // Storage: Common CollectionProperties (r:1 w:0)
458 // Storage: Common CollectionById (r:1 w:0)458 // Storage: Common CollectionById (r:1 w:0)
459 // Storage: Nonfungible TokenData (r:5 w:0)459 // Storage: Nonfungible TokenData (r:5 w:0)
460 // Storage: Nonfungible TokenSysProperties (r:1 w:1)460 // Storage: Nonfungible TokenAuxProperties (r:1 w:1)
461 fn accept_resource() -> Weight {461 fn accept_resource() -> Weight {
462 (45_535_000 as Weight)462 (45_096_000 as Weight)
463 .saturating_add(RocksDbWeight::get().reads(9 as Weight))463 .saturating_add(RocksDbWeight::get().reads(9 as Weight))
464 .saturating_add(RocksDbWeight::get().writes(1 as Weight))464 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
465 }465 }
466 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)466 // Storage: RmrkCore UniqueCollectionId (r:1 w:0)
467 // Storage: Common CollectionProperties (r:1 w:0)467 // Storage: Common CollectionProperties (r:1 w:0)
468 // Storage: Common CollectionById (r:1 w:0)468 // Storage: Common CollectionById (r:1 w:0)
469 // Storage: Nonfungible TokenData (r:5 w:0)469 // Storage: Nonfungible TokenData (r:5 w:0)
470 // Storage: Nonfungible TokenSysProperties (r:1 w:1)470 // Storage: Nonfungible TokenAuxProperties (r:1 w:1)
471 fn accept_resource_removal() -> Weight {471 fn accept_resource_removal() -> Weight {
472 (46_327_000 as Weight)472 (45_445_000 as Weight)
473 .saturating_add(RocksDbWeight::get().reads(9 as Weight))473 .saturating_add(RocksDbWeight::get().reads(9 as Weight))
474 .saturating_add(RocksDbWeight::get().writes(1 as Weight))474 .saturating_add(RocksDbWeight::get().writes(1 as Weight))
475 }475 }
modifiedprimitives/data-structs/src/lib.rsdiffbeforeafterboth
104pub const MAX_PROPERTY_VALUE_LENGTH: u32 = 32768;104pub const MAX_PROPERTY_VALUE_LENGTH: u32 = 32768;
105pub const MAX_PROPERTIES_PER_ITEM: u32 = 64;105pub const MAX_PROPERTIES_PER_ITEM: u32 = 64;
106106
107pub const MAX_SYSTEM_PROPERTY_VALUE_LENGTH: u32 = 2048;107pub const MAX_AUX_PROPERTY_VALUE_LENGTH: u32 = 2048;
108108
109pub const MAX_COLLECTION_PROPERTIES_SIZE: u32 = 40960;109pub const MAX_COLLECTION_PROPERTIES_SIZE: u32 = 40960;
110pub const MAX_TOKEN_PROPERTIES_SIZE: u32 = 32768;110pub const MAX_TOKEN_PROPERTIES_SIZE: u32 = 32768;
658658
659pub type BoundedBytes<S> = BoundedVec<u8, S>;659pub type BoundedBytes<S> = BoundedVec<u8, S>;
660660
661pub type SysPropertyValue = BoundedBytes<ConstU32<MAX_SYSTEM_PROPERTY_VALUE_LENGTH>>;661pub type AuxPropertyValue = BoundedBytes<ConstU32<MAX_AUX_PROPERTY_VALUE_LENGTH>>;
662662
663pub type PropertyKey = BoundedBytes<ConstU32<MAX_PROPERTY_KEY_LENGTH>>;663pub type PropertyKey = BoundedBytes<ConstU32<MAX_PROPERTY_KEY_LENGTH>>;
664pub type PropertyValue = BoundedBytes<ConstU32<MAX_PROPERTY_VALUE_LENGTH>>;664pub type PropertyValue = BoundedBytes<ConstU32<MAX_PROPERTY_VALUE_LENGTH>>;
modifiedruntime/opal/src/lib.rsdiffbeforeafterboth
1513 let nft_id = TokenId(nft_id);1513 let nft_id = TokenId(nft_id);
1514 if RmrkCore::ensure_nft_type(collection_id, nft_id, NftType::Regular).is_err() { return Ok(Vec::new()); }1514 if RmrkCore::ensure_nft_type(collection_id, nft_id, NftType::Regular).is_err() { return Ok(Vec::new()); }
15151515
1516 let resources = <pallet_nonfungible::Pallet<Runtime>>::iterate_token_sys_properties(1516 let resources = <pallet_nonfungible::Pallet<Runtime>>::iterate_token_aux_properties(
1517 collection_id, nft_id, PropertyScope::Rmrk1517 collection_id, nft_id, PropertyScope::Rmrk
1518 ).filter_map(|(_, value)| {1518 ).filter_map(|(_, value)| {
1519 let resource_info: RmrkResourceInfo = RmrkCore::decode_property(&value).ok()?;1519 let resource_info: RmrkResourceInfo = RmrkCore::decode_property(&value).ok()?;
modifiedruntime/quartz/src/lib.rsdiffbeforeafterboth
1513 let nft_id = TokenId(nft_id);1513 let nft_id = TokenId(nft_id);
1514 if RmrkCore::ensure_nft_type(collection_id, nft_id, NftType::Regular).is_err() { return Ok(Vec::new()); }1514 if RmrkCore::ensure_nft_type(collection_id, nft_id, NftType::Regular).is_err() { return Ok(Vec::new()); }
15151515
1516 let resources = <pallet_nonfungible::Pallet<Runtime>>::iterate_token_sys_properties(1516 let resources = <pallet_nonfungible::Pallet<Runtime>>::iterate_token_aux_properties(
1517 collection_id, nft_id, PropertyScope::Rmrk1517 collection_id, nft_id, PropertyScope::Rmrk
1518 ).filter_map(|(_, value)| {1518 ).filter_map(|(_, value)| {
1519 let resource_info: RmrkResourceInfo = RmrkCore::decode_property(&value).ok()?;1519 let resource_info: RmrkResourceInfo = RmrkCore::decode_property(&value).ok()?;