|
@@ -32,19 +32,21 @@ contract ERC721 is ERC165, IERC721 {
|
|
|
// Mapping from owner to operator approvals
|
|
|
mapping (address => mapping (address => bool)) private _operatorApprovals;
|
|
|
|
|
|
- bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;
|
|
|
/*
|
|
|
- * 0x80ac58cd ===
|
|
|
- * bytes4(keccak256('balanceOf(address)')) ^
|
|
|
- * bytes4(keccak256('ownerOf(uint256)')) ^
|
|
|
- * bytes4(keccak256('approve(address,uint256)')) ^
|
|
|
- * bytes4(keccak256('getApproved(uint256)')) ^
|
|
|
- * bytes4(keccak256('setApprovalForAll(address,bool)')) ^
|
|
|
- * bytes4(keccak256('isApprovedForAll(address,address)')) ^
|
|
|
- * bytes4(keccak256('transferFrom(address,address,uint256)')) ^
|
|
|
- * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) ^
|
|
|
- * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)'))
|
|
|
+ * bytes4(keccak256('balanceOf(address)')) == 0x70a08231
|
|
|
+ * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e
|
|
|
+ * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3
|
|
|
+ * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc
|
|
|
+ * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465
|
|
|
+ * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c
|
|
|
+ * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd
|
|
|
+ * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e
|
|
|
+ * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde
|
|
|
+ *
|
|
|
+ * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^
|
|
|
+ * 0xa22cb465 ^ 0xe985e9c ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd
|
|
|
*/
|
|
|
+ bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;
|
|
|
|
|
|
constructor () public {
|
|
|
// register the supported interfaces to conform to ERC721 via ERC165
|