diff --git a/src-upgradeable/src/ERC721SeaDropUpgradeable.sol b/src-upgradeable/src/ERC721SeaDropUpgradeable.sol index ffae3445..1e9c4f95 100644 --- a/src-upgradeable/src/ERC721SeaDropUpgradeable.sol +++ b/src-upgradeable/src/ERC721SeaDropUpgradeable.sol @@ -175,6 +175,17 @@ contract ERC721SeaDropUpgradeable is emit AllowedSeaDropUpdated(allowedSeaDrop); } + /** + * @notice Burns `tokenId`. The caller must own `tokenId` or be an + * approved operator. + * + * @param tokenId The token id to burn. + */ + // solhint-disable-next-line comprehensive-interface + function burn(uint256 tokenId) external { + _burn(tokenId, true); + } + /** * @dev Overrides the `_startTokenId` function from ERC721A * to start at token id `1`. diff --git a/src-upgradeable/src/extensions/ERC721SeaDropBurnableUpgradeable.sol b/src-upgradeable/src/extensions/ERC721SeaDropBurnableUpgradeable.sol deleted file mode 100644 index b7862fa3..00000000 --- a/src-upgradeable/src/extensions/ERC721SeaDropBurnableUpgradeable.sol +++ /dev/null @@ -1,51 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.17; - -import { ERC721SeaDropUpgradeable } from "../ERC721SeaDropUpgradeable.sol"; - -/** - * @title ERC721SeaDropBurnable - * @author James Wenzel (emo.eth) - * @author Ryan Ghods (ralxz.eth) - * @author Stephan Min (stephanm.eth) - * @notice ERC721SeaDropBurnable is a token contract that extends - * ERC721SeaDrop to additionally provide a burn function. - */ -contract ERC721SeaDropBurnableUpgradeable is ERC721SeaDropUpgradeable { - /** - * @notice Deploy the token contract with its name, symbol, - * and allowed SeaDrop addresses. - */ - function __ERC721SeaDropBurnable_init( - string memory name, - string memory symbol, - address[] memory allowedSeaDrop - ) internal onlyInitializing { - __ERC721A_init_unchained(name, symbol); - __ConstructorInitializable_init_unchained(); - __TwoStepOwnable_init_unchained(); - __ERC721ContractMetadata_init_unchained(name, symbol); - __ReentrancyGuard_init_unchained(); - __ERC721SeaDrop_init_unchained(name, symbol, allowedSeaDrop); - __ERC721SeaDrop_init_unchained(name, symbol, allowedSeaDrop); - __ERC721SeaDropBurnable_init_unchained(name, symbol, allowedSeaDrop); - } - - function __ERC721SeaDropBurnable_init_unchained( - string memory, - string memory, - address, - address[] memory - ) internal onlyInitializing {} - - /** - * @notice Burns `tokenId`. The caller must own `tokenId` or be an - * approved operator. - * - * @param tokenId The token id to burn. - */ - // solhint-disable-next-line comprehensive-interface - function burn(uint256 tokenId) external { - _burn(tokenId, true); - } -} diff --git a/src/ERC721SeaDrop.sol b/src/ERC721SeaDrop.sol index 5cb11482..e59a511d 100644 --- a/src/ERC721SeaDrop.sol +++ b/src/ERC721SeaDrop.sol @@ -144,6 +144,17 @@ contract ERC721SeaDrop is emit AllowedSeaDropUpdated(allowedSeaDrop); } + /** + * @notice Burns `tokenId`. The caller must own `tokenId` or be an + * approved operator. + * + * @param tokenId The token id to burn. + */ + // solhint-disable-next-line comprehensive-interface + function burn(uint256 tokenId) external { + _burn(tokenId, true); + } + /** * @dev Overrides the `_startTokenId` function from ERC721A * to start at token id `1`. diff --git a/src/clones/ERC721SeaDropCloneable.sol b/src/clones/ERC721SeaDropCloneable.sol index 8330877a..128cbc4f 100644 --- a/src/clones/ERC721SeaDropCloneable.sol +++ b/src/clones/ERC721SeaDropCloneable.sol @@ -136,6 +136,17 @@ contract ERC721SeaDropCloneable is emit AllowedSeaDropUpdated(allowedSeaDrop); } + /** + * @notice Burns `tokenId`. The caller must own `tokenId` or be an + * approved operator. + * + * @param tokenId The token id to burn. + */ + // solhint-disable-next-line comprehensive-interface + function burn(uint256 tokenId) external { + _burn(tokenId, true); + } + /** * @dev Overrides the `_startTokenId` function from ERC721A * to start at token id `1`. diff --git a/src/extensions/ERC721SeaDropBurnable.sol b/src/extensions/ERC721SeaDropBurnable.sol deleted file mode 100644 index 6ebc5f97..00000000 --- a/src/extensions/ERC721SeaDropBurnable.sol +++ /dev/null @@ -1,36 +0,0 @@ -// SPDX-License-Identifier: MIT -pragma solidity 0.8.17; - -import { ERC721SeaDrop } from "../ERC721SeaDrop.sol"; - -/** - * @title ERC721SeaDropBurnable - * @author James Wenzel (emo.eth) - * @author Ryan Ghods (ralxz.eth) - * @author Stephan Min (stephanm.eth) - * @author Michael Cohen (notmichael.eth) - * @notice ERC721SeaDropBurnable is a token contract that extends - * ERC721SeaDrop to additionally provide a burn function. - */ -contract ERC721SeaDropBurnable is ERC721SeaDrop { - /** - * @notice Deploy the token contract with its name, symbol, - * and allowed SeaDrop addresses. - */ - constructor( - string memory name, - string memory symbol, - address[] memory allowedSeaDrop - ) ERC721SeaDrop(name, symbol, allowedSeaDrop) {} - - /** - * @notice Burns `tokenId`. The caller must own `tokenId` or be an - * approved operator. - * - * @param tokenId The token id to burn. - */ - // solhint-disable-next-line comprehensive-interface - function burn(uint256 tokenId) external { - _burn(tokenId, true); - } -}