# New ERC1155SupplyUpgradeable is throwing errors

**URL:** <https://forum.openzeppelin.com/t/new-erc1155supplyupgradeable-is-throwing-errors/38189>\
**Category:** Contracts\
**Tags:** openzeppelin-contracts, erc1155\
**Created:** [October 21, 2023, 2:24pm UTC](https://forum.openzeppelin.com/t/new-erc1155supplyupgradeable-is-throwing-errors/38189 "2023-10-21T14:24:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sasha](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/sasha/32/11473_2.png) [@sasha](https://forum.openzeppelin.com/u/sasha)\
**Post date:** [October 21, 2023, 2:24pm UTC](https://forum.openzeppelin.com/t/new-erc1155supplyupgradeable-is-throwing-errors/38189/1 "2023-10-21T14:24:52Z")

</div>

Hi

My parent contract inherits ERC1155Upgradeable & ERC1155SupplyUpgradeable with other contracts from OZ, the problem is the supply contract is throwing 3 errors. I even tried OZ Wizard and errors persist still.

```auto
contract Example is Initializable, OwnableUpgradeable, ERC1155Upgradeable, ERC1155SupplyUpgradeable {

    function initialize(address initialOwner) initializer public {
        __ERC1155_init("");
        __Ownable_init(initialOwner);
        __ERC1155Supply_init();
    }

  function _update(address from, address to, uint256[] memory ids, uint256[] memory values)
          internal
          override(ERC1155Upgradeable, ERC1155SupplyUpgradeable)
      {
          super._update(from, to, ids, values);
      }
}

```

errors are:

- Function has override specified but does not override anything.

- Invalid contract specified in override list: "ERC1155Upgradeable".

- Member "\_update" not found or not visible after argument-dependent lookup in type(contract super ERC1155SupplyUpgradeable).

even ERC1155Supply standalone contract isn't compiling!!

Thanks in advance

---

<div class="post-metadata">

**Author:** ![barakman](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/barakman/32/855_2.png) [@barakman](https://forum.openzeppelin.com/u/barakman)\
**Post date:** [October 23, 2023, 1:39pm UTC](https://forum.openzeppelin.com/t/new-erc1155supplyupgradeable-is-throwing-errors/38189/2 "2023-10-23T13:39:16Z")

</div>

Semantic:

Throwing an error is a term typically associated with runtime behavior, for example, a transaction-revert.

In your case, these are **compilation** errors (I guess you could claim that the compiler throws an error, but the typical terminology in this case does not involve 'throwing').

* * *

As to your actual problem:

The `ERC1155SupplyUpgradeable` contract already inherits the `ERC1155Upgradeable` contract, and it already overrides the `_update` function of that contract.

So your contract needs to inherit only the `ERC1155SupplyUpgradeable` contract, and it needs to override the `_update` function only of that contract.

---

<div class="post-metadata">

**Author:** ![sasha](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/sasha/32/11473_2.png) [@sasha](https://forum.openzeppelin.com/u/sasha)\
**Post date:** [October 23, 2023, 2:05pm UTC](https://forum.openzeppelin.com/t/new-erc1155supplyupgradeable-is-throwing-errors/38189/3 "2023-10-23T14:05:34Z")

</div>

Thanks for your input @barakman they are indeed compilation errors. But ERC1155SupplyUpgradeable as a contract isn't compiling before any inheritance (screenshot below). The wizard was used to debug before asking for support and the code I posted above was the wizard code.

@frangio can you please take a quick look and advise. Thanks

 ![image](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/3X/9/9/99c4d1f13d36c874b3e6d0a78650cb3c7a8e5845.png)  
Note: tried to change the header to compilation errors but couldn't

---

<div class="post-metadata">

**Author:** ![Amxx](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/amxx/32/668_2.png) [@Amxx](https://forum.openzeppelin.com/u/Amxx)\
**Post date:** [November 6, 2023, 1:53pm UTC](https://forum.openzeppelin.com/t/new-erc1155supplyupgradeable-is-throwing-errors/38189/4 "2023-11-06T13:53:30Z")

</div>

Is it possible that your remix instances has old version of the dependency cached ? (4.x).

Please check the relevant `.deps/npm/@openzeppelin/contracts-upgradeable/...` files in your remix workspace, and check that they start with

```auto
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (...)

```

If that is not he case, you'll need to either reset the cache (by deleting the old files) or force using a new version by doing

```auto
import "@openzeppelin/contracts-upgradeable@5.0.0/...";

```
