interface ERC721TokenReceiver {

  /**
   * @dev Handle the receipt of a NFT. The ERC721 smart contract calls this function on the
   * recipient after a `transfer`. This function MAY throw to revert and reject the transfer. Return
   * of other than the magic value MUST result in the transaction being reverted.
   * Returns `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` unless throwing.
   * @notice The contract address is always the message sender. A wallet/broker/auction application
   * MUST implement the wallet interface if it will accept safe transfers.
   * @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.
   */
    function onERC721Received(
        address _operator,
        address _from,
        uint256 _tokenId,
        bytes calldata _data
    ) external returns(bytes4);
    
}
function onERC721Received(
    address _operator,
    address _from,
    uint256 _tokenId,
    bytes calldata _data
) external returns(bytes4);

/**
 * @dev Handle the receipt of a NFT. The ERC721 smart contract calls this function on the
 * recipient after a `transfer`. This function MAY throw to revert and reject the transfer. Return
 * of other than the magic value MUST result in the transaction being reverted.
 * Returns `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` unless throwing.
 * @notice The contract address is always the message sender. A wallet/broker/auction application
 * MUST implement the wallet interface if it will accept safe transfers.
 * @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.
 */