@@ -3,7 +3,6 @@ pragma solidity ^0.4.18;
3
3
import "zeppelin-solidity/contracts/token/ERC827/ERC827Token.sol " ;
4
4
import "zeppelin-solidity/contracts/token/ERC20/StandardToken.sol " ;
5
5
import "zeppelin-solidity/contracts/token/ERC20/MintableToken.sol " ;
6
- import "zeppelin-solidity/contracts/token/ERC20/BurnableToken.sol " ;
7
6
import "zeppelin-solidity/contracts/token/ERC20/PausableToken.sol " ;
8
7
9
8
/**
@@ -12,9 +11,9 @@ import "zeppelin-solidity/contracts/token/ERC20/PausableToken.sol";
12
11
Implementation of Líf, the ERC827 token for Winding Tree, an extension of the
13
12
ERC20 token with extra methods to transfer value and data to execute a call
14
13
on transfer.
15
- Uses OpenZeppelin StandardToken, ERC827Token, BurnableToken, MintableToken and PausableToken.
14
+ Uses OpenZeppelin StandardToken, ERC827Token, MintableToken and PausableToken.
16
15
*/
17
- contract LifToken is StandardToken , ERC827Token , BurnableToken , MintableToken , PausableToken {
16
+ contract LifToken is StandardToken , ERC827Token , MintableToken , PausableToken {
18
17
// Token Name
19
18
string public constant NAME = "Líf " ;
20
19
@@ -30,11 +29,34 @@ contract LifToken is StandardToken, ERC827Token, BurnableToken, MintableToken, P
30
29
* @param _value The amount of tokens to be burned.
31
30
*/
32
31
function burn (uint256 _value ) public whenNotPaused {
33
- super .burn (_value);
32
+
33
+ require (_value <= balances[msg .sender ]);
34
+
35
+ balances[msg .sender ] = balances[msg .sender ].sub (_value);
36
+ totalSupply_ = totalSupply_.sub (_value);
34
37
35
38
// a Transfer event to 0x0 can be useful for observers to keep track of
36
39
// all the Lif by just looking at those events
37
40
Transfer (msg .sender , address (0 ), _value);
38
41
}
39
42
43
+ /**
44
+ * @dev Burns a specific amount of tokens of an address
45
+ * This function can be called only by the owner in the minting process
46
+ *
47
+ * @param _value The amount of tokens to be burned.
48
+ */
49
+ function burn (address burner , uint256 _value ) public onlyOwner {
50
+
51
+ require (! mintingFinished);
52
+
53
+ require (_value <= balances[burner]);
54
+
55
+ balances[burner] = balances[burner].sub (_value);
56
+ totalSupply_ = totalSupply_.sub (_value);
57
+
58
+ // a Transfer event to 0x0 can be useful for observers to keep track of
59
+ // all the Lif by just looking at those events
60
+ Transfer (burner, address (0 ), _value);
61
+ }
40
62
}
0 commit comments