ZTP-721
Simple Summary
A standard interface for non-fungible tokens, also known as deeds.
Abstract
The following standard allows for the implementation of a standard API for NFTs (non-fungible tokens) within smart contracts. This standard provides basic functionality to track and transfer NFTs.
We considered use cases of NFTs being owned and transacted by individuals as well as consignment to third party brokers/wallets/auctioneers (“operators”). NFTs can represent ownership over digital or physical assets. We considered a diverse universe of assets, and we know you will dream up many more:
Physical property — houses, unique artwork
Virtual collectibles — unique pictures of kittens, collectible cards
“Negative value” assets — loans, burdens and other responsibilities
In general, all houses are distinct and no two kittens are alike. NFTs are distinguishable and you must track the ownership of each one separately.
Motivation
A standard interface allows wallet/broker/auction applications to work with any NFT on Zetrix. Additional applications are discussed below.
Specification Token Methods
balanceOf
Count all NFTs assigned to an owner
, and returns the number of NFTs owned by owner
, possibly zero.
ownerOf
Find the owner of an NFT, and returns the address of the owner of the NFT.
safeTransferFrom
Transfers the ownership of an NFT from one address to another address. This function SHOULD also enforce the onZTP721Received
check to ensure that if the receiver is a contract address, it is able to receive NFTs.
transferFrom
Transfers the ownership of an NFT from one address to another address.
Note: THE CALLER IS RESPONSIBLE TO CONFIRM THAT THE RECEIVER IS CAPABLE OF RECEIVING NFTS OR ELSE THEY MAY BE PERMANENTLY LOST.
approve
Change or reaffirm the approved address for an NFT.
setApprovalForAll
Enable or disable approval for a third party ("operator") to manage all of Chain.msg.sender
's assets.
getApproved
Get the approved address for a single NFT, and returns the approved address for this NFT.
isApprovedForAll
Query if an address is an authorized operator for another address, and returns true if operator
is an approved operator for owner
, false otherwise.
Note: A wallet/broker/auction application MUST implement the wallet interface (ZTP721Receiver interface with the onERC721Received function) if it will accept safe transfers.
Last updated