chiru-labs / ERC721A

https://ERC721A.org
MIT License
2.5k stars 840 forks source link

Batch burning with ERC721ABurnable implementation #455

Open web3sOAmazing opened 1 year ago

web3sOAmazing commented 1 year ago

Hey, community Is there any way to be able to batch burning with ERC721A implementation?

abstract contract ERC721ABurnable is ERC721A, IERC721ABurnable {
    /**
     * @dev Burns `tokenId`. See {ERC721A-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) public virtual override {
        _burn(tokenId, true);
    }
}

Cannot see any option (For example adding quantity and startTokenId instead of tokenId) similar with _beforeTokenTransfers

function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

Only can burn one token at once?

nidhhoggr commented 1 year ago

A quick look at the code suggests batch burns are currently not supported, and batch transfers are not implemented, but there is an open pull request regarding the feature:

https://github.com/chiru-labs/ERC721A/pull/444

Nlferu commented 5 days ago

@web3sOAmazing

Those features have been recently implemented along with batchTransfer and I have already tested it and it works perfect!