Use a better magic value, clarify callback, thanks @abandeali1

This commit is contained in:
William Entriken 2018-02-26 22:10:41 -05:00 committed by GitHub
parent 1eeddf7a57
commit e847ffee78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,9 +95,10 @@ interface ERC721 /* is ERC165 */ {
/// @dev Throws unless `msg.sender` is the current owner, an authorized
/// operator, or the approved address for this NFT. Throws if `_from` is
/// not the current owner. Throws if `_to` is the zero address. Throws if
/// `_tokenId` is not a valid NFT. When transfer is complete, this function also
/// calls `onNFTReceived` on `_to` and throws if the return value is not
/// `keccak256("ERC721_ONNFTRECEIVED")`.
/// `_tokenId` is not a valid NFT. When transfer is complete, this function
/// checks if `_to` is a smart contract (code size > 0). If so, it calls
/// `onNFTReceived` on `_to` and throws if the return value is not
/// `bytes4(keccak256("onNFTReceived(address,uint256,bytes)"))`.
/// @param _from The current owner of the NFT
/// @param _to The new owner
/// @param _tokenId The NFT to transfer
@ -105,12 +106,8 @@ interface ERC721 /* is ERC165 */ {
function transferFrom(address _from, address _to, uint256 _tokenId, bytes[] data) external payable;
/// @notice Transfers the ownership of an NFT from one address to another address
/// @dev Throws unless `msg.sender` is the current owner, an authorized
/// operator, or the approved address for this NFT. Throws if `_from` is
/// not the current owner. Throws if `_to` is the zero address. Throws if
/// `_tokenId` is not a valid NFT. When transfer is complete, this function also
/// calls `onNFTReceived` on `_to` and throws if the return value is not
/// `keccak256("ERC721_ONNFTRECEIVED")`.
/// @dev This works identically to the other function with an extra data parameter,
/// except this function just sets data to []
/// @param _from The current owner of the NFT
/// @param _to The new owner
/// @param _tokenId The NFT to transfer