Created
April 24, 2023 12:29
-
-
Save okwme/f42e725380b995ecf6843c45e7cb607d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//SPDX-License-Identifier: Unlicense | |
pragma solidity ^0.8.0; | |
import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; | |
import "@openzeppelin/contracts/utils/Strings.sol"; | |
import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; | |
contract HonorSystemNFT is ERC165 { | |
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); | |
function transferFrom(address from, address to, uint256 tokenId) public { | |
emit Transfer(from, to, tokenId); | |
} | |
function tokenURI(uint _tokenId) public pure returns (string memory _infoUrl) { | |
return string.concat("https://honor-system.folia.app/v1/metadata/", Strings.toString(_tokenId)); | |
} | |
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { | |
return | |
interfaceId == type(IERC721).interfaceId || | |
interfaceId == type(IERC721Metadata).interfaceId || | |
super.supportsInterface(interfaceId); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment