forked from crytic/properties
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExampleToken.sol
40 lines (33 loc) · 1.18 KB
/
ExampleToken.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
37
38
39
40
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract ExampleToken is ERC721, ERC721Enumerable, ERC721Burnable, Pausable, Ownable {
uint256 public counter;
constructor() ERC721("Example token", "EXT") {}
function mint(address to, uint256 amount) public {
for (uint256 i; i < amount; i++) {
_mint(to, counter++);
}
}
// Overrides
function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize)
internal
virtual
override(ERC721, ERC721Enumerable)
{
super._beforeTokenTransfer(from, to, tokenId, batchSize);
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, ERC721Enumerable)
returns (bool)
{
return super.supportsInterface(interfaceId);
}
}