in the WolfGame V2, their new contract WoolfReborn.sol(https://etherscan.deth.net/address/0x7f36182dee28c45de6072a34d29855bae76dbe2f) can burn NFT from old contract Woolf.sol(https://etherscan.deth.net/address/0xeb834ae72b30866af20a6ce5440fa598bfad3a42)
by use the function
function _attemptBurn(address owner, uint256 tokenId) internal
{
woolf.transferFrom(owner, address(0xdead), tokenId);
}
how did they do that? in Woolf the transferFrom is
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
// Hardcode the Barn's approval so that users don't have to waste gas approving
if (_msgSender() != address(barn))
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
It require _msgSender() is approved or owner, but the new contract is not the owner of the NFT, and there is no code to let the new contract get approved