Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'upstream/master' into elopio-refactor/1…
…175/event-underscores
  • Loading branch information
frangio committed Aug 31, 2018
commit f54d50d955719f394f5c627a1754661dd15e815c
27 changes: 12 additions & 15 deletions contracts/token/ERC721/ERC721Basic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -60,21 +60,18 @@ contract ERC721Basic is SupportsInterfaceWithLookup, IERC721Basic {
return owner;
}

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 Approves another address to transfer the given token ID
* The zero address indicates there is no approved address.
* There can only be one approved address per token at a given time.
* Can only be called by the token owner or an approved operator.
* @param _to address to be approved for the given token ID
* @param _tokenId uint256 ID of the token to be approved
*/
function approve(address _to, uint256 _tokenId) public {
address owner = ownerOf(_tokenId);
require(_to != owner);
require(msg.sender == owner || isApprovedForAll(owner, msg.sender));

tokenApprovals[_tokenId] = _to;
emit Approval(owner, _to, _tokenId);
Expand Down
18 changes: 9 additions & 9 deletions contracts/token/ERC721/IERC721Basic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ contract IERC721Basic is IERC165 {
*/

event Transfer(
address indexed _from,
address indexed _to,
uint256 indexed _tokenId
address indexed from,
address indexed to,
uint256 indexed tokenId
);
event Approval(
address indexed _owner,
address indexed _approved,
uint256 indexed _tokenId
address indexed owner,
address indexed approved,
uint256 indexed tokenId
);
event ApprovalForAll(
address indexed _owner,
address indexed _operator,
bool _approved
address indexed owner,
address indexed operator,
bool approved
);

function balanceOf(address _owner) public view returns (uint256 _balance);
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.