-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dee415c
commit 65c6d14
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.23; | ||
|
||
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | ||
|
||
contract NFT is ERC721 { | ||
|
||
uint256 public currentTokenId; | ||
|
||
// The following will create an ERC721 Token called Lisk. | ||
constructor() ERC721("Lisk", "LSK") {} | ||
|
||
// mint function | ||
function mint(address recipient) public payable returns (uint256) { | ||
uint256 newItemId = ++currentTokenId; | ||
_safeMint(recipient, newItemId); | ||
return newItemId; | ||
} | ||
} |