Skip to content

Invalid contracts generated for @openzeppelin/contracts 4.9.0 #254

@annamcallister

Description

@annamcallister

The wizard no longer works with all options when @openzeppelin/contracts is installed at v4.9.0, which is the latest version published to npm as of yesterday.

e.g. when URI Storage is chosen for ERC721, you get this compilation error.

Derived contract must override function \"supportsInterface\". Two or more base classes define function with same name and parameter types.\n --> contract.sol:8:1:\n |\n8 | contract Token is ERC721, ERC721URIStorage, Ownable {\n | ^ (Relevant source part starts here and spans across multiple lines).\nNote: Definition in \"ERC721\": \n --> @openzeppelin/contracts/token/ERC721/ERC721.sol:52:5:\n |\n52 | function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\n | ^ (Relevant source part starts here and spans across multiple lines).\nNote: Definition in \"ERC721URIStorage\": \n --> @openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol:21:5:\n |\n21 | function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, IERC165) returns (bool) {\n | ^ (Relevant source part starts here and spans across multiple lines).\n\n","message":"Derived contract must override function \"supportsInterface\". Two or more base classes define function with same name and parameter types."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions