// SPDX-License-Identifier: MIT pragma solidity >=0.7.6 <0.8.0; /** * @title ERC721 Non-Fungible Token Standard, Tokens Receiver. * Interface for any contract that wants to support safeTransfers from ERC721 asset contracts. * @dev See https://eips.ethereum.org/EIPS/eip-721 * @dev Note: The ERC-165 identifier for this interface is 0x150b7a02. */ interface IERC721Receiver { /** * Handles 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. * @dev 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 returns (bytes4); }