25 lines
622 B
Solidity
25 lines
622 B
Solidity
// SPDX-License-Identifier: UNLICENSED
|
|
pragma solidity 0.8.28;
|
|
|
|
import {ERC721} from "solmate/tokens/ERC721.sol";
|
|
import {Strings} from "openzeppelin-contracts/utils/Strings.sol";
|
|
|
|
contract NFT is ERC721 {
|
|
uint256 public currentTokenId;
|
|
|
|
constructor(
|
|
string memory _name,
|
|
string memory _symbol
|
|
) ERC721(_name, _symbol) {}
|
|
|
|
function mintTo(address recipient) public payable returns (uint256) {
|
|
uint256 newItemId = ++currentTokenId;
|
|
_safeMint(recipient, newItemId);
|
|
return newItemId;
|
|
}
|
|
|
|
function tokenURI(uint256 id) public view virtual override returns (string memory) {
|
|
return Strings.toString(id);
|
|
}
|
|
}
|