mirror of openzeppelin-contracts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openzeppelin-contracts/contracts/token/BurnableToken.sol

28 lines
627 B

pragma solidity ^0.4.13;
import './StandardToken.sol';
/**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/
8 years ago
contract BurnableToken is StandardToken {
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of token to be burned.
*/
function burn(uint _value)
public
{
require(_value > 0);
8 years ago
address burner = msg.sender;
balances[burner] = balances[burner].sub(_value);
totalSupply = totalSupply.sub(_value);
Burn(burner, _value);
}
event Burn(address indexed burner, uint256 value);
8 years ago
}