Created
March 11, 2024 15:28
-
-
Save CJ42/06d200124762be30d3cd7b7124fd4ab6 to your computer and use it in GitHub Desktop.
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 | |
// Compatible with OpenZeppelin Contracts ^5.0.0 | |
pragma solidity ^0.8.20; | |
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
contract TimeCapsulez is ERC721, ERC721Burnable, Ownable { | |
constructor( | |
address initialOwner | |
) ERC721("Time Capsulez", "TCZ") Ownable(initialOwner) {} | |
function safeMint(address to, uint256 tokenId) public onlyOwner { | |
_safeMint(to, tokenId); | |
} | |
} | |
// modules | |
import { | |
LSP8IdentifiableDigitalAsset | |
} from "@lukso/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/LSP8IdentifiableDigitalAsset.sol"; | |
import { | |
LSP8Burnable | |
} from "@lukso/lsp-smart-contracts/contracts/LSP8IdentifiableDigitalAsset/extensions/LSP8Burnable.sol"; | |
contract MyNFT is LSP8IdentifiableDigitalAsset, LSP8Burnable { | |
constructor( | |
address initialOwner | |
) | |
LSP8IdentifiableDigitalAsset("Time Capsulez", "TCZ", initialOwner, 2, 0) | |
{} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment