# Base constructor arguments given twice when using ERC1155 Preset

**URL:** <https://forum.openzeppelin.com/t/base-constructor-arguments-given-twice-when-using-erc1155-preset/5081>\
**Category:** Contracts\
**Created:** [December 17, 2020, 4:46pm UTC](https://forum.openzeppelin.com/t/base-constructor-arguments-given-twice-when-using-erc1155-preset/5081 "2020-12-17T16:46:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomas\_Velasquez](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/tomas_velasquez/32/3728_2.png) [@Tomas\_Velasquez](https://forum.openzeppelin.com/u/Tomas_Velasquez)\
**Post date:** [December 17, 2020, 4:46pm UTC](https://forum.openzeppelin.com/t/base-constructor-arguments-given-twice-when-using-erc1155-preset/5081/1 "2020-12-17T16:46:29Z")

</div>

Hello, Im having a problem when compiling my smart contracts.  
After the constructor, where it is suposed to be the ERC1155(uri) the compiler return me this error Base constructor arguments given twice.  
Here the contract

```auto
pragma solidity >=0.4.22 <0.8.0;

import "@openzeppelin/contracts/presets/ERC1155PresetMinterPauser.sol";

abstract contract PruebasToken is ERC1155PresetMinterPauser {
    
    uint256 public constant xx = 0;
    uint256 public constant yy = 0;
    uint256 public constant zz = 0;

  constructor() ERC1155(uri) {
    _mint(msg.sender, xx, 10 ** 10, "");
    _mint(msg.sender, yy,10 ** 10, "");
    _mint(msg.sender, zz,10 ** 10, "");
  }
}

```

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [December 17, 2020, 11:48pm UTC](https://forum.openzeppelin.com/t/base-constructor-arguments-given-twice-when-using-erc1155-preset/5081/2 "2020-12-17T23:48:54Z")

</div>

Hi @Tomas_Velasquez,

Welcome to the community 👋

I recommend having a look at: [Create an ERC1155](https://forum.openzeppelin.com/t/create-an-erc1155/4433).

* * *

As you are extending `ERC1155PresetMinterPauser` you should call the constructor of `ERC1155PresetMinterPauser` rather than the `ERC1155` constructor.

`uri` isn’t defined in your contract. You could pass a value in using your constructor or set a value in a constant.

I wasn’t sure why you set your contract to be `abstract`. Unless you wanted to create an ERC1155 which inherits from this contract.

You have a wide pragma, `>=0.4.22 <0.8.0`, when you may be better to stick to a similar pragma to the contract you are extending.

Your contract could look something like the following:

```auto
// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.4.22 <0.8.0;

import "@openzeppelin/contracts/presets/ERC1155PresetMinterPauser.sol";

contract PruebasToken is ERC1155PresetMinterPauser {
    uint256 public constant xx = 1;
    uint256 public constant yy = 2;
    uint256 public constant zz = 3;

    constructor(string memory uri) public ERC1155PresetMinterPauser(uri) {
        _mint(msg.sender, xx, 10**10, "");
        _mint(msg.sender, yy, 10**10, "");
        _mint(msg.sender, zz, 10**10, "");
    }
}

```

---

<div class="post-metadata">

**Author:** ![abcoathup](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/abcoathup/32/415_2.png) [@abcoathup](https://forum.openzeppelin.com/u/abcoathup)\
**Post date:** [January 4, 2021, 4:33am UTC](https://forum.openzeppelin.com/t/base-constructor-arguments-given-twice-when-using-erc1155-preset/5081/3 "2021-01-04T04:33:00Z")

</div>

Hi @Tomas_Velasquez,

I just wanted to check that you resolved your issue?

---

<div class="post-metadata">

**Author:** ![Tomas\_Velasquez](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/tomas_velasquez/32/3728_2.png) [@Tomas\_Velasquez](https://forum.openzeppelin.com/u/Tomas_Velasquez)\
**Post date:** [January 5, 2021, 12:52pm UTC](https://forum.openzeppelin.com/t/base-constructor-arguments-given-twice-when-using-erc1155-preset/5081/4 "2021-01-05T12:52:20Z")

</div>

Hi @abcoathup I resolved the issue.  
Thanks!
