Added events to the role contracts. (#1302)

* Added events to the role contracts.

* Fixed linter error.
This commit is contained in:
Nicolás Venturo
2018-09-07 10:04:52 -03:00
committed by Francisco Giordano
parent 84e63bbf8b
commit 951460696e
5 changed files with 32 additions and 0 deletions

View File

@ -6,6 +6,9 @@ import "../Roles.sol";
contract CapperRole {
using Roles for Roles.Role;
event CapperAdded(address indexed account);
event CapperRemoved(address indexed account);
Roles.Role private cappers;
constructor() public {
@ -23,6 +26,7 @@ contract CapperRole {
function addCapper(address _account) public onlyCapper {
cappers.add(_account);
emit CapperAdded(_account);
}
function renounceCapper() public {
@ -31,5 +35,6 @@ contract CapperRole {
function _removeCapper(address _account) internal {
cappers.remove(_account);
emit CapperRemoved(_account);
}
}