Add StandardBurnableToken implementation (#870)

* Add StandardBurnableToken implementation

BurnableToken that extends from StandardToken and adds a
burnFrom method that decrements allowance. Equivalent to
a transferFrom plus burn in a single operation.

* Return event object from expectEvent helper

* Add comment on Approval event in burnFrom function

* Improvements on burnable token tests

- Inject initial balance as a parameter to the behaviour
- Use expectEvent helper for assertions on events
- Use chai bignumber for numbers
- Change to bdd-style assertions
This commit is contained in:
Santiago Palladino
2018-04-11 16:15:33 -03:00
committed by GitHub
parent 9e1c934ffd
commit 0926729c8f
7 changed files with 174 additions and 43 deletions

View File

@ -0,0 +1,13 @@
pragma solidity ^0.4.18;
import "../token/ERC20/StandardBurnableToken.sol";
contract StandardBurnableTokenMock is StandardBurnableToken {
function StandardBurnableTokenMock(address initialAccount, uint initialBalance) public {
balances[initialAccount] = initialBalance;
totalSupply_ = initialBalance;
}
}