Created
February 24, 2022 18:02
-
-
Save BetterProgramming/f422799c4ed41cc9e55eccbb2aa8afb8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.9; | |
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol"; | |
contract GovernanceToken is ERC20Votes { | |
uint256 public s_maxSupply = 1000000000000000000000000; | |
constructor() ERC20("GovernanceToken", "GT") ERC20Permit("GovernanceToken") { | |
_mint(msg.sender, s_maxSupply); | |
} | |
// The functions below are overrides required by Solidity. | |
function _afterTokenTransfer( | |
address from, | |
address to, | |
uint256 amount | |
) internal override(ERC20Votes) { | |
super._afterTokenTransfer(from, to, amount); | |
} | |
function _mint(address to, uint256 amount) internal override(ERC20Votes) { | |
super._mint(to, amount); | |
} | |
function _burn(address account, uint256 amount) internal override(ERC20Votes) { | |
super._burn(account, amount); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment