0
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import "./AdminContract.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol";

//error on line below
contract sss is ERC1155, Ownable, Pausable, ERC2981, ERC1155Supply, ERC1155Holder, ERC1155Burnable, IERC1155MetadataURI {

    
    event Minted (uint indexed tokenId,address indexed owner, uint quantity);

    address operator;
    AdminConsole admin;

from solidity:
TypeError: Linearization of inheritance graph impossible
  --> sss.sol:23:1:
   |
23 | contract sss is ERC1155, Ownable, Pausable, ERC2981, ERC1155Supply, ERC1155Holder, ERC1155Burnable, IERC1155MetadataURI {
   | ^ (Relevant source part starts here and spans across multiple lines).

I imported IERC1155MetadataURI from openzep and thats giving me type error mentioned below:

TypeError: Linearization of inheritance graph impossible

S M
  • 5
  • 2

1 Answers1

0
Linearization of inheritance graph impossible

that means inheritance order is not linear. solidity follows C3_linearization. Since your contract is inheriting too many contracts and those contracts are also probably inheriting from each other you are getting this error.

Yilmaz
  • 35,338
  • 10
  • 157
  • 202