|
@@ -36,9 +36,9 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
|
|
|
using SafeMath for uint256;
|
|
|
using AddressUtils for address;
|
|
|
|
|
|
- // Equals to `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`
|
|
|
+ // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
|
|
|
// which can be also obtained as `ERC721Receiver(0).onERC721Received.selector`
|
|
|
- bytes4 private constant ERC721_RECEIVED = 0xf0b9e5ba;
|
|
|
+ bytes4 private constant ERC721_RECEIVED = 0x150b7a02;
|
|
|
|
|
|
// Mapping from token ID to owner
|
|
|
mapping (uint256 => address) internal tokenOwner;
|
|
@@ -194,7 +194,7 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
|
|
|
* @dev Safely transfers the ownership of a given token ID to another address
|
|
|
* If the target address is a contract, it must implement `onERC721Received`,
|
|
|
* which is called upon a safe transfer, and return the magic value
|
|
|
- * `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`; otherwise,
|
|
|
+ * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
|
|
|
* the transfer is reverted.
|
|
|
*
|
|
|
* Requires the msg sender to be the owner, approved, or operator
|
|
@@ -218,7 +218,7 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
|
|
|
* @dev Safely transfers the ownership of a given token ID to another address
|
|
|
* If the target address is a contract, it must implement `onERC721Received`,
|
|
|
* which is called upon a safe transfer, and return the magic value
|
|
|
- * `bytes4(keccak256("onERC721Received(address,uint256,bytes)"))`; otherwise,
|
|
|
+ * `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`; otherwise,
|
|
|
* the transfer is reverted.
|
|
|
* Requires the msg sender to be the owner, approved, or operator
|
|
|
* @param _from current owner of the token
|
|
@@ -346,7 +346,7 @@ contract ERC721BasicToken is SupportsInterfaceWithLookup, ERC721Basic {
|
|
|
return true;
|
|
|
}
|
|
|
bytes4 retval = ERC721Receiver(_to).onERC721Received(
|
|
|
- _from, _tokenId, _data);
|
|
|
+ msg.sender, _from, _tokenId, _data);
|
|
|
return (retval == ERC721_RECEIVED);
|
|
|
}
|
|
|
}
|