* Now compiling in a separate directory using truffle 5. * Ported to 0.5.1, now compiling using 0.5.1. * test now also compiles using the truffle 5 hack. * Downgraded to 0.5.0. * Sorted scripts. * Cleaned up the compile script a bit.
27 lines
720 B
Solidity
27 lines
720 B
Solidity
pragma solidity ^0.5.0;
|
|
|
|
import "./ERC20.sol";
|
|
|
|
/**
|
|
* @title Burnable Token
|
|
* @dev Token that can be irreversibly burned (destroyed).
|
|
*/
|
|
contract ERC20Burnable is ERC20 {
|
|
/**
|
|
* @dev Burns a specific amount of tokens.
|
|
* @param value The amount of token to be burned.
|
|
*/
|
|
function burn(uint256 value) public {
|
|
_burn(msg.sender, value);
|
|
}
|
|
|
|
/**
|
|
* @dev Burns a specific amount of tokens from the target address and decrements allowance
|
|
* @param from address The address which you want to send tokens from
|
|
* @param value uint256 The amount of token to be burned
|
|
*/
|
|
function burnFrom(address from, uint256 value) public {
|
|
_burnFrom(from, value);
|
|
}
|
|
}
|