Skip to content

Commit e642ad3

Browse files
authored
governance: fix event (#172)
1 parent 04ca1fe commit e642ad3

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

contracts/Governed.sol

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pragma experimental ABIEncoderV2;
1010
contract Governed {
1111
address public governor;
1212

13-
event GovernanceTransferred(address indexed _from, address indexed _to);
13+
event OwnershipTransferred(address indexed from, address indexed to);
1414

1515
modifier onlyGovernor {
1616
require(msg.sender == governor, "Only Governor can call");
@@ -29,12 +29,9 @@ contract Governed {
2929
* @dev The current `governor` can assign a new `governor`
3030
* @param _newGovernor <address> Address of new `governor`
3131
*/
32-
function transferOwnership(address _newGovernor)
33-
public
34-
onlyGovernor
35-
returns (bool)
36-
{
32+
function transferOwnership(address _newGovernor) public onlyGovernor {
33+
require(_newGovernor != address(0), "New owner is the zero address");
34+
emit OwnershipTransferred(governor, _newGovernor);
3735
governor = _newGovernor;
38-
return true;
3936
}
4037
}

0 commit comments

Comments
 (0)