// @openzeppelin v3.2.0
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract K is ERC721URIStorage {
address public owner;
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
constructor()
ERC721("Xray Your Zen", "XYZ")
{
owner = msg.sender;
}
function mint(address receiver, string memory tokenURI)
public
returns (uint256 _id)
{
require(
msg.sender == owner,
"Unauthorized."
);
_tokenIds.increment();
_id = _tokenIds.current();
_mint(receiver, _id);
_setTokenURI(_id, tokenURI);
}
}
PLATFORM: darwin
GANACHE VERSION: 2.5.4
EXCEPTION:
UnknownBaseContractIdError: Cannot locate base contract ID 1527$ of contract$ K (ID 67)
at /Applications/Ganache.app/Contents/Resources/static/node/node_modules/@truffle/decoder/lib/allocate/storage.ts:181:13
at Array.map (<anonymous>)
at allocateContract (/Applications/Ganache.app/Contents/Resources/static/node/node_modules/@truffle/decoder/lib/allocate/storage.ts:178:59)
at Object.getStorageAllocations (/Applications/Ganache.app/Contents/Resources/static/node/node_modules/@truffle/decoder/lib/allocate/storage.ts:23:19)
at TruffleContractDecoder.<anonymous> (/Applications/Ganache.app/Contents/Resources/static/node/node_modules/@truffle/decoder/lib/interface/contract-decoder.ts:237:39)
at Generator.next (<anonymous>)
at fulfilled (/Applications/Ganache.app/Contents/Resources/static/node/node_modules/@truffle/decoder/dist/interface/contract-decoder.js:5:58)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Deployed OZ ERC721 contract as follows:
PLATFORM: darwin GANACHE VERSION: 2.5.4
EXCEPTION: