Created
February 15, 2024 16:34
-
-
Save Oluwatobilobaoke/150b9c23f1328437e129f66292362176 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.24+commit.e11b9ed9.js&optimize=false&runs=200&gist=
This file contains 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: MIT | |
pragma solidity ^0.8.20; | |
import "@openzeppelin/[email protected]/token/ERC721/ERC721.sol"; | |
import "@openzeppelin/[email protected]/token/ERC721/extensions/ERC721URIStorage.sol"; | |
import "@openzeppelin/[email protected]/token/ERC721/extensions/ERC721Burnable.sol"; | |
import "@openzeppelin/[email protected]/access/Ownable.sol"; | |
contract TbGuys is ERC721, ERC721URIStorage, ERC721Burnable, Ownable { | |
constructor(address initialOwner) | |
ERC721("TbToken", "TBT") | |
Ownable(initialOwner) | |
{} | |
function safeMint(address to, uint256 tokenId, string memory uri) | |
public | |
onlyOwner | |
{ | |
_safeMint(to, tokenId); | |
_setTokenURI(tokenId, uri); | |
} | |
// The following functions are overrides required by Solidity. | |
function tokenURI(uint256 tokenId) | |
public | |
view | |
override(ERC721, ERC721URIStorage) | |
returns (string memory) | |
{ | |
return super.tokenURI(tokenId); | |
} | |
function supportsInterface(bytes4 interfaceId) | |
public | |
view | |
override(ERC721, ERC721URIStorage) | |
returns (bool) | |
{ | |
return super.supportsInterface(interfaceId); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OPEN SEA LINK:
https://testnets.opensea.io/assets/sepolia/0x5d30129024670e4c79dc2851bdf887f3883c8784/22