ERC20PresetFixedSupply.sol 932 B

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