difftreelog
feat add Transfer event
in: master
1 file changed
pallets/nft/src/lib.rsdiffbeforeafterboth506 /// item_id: Identifier of burned NFT.506 /// item_id: Identifier of burned NFT.507 ItemDestroyed(CollectionId, TokenId),507 ItemDestroyed(CollectionId, TokenId),508509 /// Item was transferred510 ///511 /// * collection_id: Id of collection to which item is belong512 ///513 /// * item_id: Id of an item514 ///515 /// * sender: Original owner of item516 ///517 /// * recipient: New owner of item518 ///519 /// * amount: Always 1 for NFT520 Transfer(CollectionId, TokenId, AccountId, AccountId, u128),508 }521 }509);522);510523155615691557 match target_collection.mode1570 match target_collection.mode1558 {1571 {1559 CollectionMode::NFT => Self::transfer_nft(collection_id, item_id, sender.clone(), recipient)?,1572 CollectionMode::NFT => Self::transfer_nft(collection_id, item_id, sender.clone(), recipient.clone())?,1560 CollectionMode::Fungible(_) => Self::transfer_fungible(collection_id, value, &sender, &recipient)?,1573 CollectionMode::Fungible(_) => Self::transfer_fungible(collection_id, value, &sender, &recipient)?,1561 CollectionMode::ReFungible => Self::transfer_refungible(collection_id, item_id, value, sender.clone(), recipient)?,1574 CollectionMode::ReFungible => Self::transfer_refungible(collection_id, item_id, value, sender.clone(), recipient.clone())?,1562 _ => ()1575 _ => ()1563 };1576 };15771578 Self::deposit_event(RawEvent::Transfer(collection_id, item_id, sender, recipient, value));156415791565 Ok(())1580 Ok(())1566 }1581 }