-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGovernanceToken.sol
43 lines (36 loc) · 1.12 KB
/
GovernanceToken.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
41
42
43
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
/**
* @dev Only the holder of this ERC20 token can participate in voting process.
*/
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";
contract GovernanceToken is ERC20, ERC20Permit, ERC20Votes {
uint256 public s_maxSupply = 1000000 ether; // 1000000 * 10 ** 18
constructor()
ERC20("GovernanceToken", "GT")
ERC20Permit("GovernanceToken")
{
_mint(msg.sender, s_maxSupply);
}
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal override(ERC20, ERC20Votes) {
super._afterTokenTransfer(from, to, amount);
}
function _mint(
address to,
uint256 amount
) internal override(ERC20, ERC20Votes) {
super._mint(to, amount);
}
function _burn(
address account,
uint256 amount
) internal override(ERC20, ERC20Votes) {
super._burn(account, amount);
}
}