* 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.
28 lines
681 B
Solidity
28 lines
681 B
Solidity
pragma solidity ^0.5.0;
|
|
|
|
import "../../GSN/Context.sol";
|
|
import "./ERC20.sol";
|
|
|
|
/**
|
|
* @dev Extension of {ERC20} that allows token holders to destroy both their own
|
|
* tokens and those that they have an allowance for, in a way that can be
|
|
* recognized off-chain (via event analysis).
|
|
*/
|
|
contract ERC20Burnable is Context, ERC20 {
|
|
/**
|
|
* @dev Destroys `amount` tokens from the caller.
|
|
*
|
|
* See {ERC20-_burn}.
|
|
*/
|
|
function burn(uint256 amount) public {
|
|
_burn(_msgSender(), amount);
|
|
}
|
|
|
|
/**
|
|
* @dev See {ERC20-_burnFrom}.
|
|
*/
|
|
function burnFrom(address account, uint256 amount) public {
|
|
_burnFrom(account, amount);
|
|
}
|
|
}
|