difftreelog
fix create collection properties length
in: master
1 file changed
primitives/data-structs/src/lib.rsdiffbeforeafterboth105pub const MAX_PROPERTY_VALUE_LENGTH: u32 = 32768;105pub const MAX_PROPERTY_VALUE_LENGTH: u32 = 32768;106pub const MAX_PROPERTIES_PER_ITEM: u32 = 64;106pub const MAX_PROPERTIES_PER_ITEM: u32 = 64;107107108// pub const MAX_PROPERTY_KEYS_OVERALL_LENGTH: u32 = MAX_PROPERTY_KEY_LENGTH * MAX_PROPERTIES_PER_ITEM;109pub const MAX_COLLECTION_PROPERTIES_SIZE: u32 = 40960;108pub const MAX_COLLECTION_PROPERTIES_SIZE: u32 = 40960;110pub const MAX_TOKEN_PROPERTIES_SIZE: u32 = 32768;109pub const MAX_TOKEN_PROPERTIES_SIZE: u32 = 32768;111112pub const MAX_COLLECTION_PROPERTIES_ENCODE_LEN: u32 =113 MAX_PROPERTIES_PER_ITEM * MAX_PROPERTY_KEY_LENGTH + MAX_COLLECTION_PROPERTIES_SIZE;114110115// RMRK constants111// RMRK constants116pub const RMRK_STRING_LIMIT: u32 = 128;112pub const RMRK_STRING_LIMIT: u32 = 128;119pub const RMRK_KEY_LIMIT: u32 = 32;115pub const RMRK_KEY_LIMIT: u32 = 32;120pub const RMRK_VALUE_LIMIT: u32 = 256;116pub const RMRK_VALUE_LIMIT: u32 = 256;121122pub struct MaxPropertiesPermissionsEncodeLen;123124impl Get<u32> for MaxPropertiesPermissionsEncodeLen {125 fn get() -> u32 {126 MAX_PROPERTIES_PER_ITEM * MAX_PROPERTY_KEY_LENGTH127 + <PropertyPermission as MaxEncodedLen>::max_encoded_len() as u32128 }129}130117131/// How much items can be created per single118/// How much items can be created per single132/// create_many call119/// create_many call381}368}382369383pub type CollectionPropertiesPermissionsVec =370pub type CollectionPropertiesPermissionsVec =384 BoundedVec<PropertyKeyPermission, MaxPropertiesPermissionsEncodeLen>;371 BoundedVec<PropertyKeyPermission, ConstU32<MAX_PROPERTIES_PER_ITEM>>;385372386pub type CollectionPropertiesVec =373pub type CollectionPropertiesVec =387 BoundedVec<Property, ConstU32<MAX_COLLECTION_PROPERTIES_ENCODE_LEN>>;374 BoundedVec<Property, ConstU32<MAX_PROPERTIES_PER_ITEM>>;388375389/// All fields are wrapped in `Option`s, where None means chain default376/// All fields are wrapped in `Option`s, where None means chain default390#[struct_versioning::versioned(version = 2, upper)]377#[struct_versioning::versioned(version = 2, upper)]