ERC20PresetFixedSupply.sol 855 B

1234567891011121314151617181920212223242526272829303132
  1. // SPDX-License-Identifier: MIT
  2. pragma solidity ^0.6.2;
  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. * _Available since v3.4._
  15. */
  16. contract ERC20PresetFixedSupply is ERC20Burnable {
  17. /**
  18. * @dev Mints `initialSupply` amount of token and transfers them to `owner`.
  19. *
  20. * See {ERC20-constructor}.
  21. */
  22. constructor(
  23. string memory name,
  24. string memory symbol,
  25. uint256 initialSupply,
  26. address owner
  27. ) public ERC20(name, symbol) {
  28. _mint(owner, initialSupply);
  29. }
  30. }