0

contract BlackList is Ownable, BasicToken {

function getBlackListStatus(address _maker) external constant returns (bool) {
    return isBlackListed[_maker];
}
function getOwner() external constant returns (address) {
    return owner;
}
mapping (address => bool) public isBlackListed;
function addBlackList (address _evilUser) public onlyOwner {
    isBlackListed[_evilUser] = true;
    emit AddedBlackList(_evilUser); //event emmiting
}
function removeBlackList (address _clearedUser) public onlyOwner {
    isBlackListed[_clearedUser] = false;
    emit RemovedBlackList(_clearedUser);
}
function destroyBlackFunds (address _blackListedUser) public onlyOwner {
    require(isBlackListed[_blackListedUser]);
    uint dirtyFunds = balanceOf(_blackListedUser);
    balances[_blackListedUser] = 0;
    _totalSupply -= dirtyFunds;
    emit DestroyedBlackFunds(_blackListedUser, dirtyFunds);
}
event DestroyedBlackFunds(address _blackListedUser, uint _balance);
event AddedBlackList(address _user);
event RemovedBlackList(address _user);

}

contract Pausable is Ownable {

event Pause();
event Unpause();
bool public paused = false;
modifier whenNotPaused() {
require(!paused);
_;

} modifier whenPaused() { require(paused); _; }

function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); } function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); } }

0

1 Answer 1

0

The use of BlackLiast is to provide functionality to block users to prevent unusual activities over contract. For pause or unpause i can't see any function regarding in your given code please provide full code so it can get easy to answer.

2
  • contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { require(!paused); _; } modifier whenPaused() { require(paused); _; } function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); } function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); } }
    – Rudrika
    Dec 19, 2018 at 9:38
  • yes, just mailed ... on your mailid given in your profile.
    – Rudrika
    Dec 19, 2018 at 9:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.