mirror of
git://holbrook.no/erc20-demurrage-token
synced 2024-11-23 08:46:45 +01:00
Add ExpiryChange event
This commit is contained in:
parent
f2648dfb68
commit
8242d3a62f
@ -1,5 +1,6 @@
|
||||
- 0.5.2
|
||||
* Update ERC165 interface response for Expire
|
||||
* Add ExpiryChange event
|
||||
- 0.5.1
|
||||
* Update ERC165 interface responses
|
||||
- 0.5.0
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -116,6 +116,9 @@ contract DemurrageTokenSingleNocap {
|
||||
// Implements Expire
|
||||
event Expired(uint256 _timestamp);
|
||||
|
||||
// Implements Expire
|
||||
event ExpiryChange(uint256 indexed _oldTimestamp, uint256 _newTimestamp);
|
||||
|
||||
event Cap(uint256 indexed _oldCap, uint256 _newCap);
|
||||
|
||||
// Implements Seal
|
||||
@ -180,13 +183,16 @@ contract DemurrageTokenSingleNocap {
|
||||
// Cannot be set to a time in the past.
|
||||
function setExpirePeriod(uint256 _expirePeriod) public {
|
||||
uint256 r;
|
||||
uint256 oldTimestamp;
|
||||
|
||||
require(!isSealed(EXPIRY_STATE));
|
||||
require(!expired);
|
||||
require(msg.sender == owner);
|
||||
r = periodStart + (_expirePeriod * periodDuration);
|
||||
require(r > expires);
|
||||
oldTimestamp = expires;
|
||||
expires = r;
|
||||
emit ExpiryChange(oldTimestamp, expires);
|
||||
}
|
||||
|
||||
// Change max token supply.
|
||||
|
Loading…
Reference in New Issue
Block a user