-
Notifications
You must be signed in to change notification settings - Fork 22
/
ERC721NoData.sol
36 lines (30 loc) · 1.23 KB
/
ERC721NoData.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol';
import '@openzeppelin/contracts/utils/Context.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
/**
* Example ERC721 token with mint and burn.
*
* This contract is identical to ERC721WithData, except that there is no way to record
* extra data alongside any of the token operations. While FireFly can still index
* the transactions and balances from this type of ABI, certain features will not be
* available (such as tieing FireFly transactions, messages, and data to a token event).
*
* This is a sample only and NOT a reference implementation.
*/
contract ERC721NoData is Context, Ownable, ERC721, ERC721Burnable {
uint256 private _nextTokenId = 1;
constructor(
string memory name,
string memory symbol
) ERC721(name, symbol) Ownable(msg.sender) {}
function safeMint(address to) public onlyOwner {
uint256 tokenId = _nextTokenId++;
_safeMint(to, tokenId);
}
function _baseURI() internal view virtual override returns (string memory) {
return 'firefly://token/';
}
}