@@ -61,7 +61,7 @@ abstract contract SBT is ISBT, ERC165Upgradeable {
6161 * @return true if `tokenId_` exists, false otherwise
6262 */
6363 function tokenExists (uint256 tokenId_ ) public view virtual override returns (bool ) {
64- return ownerOf (tokenId_) != address (0 );
64+ return _ownerOf (tokenId_) != address (0 );
6565 }
6666
6767 /**
@@ -101,7 +101,7 @@ abstract contract SBT is ISBT, ERC165Upgradeable {
101101 * @return address of an owner or `address(0)` if token does not exist
102102 */
103103 function ownerOf (uint256 tokenId_ ) public view virtual override returns (address ) {
104- return _tokenOwners[ tokenId_] ;
104+ return _ownerOf ( tokenId_) ;
105105 }
106106
107107 /**
@@ -172,7 +172,7 @@ abstract contract SBT is ISBT, ERC165Upgradeable {
172172 * @param tokenId_ the token to burn
173173 */
174174 function _burn (uint256 tokenId_ ) internal virtual {
175- address owner_ = ownerOf (tokenId_);
175+ address owner_ = _ownerOf (tokenId_);
176176 require (owner_ != address (0 ), "SBT: token doesn't exist " );
177177
178178 _beforeTokenAction (address (0 ), tokenId_);
@@ -204,6 +204,15 @@ abstract contract SBT is ISBT, ERC165Upgradeable {
204204 _baseURI = baseURI_;
205205 }
206206
207+ /**
208+ * @notice The function to get the owner of a token
209+ * @param tokenId_ the token to get the owner of
210+ * @return address of an owner or `address(0)` if token does not exist
211+ */
212+ function _ownerOf (uint256 tokenId_ ) internal view virtual returns (address ) {
213+ return _tokenOwners[tokenId_];
214+ }
215+
207216 /**
208217 * @notice The hook that is called before the `mint` and `burn` actions occur
209218 * @param to_ the receiver address if `mint` and `address(0)` if burn
0 commit comments