git.delta.rocks / unique-network / refs/commits / 4268af19ec49

difftreelog

feat add recipient field to ItemCreated event

Yaroslav Bolyukin2021-02-17parent: #a09692c.patch.diff
in: master

1 file changed

modifiedpallets/nft/src/lib.rsdiffbeforeafterboth
495 /// * collection_id: Id of the collection where item was created.495 /// * collection_id: Id of the collection where item was created.
496 /// 496 ///
497 /// * item_id: Id of an item. Unique within the collection.497 /// * item_id: Id of an item. Unique within the collection.
498 ///
499 /// * recipient: Owner of newly created item
498 ItemCreated(CollectionId, TokenId),500 ItemCreated(CollectionId, TokenId, AccountId),
499501
500 /// Collection item was burned.502 /// Collection item was burned.
501 /// 503 ///
1635 {1637 {
1636 CreateItemData::NFT(data) => {1638 CreateItemData::NFT(data) => {
1637 let item = NftItemType {1639 let item = NftItemType {
1638 owner,1640 owner: owner.clone(),
1639 const_data: data.const_data,1641 const_data: data.const_data,
1640 variable_data: data.variable_data1642 variable_data: data.variable_data
1641 };1643 };
1660 };1662 };
16611663
1662 // call event1664 // call event
1663 Self::deposit_event(RawEvent::ItemCreated(collection_id, <ItemListIndex>::get(collection_id)));1665 Self::deposit_event(RawEvent::ItemCreated(collection_id, <ItemListIndex>::get(collection_id), owner));
16641666
1665 Ok(())1667 Ok(())
1666 }1668 }