Remove deprecated implementation

We only want to keep the interface, for interacting with already deployed contracts
This commit is contained in:
Santiago Palladino
2018-03-09 15:40:48 -03:00
parent 6f180a6c5a
commit 6fbe771c27
2 changed files with 5 additions and 35 deletions

View File

@ -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;

View File

@ -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];
}
}