Files
openzeppelin-contracts/contracts/token/ERC721/ERC721Receiver.sol
Santiago Palladino 71cbc511ec Support for new ERC721 interface
- Tests for new features are pending
- ERC721 is abstract, since it requires metadata implementation
- Move some methods into DeprecatedERC721 contract
- Reorganise base vs full implementation
- Pending tokenByIndex
2018-03-09 17:19:11 -03:00

20 lines
1001 B
Solidity

pragma solidity ^0.4.18;
contract ERC721Receiver {
/// @dev Magic value to be returned upon successful reception of an NFT
/// Equals to bytes4(keccak256("onERC721Received(address,uint256,bytes)"))
bytes4 ERC721_RECEIVED = 0xf0b9e5ba;
/// @notice Handle the receipt of an NFT
/// @dev The ERC721 smart contract calls this function on the recipient
/// after a `safetransfer`. This function MAY throw to revert and reject the
/// transfer. This function MUST use 50,000 gas or less. Return of other
/// than the magic value MUST result in the transaction being reverted.
/// Note: the contract address is always the message sender.
/// @param _from The sending address
/// @param _tokenId The NFT identifier which is being transfered
/// @param _data Additional data with no specified format
/// @return `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`
function onERC721Received(address _from, uint256 _tokenId, bytes _data) public returns(bytes4);
}