Why is the function _addTokenTo internal?

erc721

#1

On 2018-08-24 12:57:35 @german.lugo asked in Slack:

Why the function addTokenTo is internal? how can I call it to create a deed?


#2

On 2018-08-24 14:41:38, @shrugs answered:

_mint is internal because the logic for how a token is minted will differ for everyone. If you want to add the ability for your admin address to mint tokens whenever you want, for example, you would do some thing like

contract MyToken is ERC721Token {
   function mint(address _to, uint256 _tokenId)
     public
   {
      require(msg.sender === owner); // <- you have to write this part yourself
      _mint(_to, _tokenId);
   }
}