ERC20PresetFixedSupply.sol 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  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(
  26. string memory name,
  27. string memory symbol,
  28. uint256 initialSupply,
  29. address owner
  30. ) ERC20(name, symbol) {
  31. _mint(owner, initialSupply);
  32. }
  33. }