ERC20Burnable.sol 637 B

1234567891011121314151617181920212223242526
  1. pragma solidity ^0.5.0;
  2. import "./ERC20.sol";
  3. /**
  4. * @dev Extension of `ERC20` that allows token holders to destroy both their own
  5. * tokens and those that they have an allowance for, in a way that can be
  6. * recognized off-chain (via event analysis).
  7. */
  8. contract ERC20Burnable is ERC20 {
  9. /**
  10. * @dev Destoys `amount` tokens from the caller.
  11. *
  12. * See `ERC20._burn`.
  13. */
  14. function burn(uint256 amount) public {
  15. _burn(msg.sender, amount);
  16. }
  17. /**
  18. * @dev See `ERC20._burnFrom`.
  19. */
  20. function burnFrom(address account, uint256 amount) public {
  21. _burnFrom(account, amount);
  22. }
  23. }