ERC20PresetFixedSupply.sol 816 B

123456789101112131415161718192021222324252627282930
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.8.0;
  3. import "../token/ERC20/ERC20Burnable.sol";
  4. /**
  5. * @dev {ERC20} token, including:
  6. *
  7. * - Preminted initial supply
  8. * - Ability for holders to burn (destroy) their tokens
  9. * - No access control mechanism (for minting/pausing) and hence no governance
  10. *
  11. * This contract uses {ERC20Burnable} to include burn capabilities - head to
  12. * its documentation for details.
  13. */
  14. contract ERC20PresetFixedSupply is ERC20Burnable {
  15. /**
  16. * @dev Mints `initialSupply` amount of token and transfers them to `owner`.
  17. *
  18. * See {ERC20-constructor}.
  19. */
  20. constructor(
  21. string memory name,
  22. string memory symbol,
  23. uint256 initialSupply,
  24. address owner
  25. ) ERC20(name, symbol) {
  26. _mint(owner, initialSupply);
  27. }
  28. }