From 6e10dcfcbc15552a155f69d6b73900ab3b80c563 Mon Sep 17 00:00:00 2001 From: zhl Date: Fri, 28 Jan 2022 17:09:56 +0800 Subject: [PATCH] =?UTF-8?q?burn=20nft=E6=97=B6=E5=88=A4=E6=96=AD=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E9=94=81=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contracts/BEBase.sol | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/contracts/BEBase.sol b/contracts/BEBase.sol index e9d89de..a243b9c 100644 --- a/contracts/BEBase.sol +++ b/contracts/BEBase.sol @@ -42,23 +42,7 @@ abstract contract BEBase is ERC721, AccessControlEnumerable, ERC721Enumerable, O } /** - * @dev See {IERC721-isApprovedForAll}. - */ - function isApprovedForAll(address owner, address operator) - public - view - override - returns (bool) - { - if (approvalWhitelists[operator]) { - return true; - } - - return super.isApprovedForAll(owner, operator); - } - - /** - * @dev Allow operation to reduce gas fee. + * @dev Allow operation to approval list. */ function addApprovalWhitelist(address proxy) external onlyOwner { require(!approvalWhitelists[proxy], "Invalid proxy address"); @@ -161,6 +145,7 @@ abstract contract BEBase is ERC721, AccessControlEnumerable, ERC721Enumerable, O "Must have burn role to burn" ); require(_exists(tokenId), "TokenId not exists"); + require(!lockedTokens[tokenId], "Can not burn locked token"); require( ownerOf(tokenId) == owner, "current address is not owner of this item now"