pub fn create_class(owner: &T::AccountId, metadata: CID, data: T::ClassData) -> Result<T::ClassId, DispatchError> {
		let class_id = NextClassId::<T>::try_mutate(|id| -> Result<T::ClassId, DispatchError> {
			let current_id = *id;
			*id = id.checked_add(&One::one()).ok_or(Error::<T>::NoAvailableClassId)?;
			Ok(current_id)
		})?;

		let info = ClassInfo {
			metadata,
			total_issuance: Default::default(),
			owner: owner.clone(),
			data,
		};
		Classes::<T>::insert(class_id, info);

		Ok(class_id)
	}
/// Create NFT(non fungible token) class
Create NFT(non fungible token) class
Create NFT ( non fungible token ) class
pub fn create_class(owner: &T::AccountId, metadata: CID, data: T::ClassData) -> Result<T::ClassId, DispatchError> {
		let class_id = NextClassId::<T>::try_mutate(|id| -> Result<T::ClassId, DispatchError> {
			let current_id = *id;
			*id = id.checked_add(&One::one()).ok_or(Error::<T>::NoAvailableClassId)?;
			Ok(current_id)
		})?;
		let info = ClassInfo {
			metadata,
			total_issuance: Default::default(),
			owner: owner.clone(),
			data,
		};
		Classes::<T>::insert(class_id, info);
		Ok(class_id)
	}
pub fn create_class ( owner : & T :: AccountId , metadata : CID , data : T :: ClassData ) -> Result < T :: ClassId , DispatchError > { let class_id = NextClassId :: < T > :: try_mutate ( | id | -> Result < T :: ClassId , DispatchError > { let current_id = * id ; * id = id . checked_add ( & One :: one ( ) ) . ok_or ( Error :: < T > :: NoAvailableClassId ) ? ; Ok ( current_id ) } ) ? ; let info = ClassInfo { metadata , total_issuance : Default :: default ( ) , owner : owner . clone ( ) , data , } ; Classes :: < T > :: insert ( class_id , info ) ; Ok ( class_id ) }
Create NFT(non fungible token) class
Create NFT ( non fungible token ) class
owner
&T::AccountId
metadata
CID
data
T::ClassData
owner
&T::AccountId
metadata
CID
data
T::ClassData