Skip to content

Instantly share code, notes, and snippets.

@okwme
Created April 24, 2023 12:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save okwme/f42e725380b995ecf6843c45e7cb607d to your computer and use it in GitHub Desktop.
Save okwme/f42e725380b995ecf6843c45e7cb607d to your computer and use it in GitHub Desktop.
//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