Hi guys
Iām getting this error when I try to truffle migrate my ERC721 Token.
Error: Could not find artifacts for MorarableToken from any sources.
Has anyone made Morarable or know how to solve this migration issues?
Cheers
MorarableToken
SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import "../node_modules/@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "../node_modules/@openzeppelin/contracts/utils/Counters.sol";
contract MorarableToken is ERC721 {
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
constructor () ERC721("MorarableToken", "MORA" ){}
struct Item {
uint256 id;
address creator;
string uri;
}
mapping (uint256 => Item) public Items;
function createItem(string memory uri) public returns (uint256){
_tokenIds.increment();
uint256 newItemId = _tokenIds.current();
_safeMint(msg.sender, newItemId);
Items[newItemId] = Item(newItemId, msg.sender, uri);
return newItemId;
}
function tokenURI(uint256 tokenId) public view override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
return Items[tokenId].uri;
}
}
TokenMigration2
const MorarableToken = artifacts.require("MorarableToken");
module.exports = function (deployer) {
deployer.deploy(MorarableToken);
};