BasicERC20.sol 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity 0.8.28;
  3. import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
  4. import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
  5. import { ERC20Burnable } from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
  6. import { ERC20Pausable } from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";
  7. /**
  8. * This file was generated with Openzeppelin Wizard and later modified.
  9. * GO TO: https://wizard.openzeppelin.com/#erc20
  10. */
  11. contract BasicERC20 is ERC20, ERC20Burnable, ERC20Pausable, Ownable {
  12. constructor(
  13. string memory name,
  14. string memory symbol,
  15. address initialOwner
  16. ) ERC20(name, symbol) Ownable(initialOwner) {}
  17. function pause() external onlyOwner {
  18. _pause();
  19. }
  20. function unpause() external onlyOwner {
  21. _unpause();
  22. }
  23. function mint(address to, uint256 amount) external onlyOwner {
  24. _mint(to, amount);
  25. }
  26. function _update(address from, address to, uint256 value) internal override(ERC20, ERC20Pausable) {
  27. super._update(from, to, value);
  28. }
  29. }