Files
openzeppelin-contracts/contracts/token/ERC20/ERC20Burnable.sol
Nicolás Venturo 89835152ce GSN compatibility (#1880)
* switch to using Context internally

* add context import

* Add smoke test to make sure enabling GSN support works

* Update test/GSN/ERC721GSNRecipientMock.test.js

Co-Authored-By: Francisco Giordano <frangio.1@gmail.com>

* Upgrade truffle

* add missing awaits

* Revert "Upgrade truffle"

This reverts commit f9b0ba9019.
2019-08-15 16:40:34 +02:00

32 lines
874 B
Solidity

pragma solidity ^0.5.2;
import "@openzeppelin/upgrades/contracts/Initializable.sol";
import "../../GSN/Context.sol";
import "./ERC20.sol";
/**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/
contract ERC20Burnable is Initializable, Context, ERC20 {
/**
* @dev Burns a specific amount of tokens.
* @param amount The amount of token to be burned.
*/
function burn(uint256 amount) public {
_burn(_msgSender(), amount);
}
/**
* @dev Burns a specific amount of tokens from the target address and decrements allowance
* @param from address The account whose tokens will be burned.
* @param value uint256 The amount of token to be burned.
*/
function burnFrom(address from, uint256 value) public {
_burnFrom(from, value);
}
uint256[50] private ______gap;
}