From 6fbe771c276f83e734256908877c8f9aaa2e1bfc Mon Sep 17 00:00:00 2001 From: Santiago Palladino Date: Fri, 9 Mar 2018 15:40:48 -0300 Subject: [PATCH] Remove deprecated implementation We only want to keep the interface, for interacting with already deployed contracts --- contracts/token/ERC721/DeprecatedERC721.sol | 5 +++ .../token/ERC721/DeprecatedERC721Token.sol | 35 ------------------- 2 files changed, 5 insertions(+), 35 deletions(-) delete mode 100644 contracts/token/ERC721/DeprecatedERC721Token.sol diff --git a/contracts/token/ERC721/DeprecatedERC721.sol b/contracts/token/ERC721/DeprecatedERC721.sol index 5857a35b9..01b6c234a 100644 --- a/contracts/token/ERC721/DeprecatedERC721.sol +++ b/contracts/token/ERC721/DeprecatedERC721.sol @@ -2,6 +2,11 @@ pragma solidity ^0.4.18; import "./ERC721.sol"; +/** + * @title ERC-721 methods shipped in OpenZeppelin v1.7.0, removed in the latest version of the standard + * @dev Only use this interface for compatibility with previously deployed contracts + * @dev Use ERC721 for interacting with new contracts which are standard-compliant + */ contract DeprecatedERC721 is ERC721 { function takeOwnership(uint256 _tokenId) public; function transfer(address _to, uint256 _tokenId) public; diff --git a/contracts/token/ERC721/DeprecatedERC721Token.sol b/contracts/token/ERC721/DeprecatedERC721Token.sol deleted file mode 100644 index 803b0ad35..000000000 --- a/contracts/token/ERC721/DeprecatedERC721Token.sol +++ /dev/null @@ -1,35 +0,0 @@ -pragma solidity ^0.4.18; - -import "./DeprecatedERC721.sol"; -import "./ERC721Token.sol"; - -contract DeprecatedERC721Token is DeprecatedERC721, ERC721Token { - /** - * @dev Claims the ownership of a given token ID - * @param _tokenId uint256 ID of the token being claimed by the msg.sender - */ - function takeOwnership(uint256 _tokenId) canTransfer(_tokenId) public { - require(msg.sender != ownerOf(_tokenId)); - clearApprovalAndTransfer(ownerOf(_tokenId), msg.sender, _tokenId, "", false); - } - - /** - * @dev Transfers the ownership of a given token ID to another address - * @param _to address to receive the ownership of the given token ID - * @param _tokenId uint256 ID of the token to be transferred - */ - function transfer(address _to, uint256 _tokenId) public { - address owner = ownerOf(_tokenId); - require(owner == msg.sender); - clearApprovalAndTransfer(owner, _to, _tokenId, "", false); - } - - /** - * @dev Gets the list of tokens owned by a given address - * @param _owner address to query the tokens of - * @return uint256[] representing the list of tokens owned by the passed address - */ - function tokensOf(address _owner) public view returns (uint256[]) { - return ownedTokens[_owner]; - } -} \ No newline at end of file