chore: add clear token function comment

This commit is contained in:
zoruka 2022-12-12 14:36:18 -03:00 committed by EmperorOrokuSaki
parent f6510106cd
commit 5900488532
1 changed files with 8 additions and 0 deletions

View File

@ -160,10 +160,18 @@ abstract contract FleekAccessControl {
}
}
/**
* @dev Clears all token roles and not garants an owner role.
* Should be used when burns the token.
*/
function _clearAllTokenRoles(uint256 tokenId) internal {
_tokenRolesVersion[tokenId].increment();
}
/**
* @dev Clears all token roles and garants an owner role.
* Should be used when transfers the token.
*/
function _clearAllTokenRoles(uint256 tokenId, address newOwner) internal {
_clearAllTokenRoles(tokenId);
_grantTokenRole(tokenId, Roles.Owner, newOwner);