It depends on the implementation of your mint
, burnToken
, addToken
and removeToken
functions.
The ERC-721 pattern does not declare a mint
function, in the same way that ERC-20 doesn't either. So, if your mint
function requires that the token ID has not been used before, then the answer to your question is "no". Otherwise, it's probably "yes, just be careful".
Following the links in ERC721.org, you'll find this basic implementation. Go to line 371 there and you'll see something like this:
function _mint(address _to, uint256 _tokenId) internal {
require(_to != address(0));
_addToken(_to, _tokenId);
Transfer(0x0, _to, _tokenId);
}
So, in this case, it appears that you can mint it again because it only requires that to
is not address(0)
. But in line 410 we get this:
function _addToken(address _to, uint256 _tokenId) private {
require(tokenOwner[_tokenId] == address(0));
tokenOwner[_tokenId] = _to;
uint256 length = balanceOf(_to);
ownedTokens[_to].push(_tokenId);
ownedTokensIndex[_tokenId] = length;
totalTokens = totalTokens.add(1);
}
The require
there guarantees the token has no owner in that moment.
And that leads us to the burn
and removeToken
implementations. There's no burnToken
function in this example, but note that the IS a removeToken()
.
function _removeToken(address _from, uint256 _tokenId) private {
require(ownerOf(_tokenId) == _from);
uint256 tokenIndex = ownedTokensIndex[_tokenId];
uint256 lastTokenIndex = balanceOf(_from).sub(1);
uint256 lastToken = ownedTokens[_from][lastTokenIndex];
tokenOwner[_tokenId] = 0;
ownedTokens[_from][tokenIndex] = lastToken;
ownedTokens[_from][lastTokenIndex] = 0;
ownedTokens[_from].length--;
ownedTokensIndex[_tokenId] = 0;
ownedTokensIndex[lastToken] = tokenIndex;
totalTokens = totalTokens.sub(1);
}
It effectively sets the owner of that token to 0 and clears all references. If you follow that implementation and call removeToken
inside you burnToken
function, that token ID will belong to no one after being burned. And in that case, the answer to your question is YES, you can mint a token that has been burned before.