# Can´t put name to new token

**URL:** <https://forum.openzeppelin.com/t/can-t-put-name-to-new-token/19713>\
**Category:** Contracts\
**Tags:** erc721\
**Created:** [November 25, 2021, 10:15pm UTC](https://forum.openzeppelin.com/t/can-t-put-name-to-new-token/19713 "2021-11-25T22:15:21Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![igdiaz](https://avatars.discourse-cdn.com/v4/letter/i/58956e/32.png) [@igdiaz](https://forum.openzeppelin.com/u/igdiaz)\
**Post date:** [November 25, 2021, 10:15pm UTC](https://forum.openzeppelin.com/t/can-t-put-name-to-new-token/19713/1 "2021-11-25T22:15:21Z")

</div>

I want to create a smart contract for minting NFTs in Open Sea, very basic. Anyway, I´m struggling.

I can´t put name to new token, I receive this error:

project:/contracts/AxolotolImperium.sol:17:32: TypeError: Wrong argument count for modifier invocation: 2 arguments given but expected 0.  
constructor() internal ERC721 ("AxolotlImperium", "AXOL") {  
^--------------------------------^

In other hand, how do I read the images in my server, assign its non fungible number and upload it to Open Sea?

#### 🔢 Code to reproduce

```auto
    pragma solidity >=0.5.16 <0.9.0;

    import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
    import "@openzeppelin/contracts/ownership/Ownable.sol";

    contract AxolotolImperium is Ownable, ERC721 {

        struct Metadata {
            uint8 color;
            string tittle;
        }

        mapping (uint256 => Metadata) id_to_date;

        string private _currentBaseURI;

        constructor() internal ERC721 ("AxolotlImperium", "AXOL") {

        }

    }

```

#### 💻 Environment

Truffle

---

<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 26, 2021, 2:39pm UTC](https://forum.openzeppelin.com/t/can-t-put-name-to-new-token/19713/2 "2021-11-26T14:39:07Z")

</div>

Hello @igdiaz

What version of Solidity are you using. When I try to compile your code in Remix. I get other errors:

- `import "@openzeppelin/contracts/ownership/Ownable.sol";` is not a valid path in current version of OZ contracts
- internal constructor is also an old syntax. Solidity 0.8.0 uses the `abstract contract` syntax instead of constructor visibility.

I would recommend you update your compiler to 0.8.x and OZ to 4.4.0

---

<div class="post-metadata">

**Author:** ![igdiaz](https://avatars.discourse-cdn.com/v4/letter/i/58956e/32.png) [@igdiaz](https://forum.openzeppelin.com/u/igdiaz)\
**Post date:** [November 26, 2021, 7:52pm UTC](https://forum.openzeppelin.com/t/can-t-put-name-to-new-token/19713/3 "2021-11-26T19:52:33Z")

</div>

Hi Amxx,

Thanks, I´m using the next:

Truffle v5.4.22 (core: 5.4.22)  
Solidity v0.5.16 (solc-js)  
Node v14.17.1  
Web3.js v1.5.3

I tried to unistall Truffle and Solidity, install again and it still being the same version, is that the latest? Or how do I install the 0.8.0?

---

<div class="post-metadata">

**Author:** ![igdiaz](https://avatars.discourse-cdn.com/v4/letter/i/58956e/32.png) [@igdiaz](https://forum.openzeppelin.com/u/igdiaz)\
**Post date:** [December 1, 2021, 2:04pm UTC](https://forum.openzeppelin.com/t/can-t-put-name-to-new-token/19713/4 "2021-12-01T14:04:31Z")

</div>

> [@Amxx](#):
>
> abstract contract

Hi Amxx,

i just updated to Solidity 0.8.3 and OZ 4.4.0 upgradeable. I still can´t name the token, I have this error:

TypeError: Wrong argument count for modifier invocation: 2 arguments given but expected 0.  
--\> project:/contracts/AxolotlImperium.sol:17:23:  
|  
17 | constructor() ERC721Upgradeable ("AxolotlImperium", "AXOL") {  
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

My code is the next one:

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

import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";

contract AxolotlImperium is OwnableUpgradeable, ERC721Upgradeable {
  struct Metadata {
            uint8 color;
            string tittle;
        }

        mapping (uint256 => Metadata) id_to_date;

        string private _currentBaseURI;

        constructor() ERC721Upgradeable ("AxolotlImperium", "AXOL") {
        }
}

```

---

<div class="post-metadata">

**Author:** ![frangio](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/frangio/32/15251_2.png) [@frangio](https://forum.openzeppelin.com/u/frangio)\
**Post date:** [December 2, 2021, 2:30am UTC](https://forum.openzeppelin.com/t/can-t-put-name-to-new-token/19713/5 "2021-12-02T02:30:11Z")

</div>

The code you shared compiles. Double check you have the right dependencies installed.

---

<div class="post-metadata">

**Author:** ![igdiaz](https://avatars.discourse-cdn.com/v4/letter/i/58956e/32.png) [@igdiaz](https://forum.openzeppelin.com/u/igdiaz)\
**Post date:** [December 3, 2021, 2:49am UTC](https://forum.openzeppelin.com/t/can-t-put-name-to-new-token/19713/6 "2021-12-03T02:49:23Z")

</div>

Hi Frangio,

With dependencies, do you mean Truffle, Solidity, and OpenZeppelin? Or do I have to install something else?

---

<div class="post-metadata">

**Author:** ![igdiaz](https://avatars.discourse-cdn.com/v4/letter/i/58956e/32.png) [@igdiaz](https://forum.openzeppelin.com/u/igdiaz)\
**Post date:** [December 3, 2021, 2:51am UTC](https://forum.openzeppelin.com/t/can-t-put-name-to-new-token/19713/7 "2021-12-03T02:51:50Z")

</div>

I´m getting this:

TypeError: Wrong argument count for modifier invocation: 2 arguments given but expected 0.  
--\> project:/contracts/AxolotlImperium.sol:17:23:  
|  
17 | constructor() ERC721Upgradeable ("AxolotlImperium", "AXOL") {  
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

---

<div class="post-metadata">

**Author:** ![frangio](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/frangio/32/15251_2.png) [@frangio](https://forum.openzeppelin.com/u/frangio)\
**Post date:** [December 8, 2021, 5:24pm UTC](https://forum.openzeppelin.com/t/can-t-put-name-to-new-token/19713/8 "2021-12-08T17:24:59Z")

</div>

@igdiaz My bad, not sure how I got the code to compile before.

The error is that you're using upgradeable contracts but using the constructor. Upgradeable contracts don't have a constructor, they have initializer functions. You should [read the docs about this](https://docs.openzeppelin.com/contracts/4.x/upgradeable), and also take a look at the code generated by Contracts Wizard when you select upgradeability.

> **[OpenZeppelin Contracts Wizard](https://wizard.openzeppelin.com/)**
>
> An interactive smart contract generator based on OpenZeppelin Contracts.

---

<div class="post-metadata">

**Author:** ![igdiaz](https://avatars.discourse-cdn.com/v4/letter/i/58956e/32.png) [@igdiaz](https://forum.openzeppelin.com/u/igdiaz)\
**Post date:** [December 8, 2021, 7:25pm UTC](https://forum.openzeppelin.com/t/can-t-put-name-to-new-token/19713/9 "2021-12-08T19:25:54Z")

</div>

Hi Frangio,

Thank you so much, I will check those docs.

---

<div class="post-metadata">

**Author:** ![igdiaz](https://avatars.discourse-cdn.com/v4/letter/i/58956e/32.png) [@igdiaz](https://forum.openzeppelin.com/u/igdiaz)\
**Post date:** [December 9, 2021, 1:14am UTC](https://forum.openzeppelin.com/t/can-t-put-name-to-new-token/19713/10 "2021-12-09T01:14:48Z")

</div>

Hi Frangio,

The solution was to erase the Open Zeppelin upgradeable folder and install the normal contracts:

```auto
npm install @openzeppelin/contracts

```

These are my current versions:

Truffle v5.4.22 (core: 5.4.22)  
Solidity - 0.8.3 (solc-js)  
Node v14.17.1  
Web3.js v1.5.3

I´ll keep using the constructor as long as I didn´t understand the benefit of using the initializer with the upgradeable contracts.

Although, I´ll keep exploring the Contracts Wizard, looks very good.

Regards.
