瀏覽代碼

Made tokenURI external, as per the spec. (#1444)

Nicolás Venturo 7 年之前
父節點
當前提交
5bf3907862
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      contracts/token/ERC721/ERC721Metadata.sol
  2. 1 1
      contracts/token/ERC721/IERC721Metadata.sol

+ 1 - 1
contracts/token/ERC721/ERC721Metadata.sol

@@ -54,7 +54,7 @@ contract ERC721Metadata is ERC165, ERC721, IERC721Metadata {
    * Throws if the token ID does not exist. May return an empty string.
    * Throws if the token ID does not exist. May return an empty string.
    * @param tokenId uint256 ID of the token to query
    * @param tokenId uint256 ID of the token to query
    */
    */
-  function tokenURI(uint256 tokenId) public view returns (string) {
+  function tokenURI(uint256 tokenId) external view returns (string) {
     require(_exists(tokenId));
     require(_exists(tokenId));
     return _tokenURIs[tokenId];
     return _tokenURIs[tokenId];
   }
   }

+ 1 - 1
contracts/token/ERC721/IERC721Metadata.sol

@@ -9,5 +9,5 @@ import "./IERC721.sol";
 contract IERC721Metadata is IERC721 {
 contract IERC721Metadata is IERC721 {
   function name() external view returns (string);
   function name() external view returns (string);
   function symbol() external view returns (string);
   function symbol() external view returns (string);
-  function tokenURI(uint256 tokenId) public view returns (string);
+  function tokenURI(uint256 tokenId) external view returns (string);
 }
 }