abstract contract IERC721Receiver {

    //bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))
    bytes4 constant internal ERC721_RECEIVED = 0x150b7a02;

    /**
        @notice Handle the receipt of an NFT
        @dev The ERC721 smart contract calls this function on the recipient
        after a {IERC721-safeTransferFrom}. This function MUST return the function selector,
        otherwise the caller will revert the transaction. The selector to be
        returned can be obtained as `this.onERC721Received.selector`. This
        function MAY throw to revert and reject the transfer.
        Note: the ERC721 contract address is always the message sender.
        @param operator The address which called `safeTransferFrom` function
        @param from The address which previously owned the token
        @param tokenId The NFT identifier which is being transferred
        @param data Additional data with no specified format
        @return bytes4 `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
     */
    function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data
    ) external virtual returns (bytes4);
}
/**
 @title ERC721 Non-Fungible Token Standard, token receiver
 @dev See https://eips.ethereum.org/EIPS/eip-721
 Interface for any contract that wants to support safeTransfers from ERC721 asset contracts.
 Note: The ERC-165 identifier for this interface is 0x150b7a02.
 */
function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data
    ) external virtual returns (bytes4);
/**
 @notice Handle the receipt of an NFT
 @dev The ERC721 smart contract calls this function on the recipient
 after a {IERC721-safeTransferFrom}. This function MUST return the function selector,
 otherwise the caller will revert the transaction. The selector to be
 returned can be obtained as `this.onERC721Received.selector`. This
 function MAY throw to revert and reject the transfer.
 Note: the ERC721 contract address is always the message sender.
 @param operator The address which called `safeTransferFrom` function
 @param from The address which previously owned the token
 @param tokenId The NFT identifier which is being transferred
 @param data Additional data with no specified format
 @return bytes4 `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
 */