ERC20PresetFixedSupply.sol 987 B

123456789101112131415161718192021222324252627282930
  1. // SPDX-License-Identifier: MIT
  2. // OpenZeppelin Contracts (last updated v4.5.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. * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._
  18. */
  19. contract ERC20PresetFixedSupply is ERC20Burnable {
  20. /**
  21. * @dev Mints `initialSupply` amount of token and transfers them to `owner`.
  22. *
  23. * See {ERC20-constructor}.
  24. */
  25. constructor(string memory name, string memory symbol, uint256 initialSupply, address owner) ERC20(name, symbol) {
  26. _mint(owner, initialSupply);
  27. }
  28. }