I am creating a token like this:
pragma solidity ^0.5.0;
import "../utils/math/SafeMath.sol";
contract ExampleDivisibleNFTs {
using SafeMath for uint256;
// Percentage of ownership over a token
mapping(address => mapping(string => uint)) ownerToTokenShare;
// If a token has been created
mapping(string => bool) mintedToken;
modifier onlyNonExistentToken(string _tokenId) {
require(mintedToken[_tokenId] == false, "the NFT already exists");
_;
}
modifier onlyExistentToken(string _tokenId) {
require(mintedToken[_tokenId] == true, "the NFT doesn't exists");
_;
}
}
and I am testing with remix but I have the following problem
Data location must be "storage" or "memory" for parameter in function, but none was given.
modifier onlyNonExistentToken(string _tokenId) {
^-------------^
why a parameter may to be a "storage", It is not always "memory" ?