From c4b7027a56ee9d03cf41c46bd9a93cdf512ef8ba Mon Sep 17 00:00:00 2001 From: Michele Balistreri Date: Tue, 14 Apr 2020 09:31:53 +0300 Subject: [PATCH] use constant for ERC721 callback --- contracts/NFTBucket.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/NFTBucket.sol b/contracts/NFTBucket.sol index e49a9c3..83bad7a 100644 --- a/contracts/NFTBucket.sol +++ b/contracts/NFTBucket.sol @@ -32,7 +32,7 @@ contract NFTBucket is IERC165, IERC721Receiver { bytes32 code; } - bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; + bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; //bytes4(keccak256("onERC721Received(address,address,uint256,bytes)")) bytes32 constant EIP712DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); bytes32 constant REDEEM_TYPEHASH = keccak256("Redeem(uint256 blockNumber,bytes32 blockHash,address receiver,bytes32 code)"); @@ -169,6 +169,6 @@ contract NFTBucket is IERC165, IERC721Receiver { gift.tokenID = _tokenID; gift.code = code; - return 0x150b7a02; //bytes4(keccak256("onERC721Received(address,address,uint256,bytes)")) + return _ERC721_RECEIVED; } }