mirror of
git://holbrook.no/erc20-demurrage-token
synced 2024-12-22 03:57:31 +01:00
Fix burn interface implementation
This commit is contained in:
parent
1d93ece13e
commit
f052529935
@ -1,3 +1,5 @@
|
||||
- 0.4.2
|
||||
* Correct burn interface implementation
|
||||
- 0.4.1
|
||||
* Eliminate solidity compiler warnings
|
||||
- 0.4.0
|
||||
|
@ -1,6 +1,6 @@
|
||||
[metadata]
|
||||
name = erc20-demurrage-token
|
||||
version = 0.4.1
|
||||
version = 0.4.2
|
||||
description = ERC20 token with redistributed continual demurrage
|
||||
author = Louis Holbrook
|
||||
author_email = dev@holbrook.no
|
||||
|
@ -668,7 +668,7 @@ contract DemurrageTokenSingleNocap {
|
||||
|
||||
// Explicitly and irretrievably burn tokens
|
||||
// Only token minters can burn tokens
|
||||
function burn(uint256 _value) public {
|
||||
function burn(uint256 _value) public returns (bool) {
|
||||
require(applyExpiry() == 0);
|
||||
require(minter[msg.sender]);
|
||||
require(_value <= account[msg.sender]);
|
||||
@ -678,6 +678,7 @@ contract DemurrageTokenSingleNocap {
|
||||
decreaseBaseBalance(msg.sender, _delta);
|
||||
burned += _value;
|
||||
emit Burn(msg.sender, _value);
|
||||
return true;
|
||||
}
|
||||
|
||||
// Implements ERC20
|
||||
@ -690,6 +691,12 @@ contract DemurrageTokenSingleNocap {
|
||||
return burned;
|
||||
}
|
||||
|
||||
// Return total number of tokens ever minted
|
||||
function totalMinted() public view returns (uint256) {
|
||||
return supply;
|
||||
}
|
||||
|
||||
|
||||
// Implements EIP165
|
||||
function supportsInterface(bytes4 _sum) public pure returns (bool) {
|
||||
if (_sum == 0xc6bb4b70) { // ERC20
|
||||
|
Loading…
Reference in New Issue
Block a user