Hi,
Long story short .. is it possible to lock safeTransferFrom function and keep _burn function ?
What I want to achieve is to let user to mint the NFT's and do not allow them to transfer, but allow them to burn their own NFTs it they want to..
Is it at all possible ?
I wrote code like this, but of course it blocks the burn function.
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize)
internal
whenNotPaused
override(ERC721, ERC721Enumerable)
{
super._beforeTokenTransfer(from, to, tokenId, batchSize);
if (from == msg.sender) {
revert("Transfer locked");
}
}
Thanks