forked from matter-labs/l2-intro-pre-ethdenver
-
Notifications
You must be signed in to change notification settings - Fork 1
/
zkToken.sol
38 lines (31 loc) · 1.06 KB
/
zkToken.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
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Snapshot.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
contract zkToken is ERC20, ERC20Burnable, ERC20Snapshot, Ownable, Pausable {
constructor() ERC20("zkToken", "ZZZK") {
_mint(msg.sender, 333333333 * 10 ** decimals());
}
function snapshot() public onlyOwner {
_snapshot();
}
function pause() public onlyOwner {
_pause();
}
function unpause() public onlyOwner {
_unpause();
}
function mint(address to, uint256 amount) public onlyOwner {
_mint(to, amount);
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal override(ERC20, ERC20Snapshot) whenNotPaused {
super._beforeTokenTransfer(from, to, amount);
}
}