/**
* @dev Returns an URI for a given token ID.
* Throws if the token ID does not exist. May return an empty string.
* @param tokenId uint256 ID of the token to query
*/
function tokenURI(uint256 tokenId) external view returns (string memory) {
require(_exists(tokenId), "KIP17Metadata: URI query for nonexistent token");
return _tokenURIs[tokenId];
}
/**
* @dev Internal function to set the token URI for a given token.
* Reverts if the token ID does not exist.
* @param tokenId uint256 ID of the token to set its URI
* @param uri string URI to assign
*/
function _setTokenURI(uint256 tokenId, string memory uri) internal {
require(_exists(tokenId), "KIP17Metadata: URI set of nonexistent token");
_tokenURIs[tokenId] = uri;
}
이렇게 나오는데 하고 디플로이를 하게돼면
to에 받을 주소입력하고
tokenID에 1이라고 하면 자동으로
tokenURI가
https://test.mosongkim.repl.co/res_json/1.json
입력되게 하고싶습니다
tokenID에 2이라고 입력하면
tokenURI가
https://test.mosongkim.repl.co/res_json/2.json
나오게끔 컨트랙트 솔리디티를 바꿀수있을까요?
URI와 토큰아이디를 하나 하나 입력할려니 너무힘드네요
아래 코드를 넣고 싶은데 어떻게 해야됄까요
contract TheStripesNFT is ERC721Enumerable, Ownable {
using Strings for uint256;
string public tokenURI;
string public tokenURI = ".json";