--- a/pallets/nft/src/lib.rs +++ b/pallets/nft/src/lib.rs @@ -131,7 +131,7 @@ trait Store for Module as Nft { // Private members - NextCollectionID: u64; + CreatedCollectionCount: u64; ItemListIndex: map hasher(blake2_128_concat) u64 => u64; pub Collection get(fn collection): map hasher(identity) u64 => CollectionType; @@ -212,11 +212,11 @@ ensure!(prefix.len() <= 16, "Token prefix can not be longer than 15 char"); // Generate next collection ID - let next_id = NextCollectionID::get() + let next_id = CreatedCollectionCount::get() .checked_add(1) .expect("collection id error"); - NextCollectionID::put(next_id); + CreatedCollectionCount::put(next_id); // Create new collection let new_collection = CollectionType {