Can´t put name to new token

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?

:1234: Code to reproduce

    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") {

        }

    }

:computer: Environment

Truffle

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

1 Like

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?