设置tokenuri支持: 增加3个方法实现就行 参考文档: https://hackernoon.com/zh/理解以太坊中的代币标准第二部分erc721 ipfs的链接如何上传? 721合约是一个标准,还是完整的代码实现?基于接口实现? function setTokenURI(uint256 tokenId, string memory _tokenURI) external onlyOwner { super._setTokenURI(tokenId, _tokenURI); } function setBaseURI(string memory baseURI_) external onlyOwner { super._setBaseURI(baseURI_); } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { string memory uri = super.tokenURI(tokenId); return string(abi.encodePacked(uri, ".json")); }
标签:function,tokenuri,string,tokenId,tokenURI,eve,设置,memory,super From: https://www.cnblogs.com/zhanchenjin/p/18167718