MyToken.sol 891 B

123456789101112131415161718192021222324
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.2;
  3. import "@openzeppelin/contracts/../token/ERC20/ERC20.sol";
  4. import "@openzeppelin/contracts/../token/ERC20/extensions/ERC20Permit.sol";
  5. import "@openzeppelin/contracts/../token/ERC20/extensions/ERC20Votes.sol";
  6. contract MyToken is ERC20, ERC20Permit, ERC20Votes {
  7. constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}
  8. // The functions below are overrides required by Solidity.
  9. function _afterTokenTransfer(address from, address to, uint256 amount) internal override(ERC20, ERC20Votes) {
  10. super._afterTokenTransfer(from, to, amount);
  11. }
  12. function _mint(address to, uint256 amount) internal override(ERC20, ERC20Votes) {
  13. super._mint(to, amount);
  14. }
  15. function _burn(address account, uint256 amount) internal override(ERC20, ERC20Votes) {
  16. super._burn(account, amount);
  17. }
  18. }