DeclarationError: Undeclared identifier error when using _setBaseURI

If you need totalSuply() you have to inherit ERC721Enumerable. See the section about " ERC721 Enumerability" in OpenZeppelin Contracts 4.0.

1 Like