Difference between inheriting only ERC721Enumerable and together with ERC721

currently working on one contract and I struggle to understand one thing.

Is there any difference between:

contract A is ERC721Enumerable {
    constructor() ERC721("name", "symbol") {}


contract B is ERC721, ERC721Enumerable {
    constructor() ERC721("name", "symbol") {}

Is it just good practice or is there any serious reason to import ERC721 as well as inheriting it even tho ERC721Enumerable already does both?

Just stumbled upon this due ContractWizard doing it and also the requirement of overriding _update, _increaseBalance, supportInterface which contract A does not need.


This is mainly for good practice and clarity. See explanation in https://github.com/OpenZeppelin/contracts-wizard/issues/101#issuecomment-1066978279

1 Like