mirror of
git://holbrook.no/erc20-demurrage-token
synced 2024-11-22 08:16:47 +01:00
Alias writer, emit missing events
This commit is contained in:
parent
edc9b6587c
commit
4e6e5300f7
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -138,7 +138,7 @@ contract DemurrageTokenSingleNocap {
|
|||||||
|
|
||||||
// ACL setup
|
// ACL setup
|
||||||
owner = msg.sender;
|
owner = msg.sender;
|
||||||
minter[owner] = true;
|
// minter[owner] = true;
|
||||||
|
|
||||||
// ERC20 setup
|
// ERC20 setup
|
||||||
name = _name;
|
name = _name;
|
||||||
@ -228,6 +228,9 @@ contract DemurrageTokenSingleNocap {
|
|||||||
minter[_minter] = true;
|
minter[_minter] = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
function addWriter(address _minter) public returns (bool) {
|
||||||
|
return addMinter(_minter);
|
||||||
|
}
|
||||||
|
|
||||||
// Given address will no longer be allowed to call the mintTo() function
|
// Given address will no longer be allowed to call the mintTo() function
|
||||||
function removeMinter(address _minter) public returns (bool) {
|
function removeMinter(address _minter) public returns (bool) {
|
||||||
@ -236,6 +239,9 @@ contract DemurrageTokenSingleNocap {
|
|||||||
minter[_minter] = false;
|
minter[_minter] = false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
function deleteWriter(address _minter) public returns (bool) {
|
||||||
|
return removeMinter(_minter);
|
||||||
|
}
|
||||||
|
|
||||||
/// Implements ERC20
|
/// Implements ERC20
|
||||||
function balanceOf(address _account) public view returns (uint256) {
|
function balanceOf(address _account) public view returns (uint256) {
|
||||||
@ -299,6 +305,7 @@ contract DemurrageTokenSingleNocap {
|
|||||||
|
|
||||||
require(applyExpiry() == 0);
|
require(applyExpiry() == 0);
|
||||||
require(minter[msg.sender], 'ERR_ACCESS');
|
require(minter[msg.sender], 'ERR_ACCESS');
|
||||||
|
|
||||||
changePeriod();
|
changePeriod();
|
||||||
if (maxSupply > 0) {
|
if (maxSupply > 0) {
|
||||||
require(supply + _amount <= maxSupply);
|
require(supply + _amount <= maxSupply);
|
||||||
|
Loading…
Reference in New Issue
Block a user