Alias writer, emit missing events

This commit is contained in:
lash 2023-02-12 08:17:58 +00:00
parent edc9b6587c
commit 4e6e5300f7
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
3 changed files with 11 additions and 4 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -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,7 +305,8 @@ 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);
} }