difftreelog
Merge branch 'dev'
in: master
2 files changed
README.mddiffbeforeafterboth--- a/README.md
+++ b/README.md
@@ -126,7 +126,6 @@
"Owner": "AccountId",
"Mode": "CollectionMode",
"Access": "u8",
- "NextItemId": "u64",
"DecimalPoints": "u32",
"Name": "Vec<u16>",
"Description": "Vec<u16>",
pallets/nft/src/lib.rsdiffbeforeafterboth81 pub owner: AccountId,81 pub owner: AccountId,82 pub mode: CollectionMode,82 pub mode: CollectionMode,83 pub access: AccessMode,83 pub access: AccessMode,84 pub next_item_id: u64,85 pub decimal_points: u32,84 pub decimal_points: u32,86 pub name: Vec<u16>, // 64 include null escape char85 pub name: Vec<u16>, // 64 include null escape char87 pub description: Vec<u16>, // 256 include null escape char86 pub description: Vec<u16>, // 256 include null escape char228 description: description,227 description: description,229 decimal_points: decimal_points,228 decimal_points: decimal_points,230 token_prefix: prefix,229 token_prefix: prefix,231 next_item_id: next_id,232 offchain_schema: Vec::new(),230 offchain_schema: Vec::new(),233 custom_data_size: custom_data_size,231 custom_data_size: custom_data_size,234 sponsor: T::AccountId::default(),232 sponsor: T::AccountId::default(),365363366 Self::check_owner_or_admin_permissions(collection_id, sender.clone())?;364 Self::check_owner_or_admin_permissions(collection_id, sender.clone())?;367368 let new_balance = <Balance<T>>::get(collection_id, owner.clone()).checked_add(1).unwrap();369 <Balance<T>>::insert(collection_id, owner.clone(), new_balance);370365371 // TODO: implement other modes366 // TODO: implement other modes372 match target_collection.mode 367 match target_collection.mode 593 .checked_add(1)588 .checked_add(1)594 .expect("Item list index id error");589 .expect("Item list index id error");595590591 let value = item.owner.first().unwrap().fraction as u64;596 Self::add_token_index(item.collection, current_index, item.owner.first().unwrap().owner.clone())?;592 let owner = item.owner.first().unwrap().owner.clone();593594 Self::add_token_index(item.collection, current_index, owner.clone())?;597595598 <ItemListIndex>::insert(item.collection, current_index);596 <ItemListIndex>::insert(item.collection, current_index);599 <ReFungibleItemList<T>>::insert(item.collection, current_index, item); 597 <ReFungibleItemList<T>>::insert(item.collection, current_index, item); 598 599 // Update balance600 let new_balance = <Balance<T>>::get(item.collection, owner.clone()).checked_add(value).unwrap();601 <Balance<T>>::insert(item.collection, owner.clone(), new_balance);600602601 Ok(())603 Ok(())602 }604 }681 <ItemListIndex>::insert(item.collection, current_index);683 <ItemListIndex>::insert(item.collection, current_index);682 <NftItemList<T>>::insert(item.collection, current_index, item);684 <NftItemList<T>>::insert(item.collection, current_index, item);685686 // Update balance687 let new_balance = <Balance<T>>::get(item.collection, item.owner.clone()).checked_add(1).unwrap();688 <Balance<T>>::insert(item.collection_id, item.owner.clone(), new_balance);683689684 Ok(())690 Ok(())685 }691 }