diff --git a/python/CHANGELOG b/python/CHANGELOG index 2574ac9..1d4eea7 100644 --- a/python/CHANGELOG +++ b/python/CHANGELOG @@ -1,3 +1,5 @@ +- 0.4.2 + * Correct burn interface implementation - 0.4.1 * Eliminate solidity compiler warnings - 0.4.0 diff --git a/python/setup.cfg b/python/setup.cfg index 8f97fdc..f95b981 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -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 diff --git a/solidity/DemurrageTokenSingleNocap.sol b/solidity/DemurrageTokenSingleNocap.sol index 5aca545..0cb5051 100644 --- a/solidity/DemurrageTokenSingleNocap.sol +++ b/solidity/DemurrageTokenSingleNocap.sol @@ -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