1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- pragma solidity ^0.5.0;
- import "../../introspection/IERC165.sol";
- /**
- * @dev Required interface of an ERC721 compliant contract.
- */
- contract IERC721 is IERC165 {
- event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
- event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
- event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
- /**
- * @dev Returns the number of NFTs in `owner`'s account.
- */
- function balanceOf(address owner) public view returns (uint256 balance);
- /**
- * @dev Returns the owner of the NFT specified by `tokenId`.
- */
- function ownerOf(uint256 tokenId) public view returns (address owner);
- /**
- * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to
- * another (`to`).
- *
- *
- *
- * Requirements:
- * - `from`, `to` cannot be zero.
- * - `tokenId` must be owned by `from`.
- * - If the caller is not `from`, it must be have been allowed to move this
- * NFT by either `approve` or `setApproveForAll`.
- */
- function safeTransferFrom(address from, address to, uint256 tokenId) public;
- /**
- * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to
- * another (`to`).
- *
- * Requirements:
- * - If the caller is not `from`, it must be approved to move this NFT by
- * either `approve` or `setApproveForAll`.
- */
- function transferFrom(address from, address to, uint256 tokenId) public;
- function approve(address to, uint256 tokenId) public;
- function getApproved(uint256 tokenId) public view returns (address operator);
- function setApprovalForAll(address operator, bool _approved) public;
- function isApprovedForAll(address owner, address operator) public view returns (bool);
- function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public;
- }
|